[antlr-interest] Unreachable production
andrei.majidian at bt.com
andrei.majidian at bt.com
Sun Mar 30 14:02:47 PDT 2008
Hi
I am trying the Interpreter for the following grammar Name.g
_____________________________________________
grammar Name;
start: wordList ;
wordList: '[' Name (',' Name)* ']';
Name: ID | QW;
ID: ('a'..'z'|'A'..'Z')+ ;
QW: '"' ('a'..'z'|'A'..'Z') (' '|'a'..'z'|'A'..'Z')*
('a'..'z'|'A'..'Z') '"';
WS: (' '|'\t' |'\r'|'\n')+ {skip();} ;
____________________________________________________
With the following input:
["wild animal", "friendly", timid]
It gave me the following Warning in the console
"[21:52:57] warning(208): Name.g:10:1: The following token definitions
are unreachable: ID,QW
[21:52:57] Interpreting..."
What does this mean? The parse-tree is correctly produced. I don't
understand the warning.
Thanks
Andrei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080330/aa48b933/attachment.html
More information about the antlr-interest
mailing list