This package contains JavaCUP grammars for the Java programming language.

Copyright (C) C. Scott Ananian
This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.  See the file COPYING for more details.

Directory structure:
 Parse/		contains the java grammars.
  java10.cup    contains a Java 1.0 grammar.
  java11.cup    contains a Java 1.1 grammar.
  java12.cup    contains a Java 1.2 grammar. [added 11-feb-1999]
  Lexer.java    interface description for a lexer.

 Lex/           contains a simple but complete java lexer.
  Lex.java      main class
  Sym.java      a copy of Parse/Sym.java containing symbolic constants.

 Main/
  Main.java     a simple testing skeleton for the parser/lexer.

The grammar in Parse/ should be processed by javaCUP into Grm.java.
There are much better ways to write lexers for java, but my preferred
tool (JLex) doesn't support a full unicode character set.  The
lexer implemented here is not as efficient as a table-driven lexer,
but adheres to the java specification exactly.

  -- C. Scott Ananian <cananian@alumni.princeton.edu> 3-Apr-1998

UPDATE: Fixed a lexer bug: '5.2' is a double, not a float.  Thanks to
Ben Walter <bwalter@mit.edu> for spotting this.

  -- C. Scott Ananian <cananian@alumni.princeton.edu> 14-Jul-1998

UPDATE: Fixed a couple of minor bugs.
1) Lex.EscapedUnicodeReader wasn't actually parsing unicode escape sequences
   properly because we didn't implement read(char[], int, int).
2) Grammar fixes: int[].class, Object[].class and all array class
   literals were not being parsed.  Also special void.class literal
   inadvertantly omitted from the grammar.
Both these problems have been fixed.

  -- C. Scott Ananian <cananian@alumni.princeton.edu> 11-Feb-1999

UPDATE: Fixed another lexer bug: Large integer constants such as
0xFFFF0000 were being incorrectly flagged as 'too large for an int'.
Also, by the Java Language Specification, "\477" is a valid string
literal (it is the same as "\0477": the character '\047' followed by
the character '7').  The lexer handles this case correctly now.

Created java12.cup with grammar updated to Java 1.2.  Features
added include the 'strictfp' keyword and the various new inner class
features at http://java.sun.com/docs/books/jls/nested-class-clarify.html.

Also added slightly better position/error reporting to all parsers.

  -- C. Scott Ananian <cananian@alumni.princeton.edu> 11-Feb-1999
