To have ANTLR output C code, you need only change the `options = Java` to `options = C`. Once you've got your outputted C code, you'll need to compile it with the appropriate ANTLR header files and link it with the appropriate ANTLR runtime library.
So, grab the source code: http://www.antlr.org/wiki/display/ANTLR3/Using+the+ANTLR3+C+Target#UsingtheANTLR3CTarget-FindingtheSourceCode And build it: http://www.antlr.org/wiki/display/ANTLR3/Using+the+ANTLR3+C+Target#UsingtheANTLR3CTarget-BuildinginUNIXStyleEnvironments And use your compiler of choice to compile the ANTLR code. The guide above has instructions to install the library and headers in a location where your compiler might be aware of them (I usually abstain from this as I only allow my package manager to be in charge of anything outside of my home on *nix). If you do not install the headers and library in a place where your compiler is aware of them, do not forget to use whatever flags your compiler makes available to supply it with the location of the header files and libraries. I personally use Arch Linux, and a package for the ANTLR C runtime is available (see https://aur.archlinux.org/packages.php?ID=42227). Check to see if your distribution of whatever *nix you're on has packages available for you. -- Parsiad Azimzadeh http://sfu.ca/~paa4 List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
