Peter: I surmise from this that your main test routine is trying to call g.ML_COMMENT, when it should be calling the top level (starting) lexer rule method:
g.code(); -- Graham At 10/25/2009 01:03 AM, Peter Boughton wrote: >Thanks John, but this doesn't appear to be working. >(I'm using antlr 3.2 with antlrworks 1.3) > >I tried it both as provided and with changing the comment start/end >characters, and both of these give the same error in the generated >Java code: > > C:\tmp\antlr\__Test__.java:14: cannot find symbol > symbol : method ML_COMMENT() > location: class cfml_comment_testParser > g.ML_COMMENT(); > ^ > 1 error > >I'm testing this with a very basic set of rules at the moment: > > grammar cfml_comment_test; > > ML_COMMENT : NESTED_COMMENTARY { $channel=HIDDEN; } ; > > fragment NESTED_COMMENTARY : > '<!---' > ( options {greedy=false;} : . )* > ( NESTED_COMMENTARY ( options {greedy=false;} : . )* )* > '--->' > ; > > WS : ( ' ' | '\t' | '\n' | '\r' ) {$channel=HIDDEN;} ; > > TEXT: ~'<' ; > > code: ( ML_COMMENT | WS | TEXT )+; 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 il-antlr-interest@googlegroups.com To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---