[antlr-interest] Re: C Grammar Build

Stuart Harker escher-solutions at shaw.ca
Thu Nov 20 21:29:57 PST 2003


Thanks Arnar,

The fix seems to work. Since the changes are in the *.g files, 
wouldn't others have this problem with their builds also? Comments?

I noticed that the C grammar files are dated 1997.  Is this grammar 
still compatible with antlr 2.7.2 ?

Stu Harker




--- In antlr-interest at yahoogroups.com, "Arnar Birgisson" 
<arnarb at o...> wrote:
> Hello Stu,
> 
> I don't know if the Java-specs have changed, but importing a class
> that's already in the same package as the importing file is not
> neccessary. The import statement thus only makes sense if it's 
argument
> contains a dot, ".".
> 
> Maybe this was legal in older java-compilers, but you should be 
able
> just to comment out this line, the class CToken is in the same 
directory
> as TNode so it should be visible without any import.
> 
> Arnar
> 
> > -----Original Message-----
> > From: escher_solutions2003 [mailto:escher-solutions at s...] 
> > Sent: 20. nóvember 2003 07:18
> > To: antlr-interest at yahoogroups.com
> > Subject: [antlr-interest] C Grammar Build - Warning Java Newbie
> > 
> > 
> > Hi All,
> > 
> > I am new to antlr after working with bison/flex. I have limmited 
> > exposure to Java but have an OOP/C++ bankground.
> > 
> > I am trying to build the Gnu C grammars and I am getting the 
> > following compile error during the build.
> > 
> > > javac -classpath .;c:\antlr-2.7.2\antlr.jar TNode.java
> > TNode.java:9: '.' expected
> > import CToken;
> >              ^
> > 1 error
> > 
> > Why is the "import CToken;" statement causing an error? Note my 
> > classpath commandline settings contains the current directory.
> > 
> > Any suggestions?
> > 
> > Thanks
> > 
> > Stu Harker
> > 
> > 
> >  
> > 
> > Your use of Yahoo! Groups is subject to 
> > http://docs.yahoo.com/info/terms/ 
> > 
> >


 

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




More information about the antlr-interest mailing list