I am trying to learn ANTLR. I tried to invoke ANTLR v3.3 from
command line (java -cp antlr-3.3-complete.jar org.antlr.Tool T.g) on
the T.g, and found the following error message:
error(10): internal error: Exception T.g:5:64: unexpected char:
'e'@org.antlr.grammar.v2.ANTLRLexer.nextToken(ANTLRLexer.java:346):
unexpected stream error from parsing T.g
When I open T.g in AntlrWorks 1.4.2 and select any rule I get the following
error message:
Cannot display rule "X" because start state not found
However, the content of T.g is taken from page 29 of the book "The
Definite ANTLR Reference: Building Domain specific Languages, by Terence
Parr, 2007". T.g simply contains the following:
grammar T;
/** Match things like "call foo;" */
r : 'call' ID ';' {System.out.println("invoke "+$ID.text);} ;
ID: 'a'..'z'+ ;
WS: (' '|'\n'|'\r')+ {$channel=HIDDEN;} ; // ignore whitespace
My Question is, how can I resolve this issue, and what is start state?
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.