SableCC Example

The code in this directory illustrates working with SableCC to create a simple expression evaluator (and printer). The elements:

To build, save all the files to a directory, download sablecc-3.7.jar (or later), and type

        java -jar sablecc.jar exp.grammar
        javac Echo.java
        javac Eval.java
The first step creates various subdirectories; these are used to implement Echo and Eval. Once the programs are compiled, you can execute them by typing
        java Echo exp1
        java Eval exp1

An alternative build method is to use the makefile:

        make
        make clean

Notes about SableCC

Miscellaneous things I've worked out about SableCC from doing this example: