[antlr-interest] executing actions during backtrack

Micheal J open.zone at virgin.net
Wed May 10 04:30:13 PDT 2006


Ter,

> Anybody have a suggestion?  We have named actions now, perhaps  
> instead of @init{...} or plain {...} we do @guessing{...} or 
> something?

Depends on the number of time that a... say @guessing{..} ...block might
execute. I'm thinking here of nested rules that independently trigger
backtracking (this was possible in ANTLR2). Would the @guessing action block
always run?

If these blocks can be executed more than once while backtracking, it is
probably best to simply document the fact that the backtracking attribute
can be used to check action execution context (and backtracking nesting
depth?). We should also include example(s) in the docs of how that might be
used to control action execution effectively.

Oh, "@guessing" sounds as good as any... ;-)


Cheers,

Micheal



More information about the antlr-interest mailing list