Apparently, putting tstream->discardOffChannel = ANTLR3_FALSE; into the driver program solves the issue with the hidden tokens not showing up in $text->chars. However, I think it will be better to keep the defaults same with the other runtimes.
2008/10/26 Buğra Gedik <[EMAIL PROTECTED]> > Adding the line "LEXSTATE->tokenStartCharIndex += $text->size -1;" after > the SKIP() fixes the SKIP bug. > But then, the behavior of SKIP and $channel=HIDDEN become the same with > respect to my original problem, that is when I print the rule text using > $text->chars, I do not get the hidden or skipped tokens. This seems to be > the expected behavior with skip() in Java runtime. However, with > $channel=hidden in Java runtime, I get the hidden chars in the text of the > rule, using $text, which is inconsistent with the C runtime. > > Cheers, > -bugra > > > > On Sun, Oct 26, 2008 at 8:52 PM, Buğra Gedik <[EMAIL PROTECTED]> wrote: > >> Hi (Jim), >> With the C runtime when using $channel=HIDDEN the hidden tokens DO NOT >> appear when printing a rule with $text->chars, whereas with the Java runtime >> they appear (which I assume is the expected behaviour). The problem can be >> solved by using SKIP() instead with the C runtime, but the SKIP function has >> a bug (I saw it the official list of bugs), it messes up the next token >> (includes the spaces). >> >> I'm using 3.1 (not 3.1.1). Any plans on fixing these? Or, are they fixed >> in 3.1.1? >> >> Cheers, >> -bugra >> >> > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address
