This directory is a model for one that could be used with java_cup
and JLex (the Princeton Java Parser Generator).  Probably the easiest
way to use these tools (but a clumsy one!) involves making a copy of
this complete directory and replacing the two files minimal.lex and
minimal.cup with a specification of your own grammar. The script in the
file "build.bat" (for Windows) or "build" (for Unix, and please go
"chmod +x build" to make it executable if needbe) compile the parser
generators (this really only needs doing once), then runs them on your
grammar (to create files "parser.java" and "Yylex.java") and finally
compiles these.  The code in java_cup/runtime must remain present
when your code is to be run.

The use of "jar" is valid with JDK 1.2 but shows how to package your
final code as a single file. With it you can run cup & lex from anywhere
by saying (or putting in a script)
    java -jar wherever/jlex.jar myinput.lex
    java -jar wherever/cup.jar < myinput.cup
but STILL note that you will need to have a copy of java_cup/runtime
either locally on available via your CLASSPATH.

A C Norman.     September 1999

