[antlr-interest] 2.7.1 -> 2.7.2 gotcha's?

kkvilekval kkvilekval at yahoo.com
Tue Aug 5 11:46:22 PDT 2003


I've had alot of trouble  going from 2.7.1 to 2.7.2

I've found two problems
1.  The grammar file now must specify fully qualified
    names for AST contruction
    i.e.
     Previously we have production rules
    <AST=IdentifierAST>
 
     We must now use
     <AST=mokan.compiler.expr.IdentifierAST>
 
     since the class value is passed as string to
     the constructor function.
 
2.   AST nodes must have public constructors
     otherwise the reflection contructor cannot
     find it in the class file.
 
      Make sure all your AST nodes have
      i.e.
      2.7.1
      protected VarAST(final Token token)
      2.7.2
      public VarAST(final Token token)


Finally, the tree seems to be constructed differently.
A previously working translator now fails completely
with type cast errors, during the tree-walk.


Is there a document describing what has changed and
how to fix these problems???

Thx.





 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list