|
Re: New to Xtext Grammar help [message #967623 is a reply to message #967161] |
Thu, 01 November 2012 22:34 |
Sebastian Zarnekow Messages: 3118 Registered: July 2009 |
Senior Member |
|
|
Am 01.11.12 15:42, schrieb Adam Chase:
> PsetFieldArray: ('[' fields+=PsetField ']')
> | ('[' (fields+=PsetField ',')+ fields+=PsetField ']')
> ;
Hi Adam,
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
those, too.
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.
Best regards,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com
|
|
|
|
Powered by
FUDForum. Page generated in 0.03039 seconds