[antlr-interest] How to force a TreeWalker to match exactly?

Terence Parr parrt at cs.usfca.edu
Mon Mar 20 11:06:22 PST 2006

On Mar 20, 2006, at 10:43 AM, Koehne Kai wrote:
> "An important thing to remember when specifying tree patterns and  
> tree grammars in general is that sufficient matches are done not  
> exact matches. As long as the tree satistfies the pattern, a match  
> is reported, regardless of how much is left unparsed."
> This can be very annoying! If there is an inconsistency between the  
> Parser and the TreeWalker grammar, there is very little chance to  
> detect it. Instead, unknown nodes are sometimes silently ignored.  
> Is there a way to turn off this feature? How do you ensure that the  
> TreeWalker grammars really correspond to the AST generated by the  
> parser?

The funny part is that v3 enforces this strictly, but now I'm trying  
to find out how to turn off for quick filtering!  ;)


More information about the antlr-interest mailing list