[antlr-interest] Antlr3 b.5 treeparser problem - misplaced action
Shmuel Siegel
ssiegel at finjan.com
Wed Jan 3 08:39:53 PST 2007
I wrote the following pattern
^(e=entity{value=$e} X?)
Antlr produced the following logic
e=entity();
if( input.LA(1) == Token.DOWN){
match(input Token.DOWN, null);
value = e;.
......
match(input Token.UP, null);
}
In other words, Antlr was perfectly willing to deal with the possibility
that no X means no tree. But the action was only done if there was a
tree.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070103/0edfcfef/attachment-0001.html
More information about the antlr-interest
mailing list