|Re: New to Xtext Grammar help [message #967623 is a reply to message #967161]
||Thu, 01 November 2012 22:34
| Sebastian Zarnekow
Registered: July 2009
Am 01.11.12 15:42, schrieb Adam Chase:|
> PsetFieldArray: ('[' fields+=PsetField ']')
> | ('[' (fields+=PsetField ',')+ fields+=PsetField ']')
this one looks overly complicated to me. Even though it's not exactly
ambiguous, I suggest to rewrite the rule to the simpler variant
PsetFieldArray: '[' fields+=PsetField (',' fields+=PsetField)* ']';
You used the same pattern for PsetFlags and StringArray. I'd rewrite
There are other issues, e.g. you use a boolean assignement
fieldArray?=PsetFieldArray which will pretty much discard the rhs of the
assignment. These deserve a clean-up, too.
I hope these tips help.
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com
Powered by FUDForum
. Page generated in 0.01641 seconds