[antlr-interest] Antlr v3.3/3.4 documentation hurdles

Ramanand Mandayam ramanand_mandayam at yahoo.com
Wed Aug 24 13:36:32 PDT 2011


I have been using Antlr (and PCCTS before that) for a long time and am very happy with it. However of late I am having difficulties getting information about more recent changes specifically v3.4 released in July. I believe it would help if documentation were easier to get to in a meaningful way. 

(Sorry Terr, I am ***not*** taking a pot shot at you here)



I am not sure if it is just me or others too but I am finding it very difficult to find the root cause of many errors based on the feedback from running the tool. Attempts to navigate online documentation (FAQs, V3 documentation, etc.) all lead to web sites that were apparently last updated in 2008 or 2009 and bear little information for me to understand why my grammar (or my compiler generation command) is generating errors such as:

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

when in fact I am not creating any ASTs (I am using option = template). 


In addition, the same grammar when checked with Antlrworks generates an error about left factoring a rule "Tokens" which I struggled to find out was an "implicit" rule for the lexer. However I do not see any obvious culprits and the line number provided by the tool is line 1 which is the first line in my grammar file.
Any suggestions, pointers, or clues where to look to? I have Terr's book but that only matches v 2.7.

Cheers

Ramanand


More information about the antlr-interest mailing list