[antlr-interest] How to look only for one rule?

Terence Parr parrt at cs.usfca.edu
Sat Oct 21 09:41:47 PDT 2006


Hi.  See the filter example, which does it all in the lexer.  Have a

EVERYTHINGELSE : . ;

rule at bottom to skip everything but your rules of interest.
Ter
On Oct 21, 2006, at 4:54 AM, Matthias Gutheil wrote:

> Hello,
>
> I am writing a fuzzy C grammar and I am only interesting in methods  
> with parameters and return values.
>
> The method definition is not the problem, but I want to skip  
> anything else.
> For example something like (method | ~method) doesn't work, cause  
> so the first token af a real method (return type or name) goes in  
> ~method.
>
> Some tips?
>
> Matthias



More information about the antlr-interest mailing list