[antlr-interest] Forcing action into DFA
Patrick Hulsmeijer
phulsmeijer at xebic.com
Fri Apr 18 03:16:30 PDT 2008
All,
Is there a way to force an action into the prediction DFA although the
alternatives are not ambiguous? An semantic predicate wouldn't work
because it will not be hoisted into the DFA. I want to execute an action
before the alternatives of a rule get evaluated.
E.g.:
rule:
: TOKEN
| HIDDENTOKEN
;
The HIDDENTOKEN is on a channel that is not visible to the parser but
will be switched to a channel that is, by an action. To make this work
with DFA prediction I need to execute the action that will make
HIDDENTOKEN visible before the alternatives are looked at. How can I
make this happen?
Gr, patrick.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080418/a0aa4732/attachment.html
More information about the antlr-interest
mailing list