[antlr-interest] didn't manage to compile under gcj

Terence Parr parrt at cs.usfca.edu
Sat Jul 5 17:10:32 PDT 2003


Wow.. GCJ has gotten much better...yeah I got really weird errors that 
just don't make sense.  Try running it as ASTFrame is not really 
needed.  Let us know if you can run antlr on a simple grammar file. :)

Thanks,
Terence

On Saturday, July 5, 2003, at 04:57  PM, paul taney wrote:

>
> Aha!
>
> After casting all ASTNULLs with
>
>     (antlr.collections.AST)ASTNULL
>
> there's only one error showing:
>
>     antlr/debug/misc/ASTFrame.java:0: bad class index
> 0
>
> But I don't get that one...
> paul
>
>
> --- paul taney <paultaney at yahoo.com> wrote:
>>
>> --- Terence Parr <parrt at cs.usfca.edu> wrote:
>>> Does GCJ actually work these days?  It wouldn't
>> even
>>> come close to
>>> compiling let alone running ANTLR when I checked
>>> months ago.
>>>
>>
>> I'm running on RedHat with 2.4.7-10 kernal.
>>
>> $ gcj --version
>> 2.96
>>
>> This is what I did to try to use gjc:
>>
>> I think what it wants in the CLASSPATH is
>> gcc-3.3/libjava  and
>> gcc-3.3/build/i686-pc-linux-gnu/libjava
>>
>> so I added to .bashrc
>> export GCJ=/usr/local/gcc/gcc-3.3/libjava:\
>>
> /usr/local/gcc/gcc-3.3/build/i686-pc-linux-gnu/libjava
>> export CLASSPATHGNU=$GCJ:$CLASSPATH:.
>>
>> $ source .bashrc
>>
>> Then try to compile some things in
>> $ cd antlr-2.7.2/examples/java/java:
>>
>> $ gcj --classpath $CLASSPATHGNU \
>>     JavaLexer.java \
>>     JavaRecognizer.java \
>>     JavaTokenTypes.java \
>>     JavaTreeParser.java \
>>     JavaTreeParserTokenTypes.java \
>>     Main.java
>>
>> this is what I get:
>>
>> JavaTreeParser.java: In class `JavaTreeParser':
>> JavaTreeParser.java: In method
>> `compilationUnit(antlr.collections.AST)':
>> JavaTreeParser.java:34: Incompatible type \
>> for `='. Explicit cast needed to convert
>> `antlr.ASTNULLType' to `antlr.collections.AST'.
>> 			if (_t==null) _t=ASTNULL;
>>                                         ^
>> JavaTreeParser.java:58: Incompatible type \
>> for `='. Explicit cast needed to convert
>> `antlr.ASTNULLType' to `antlr.collections.AST'.
>> 				if (_t==null) _t=ASTNULL;
>>
>> <snip>
>>
>> and 50 more such messages.
>>
>> I don't know what it means.  If you suggest
>> a fix I'll try it.
>>
>> paul
>>
>>
>>
>> __________________________________
>> Do you Yahoo!?
>> SBC Yahoo! DSL - Now only $29.95 per month!
>> http://sbc.yahoo.com
>>
>>
>>
>> Your use of Yahoo! Groups is subject to
>> http://docs.yahoo.com/info/terms/
>>
>>
>
>
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
>
>
>
> Your use of Yahoo! Groups is subject to 
> http://docs.yahoo.com/info/terms/
>
>
>
--
Professor Comp. Sci., University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Co-founder, http://www.jguru.com
Co-founder, http://www.knowspam.net enjoy email again!
Co-founder, http://www.peerscope.com link sharing, pure-n-simple




 

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




More information about the antlr-interest mailing list