This directory contains a bunch of Java grammars:

Java1.0.2.jj:
	This is our most thoroughly tested Java grammar.  It is a
	faithful rendering of the language syntax as specified by the
	Java Language Specification by Gosling, Joy, and Steele.

Java.1.0.2LS.jj:
	This is a minor modification of Java1.0.2.jj which uses
	lexical states to express the comment tokens.  While this is a
	cleaner grammar, it has not been tested as thoroughly as the
	previous grammar.  Over time, we will make this grammar our
	primary grammar and delete Java1.0.2.jj.

billsJava1.0.2.jj:
	This version was contributed by Bill McKeeman
	(mckeeman@mathworks.com).  This grammar is a little closer to
	the Java Language Specification in terms of non-terminal
	usage.

Java1.1.jj:
	This is the grammar that includes the Java 1.1 language
	extensions.  It is based on the Java Language Specification
	by Gosling, Joy, and Steele augmented by the inner class
	document released with JDK 1.1.

Java1.1noLA.jj:
	Same as Java1.1.jj, but all explicit syntactic lookaheads
	are replaced by semantic lookaheads to minimize the space
	requirements of the generated parser.  JavaCC will soon be
	improved to do this automatically.  To do the same kind
	of optimization for your grammar in the interim, please see
	file OPTIMIZING in this directory.

Java1.2-a.jj:
	An adaptation of Java1.1.jj to Java 1.2.  Essentially includes
	handling for the new 'strictfp' keyword.  This grammar was
	contributed by David Williams.  A complete zip file with test
	cases can be downloaded from www.metamata.com.

Java1.2-b.jjt:
	An adaptation of the Java 1.1 grammar in the VTransformer
	example to Java 1.2.  Essentially includes handling for the
	new 'strictfp' keyword.  This grammar was contributed by
	David Williams.  A complete zip file with test cases can be
	downloaded from www.metamata.com.

We wish to thank all our users and especially Bill Foote (of JavaSoft),
Bill McKeeman(of MathWorks), Juei Chang (of UC Irvine), and David
Williams for contributing and really testing out these grammars.


To build a parser from a .jj file, simply type:

  "javacc <grammar-file>"

in this directory.  The files that comprise the Java parser are
generated into this directory.

To build a parser from Java1.2-b.jjt, run jjtree on it first to get
a .jj file and then follow the remaining instructions.

Compile these files using "javac".

JavaParser.java contains a main program that takes input from either
the standard input or from the file specified as the argument to
"java".  i.e., A Java program can be parser in either of the following
ways:

  java JavaParser < javafile
  java JavaParser javafile

If you have any comments on these grammars or make any changes to it,
we'd appreciate your contacting us at javacc-support@metamata.com.
