Chapter 4. Compiling Cetus

The following tools are useful to compile Cetus. You do not need them to use Cetus if you have a Cetus JAR file, although it is normally more useful for compiler writers to modify Cetus.

The following tools are useful to compile separate parsers. You do not need them if you have binaries.

  • A good C++ compiler. GCC 3.2 or later is recommended strongly, because pre-3.0 versions of GCC do not deal with some C++ code correctly (such as templates). GCC "2.96" (a.k.a. RedHat GCC) particularly should never be used.

  • GNU Bison 1.875a or later. yacc will not work because the C++ parser relies on the new GLR features of Bison.

  • GNU Flex 2.5 or later. Earlier versions of flex or lex may work but have not been tested.

Makefile in the cetus directory controls compilation of Cetus IR. Users need to pass the location of the antlr.jar file as a parameter to the make command: make antlr=(location of antlr.jar)