[antlr-interest] rebuilding antlr 3.1.1 with ant

Carter Cheng carter_cheng at yahoo.com
Sun Feb 8 11:53:16 PST 2009


I tried making a slight correction to one of the templates for tree parser building in the C directory to hopefully fix the problem I was having w.r.t. the tree parser not compiling under g++ by changing the line:

retval.tree = ADAPTOR->rulePostProcessing(ADAPTOR, root_0);

to

retval.tree = (<ASTLabelType>)ADAPTOR->rulePostProcessing(ADAPTOR, root_0);

I was hoping to test this change by rebuilding antlr 3.1.1 using ant build from the top level directory but keep getting the following error message:

/home/cwcheng/antlr-3.1.1/build.xml:111: The following error occurred while executing this line:
/home/cwcheng/antlr-3.1.1/build.xml:55: Problem: failed to create task or type antlr
Cause: the class org.apache.tools.ant.taskdefs.optional.ANTLR was not found.
        This looks like one of Ant's optional components.
Action: Check that the appropriate optional JAR exists in
        -/usr/share/ant/lib
        -/home/cwcheng/.ant/lib
        -a directory added on the command line with the -lib argument


>From the web resources I am uncertain which .jar file to insert into this directory. I tried putting the antlr.3.1.1.jar renamed as antlr.jar but this does not seem to correct the problem. Any advice on this would be appreciated.

Thanks,

Carter.  


      


More information about the antlr-interest mailing list