[antlr-interest] Occasionally match hidden channel

Nicolas Wu zenzike at gmail.com
Thu Dec 18 10:13:48 PST 2008


To make things worse, sometimes I want to make sure that there is
definitely no SLASHSLASH between elements.

I know it sounds like it should just be an ordinary token, but it isn't,
since there are only two specific places in the grammar where
these funny requirements crop up. The rest of the time,
SLASHSLASH is invisible.

Thanks again,

zenzike

On Thu, Dec 18, 2008 at 6:04 PM, Zenzike <zenzike at gmail.com> wrote:
> I'm trying to make it so that input only occasionally matches tokens
> that are sent to the hidden channel.
> My grammar has something along the following:
>
> SLASHSLASH : '\\\\' {$channel=HIDDEN};     // For the symbols "\\"


More information about the antlr-interest mailing list