Hi,
This looks like a bug (version 3.1.1), can anyone please confirm?
Here is an edited version of T.g (from the antlr book):
{---------start of file -----
grammar T;
/*
// ASSIGN='='
*/
/** Match things like "call foo;" */
r : 'call' ID ';' {System.out.println("invoke "+$ID.text);} ;
ID: 'a'..'z' + ;
WS: (' ' |'\n' |'\r' )+ {$channel=HIDDEN;} ; // ignore whitespace
---------end of file-----}
Here, the only extra lines I have added are the comments.
Here is the error I get when I run antlr:
ANTLR Parser Generator Version 3.1.1
error(10): internal error: Exception T.g:3:9: expecting '*', found
'N'@org.antlr.tool.ANTLRLexer.nextToken(ANTLRLexer.java:333): unexpected stream
error from parsing T.g
error(150): grammar file T.g has no rules
error(100): T.g:0:0: syntax error: assign.types: <AST>:1:9: unexpected AST
node: T
error(100): T.g:0:0: syntax error: define: <AST>:1:9: unexpected AST node: T
This happens with both kinds of comments: "//" as well as "/*...*/"
Best Regards
Raj
--~--~---------~--~----~------------~-------~--~----~
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