On Wed, Aug 24, 2011 at 4:36 PM, Ramanand Mandayam <
[email protected]> wrote:

>
> error(10):  internal error: GTgrammar.g : java.lang.ClassCastException:
> org.antlr.runtime.tree.CommonTree cannot be cast to
> org.antlr.tool.GrammarAST



I just stumbled upon a simple way to create this error.


Grammar Demo;
Name : 'a' |'b' | 'c';

The problem is that Name is a lexer rule because it starts with a capitol
letter. There are no parser rules which start with a lower case letter. Just
change 'Name' to 'name".

Eric

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.

Reply via email to