Hey Jim,
>> - The ability to have actions on the right side of an ast re-write
>> operator.
>
> r: ( alt -> ^(X alt) ) {action} ;
Thanks, I don't recall seeing this anywhere else.
Do you use it often? Or is a bad form?
>> - A different rule @init that only executes during when not
>> backtracking.
>>
>> - The ability to detect / work with an empty scope.
>> Currently attempts to access an empty scope throws a stack exception
>> (in Java)
>
> That's deliberate as it means you have your scope in the wrong place.
> Getting to an empty scope is a bug in your grammar and you need it to
> abort straight away so that you know how you got there.
The fact that I ran into this is may just be a newbee mistake.
I currently have a walker that does multiple things depending on how
it is called.
The start rule differs inside my application.
I solved the stack exceptions, by redesigning the grammars or using
share global scope.
I'm not sure what my grammars would have ended up looking like if I
could have tested the validity of a scope.
Probably a mute point.
Regards
Gary
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en.