[antlr-interest] Re: Making the C grammar in cgram.tgz
edcjones <edcjones at yahoo.com>
edcjones at yahoo.com
Fri Feb 7 08:35:39 PST 2003
I fixed my problem by creating a directory "grammars/ctoken" and
moving "CToken.java" to it. Also moved "LineObject.java" to
"grammars/lineobject". I added package stuff to a number of files and
edited "Makefile". But I still wonder: Why didn't the original code work?
--- In antlr-interest at yahoogroups.com, "edcjones <edcjones at y...>"
<edcjones at y...> wrote:
> I have installed Blackdown Java Version 1.4.1-beta (based on Sun's
> 1.4.1-pre-rc-b17) and antlr-2.7.2 on my Gentoo Linux PC.
>
> In the antlr resources, there is a grammar for C in a file
> "cgram.tgz". I have set the classpath to
>
> /usr/local/src/antlr-2.7.2:../grammars:../examples:.
>
> I am having trouble getting cgram to compile. I cd to "grammars" and
> do "make". I get the error message:
>
> javac StdCParser.java
> ../grammars/TNode.java:9: '.' expected
> import CToken;
> ^
> 1 error
> make: *** [StdCParser.class] Error 1
>
> Could this problem be caused by changes in Java or ANTLR since cgram
> was written? Is this version of Java compatible with antlr-2.7.2? How
> should I handle CLASSPATH? Is there some sort of package name problem?
> Or what?
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list