[email protected] wrote: > I looked at ANTLRStringStreams consume() method and noticed that it > checks for a '\n'. In the current grammar I'm skip()ing newlines, > instead of placing them on a hidden channel. > > I made the following modification to the grammar in ANTLRWorks which > promptly broke the compiler. > fragment NEWLINE : '\n' '\r'? {$channel=HIDDEN;}; > fragment WS : ('\n'|'\r'|'\t'|' ')+ {$channel=HIDDEN;}; > > The error message is "cannot find symbol : variable _channel".
That's quite strange; I'm using $channel = HIDDEN in ANTLRWorks (version 1.2.3) with no problems. Could something be wrong with your ANTLR/ANTLRWorks installation? Can you reduce the grammar to the minimum necessary to reproduce the above error message, and post it here? -- David-Sarah Hopwood ⚥ http://davidsarah.livejournal.com 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 -~----------~----~----~----~------~----~------~--~---
