I'll give it a try, but we're actually trying to do this:
YYY && ! ('a' | 'b' | ZZZ) | 'something else'
So shouldn't this be the syntax?
XXX: YYY ('a' | 'b' | ZZZ) <reject>
| 'something' 'else'
YYY: 'some string'
ZZZ: 'ww' | 'xx' | 'yy' | 'zz'
I'm not really sure if this is valid but I'll give it a try for now.
It's pretty confusing actually, because another Production I'd like to write is:
NonTerminator: SourceCharacter but not LineTerminator
So this is my first attempt:
NonTerminator: SourceCharacter |
SourceCharacter LineTerminator <reject>
Anyone think this is correct? or is it:
NonTerminator: SourceCharacter LineTerminator <reject>
somehow I do not think the second one is correct...
Does the <reject> apply to the entire line or just the item that it follows? |