My grammar defines whitespace as:
Whitespace : ( '\t' | ' ' | '\r' | '\n' )+ { $channel = HIDDEN; }
;
Do you know how I can access tokens on the hidden channel in C? I also
generate Java parser from the same grammer and the whitespace tokens
are available there.
Thanks,
Andy.
On Apr 12, 2009, at 10:45 AM, Kay Röpke wrote:
>
> On Apr 12, 2009, at 5:13 PM, Andy Grove wrote:
>
>> Could you give me some pointers on how to get a version of the token
>> stream including whitespace?
>
> are you by any chance discarding the whitespace tokens (and not only
> placing them on a different channel)?
> iirc the vector you get by calling getTokens() is the internal one.
>
> i distinctly remember seeing "hidden" tokens in there just a few
> hours ago.
>
> cheers,
> -k
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---