[antlr-interest] ANTLR and GCC

goughroger goughroger at hotmail.com
Tue Aug 19 02:52:33 PDT 2003

Hi All,

I am new to ANTLR and I wish to use it with GCC. I have modified the 
backend of GCC compiler to recognise a new architecure which I am 
modelling. I am trying to use ANTLR as a front-end. Is this possible? 
I have written a basic grammar file containing a lexer and parser. I 
am able to compile this with the commands

java antlr.Tool myGrammarFile.g
javac *.java
main    //main is the class name

The last command does not work, i.e no output is produced. (The 
classpath options are set correctly) Should the output be an AST? Am 
i right in thinking that the antlr can output C functions and if so, 
how? Can ANTLR output assembly language?

Maybe I should post this on gcc.gnu.org mailing list but I hope 
somebody on this list may be able to help me. Any ideas/suggestions 
greatly appreciated.

Kind Regards


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

More information about the antlr-interest mailing list