[antlr-interest] The filter option
Wincent Colaiuta
win at wincent.com
Mon Aug 6 02:28:23 PDT 2007
El 3/8/2007, a las 1:30, Marcos Marín escribió:
> On 8/2/07, Jim Idle <jimi at temporal-wave.com> wrote:
>>
>> As the last rule in your lexer you could use:
>>
>>
>>
>> ANY : . { $channel = HIDDEN; }
>>
>
>
> Actually, after testing more this does not work, it no longer
> complains
> about curly braces but it does complain about anything else that is
> not one
> of my rules. My guess is it does not complain about curly braces
> and it does
> of other things because curly braces is only one char, so I tried
> ANY: .+
> {$channel = HIDDEN;} ; but it gave me a warning of the rule being
> unreachable.
>
> I'm going to try creating a standalone lexer and parser.
For reference, this has come up in the past. In my opinion this is a
bug in ANTLR, so I sent in a patch for this back in June but nobody
replied:
http://www.antlr.org/pipermail/antlr-interest/2007-June/021243.html
Cheers,
Wincent
More information about the antlr-interest
mailing list