[antlr-interest] The filter option

Marcos Marín marcosmarin at gmail.com
Thu Aug 2 14:34:10 PDT 2007


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; }
>

Thanks Jim, this worked perfectly :)

Thanks also to Gavin and Martin.


Which preserves the text but the parser won't see it. You can also use
> skip(); (Java target, I think).
>
>
>
> Jim
>
>
>
> *From:* Marcos Marín [mailto:marcosmarin at gmail.com]
> *Sent:* Thursday, August 02, 2007 1:24 PM
> *To:* Jim Idle
> *Cc:* antlr-interest at antlr.org
> *Subject:* Re: [antlr-interest] The filter option
>
>
>
>
>
> On 8/2/07, *Jim Idle* <jimi at temporal-wave.com> wrote:
>
> You are probably missing something but were you trying to use a filtering
> lexer with a parser? A filtering lexer is currently stand alone.
>
>
> So you mean that I can't use a parser if I specify the filter option? if
> this is the case, is there any way I can ignore everything else without the
> filter option?
>
> I'm sorry, this is all very new and confusing to me.
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070802/1d0a1b40/attachment.html 


More information about the antlr-interest mailing list