Validation of non-null enum rule [message #1706866] |
Mon, 31 August 2015 10:19  |
Eclipse User |
|
|
|
Hi,
I have a Grammar which includes an enum zero-based value, which i want to validate for non-null.
Lets say my grammar has rules like:
Parent:
'parent' name=ID '{'
'period-age' period=Period
'age' age=INT
'}'
enum Period:
FIRST='1Part' | SECOND='2Part' | LAST='3Part';
I Want to validate if i don't receive the enum-value (Period), which means it is null.
How can i do it?
Note: This is important because I also have rules which the enum-based value is optional (and will then pass the parser but i will want to check them in the validation step)
|
|
|
|
Powered by
FUDForum. Page generated in 0.02753 seconds