You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by pp...@apache.org on 2010/05/25 06:28:31 UTC

svn commit: r947912 [4/5] - in /openjpa/trunk/openjpa-examples/openbooks/src/main/java/openbook/tools: ./ ant/ converter/ parser/ util/

Added: openjpa/trunk/openjpa-examples/openbooks/src/main/java/openbook/tools/parser/JavaParser.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/openbooks/src/main/java/openbook/tools/parser/JavaParser.java?rev=947912&view=auto
==============================================================================
--- openjpa/trunk/openjpa-examples/openbooks/src/main/java/openbook/tools/parser/JavaParser.java (added)
+++ openjpa/trunk/openjpa-examples/openbooks/src/main/java/openbook/tools/parser/JavaParser.java Tue May 25 04:28:30 2010
@@ -0,0 +1,20088 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package openbook.tools.parser;
+// $ANTLR 3.2 Sep 23, 2009 12:02:23 Java.g 2010-05-15 01:06:37
+
+import org.antlr.runtime.*;
+import java.util.HashMap;
+import org.antlr.runtime.debug.*;
+import java.io.IOException;
+
+/** A Java 1.5 grammar for ANTLR v3 derived from the spec
+ *
+ *  This is a very close representation of the spec; the changes
+ *  are comestic (remove left recursion) and also fixes (the spec
+ *  isn't exactly perfect).  I have run this on the 1.4.2 source
+ *  and some nasty looking enums from 1.5, but have not really
+ *  tested for 1.5 compatibility.
+ *
+ *  I built this with: java -Xmx100M org.antlr.Tool java.g 
+ *  and got two errors that are ok (for now):
+ *  java.g:691:9: Decision can match input such as
+ *    "'0'..'9'{'E', 'e'}{'+', '-'}'0'..'9'{'D', 'F', 'd', 'f'}"
+ *    using multiple alternatives: 3, 4
+ *  As a result, alternative(s) 4 were disabled for that input
+ *  java.g:734:35: Decision can match input such as "{'$', 'A'..'Z',
+ *    '_', 'a'..'z', '\u00C0'..'\u00D6', '\u00D8'..'\u00F6',
+ *    '\u00F8'..'\u1FFF', '\u3040'..'\u318F', '\u3300'..'\u337F',
+ *    '\u3400'..'\u3D2D', '\u4E00'..'\u9FFF', '\uF900'..'\uFAFF'}"
+ *    using multiple alternatives: 1, 2
+ *  As a result, alternative(s) 2 were disabled for that input
+ *
+ *  You can turn enum on/off as a keyword :)
+ *
+ *  Version 1.0 -- initial release July 5, 2006 (requires 3.0b2 or higher)
+ *
+ *  Primary author: Terence Parr, July 2006
+ *
+ *  Version 1.0.1 -- corrections by Koen Vanderkimpen & Marko van Dooren,
+ *      October 25, 2006;
+ *      fixed normalInterfaceDeclaration: now uses typeParameters instead
+ *          of typeParameter (according to JLS, 3rd edition)
+ *      fixed castExpression: no longer allows expression next to type
+ *          (according to semantics in JLS, in contrast with syntax in JLS)
+ *
+ *  Version 1.0.2 -- Terence Parr, Nov 27, 2006
+ *      java spec I built this from had some bizarre for-loop control.
+ *          Looked weird and so I looked elsewhere...Yep, it's messed up.
+ *          simplified.
+ *
+ *  Version 1.0.3 -- Chris Hogue, Feb 26, 2007
+ *      Factored out an annotationName rule and used it in the annotation rule.
+ *          Not sure why, but typeName wasn't recognizing references to inner
+ *          annotations (e.g. @InterfaceName.InnerAnnotation())
+ *      Factored out the elementValue section of an annotation reference.  Created 
+ *          elementValuePair and elementValuePairs rules, then used them in the 
+ *          annotation rule.  Allows it to recognize annotation references with 
+ *          multiple, comma separated attributes.
+ *      Updated elementValueArrayInitializer so that it allows multiple elements.
+ *          (It was only allowing 0 or 1 element).
+ *      Updated localVariableDeclaration to allow annotations.  Interestingly the JLS
+ *          doesn't appear to indicate this is legal, but it does work as of at least
+ *          JDK 1.5.0_06.
+ *      Moved the Identifier portion of annotationTypeElementRest to annotationMethodRest.
+ *          Because annotationConstantRest already references variableDeclarator which 
+ *          has the Identifier portion in it, the parser would fail on constants in 
+ *          annotation definitions because it expected two identifiers.  
+ *      Added optional trailing ';' to the alternatives in annotationTypeElementRest.
+ *          Wouldn't handle an inner interface that has a trailing ';'.
+ *      Swapped the expression and type rule reference order in castExpression to 
+ *          make it check for genericized casts first.  It was failing to recognize a
+ *          statement like  "Class<Byte> TYPE = (Class<Byte>)...;" because it was seeing
+ *          'Class<Byte' in the cast expression as a less than expression, then failing 
+ *          on the '>'.
+ *      Changed createdName to use typeArguments instead of nonWildcardTypeArguments.
+ *          Again, JLS doesn't seem to allow this, but java.lang.Class has an example of
+ *          of this construct.
+ *      Changed the 'this' alternative in primary to allow 'identifierSuffix' rather than
+ *          just 'arguments'.  The case it couldn't handle was a call to an explicit
+ *          generic method invocation (e.g. this.<E>doSomething()).  Using identifierSuffix
+ *          may be overly aggressive--perhaps should create a more constrained thisSuffix rule?
+ *      
+ *  Version 1.0.4 -- Hiroaki Nakamura, May 3, 2007
+ *
+ *  Fixed formalParameterDecls, localVariableDeclaration, forInit,
+ *  and forVarControl to use variableModifier* not 'final'? (annotation)?
+ *
+ *  Version 1.0.5 -- Terence, June 21, 2007
+ *  --a[i].foo didn't work. Fixed unaryExpression
+ *
+ *  Version 1.0.6 -- John Ridgway, March 17, 2008
+ *      Made "assert" a switchable keyword like "enum".
+ *      Fixed compilationUnit to disallow "annotation importDeclaration ...".
+ *      Changed "Identifier ('.' Identifier)*" to "qualifiedName" in more 
+ *          places.
+ *      Changed modifier* and/or variableModifier* to classOrInterfaceModifiers,
+ *          modifiers or variableModifiers, as appropriate.
+ *      Renamed "bound" to "typeBound" to better match language in the JLS.
+ *      Added "memberDeclaration" which rewrites to methodDeclaration or 
+ *      fieldDeclaration and pulled type into memberDeclaration.  So we parse 
+ *          type and then move on to decide whether we're dealing with a field
+ *          or a method.
+ *      Modified "constructorDeclaration" to use "constructorBody" instead of
+ *          "methodBody".  constructorBody starts with explicitConstructorInvocation,
+ *          then goes on to blockStatement*.  Pulling explicitConstructorInvocation
+ *          out of expressions allowed me to simplify "primary".
+ *      Changed variableDeclarator to simplify it.
+ *      Changed type to use classOrInterfaceType, thus simplifying it; of course
+ *          I then had to add classOrInterfaceType, but it is used in several 
+ *          places.
+ *      Fixed annotations, old version allowed "@X(y,z)", which is illegal.
+ *      Added optional comma to end of "elementValueArrayInitializer"; as per JLS.
+ *      Changed annotationTypeElementRest to use normalClassDeclaration and 
+ *          normalInterfaceDeclaration rather than classDeclaration and 
+ *          interfaceDeclaration, thus getting rid of a couple of grammar ambiguities.
+ *      Split localVariableDeclaration into localVariableDeclarationStatement
+ *          (includes the terminating semi-colon) and localVariableDeclaration.  
+ *          This allowed me to use localVariableDeclaration in "forInit" clauses,
+ *           simplifying them.
+ *      Changed switchBlockStatementGroup to use multiple labels.  This adds an
+ *          ambiguity, but if one uses appropriately greedy parsing it yields the
+ *           parse that is closest to the meaning of the switch statement.
+ *      Renamed "forVarControl" to "enhancedForControl" -- JLS language.
+ *      Added semantic predicates to test for shift operations rather than other
+ *          things.  Thus, for instance, the string "< <" will never be treated
+ *          as a left-shift operator.
+ *      In "creator" we rule out "nonWildcardTypeArguments" on arrayCreation, 
+ *          which are illegal.
+ *      Moved "nonWildcardTypeArguments into innerCreator.
+ *      Removed 'super' superSuffix from explicitGenericInvocation, since that
+ *          is only used in explicitConstructorInvocation at the beginning of a
+ *           constructorBody.  (This is part of the simplification of expressions
+ *           mentioned earlier.)
+ *      Simplified primary (got rid of those things that are only used in
+ *          explicitConstructorInvocation).
+ *      Lexer -- removed "Exponent?" from FloatingPointLiteral choice 4, since it
+ *          led to an ambiguity.
+ *
+ *      This grammar successfully parses every .java file in the JDK 1.5 source 
+ *          tree (excluding those whose file names include '-', which are not
+ *          valid Java compilation units).
+ *
+ *  Known remaining problems:
+ *      "Letter" and "JavaIDDigit" are wrong.  The actual specification of
+ *      "Letter" should be "a character for which the method
+ *      Character.isJavaIdentifierStart(int) returns true."  A "Java 
+ *      letter-or-digit is a character for which the method 
+ *      Character.isJavaIdentifierPart(int) returns true."
+ */
+public class JavaParser extends DebugParser {
+    public static final String[] tokenNames = new String[] {
+        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "Identifier", "ENUM", "FloatingPointLiteral", "CharacterLiteral", "StringLiteral", "HexLiteral", "OctalLiteral", "DecimalLiteral", "ASSERT", "HexDigit", "IntegerTypeSuffix", "Exponent", "FloatTypeSuffix", "EscapeSequence", "UnicodeEscape", "OctalEscape", "Letter", "JavaIDDigit", "WS", "COMMENT", "LINE_COMMENT", "'package'", "';'", "'import'", "'static'", "'.'", "'*'", "'public'", "'protected'", "'private'", "'abstract'", "'final'", "'strictfp'", "'class'", "'extends'", "'implements'", "'<'", "','", "'>'", "'&'", "'{'", "'}'", "'interface'", "'void'", "'['", "']'", "'throws'", "'='", "'native'", "'synchronized'", "'transient'", "'volatile'", "'boolean'", "'char'", "'byte'", "'short'", "'int'", "'long'", "'float'", "'double'", "'?'", "'super'", "'('", "')'", "'...'", "'this'", "'null'", "'true'", "'false'", "'@'", "'default'", "':'", "'if'", "'else'", "'for'", "'while'", "'do'", "'try'", "'finally'", "'switch'", "'return'", "'thr
 ow'", "'break'", "'continue'", "'catch'", "'case'", "'+='", "'-='", "'*='", "'/='", "'&='", "'|='", "'^='", "'%='", "'||'", "'&&'", "'|'", "'^'", "'=='", "'!='", "'instanceof'", "'+'", "'-'", "'/'", "'%'", "'++'", "'--'", "'~'", "'!'", "'new'"
+    };
+    public static final int T__29=29;
+    public static final int T__28=28;
+    public static final int T__27=27;
+    public static final int T__26=26;
+    public static final int FloatTypeSuffix=16;
+    public static final int T__25=25;
+    public static final int OctalLiteral=10;
+    public static final int EOF=-1;
+    public static final int Identifier=4;
+    public static final int T__93=93;
+    public static final int T__94=94;
+    public static final int T__91=91;
+    public static final int T__92=92;
+    public static final int T__90=90;
+    public static final int COMMENT=23;
+    public static final int T__99=99;
+    public static final int T__98=98;
+    public static final int T__97=97;
+    public static final int T__96=96;
+    public static final int T__95=95;
+    public static final int T__80=80;
+    public static final int T__81=81;
+    public static final int T__82=82;
+    public static final int T__83=83;
+    public static final int LINE_COMMENT=24;
+    public static final int IntegerTypeSuffix=14;
+    public static final int T__85=85;
+    public static final int T__84=84;
+    public static final int ASSERT=12;
+    public static final int T__87=87;
+    public static final int T__86=86;
+    public static final int T__89=89;
+    public static final int T__88=88;
+    public static final int WS=22;
+    public static final int T__71=71;
+    public static final int T__72=72;
+    public static final int T__70=70;
+    public static final int FloatingPointLiteral=6;
+    public static final int JavaIDDigit=21;
+    public static final int T__76=76;
+    public static final int T__75=75;
+    public static final int T__74=74;
+    public static final int Letter=20;
+    public static final int EscapeSequence=17;
+    public static final int T__73=73;
+    public static final int T__79=79;
+    public static final int T__78=78;
+    public static final int T__77=77;
+    public static final int T__68=68;
+    public static final int T__69=69;
+    public static final int T__66=66;
+    public static final int T__67=67;
+    public static final int T__64=64;
+    public static final int T__65=65;
+    public static final int T__62=62;
+    public static final int T__63=63;
+    public static final int CharacterLiteral=7;
+    public static final int Exponent=15;
+    public static final int T__61=61;
+    public static final int T__60=60;
+    public static final int HexDigit=13;
+    public static final int T__55=55;
+    public static final int T__56=56;
+    public static final int T__57=57;
+    public static final int T__58=58;
+    public static final int T__51=51;
+    public static final int T__52=52;
+    public static final int T__53=53;
+    public static final int T__54=54;
+    public static final int T__107=107;
+    public static final int T__108=108;
+    public static final int T__109=109;
+    public static final int T__59=59;
+    public static final int T__103=103;
+    public static final int T__104=104;
+    public static final int T__105=105;
+    public static final int T__106=106;
+    public static final int T__111=111;
+    public static final int T__110=110;
+    public static final int T__113=113;
+    public static final int T__112=112;
+    public static final int T__50=50;
+    public static final int T__42=42;
+    public static final int HexLiteral=9;
+    public static final int T__43=43;
+    public static final int T__40=40;
+    public static final int T__41=41;
+    public static final int T__46=46;
+    public static final int T__47=47;
+    public static final int T__44=44;
+    public static final int T__45=45;
+    public static final int T__48=48;
+    public static final int T__49=49;
+    public static final int T__102=102;
+    public static final int T__101=101;
+    public static final int T__100=100;
+    public static final int DecimalLiteral=11;
+    public static final int StringLiteral=8;
+    public static final int T__30=30;
+    public static final int T__31=31;
+    public static final int T__32=32;
+    public static final int T__33=33;
+    public static final int ENUM=5;
+    public static final int T__34=34;
+    public static final int T__35=35;
+    public static final int T__36=36;
+    public static final int T__37=37;
+    public static final int T__38=38;
+    public static final int T__39=39;
+    public static final int UnicodeEscape=18;
+    public static final int OctalEscape=19;
+
+    // delegates
+    // delegators
+
+    public static final String[] ruleNames = new String[] {
+        "invalidRule", "synpred179_Java", "block", "synpred250_Java", "synpred137_Java", 
+        "synpred169_Java", "synpred154_Java", "catches", "relationalExpression", 
+        "synpred237_Java", "synpred105_Java", "synpred88_Java", "expression", 
+        "synpred242_Java", "synpred138_Java", "synpred151_Java", "typeList", 
+        "formalParameterDecls", "interfaceBodyDeclaration", "synpred74_Java", 
+        "typeName", "classDeclaration", "synpred252_Java", "selector", "synpred25_Java", 
+        "synpred7_Java", "modifiers", "exclusiveOrExpression", "synpred11_Java", 
+        "synpred164_Java", "variableModifiers", "synpred261_Java", "synpred42_Java", 
+        "synpred128_Java", "synpred245_Java", "synpred264_Java", "synpred100_Java", 
+        "synpred206_Java", "elementValuePair", "packageDeclaration", "variableModifier", 
+        "synpred196_Java", "synpred203_Java", "arguments", "synpred149_Java", 
+        "booleanLiteral", "synpred254_Java", "synpred96_Java", "synpred176_Java", 
+        "synpred195_Java", "innerCreator", "compilationUnit", "synpred22_Java", 
+        "integerLiteral", "annotationTypeDeclaration", "synpred165_Java", 
+        "synpred55_Java", "synpred106_Java", "synpred158_Java", "annotationMethodOrConstantRest", 
+        "synpred6_Java", "instanceOfExpression", "enumBody", "synpred262_Java", 
+        "synpred117_Java", "synpred228_Java", "synpred269_Java", "synpred97_Java", 
+        "synpred112_Java", "interfaceMethodOrFieldDecl", "switchBlockStatementGroups", 
+        "synpred210_Java", "synpred44_Java", "synpred188_Java", "statementExpression", 
+        "annotationTypeBody", "synpred170_Java", "synpred120_Java", "interfaceGenericMethodDecl", 
+        "synpred89_Java", "synpred205_Java", "synpred230_Java", "arrayCreatorRest", 
+        "synpred75_Java", "synpred130_Java", "annotationTypeElementRest", 
+        "creator", "variableDeclarator", "synpred93_Java", "synpred115_Java", 
+        "synpred119_Java", "synpred110_Java", "synpred186_Java", "synpred265_Java", 
+        "synpred202_Java", "synpred253_Java", "andExpression", "synpred32_Java", 
+        "synpred135_Java", "synpred148_Java", "synpred132_Java", "conditionalOrExpression", 
+        "relationalOp", "synpred21_Java", "qualifiedNameList", "synpred58_Java", 
+        "qualifiedName", "synpred51_Java", "conditionalExpression", "synpred175_Java", 
+        "synpred90_Java", "synpred181_Java", "synpred31_Java", "shiftExpression", 
+        "synpred197_Java", "fieldDeclaration", "synpred17_Java", "synpred231_Java", 
+        "literal", "expressionList", "classBody", "synpred3_Java", "synpred160_Java", 
+        "synpred190_Java", "synpred20_Java", "synpred219_Java", "synpred235_Java", 
+        "synpred184_Java", "synpred222_Java", "synpred94_Java", "synpred147_Java", 
+        "elementValue", "synpred64_Java", "synpred180_Java", "synpred82_Java", 
+        "synpred30_Java", "synpred26_Java", "statement", "inclusiveOrExpression", 
+        "multiplicativeExpression", "switchLabel", "synpred168_Java", "blockStatement", 
+        "synpred111_Java", "synpred270_Java", "synpred134_Java", "synpred236_Java", 
+        "enhancedForControl", "synpred213_Java", "synpred62_Java", "synpred227_Java", 
+        "classCreatorRest", "synpred54_Java", "synpred104_Java", "synpred136_Java", 
+        "synpred191_Java", "interfaceMemberDecl", "enumConstantName", "synpred67_Java", 
+        "synpred49_Java", "typeParameters", "synpred123_Java", "synpred50_Java", 
+        "synpred15_Java", "classOrInterfaceModifiers", "catchClause", "shiftOp", 
+        "synpred63_Java", "synpred86_Java", "synpred212_Java", "normalClassDeclaration", 
+        "methodDeclaratorRest", "conditionalAndExpression", "synpred79_Java", 
+        "synpred239_Java", "synpred260_Java", "equalityExpression", "synpred161_Java", 
+        "synpred221_Java", "annotationMethodRest", "synpred214_Java", "synpred113_Java", 
+        "synpred92_Java", "synpred101_Java", "synpred234_Java", "synpred272_Java", 
+        "synpred258_Java", "synpred95_Java", "synpred10_Java", "synpred125_Java", 
+        "enumBodyDeclarations", "additiveExpression", "synpred133_Java", 
+        "synpred14_Java", "interfaceMethodDeclaratorRest", "synpred248_Java", 
+        "synpred208_Java", "formalParameterDeclsRest", "primary", "synpred78_Java", 
+        "normalInterfaceDeclaration", "synpred145_Java", "synpred85_Java", 
+        "synpred33_Java", "localVariableDeclaration", "synpred211_Java", 
+        "synpred204_Java", "primitiveType", "switchBlockStatementGroup", 
+        "synpred40_Java", "interfaceDeclaration", "formalParameters", "synpred238_Java", 
+        "synpred99_Java", "synpred56_Java", "synpred177_Java", "synpred37_Java", 
+        "synpred249_Java", "synpred46_Java", "identifierSuffix", "synpred116_Java", 
+        "synpred69_Java", "synpred259_Java", "synpred65_Java", "synpred80_Java", 
+        "synpred68_Java", "synpred66_Java", "elementValuePairs", "synpred71_Java", 
+        "annotation", "synpred126_Java", "synpred102_Java", "synpred223_Java", 
+        "synpred87_Java", "synpred27_Java", "synpred34_Java", "arrayInitializer", 
+        "synpred77_Java", "typeArguments", "synpred187_Java", "synpred140_Java", 
+        "variableDeclarators", "memberDecl", "voidMethodDeclaratorRest", 
+        "enumConstant", "typeBound", "synpred70_Java", "synpred224_Java", 
+        "constructorBody", "synpred84_Java", "interfaceBody", "classOrInterfaceDeclaration", 
+        "synpred166_Java", "annotationName", "synpred251_Java", "synpred226_Java", 
+        "synpred189_Java", "synpred246_Java", "forControl", "synpred108_Java", 
+        "explicitConstructorInvocation", "synpred157_Java", "synpred4_Java", 
+        "memberDeclaration", "synpred12_Java", "synpred243_Java", "synpred201_Java", 
+        "parExpression", "synpred209_Java", "typeArgument", "synpred73_Java", 
+        "synpred167_Java", "synpred53_Java", "synpred59_Java", "classBodyDeclaration", 
+        "synpred233_Java", "explicitGenericInvocation", "synpred244_Java", 
+        "synpred215_Java", "synpred139_Java", "synpred122_Java", "synpred266_Java", 
+        "classOrInterfaceModifier", "synpred267_Java", "genericMethodOrConstructorDecl", 
+        "synpred271_Java", "synpred183_Java", "synpred216_Java", "nonWildcardTypeArguments", 
+        "variableDeclaratorId", "synpred131_Java", "constructorDeclaratorRest", 
+        "synpred268_Java", "typeDeclaration", "annotationTypeElementDeclaration", 
+        "synpred103_Java", "synpred127_Java", "synpred263_Java", "synpred23_Java", 
+        "synpred150_Java", "defaultValue", "constantDeclarator", "genericMethodOrConstructorRest", 
+        "synpred72_Java", "synpred217_Java", "synpred8_Java", "constantExpression", 
+        "synpred52_Java", "synpred152_Java", "createdName", "synpred178_Java", 
+        "synpred156_Java", "synpred162_Java", "synpred232_Java", "synpred118_Java", 
+        "synpred91_Java", "synpred19_Java", "synpred29_Java", "elementValueArrayInitializer", 
+        "synpred61_Java", "synpred141_Java", "synpred114_Java", "unaryExpression", 
+        "synpred45_Java", "synpred16_Java", "synpred229_Java", "synpred2_Java", 
+        "enumConstants", "synpred194_Java", "synpred43_Java", "importDeclaration", 
+        "localVariableDeclarationStatement", "synpred121_Java", "forUpdate", 
+        "synpred60_Java", "synpred143_Java", "forInit", "constantDeclaratorsRest", 
+        "annotationConstantRest", "synpred36_Java", "superSuffix", "synpred39_Java", 
+        "enumDeclaration", "synpred192_Java", "castExpression", "synpred1_Java", 
+        "formalParameter", "synpred107_Java", "synpred155_Java", "synpred163_Java", 
+        "synpred83_Java", "synpred129_Java", "synpred146_Java", "synpred207_Java", 
+        "synpred13_Java", "synpred218_Java", "classOrInterfaceType", "synpred109_Java", 
+        "synpred9_Java", "assignmentOperator", "synpred255_Java", "constantDeclaratorRest", 
+        "variableInitializer", "synpred256_Java", "synpred28_Java", "synpred35_Java", 
+        "synpred193_Java", "synpred174_Java", "synpred124_Java", "modifier", 
+        "synpred81_Java", "synpred159_Java", "synpred185_Java", "synpred38_Java", 
+        "synpred144_Java", "synpred199_Java", "typeParameter", "annotations", 
+        "synpred173_Java", "synpred172_Java", "synpred18_Java", "packageOrTypeName", 
+        "synpred241_Java", "synpred153_Java", "synpred247_Java", "synpred48_Java", 
+        "synpred47_Java", "synpred98_Java", "synpred5_Java", "interfaceMethodOrFieldRest", 
+        "synpred57_Java", "methodDeclaration", "synpred76_Java", "methodBody", 
+        "synpred41_Java", "synpred142_Java", "synpred198_Java", "synpred225_Java", 
+        "unaryExpressionNotPlusMinus", "synpred240_Java", "synpred200_Java", 
+        "voidInterfaceMethodDeclaratorRest", "synpred182_Java", "synpred24_Java", 
+        "synpred257_Java", "type", "synpred220_Java", "synpred171_Java"
+    };
+     
+        public int ruleLevel = 0;
+        public int getRuleLevel() { return ruleLevel; }
+        public void incRuleLevel() { ruleLevel++; }
+        public void decRuleLevel() { ruleLevel--; }
+        public JavaParser(TokenStream input) {
+            this(input, DebugEventSocketProxy.DEFAULT_DEBUGGER_PORT, new RecognizerSharedState());
+        }
+        public JavaParser(TokenStream input, int port, RecognizerSharedState state) {
+            super(input, state);
+            this.state.ruleMemo = new HashMap[407+1];
+             
+            DebugEventSocketProxy proxy =
+                new DebugEventSocketProxy(this, port, null);
+            setDebugListener(proxy);
+            try {
+                proxy.handshake();
+            }
+            catch (IOException ioe) {
+                reportError(ioe);
+            }
+        }
+    public JavaParser(TokenStream input, DebugEventListener dbg) {
+        super(input, dbg, new RecognizerSharedState());
+        this.state.ruleMemo = new HashMap[407+1];
+         
+    }
+    protected boolean evalPredicate(boolean result, String predicate) {
+        dbg.semanticPredicate(result, predicate);
+        return result;
+    }
+
+
+    public String[] getTokenNames() { return JavaParser.tokenNames; }
+    public String getGrammarFileName() { return "Java.g"; }
+
+
+
+    // $ANTLR start "compilationUnit"
+    // Java.g:177:1: compilationUnit : ( annotations ( packageDeclaration ( importDeclaration )* ( typeDeclaration )* | classOrInterfaceDeclaration ( typeDeclaration )* ) | ( packageDeclaration )? ( importDeclaration )* ( typeDeclaration )* );
+    public final void compilationUnit() throws RecognitionException {
+        int compilationUnit_StartIndex = input.index();
+        try { dbg.enterRule(getGrammarFileName(), "compilationUnit");
+        if ( getRuleLevel()==0 ) {dbg.commence();}
+        incRuleLevel();
+        dbg.location(177, 1);
+
+        try {
+            if ( state.backtracking>0 && alreadyParsedRule(input, 1) ) { return ; }
+            // Java.g:178:5: ( annotations ( packageDeclaration ( importDeclaration )* ( typeDeclaration )* | classOrInterfaceDeclaration ( typeDeclaration )* ) | ( packageDeclaration )? ( importDeclaration )* ( typeDeclaration )* )
+            int alt8=2;
+            try { dbg.enterDecision(8);
+
+            try {
+                isCyclicDecision = true;
+                alt8 = dfa8.predict(input);
+            }
+            catch (NoViableAltException nvae) {
+                dbg.recognitionException(nvae);
+                throw nvae;
+            }
+            } finally {dbg.exitDecision(8);}
+
+            switch (alt8) {
+                case 1 :
+                    dbg.enterAlt(1);
+
+                    // Java.g:178:9: annotations ( packageDeclaration ( importDeclaration )* ( typeDeclaration )* | classOrInterfaceDeclaration ( typeDeclaration )* )
+                    {
+                    dbg.location(178,9);
+                    pushFollow(FOLLOW_annotations_in_compilationUnit44);
+                    annotations();
+
+                    state._fsp--;
+                    if (state.failed) return ;
+                    dbg.location(179,9);
+                    // Java.g:179:9: ( packageDeclaration ( importDeclaration )* ( typeDeclaration )* | classOrInterfaceDeclaration ( typeDeclaration )* )
+                    int alt4=2;
+                    try { dbg.enterSubRule(4);
+                    try { dbg.enterDecision(4);
+
+                    int LA4_0 = input.LA(1);
+
+                    if ( (LA4_0==25) ) {
+                        alt4=1;
+                    }
+                    else if ( (LA4_0==ENUM||LA4_0==28||(LA4_0>=31 && LA4_0<=37)||LA4_0==46||LA4_0==73) ) {
+                        alt4=2;
+                    }
+                    else {
+                        if (state.backtracking>0) {state.failed=true; return ;}
+                        NoViableAltException nvae =
+                            new NoViableAltException("", 4, 0, input);
+
+                        dbg.recognitionException(nvae);
+                        throw nvae;
+                    }
+                    } finally {dbg.exitDecision(4);}
+
+                    switch (alt4) {
+                        case 1 :
+                            dbg.enterAlt(1);
+
+                            // Java.g:179:13: packageDeclaration ( importDeclaration )* ( typeDeclaration )*
+                            {
+                            dbg.location(179,13);
+                            pushFollow(FOLLOW_packageDeclaration_in_compilationUnit58);
+                            packageDeclaration();
+
+                            state._fsp--;
+                            if (state.failed) return ;
+                            dbg.location(179,32);
+                            // Java.g:179:32: ( importDeclaration )*
+                            try { dbg.enterSubRule(1);
+
+                            loop1:
+                            do {
+                                int alt1=2;
+                                try { dbg.enterDecision(1);
+
+                                int LA1_0 = input.LA(1);
+
+                                if ( (LA1_0==27) ) {
+                                    alt1=1;
+                                }
+
+
+                                } finally {dbg.exitDecision(1);}
+
+                                switch (alt1) {
+                            	case 1 :
+                            	    dbg.enterAlt(1);
+
+                            	    // Java.g:0:0: importDeclaration
+                            	    {
+                            	    dbg.location(179,32);
+                            	    pushFollow(FOLLOW_importDeclaration_in_compilationUnit60);
+                            	    importDeclaration();
+
+                            	    state._fsp--;
+                            	    if (state.failed) return ;
+
+                            	    }
+                            	    break;
+
+                            	default :
+                            	    break loop1;
+                                }
+                            } while (true);
+                            } finally {dbg.exitSubRule(1);}
+
+                            dbg.location(179,51);
+                            // Java.g:179:51: ( typeDeclaration )*
+                            try { dbg.enterSubRule(2);
+
+                            loop2:
+                            do {
+                                int alt2=2;
+                                try { dbg.enterDecision(2);
+
+                                int LA2_0 = input.LA(1);
+
+                                if ( (LA2_0==ENUM||LA2_0==26||LA2_0==28||(LA2_0>=31 && LA2_0<=37)||LA2_0==46||LA2_0==73) ) {
+                                    alt2=1;
+                                }
+
+
+                                } finally {dbg.exitDecision(2);}
+
+                                switch (alt2) {
+                            	case 1 :
+                            	    dbg.enterAlt(1);
+
+                            	    // Java.g:0:0: typeDeclaration
+                            	    {
+                            	    dbg.location(179,51);
+                            	    pushFollow(FOLLOW_typeDeclaration_in_compilationUnit63);
+                            	    typeDeclaration();
+
+                            	    state._fsp--;
+                            	    if (state.failed) return ;
+
+                            	    }
+                            	    break;
+
+                            	default :
+                            	    break loop2;
+                                }
+                            } while (true);
+                            } finally {dbg.exitSubRule(2);}
+
+
+                            }
+                            break;
+                        case 2 :
+                            dbg.enterAlt(2);
+
+                            // Java.g:180:13: classOrInterfaceDeclaration ( typeDeclaration )*
+                            {
+                            dbg.location(180,13);
+                            pushFollow(FOLLOW_classOrInterfaceDeclaration_in_compilationUnit78);
+                            classOrInterfaceDeclaration();
+
+                            state._fsp--;
+                            if (state.failed) return ;
+                            dbg.location(180,41);
+                            // Java.g:180:41: ( typeDeclaration )*
+                            try { dbg.enterSubRule(3);
+
+                            loop3:
+                            do {
+                                int alt3=2;
+                                try { dbg.enterDecision(3);
+
+                                int LA3_0 = input.LA(1);
+
+                                if ( (LA3_0==ENUM||LA3_0==26||LA3_0==28||(LA3_0>=31 && LA3_0<=37)||LA3_0==46||LA3_0==73) ) {
+                                    alt3=1;
+                                }
+
+
+                                } finally {dbg.exitDecision(3);}
+
+                                switch (alt3) {
+                            	case 1 :
+                            	    dbg.enterAlt(1);
+
+                            	    // Java.g:0:0: typeDeclaration
+                            	    {
+                            	    dbg.location(180,41);
+                            	    pushFollow(FOLLOW_typeDeclaration_in_compilationUnit80);
+                            	    typeDeclaration();
+
+                            	    state._fsp--;
+                            	    if (state.failed) return ;
+
+                            	    }
+                            	    break;
+
+                            	default :
+                            	    break loop3;
+                                }
+                            } while (true);
+                            } finally {dbg.exitSubRule(3);}
+
+
+                            }
+                            break;
+
+                    }
+                    } finally {dbg.exitSubRule(4);}
+
+
+                    }
+                    break;
+                case 2 :
+                    dbg.enterAlt(2);
+
+                    // Java.g:182:9: ( packageDeclaration )? ( importDeclaration )* ( typeDeclaration )*
+                    {
+                    dbg.location(182,9);
+                    // Java.g:182:9: ( packageDeclaration )?
+                    int alt5=2;
+                    try { dbg.enterSubRule(5);
+                    try { dbg.enterDecision(5);
+
+                    int LA5_0 = input.LA(1);
+
+                    if ( (LA5_0==25) ) {
+                        alt5=1;
+                    }
+                    } finally {dbg.exitDecision(5);}
+
+                    switch (alt5) {
+                        case 1 :
+                            dbg.enterAlt(1);
+
+                            // Java.g:0:0: packageDeclaration
+                            {
+                            dbg.location(182,9);
+                            pushFollow(FOLLOW_packageDeclaration_in_compilationUnit101);
+                            packageDeclaration();
+
+                            state._fsp--;
+                            if (state.failed) return ;
+
+                            }
+                            break;
+
+                    }
+                    } finally {dbg.exitSubRule(5);}
+
+                    dbg.location(182,29);
+                    // Java.g:182:29: ( importDeclaration )*
+                    try { dbg.enterSubRule(6);
+
+                    loop6:
+                    do {
+                        int alt6=2;
+                        try { dbg.enterDecision(6);
+
+                        int LA6_0 = input.LA(1);
+
+                        if ( (LA6_0==27) ) {
+                            alt6=1;
+                        }
+
+
+                        } finally {dbg.exitDecision(6);}
+
+                        switch (alt6) {
+                    	case 1 :
+                    	    dbg.enterAlt(1);
+
+                    	    // Java.g:0:0: importDeclaration
+                    	    {
+                    	    dbg.location(182,29);
+                    	    pushFollow(FOLLOW_importDeclaration_in_compilationUnit104);
+                    	    importDeclaration();
+
+                    	    state._fsp--;
+                    	    if (state.failed) return ;
+
+                    	    }
+                    	    break;
+
+                    	default :
+                    	    break loop6;
+                        }
+                    } while (true);
+                    } finally {dbg.exitSubRule(6);}
+
+                    dbg.location(182,48);
+                    // Java.g:182:48: ( typeDeclaration )*
+                    try { dbg.enterSubRule(7);
+
+                    loop7:
+                    do {
+                        int alt7=2;
+                        try { dbg.enterDecision(7);
+
+                        int LA7_0 = input.LA(1);
+
+                        if ( (LA7_0==ENUM||LA7_0==26||LA7_0==28||(LA7_0>=31 && LA7_0<=37)||LA7_0==46||LA7_0==73) ) {
+                            alt7=1;
+                        }
+
+
+                        } finally {dbg.exitDecision(7);}
+
+                        switch (alt7) {
+                    	case 1 :
+                    	    dbg.enterAlt(1);
+
+                    	    // Java.g:0:0: typeDeclaration
+                    	    {
+                    	    dbg.location(182,48);
+                    	    pushFollow(FOLLOW_typeDeclaration_in_compilationUnit107);
+                    	    typeDeclaration();
+
+                    	    state._fsp--;
+                    	    if (state.failed) return ;
+
+                    	    }
+                    	    break;
+
+                    	default :
+                    	    break loop7;
+                        }
+                    } while (true);
+                    } finally {dbg.exitSubRule(7);}
+
+
+                    }
+                    break;
+
+            }
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+            if ( state.backtracking>0 ) { memoize(input, 1, compilationUnit_StartIndex); }
+        }
+        dbg.location(183, 5);
+
+        }
+        finally {
+            dbg.exitRule(getGrammarFileName(), "compilationUnit");
+            decRuleLevel();
+            if ( getRuleLevel()==0 ) {dbg.terminate();}
+        }
+
+        return ;
+    }
+    // $ANTLR end "compilationUnit"
+
+
+    // $ANTLR start "packageDeclaration"
+    // Java.g:185:1: packageDeclaration : 'package' qualifiedName ';' ;
+    public final void packageDeclaration() throws RecognitionException {
+        int packageDeclaration_StartIndex = input.index();
+        try { dbg.enterRule(getGrammarFileName(), "packageDeclaration");
+        if ( getRuleLevel()==0 ) {dbg.commence();}
+        incRuleLevel();
+        dbg.location(185, 1);
+
+        try {
+            if ( state.backtracking>0 && alreadyParsedRule(input, 2) ) { return ; }
+            // Java.g:186:5: ( 'package' qualifiedName ';' )
+            dbg.enterAlt(1);
+
+            // Java.g:186:9: 'package' qualifiedName ';'
+            {
+            dbg.location(186,9);
+            match(input,25,FOLLOW_25_in_packageDeclaration127); if (state.failed) return ;
+            dbg.location(186,19);
+            pushFollow(FOLLOW_qualifiedName_in_packageDeclaration129);
+            qualifiedName();
+
+            state._fsp--;
+            if (state.failed) return ;
+            dbg.location(186,33);
+            match(input,26,FOLLOW_26_in_packageDeclaration131); if (state.failed) return ;
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+            if ( state.backtracking>0 ) { memoize(input, 2, packageDeclaration_StartIndex); }
+        }
+        dbg.location(187, 5);
+
+        }
+        finally {
+            dbg.exitRule(getGrammarFileName(), "packageDeclaration");
+            decRuleLevel();
+            if ( getRuleLevel()==0 ) {dbg.terminate();}
+        }
+
+        return ;
+    }
+    // $ANTLR end "packageDeclaration"
+
+
+    // $ANTLR start "importDeclaration"
+    // Java.g:189:1: importDeclaration : 'import' ( 'static' )? qualifiedName ( '.' '*' )? ';' ;
+    public final void importDeclaration() throws RecognitionException {
+        int importDeclaration_StartIndex = input.index();
+        try { dbg.enterRule(getGrammarFileName(), "importDeclaration");
+        if ( getRuleLevel()==0 ) {dbg.commence();}
+        incRuleLevel();
+        dbg.location(189, 1);
+
+        try {
+            if ( state.backtracking>0 && alreadyParsedRule(input, 3) ) { return ; }
+            // Java.g:190:5: ( 'import' ( 'static' )? qualifiedName ( '.' '*' )? ';' )
+            dbg.enterAlt(1);
+
+            // Java.g:190:9: 'import' ( 'static' )? qualifiedName ( '.' '*' )? ';'
+            {
+            dbg.location(190,9);
+            match(input,27,FOLLOW_27_in_importDeclaration154); if (state.failed) return ;
+            dbg.location(190,18);
+            // Java.g:190:18: ( 'static' )?
+            int alt9=2;
+            try { dbg.enterSubRule(9);
+            try { dbg.enterDecision(9);
+
+            int LA9_0 = input.LA(1);
+
+            if ( (LA9_0==28) ) {
+                alt9=1;
+            }
+            } finally {dbg.exitDecision(9);}
+
+            switch (alt9) {
+                case 1 :
+                    dbg.enterAlt(1);
+
+                    // Java.g:0:0: 'static'
+                    {
+                    dbg.location(190,18);
+                    match(input,28,FOLLOW_28_in_importDeclaration156); if (state.failed) return ;
+
+                    }
+                    break;
+
+            }
+            } finally {dbg.exitSubRule(9);}
+
+            dbg.location(190,28);
+            pushFollow(FOLLOW_qualifiedName_in_importDeclaration159);
+            qualifiedName();
+
+            state._fsp--;
+            if (state.failed) return ;
+            dbg.location(190,42);
+            // Java.g:190:42: ( '.' '*' )?
+            int alt10=2;
+            try { dbg.enterSubRule(10);
+            try { dbg.enterDecision(10);
+
+            int LA10_0 = input.LA(1);
+
+            if ( (LA10_0==29) ) {
+                alt10=1;
+            }
+            } finally {dbg.exitDecision(10);}
+
+            switch (alt10) {
+                case 1 :
+                    dbg.enterAlt(1);
+
+                    // Java.g:190:43: '.' '*'
+                    {
+                    dbg.location(190,43);
+                    match(input,29,FOLLOW_29_in_importDeclaration162); if (state.failed) return ;
+                    dbg.location(190,47);
+                    match(input,30,FOLLOW_30_in_importDeclaration164); if (state.failed) return ;
+
+                    }
+                    break;
+
+            }
+            } finally {dbg.exitSubRule(10);}
+
+            dbg.location(190,53);
+            match(input,26,FOLLOW_26_in_importDeclaration168); if (state.failed) return ;
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+            if ( state.backtracking>0 ) { memoize(input, 3, importDeclaration_StartIndex); }
+        }
+        dbg.location(191, 5);
+
+        }
+        finally {
+            dbg.exitRule(getGrammarFileName(), "importDeclaration");
+            decRuleLevel();
+            if ( getRuleLevel()==0 ) {dbg.terminate();}
+        }
+
+        return ;
+    }
+    // $ANTLR end "importDeclaration"
+
+
+    // $ANTLR start "typeDeclaration"
+    // Java.g:193:1: typeDeclaration : ( classOrInterfaceDeclaration | ';' );
+    public final void typeDeclaration() throws RecognitionException {
+        int typeDeclaration_StartIndex = input.index();
+        try { dbg.enterRule(getGrammarFileName(), "typeDeclaration");
+        if ( getRuleLevel()==0 ) {dbg.commence();}
+        incRuleLevel();
+        dbg.location(193, 1);
+
+        try {
+            if ( state.backtracking>0 && alreadyParsedRule(input, 4) ) { return ; }
+            // Java.g:194:5: ( classOrInterfaceDeclaration | ';' )
+            int alt11=2;
+            try { dbg.enterDecision(11);
+
+            int LA11_0 = input.LA(1);
+
+            if ( (LA11_0==ENUM||LA11_0==28||(LA11_0>=31 && LA11_0<=37)||LA11_0==46||LA11_0==73) ) {
+                alt11=1;
+            }
+            else if ( (LA11_0==26) ) {
+                alt11=2;
+            }
+            else {
+                if (state.backtracking>0) {state.failed=true; return ;}
+                NoViableAltException nvae =
+                    new NoViableAltException("", 11, 0, input);
+
+                dbg.recognitionException(nvae);
+                throw nvae;
+            }
+            } finally {dbg.exitDecision(11);}
+
+            switch (alt11) {
+                case 1 :
+                    dbg.enterAlt(1);
+
+                    // Java.g:194:9: classOrInterfaceDeclaration
+                    {
+                    dbg.location(194,9);
+                    pushFollow(FOLLOW_classOrInterfaceDeclaration_in_typeDeclaration191);
+                    classOrInterfaceDeclaration();
+
+                    state._fsp--;
+                    if (state.failed) return ;
+
+                    }
+                    break;
+                case 2 :
+                    dbg.enterAlt(2);
+
+                    // Java.g:195:9: ';'
+                    {
+                    dbg.location(195,9);
+                    match(input,26,FOLLOW_26_in_typeDeclaration201); if (state.failed) return ;
+
+                    }
+                    break;
+
+            }
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+            if ( state.backtracking>0 ) { memoize(input, 4, typeDeclaration_StartIndex); }
+        }
+        dbg.location(196, 5);
+
+        }
+        finally {
+            dbg.exitRule(getGrammarFileName(), "typeDeclaration");
+            decRuleLevel();
+            if ( getRuleLevel()==0 ) {dbg.terminate();}
+        }
+
+        return ;
+    }
+    // $ANTLR end "typeDeclaration"
+
+
+    // $ANTLR start "classOrInterfaceDeclaration"
+    // Java.g:198:1: classOrInterfaceDeclaration : classOrInterfaceModifiers ( classDeclaration | interfaceDeclaration ) ;
+    public final void classOrInterfaceDeclaration() throws RecognitionException {
+        int classOrInterfaceDeclaration_StartIndex = input.index();
+        try { dbg.enterRule(getGrammarFileName(), "classOrInterfaceDeclaration");
+        if ( getRuleLevel()==0 ) {dbg.commence();}
+        incRuleLevel();
+        dbg.location(198, 1);
+
+        try {
+            if ( state.backtracking>0 && alreadyParsedRule(input, 5) ) { return ; }
+            // Java.g:199:5: ( classOrInterfaceModifiers ( classDeclaration | interfaceDeclaration ) )
+            dbg.enterAlt(1);
+
+            // Java.g:199:9: classOrInterfaceModifiers ( classDeclaration | interfaceDeclaration )
+            {
+            dbg.location(199,9);
+            pushFollow(FOLLOW_classOrInterfaceModifiers_in_classOrInterfaceDeclaration224);
+            classOrInterfaceModifiers();
+
+            state._fsp--;
+            if (state.failed) return ;
+            dbg.location(199,35);
+            // Java.g:199:35: ( classDeclaration | interfaceDeclaration )
+            int alt12=2;
+            try { dbg.enterSubRule(12);
+            try { dbg.enterDecision(12);
+
+            int LA12_0 = input.LA(1);
+
+            if ( (LA12_0==ENUM||LA12_0==37) ) {
+                alt12=1;
+            }
+            else if ( (LA12_0==46||LA12_0==73) ) {
+                alt12=2;
+            }
+            else {
+                if (state.backtracking>0) {state.failed=true; return ;}
+                NoViableAltException nvae =
+                    new NoViableAltException("", 12, 0, input);
+
+                dbg.recognitionException(nvae);
+                throw nvae;
+            }
+            } finally {dbg.exitDecision(12);}
+
+            switch (alt12) {
+                case 1 :
+                    dbg.enterAlt(1);
+
+                    // Java.g:199:36: classDeclaration
+                    {
+                    dbg.location(199,36);
+                    pushFollow(FOLLOW_classDeclaration_in_classOrInterfaceDeclaration227);
+                    classDeclaration();
+
+                    state._fsp--;
+                    if (state.failed) return ;
+
+                    }
+                    break;
+                case 2 :
+                    dbg.enterAlt(2);
+
+                    // Java.g:199:55: interfaceDeclaration
+                    {
+                    dbg.location(199,55);
+                    pushFollow(FOLLOW_interfaceDeclaration_in_classOrInterfaceDeclaration231);
+                    interfaceDeclaration();
+
+                    state._fsp--;
+                    if (state.failed) return ;
+
+                    }
+                    break;
+
+            }
+            } finally {dbg.exitSubRule(12);}
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+            if ( state.backtracking>0 ) { memoize(input, 5, classOrInterfaceDeclaration_StartIndex); }
+        }
+        dbg.location(200, 5);
+
+        }
+        finally {
+            dbg.exitRule(getGrammarFileName(), "classOrInterfaceDeclaration");
+            decRuleLevel();
+            if ( getRuleLevel()==0 ) {dbg.terminate();}
+        }
+
+        return ;
+    }
+    // $ANTLR end "classOrInterfaceDeclaration"
+
+
+    // $ANTLR start "classOrInterfaceModifiers"
+    // Java.g:202:1: classOrInterfaceModifiers : ( classOrInterfaceModifier )* ;
+    public final void classOrInterfaceModifiers() throws RecognitionException {
+        int classOrInterfaceModifiers_StartIndex = input.index();
+        try { dbg.enterRule(getGrammarFileName(), "classOrInterfaceModifiers");
+        if ( getRuleLevel()==0 ) {dbg.commence();}
+        incRuleLevel();
+        dbg.location(202, 1);
+
+        try {
+            if ( state.backtracking>0 && alreadyParsedRule(input, 6) ) { return ; }
+            // Java.g:203:5: ( ( classOrInterfaceModifier )* )
+            dbg.enterAlt(1);
+
+            // Java.g:203:9: ( classOrInterfaceModifier )*
+            {
+            dbg.location(203,9);
+            // Java.g:203:9: ( classOrInterfaceModifier )*
+            try { dbg.enterSubRule(13);
+
+            loop13:
+            do {
+                int alt13=2;
+                try { dbg.enterDecision(13);
+
+                int LA13_0 = input.LA(1);
+
+                if ( (LA13_0==73) ) {
+                    int LA13_2 = input.LA(2);
+
+                    if ( (LA13_2==Identifier) ) {
+                        alt13=1;
+                    }
+
+
+                }
+                else if ( (LA13_0==28||(LA13_0>=31 && LA13_0<=36)) ) {
+                    alt13=1;
+                }
+
+
+                } finally {dbg.exitDecision(13);}
+
+                switch (alt13) {
+            	case 1 :
+            	    dbg.enterAlt(1);
+
+            	    // Java.g:0:0: classOrInterfaceModifier
+            	    {
+            	    dbg.location(203,9);
+            	    pushFollow(FOLLOW_classOrInterfaceModifier_in_classOrInterfaceModifiers255);
+            	    classOrInterfaceModifier();
+
+            	    state._fsp--;
+            	    if (state.failed) return ;
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop13;
+                }
+            } while (true);
+            } finally {dbg.exitSubRule(13);}
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+            if ( state.backtracking>0 ) { memoize(input, 6, classOrInterfaceModifiers_StartIndex); }
+        }
+        dbg.location(204, 5);
+
+        }
+        finally {
+            dbg.exitRule(getGrammarFileName(), "classOrInterfaceModifiers");
+            decRuleLevel();
+            if ( getRuleLevel()==0 ) {dbg.terminate();}
+        }
+
+        return ;
+    }
+    // $ANTLR end "classOrInterfaceModifiers"
+
+
+    // $ANTLR start "classOrInterfaceModifier"
+    // Java.g:206:1: classOrInterfaceModifier : ( annotation | 'public' | 'protected' | 'private' | 'abstract' | 'static' | 'final' | 'strictfp' );
+    public final void classOrInterfaceModifier() throws RecognitionException {
+        int classOrInterfaceModifier_StartIndex = input.index();
+        try { dbg.enterRule(getGrammarFileName(), "classOrInterfaceModifier");
+        if ( getRuleLevel()==0 ) {dbg.commence();}
+        incRuleLevel();
+        dbg.location(206, 1);
+
+        try {
+            if ( state.backtracking>0 && alreadyParsedRule(input, 7) ) { return ; }
+            // Java.g:207:5: ( annotation | 'public' | 'protected' | 'private' | 'abstract' | 'static' | 'final' | 'strictfp' )
+            int alt14=8;
+            try { dbg.enterDecision(14);
+
+            switch ( input.LA(1) ) {
+            case 73:
+                {
+                alt14=1;
+                }
+                break;
+            case 31:
+                {
+                alt14=2;
+                }
+                break;
+            case 32:
+                {
+                alt14=3;
+                }
+                break;
+            case 33:
+                {
+                alt14=4;
+                }
+                break;
+            case 34:
+                {
+                alt14=5;
+                }
+                break;
+            case 28:
+                {
+                alt14=6;
+                }
+                break;
+            case 35:
+                {
+                alt14=7;
+                }
+                break;
+            case 36:
+                {
+                alt14=8;
+                }
+                break;
+            default:
+                if (state.backtracking>0) {state.failed=true; return ;}
+                NoViableAltException nvae =
+                    new NoViableAltException("", 14, 0, input);
+
+                dbg.recognitionException(nvae);
+                throw nvae;
+            }
+
+            } finally {dbg.exitDecision(14);}
+
+            switch (alt14) {
+                case 1 :
+                    dbg.enterAlt(1);
+
+                    // Java.g:207:9: annotation
+                    {
+                    dbg.location(207,9);
+                    pushFollow(FOLLOW_annotation_in_classOrInterfaceModifier275);
+                    annotation();
+
+                    state._fsp--;
+                    if (state.failed) return ;
+
+                    }
+                    break;
+                case 2 :
+                    dbg.enterAlt(2);
+
+                    // Java.g:208:9: 'public'
+                    {
+                    dbg.location(208,9);
+                    match(input,31,FOLLOW_31_in_classOrInterfaceModifier288); if (state.failed) return ;
+
+                    }
+                    break;
+                case 3 :
+                    dbg.enterAlt(3);
+
+                    // Java.g:209:9: 'protected'
+                    {
+                    dbg.location(209,9);
+                    match(input,32,FOLLOW_32_in_classOrInterfaceModifier303); if (state.failed) return ;
+
+                    }
+                    break;
+                case 4 :
+                    dbg.enterAlt(4);
+
+                    // Java.g:210:9: 'private'
+                    {
+                    dbg.location(210,9);
+                    match(input,33,FOLLOW_33_in_classOrInterfaceModifier315); if (state.failed) return ;
+
+                    }
+                    break;
+                case 5 :
+                    dbg.enterAlt(5);
+
+                    // Java.g:211:9: 'abstract'
+                    {
+                    dbg.location(211,9);
+                    match(input,34,FOLLOW_34_in_classOrInterfaceModifier329); if (state.failed) return ;
+
+                    }
+                    break;
+                case 6 :
+                    dbg.enterAlt(6);
+
+                    // Java.g:212:9: 'static'
+                    {
+                    dbg.location(212,9);
+                    match(input,28,FOLLOW_28_in_classOrInterfaceModifier342); if (state.failed) return ;
+
+                    }
+                    break;
+                case 7 :
+                    dbg.enterAlt(7);
+
+                    // Java.g:213:9: 'final'
+                    {
+                    dbg.location(213,9);
+                    match(input,35,FOLLOW_35_in_classOrInterfaceModifier357); if (state.failed) return ;
+
+                    }
+                    break;
+                case 8 :
+                    dbg.enterAlt(8);
+
+                    // Java.g:214:9: 'strictfp'
+                    {
+                    dbg.location(214,9);
+                    match(input,36,FOLLOW_36_in_classOrInterfaceModifier373); if (state.failed) return ;
+
+                    }
+                    break;
+
+            }
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+            if ( state.backtracking>0 ) { memoize(input, 7, classOrInterfaceModifier_StartIndex); }
+        }
+        dbg.location(215, 5);
+
+        }
+        finally {
+            dbg.exitRule(getGrammarFileName(), "classOrInterfaceModifier");
+            decRuleLevel();
+            if ( getRuleLevel()==0 ) {dbg.terminate();}
+        }
+
+        return ;
+    }
+    // $ANTLR end "classOrInterfaceModifier"
+
+
+    // $ANTLR start "modifiers"
+    // Java.g:217:1: modifiers : ( modifier )* ;
+    public final void modifiers() throws RecognitionException {
+        int modifiers_StartIndex = input.index();
+        try { dbg.enterRule(getGrammarFileName(), "modifiers");
+        if ( getRuleLevel()==0 ) {dbg.commence();}
+        incRuleLevel();
+        dbg.location(217, 1);
+
+        try {
+            if ( state.backtracking>0 && alreadyParsedRule(input, 8) ) { return ; }
+            // Java.g:218:5: ( ( modifier )* )
+            dbg.enterAlt(1);
+
+            // Java.g:218:9: ( modifier )*
+            {
+            dbg.location(218,9);
+            // Java.g:218:9: ( modifier )*
+            try { dbg.enterSubRule(15);
+
+            loop15:
+            do {
+                int alt15=2;
+                try { dbg.enterDecision(15);
+
+                int LA15_0 = input.LA(1);
+
+                if ( (LA15_0==73) ) {
+                    int LA15_2 = input.LA(2);
+
+                    if ( (LA15_2==Identifier) ) {
+                        alt15=1;
+                    }
+
+
+                }
+                else if ( (LA15_0==28||(LA15_0>=31 && LA15_0<=36)||(LA15_0>=52 && LA15_0<=55)) ) {
+                    alt15=1;
+                }
+
+
+                } finally {dbg.exitDecision(15);}
+
+                switch (alt15) {
+            	case 1 :
+            	    dbg.enterAlt(1);
+
+            	    // Java.g:0:0: modifier
+            	    {
+            	    dbg.location(218,9);
+            	    pushFollow(FOLLOW_modifier_in_modifiers395);
+            	    modifier();
+
+            	    state._fsp--;
+            	    if (state.failed) return ;
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop15;
+                }
+            } while (true);
+            } finally {dbg.exitSubRule(15);}
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+            if ( state.backtracking>0 ) { memoize(input, 8, modifiers_StartIndex); }
+        }
+        dbg.location(219, 5);
+
+        }
+        finally {
+            dbg.exitRule(getGrammarFileName(), "modifiers");
+            decRuleLevel();
+            if ( getRuleLevel()==0 ) {dbg.terminate();}
+        }
+
+        return ;
+    }
+    // $ANTLR end "modifiers"
+
+
+    // $ANTLR start "classDeclaration"
+    // Java.g:221:1: classDeclaration : ( normalClassDeclaration | enumDeclaration );
+    public final void classDeclaration() throws RecognitionException {
+        int classDeclaration_StartIndex = input.index();
+        try { dbg.enterRule(getGrammarFileName(), "classDeclaration");
+        if ( getRuleLevel()==0 ) {dbg.commence();}
+        incRuleLevel();
+        dbg.location(221, 1);
+
+        try {
+            if ( state.backtracking>0 && alreadyParsedRule(input, 9) ) { return ; }
+            // Java.g:222:5: ( normalClassDeclaration | enumDeclaration )
+            int alt16=2;
+            try { dbg.enterDecision(16);
+
+            int LA16_0 = input.LA(1);
+
+            if ( (LA16_0==37) ) {
+                alt16=1;
+            }
+            else if ( (LA16_0==ENUM) ) {
+                alt16=2;
+            }
+            else {
+                if (state.backtracking>0) {state.failed=true; return ;}
+                NoViableAltException nvae =
+                    new NoViableAltException("", 16, 0, input);
+
+                dbg.recognitionException(nvae);
+                throw nvae;
+            }
+            } finally {dbg.exitDecision(16);}
+
+            switch (alt16) {
+                case 1 :
+                    dbg.enterAlt(1);
+
+                    // Java.g:222:9: normalClassDeclaration
+                    {
+                    dbg.location(222,9);
+                    pushFollow(FOLLOW_normalClassDeclaration_in_classDeclaration415);
+                    normalClassDeclaration();
+
+                    state._fsp--;
+                    if (state.failed) return ;
+
+                    }
+                    break;
+                case 2 :
+                    dbg.enterAlt(2);
+
+                    // Java.g:223:9: enumDeclaration
+                    {
+                    dbg.location(223,9);
+                    pushFollow(FOLLOW_enumDeclaration_in_classDeclaration425);
+                    enumDeclaration();
+
+                    state._fsp--;
+                    if (state.failed) return ;
+
+                    }
+                    break;
+
+            }
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+            if ( state.backtracking>0 ) { memoize(input, 9, classDeclaration_StartIndex); }
+        }
+        dbg.location(224, 5);
+
+        }
+        finally {
+            dbg.exitRule(getGrammarFileName(), "classDeclaration");
+            decRuleLevel();
+            if ( getRuleLevel()==0 ) {dbg.terminate();}
+        }
+
+        return ;
+    }
+    // $ANTLR end "classDeclaration"
+
+
+    // $ANTLR start "normalClassDeclaration"
+    // Java.g:226:1: normalClassDeclaration : 'class' Identifier ( typeParameters )? ( 'extends' type )? ( 'implements' typeList )? classBody ;
+    public final void normalClassDeclaration() throws RecognitionException {
+        int normalClassDeclaration_StartIndex = input.index();
+        try { dbg.enterRule(getGrammarFileName(), "normalClassDeclaration");
+        if ( getRuleLevel()==0 ) {dbg.commence();}
+        incRuleLevel();
+        dbg.location(226, 1);
+
+        try {
+            if ( state.backtracking>0 && alreadyParsedRule(input, 10) ) { return ; }
+            // Java.g:227:5: ( 'class' Identifier ( typeParameters )? ( 'extends' type )? ( 'implements' typeList )? classBody )
+            dbg.enterAlt(1);
+
+            // Java.g:227:9: 'class' Identifier ( typeParameters )? ( 'extends' type )? ( 'implements' typeList )? classBody
+            {
+            dbg.location(227,9);
+            match(input,37,FOLLOW_37_in_normalClassDeclaration448); if (state.failed) return ;
+            dbg.location(227,17);
+            match(input,Identifier,FOLLOW_Identifier_in_normalClassDeclaration450); if (state.failed) return ;
+            dbg.location(227,28);
+            // Java.g:227:28: ( typeParameters )?
+            int alt17=2;
+            try { dbg.enterSubRule(17);
+            try { dbg.enterDecision(17);
+
+            int LA17_0 = input.LA(1);
+
+            if ( (LA17_0==40) ) {
+                alt17=1;
+            }
+            } finally {dbg.exitDecision(17);}
+
+            switch (alt17) {
+                case 1 :
+                    dbg.enterAlt(1);
+
+                    // Java.g:0:0: typeParameters
+                    {
+                    dbg.location(227,28);
+                    pushFollow(FOLLOW_typeParameters_in_normalClassDeclaration452);
+                    typeParameters();
+
+                    state._fsp--;
+                    if (state.failed) return ;
+
+                    }
+                    break;
+
+            }
+            } finally {dbg.exitSubRule(17);}
+
+            dbg.location(228,9);
+            // Java.g:228:9: ( 'extends' type )?
+            int alt18=2;
+            try { dbg.enterSubRule(18);
+            try { dbg.enterDecision(18);
+
+            int LA18_0 = input.LA(1);
+
+            if ( (LA18_0==38) ) {
+                alt18=1;
+            }
+            } finally {dbg.exitDecision(18);}
+
+            switch (alt18) {
+                case 1 :
+                    dbg.enterAlt(1);
+
+                    // Java.g:228:10: 'extends' type
+                    {
+                    dbg.location(228,10);
+                    match(input,38,FOLLOW_38_in_normalClassDeclaration464); if (state.failed) return ;
+                    dbg.location(228,20);
+                    pushFollow(FOLLOW_type_in_normalClassDeclaration466);
+                    type();
+
+                    state._fsp--;
+                    if (state.failed) return ;
+
+                    }
+                    break;
+
+            }
+            } finally {dbg.exitSubRule(18);}
+
+            dbg.location(229,9);
+            // Java.g:229:9: ( 'implements' typeList )?
+            int alt19=2;
+            try { dbg.enterSubRule(19);
+            try { dbg.enterDecision(19);
+
+            int LA19_0 = input.LA(1);
+
+            if ( (LA19_0==39) ) {
+                alt19=1;
+            }
+            } finally {dbg.exitDecision(19);}
+
+            switch (alt19) {
+                case 1 :
+                    dbg.enterAlt(1);
+
+                    // Java.g:229:10: 'implements' typeList
+                    {
+                    dbg.location(229,10);
+                    match(input,39,FOLLOW_39_in_normalClassDeclaration479); if (state.failed) return ;
+                    dbg.location(229,23);
+                    pushFollow(FOLLOW_typeList_in_normalClassDeclaration481);
+                    typeList();
+
+                    state._fsp--;
+                    if (state.failed) return ;
+
+                    }
+                    break;
+
+            }
+            } finally {dbg.exitSubRule(19);}
+
+            dbg.location(230,9);
+            pushFollow(FOLLOW_classBody_in_normalClassDeclaration493);
+            classBody();
+
+            state._fsp--;
+            if (state.failed) return ;
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+            if ( state.backtracking>0 ) { memoize(input, 10, normalClassDeclaration_StartIndex); }
+        }
+        dbg.location(231, 5);
+
+        }
+        finally {
+            dbg.exitRule(getGrammarFileName(), "normalClassDeclaration");
+            decRuleLevel();
+            if ( getRuleLevel()==0 ) {dbg.terminate();}
+        }
+
+        return ;
+    }
+    // $ANTLR end "normalClassDeclaration"
+
+
+    // $ANTLR start "typeParameters"
+    // Java.g:233:1: typeParameters : '<' typeParameter ( ',' typeParameter )* '>' ;
+    public final void typeParameters() throws RecognitionException {
+        int typeParameters_StartIndex = input.index();
+        try { dbg.enterRule(getGrammarFileName(), "typeParameters");
+        if ( getRuleLevel()==0 ) {dbg.commence();}
+        incRuleLevel();
+        dbg.location(233, 1);
+
+        try {
+            if ( state.backtracking>0 && alreadyParsedRule(input, 11) ) { return ; }
+            // Java.g:234:5: ( '<' typeParameter ( ',' typeParameter )* '>' )
+            dbg.enterAlt(1);
+
+            // Java.g:234:9: '<' typeParameter ( ',' typeParameter )* '>'
+            {
+            dbg.location(234,9);
+            match(input,40,FOLLOW_40_in_typeParameters516); if (state.failed) return ;
+            dbg.location(234,13);
+            pushFollow(FOLLOW_typeParameter_in_typeParameters518);
+            typeParameter();
+
+            state._fsp--;
+            if (state.failed) return ;
+            dbg.location(234,27);
+            // Java.g:234:27: ( ',' typeParameter )*
+            try { dbg.enterSubRule(20);
+
+            loop20:
+            do {
+                int alt20=2;
+                try { dbg.enterDecision(20);
+
+                int LA20_0 = input.LA(1);
+
+                if ( (LA20_0==41) ) {
+                    alt20=1;
+                }
+
+
+                } finally {dbg.exitDecision(20);}
+
+                switch (alt20) {
+            	case 1 :
+            	    dbg.enterAlt(1);
+
+            	    // Java.g:234:28: ',' typeParameter
+            	    {
+            	    dbg.location(234,28);
+            	    match(input,41,FOLLOW_41_in_typeParameters521); if (state.failed) return ;
+            	    dbg.location(234,32);
+            	    pushFollow(FOLLOW_typeParameter_in_typeParameters523);
+            	    typeParameter();
+
+            	    state._fsp--;
+            	    if (state.failed) return ;
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop20;
+                }
+            } while (true);
+            } finally {dbg.exitSubRule(20);}
+
+            dbg.location(234,48);
+            match(input,42,FOLLOW_42_in_typeParameters527); if (state.failed) return ;
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+            if ( state.backtracking>0 ) { memoize(input, 11, typeParameters_StartIndex); }
+        }
+        dbg.location(235, 5);
+
+        }
+        finally {
+            dbg.exitRule(getGrammarFileName(), "typeParameters");
+            decRuleLevel();
+            if ( getRuleLevel()==0 ) {dbg.terminate();}
+        }
+
+        return ;
+    }
+    // $ANTLR end "typeParameters"
+
+
+    // $ANTLR start "typeParameter"
+    // Java.g:237:1: typeParameter : Identifier ( 'extends' typeBound )? ;
+    public final void typeParameter() throws RecognitionException {
+        int typeParameter_StartIndex = input.index();
+        try { dbg.enterRule(getGrammarFileName(), "typeParameter");
+        if ( getRuleLevel()==0 ) {dbg.commence();}
+        incRuleLevel();
+        dbg.location(237, 1);
+
+        try {
+            if ( state.backtracking>0 && alreadyParsedRule(input, 12) ) { return ; }
+            // Java.g:238:5: ( Identifier ( 'extends' typeBound )? )
+            dbg.enterAlt(1);
+
+            // Java.g:238:9: Identifier ( 'extends' typeBound )?
+            {
+            dbg.location(238,9);
+            match(input,Identifier,FOLLOW_Identifier_in_typeParameter546); if (state.failed) return ;
+            dbg.location(238,20);
+            // Java.g:238:20: ( 'extends' typeBound )?
+            int alt21=2;
+            try { dbg.enterSubRule(21);
+            try { dbg.enterDecision(21);
+
+            int LA21_0 = input.LA(1);
+
+            if ( (LA21_0==38) ) {
+                alt21=1;
+            }
+            } finally {dbg.exitDecision(21);}
+
+            switch (alt21) {
+                case 1 :
+                    dbg.enterAlt(1);
+
+                    // Java.g:238:21: 'extends' typeBound
+                    {
+                    dbg.location(238,21);
+                    match(input,38,FOLLOW_38_in_typeParameter549); if (state.failed) return ;
+                    dbg.location(238,31);
+                    pushFollow(FOLLOW_typeBound_in_typeParameter551);
+                    typeBound();
+
+                    state._fsp--;
+                    if (state.failed) return ;
+
+                    }
+                    break;
+
+            }
+            } finally {dbg.exitSubRule(21);}
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+            if ( state.backtracking>0 ) { memoize(input, 12, typeParameter_StartIndex); }
+        }
+        dbg.location(239, 5);
+
+        }
+        finally {
+            dbg.exitRule(getGrammarFileName(), "typeParameter");
+            decRuleLevel();
+            if ( getRuleLevel()==0 ) {dbg.terminate();}
+        }
+
+        return ;
+    }
+    // $ANTLR end "typeParameter"
+
+
+    // $ANTLR start "typeBound"
+    // Java.g:241:1: typeBound : type ( '&' type )* ;
+    public final void typeBound() throws RecognitionException {
+        int typeBound_StartIndex = input.index();
+        try { dbg.enterRule(getGrammarFileName(), "typeBound");
+        if ( getRuleLevel()==0 ) {dbg.commence();}
+        incRuleLevel();
+        dbg.location(241, 1);
+
+        try {
+            if ( state.backtracking>0 && alreadyParsedRule(input, 13) ) { return ; }
+            // Java.g:242:5: ( type ( '&' type )* )
+            dbg.enterAlt(1);
+
+            // Java.g:242:9: type ( '&' type )*
+            {
+            dbg.location(242,9);
+            pushFollow(FOLLOW_type_in_typeBound580);
+            type();
+
+            state._fsp--;
+            if (state.failed) return ;
+            dbg.location(242,14);
+            // Java.g:242:14: ( '&' type )*
+            try { dbg.enterSubRule(22);
+
+            loop22:
+            do {
+                int alt22=2;
+                try { dbg.enterDecision(22);
+
+                int LA22_0 = input.LA(1);
+
+                if ( (LA22_0==43) ) {
+                    alt22=1;
+                }
+
+
+                } finally {dbg.exitDecision(22);}
+
+                switch (alt22) {
+            	case 1 :
+            	    dbg.enterAlt(1);
+
+            	    // Java.g:242:15: '&' type
+            	    {
+            	    dbg.location(242,15);
+            	    match(input,43,FOLLOW_43_in_typeBound583); if (state.failed) return ;
+            	    dbg.location(242,19);
+            	    pushFollow(FOLLOW_type_in_typeBound585);
+            	    type();
+
+            	    state._fsp--;
+            	    if (state.failed) return ;
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop22;
+                }
+            } while (true);
+            } finally {dbg.exitSubRule(22);}
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+            if ( state.backtracking>0 ) { memoize(input, 13, typeBound_StartIndex); }
+        }
+        dbg.location(243, 5);
+
+        }
+        finally {
+            dbg.exitRule(getGrammarFileName(), "typeBound");
+            decRuleLevel();
+            if ( getRuleLevel()==0 ) {dbg.terminate();}
+        }
+
+        return ;
+    }
+    // $ANTLR end "typeBound"
+
+
+    // $ANTLR start "enumDeclaration"
+    // Java.g:245:1: enumDeclaration : ENUM Identifier ( 'implements' typeList )? enumBody ;
+    public final void enumDeclaration() throws RecognitionException {
+        int enumDeclaration_StartIndex = input.index();
+        try { dbg.enterRule(getGrammarFileName(), "enumDeclaration");
+        if ( getRuleLevel()==0 ) {dbg.commence();}
+        incRuleLevel();
+        dbg.location(245, 1);
+
+        try {
+            if ( state.backtracking>0 && alreadyParsedRule(input, 14) ) { return ; }
+            // Java.g:246:5: ( ENUM Identifier ( 'implements' typeList )? enumBody )
+            dbg.enterAlt(1);
+
+            // Java.g:246:9: ENUM Identifier ( 'implements' typeList )? enumBody
+            {
+            dbg.location(246,9);
+            match(input,ENUM,FOLLOW_ENUM_in_enumDeclaration606); if (state.failed) return ;
+            dbg.location(246,14);
+            match(input,Identifier,FOLLOW_Identifier_in_enumDeclaration608); if (state.failed) return ;
+            dbg.location(246,25);
+            // Java.g:246:25: ( 'implements' typeList )?
+            int alt23=2;
+            try { dbg.enterSubRule(23);
+            try { dbg.enterDecision(23);
+
+            int LA23_0 = input.LA(1);
+
+            if ( (LA23_0==39) ) {
+                alt23=1;
+            }
+            } finally {dbg.exitDecision(23);}
+
+            switch (alt23) {
+                case 1 :
+                    dbg.enterAlt(1);
+
+                    // Java.g:246:26: 'implements' typeList
+                    {
+                    dbg.location(246,26);
+                    match(input,39,FOLLOW_39_in_enumDeclaration611); if (state.failed) return ;
+                    dbg.location(246,39);
+                    pushFollow(FOLLOW_typeList_in_enumDeclaration613);
+                    typeList();
+
+                    state._fsp--;
+                    if (state.failed) return ;
+
+                    }
+                    break;
+
+            }
+            } finally {dbg.exitSubRule(23);}
+
+            dbg.location(246,50);
+            pushFollow(FOLLOW_enumBody_in_enumDeclaration617);
+            enumBody();
+
+            state._fsp--;
+            if (state.failed) return ;
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+            if ( state.backtracking>0 ) { memoize(input, 14, enumDeclaration_StartIndex); }
+        }
+        dbg.location(247, 5);
+
+        }
+        finally {
+            dbg.exitRule(getGrammarFileName(), "enumDeclaration");
+            decRuleLevel();
+            if ( getRuleLevel()==0 ) {dbg.terminate();}
+        }
+
+        return ;
+    }
+    // $ANTLR end "enumDeclaration"
+
+
+    // $ANTLR start "enumBody"
+    // Java.g:249:1: enumBody : '{' ( enumConstants )? ( ',' )? ( enumBodyDeclarations )? '}' ;
+    public final void enumBody() throws RecognitionException {
+        int enumBody_StartIndex = input.index();
+        try { dbg.enterRule(getGrammarFileName(), "enumBody");
+        if ( getRuleLevel()==0 ) {dbg.commence();}
+        incRuleLevel();
+        dbg.location(249, 1);
+
+        try {
+            if ( state.backtracking>0 && alreadyParsedRule(input, 15) ) { return ; }
+            // Java.g:250:5: ( '{' ( enumConstants )? ( ',' )? ( enumBodyDeclarations )? '}' )
+            dbg.enterAlt(1);
+
+            // Java.g:250:9: '{' ( enumConstants )? ( ',' )? ( enumBodyDeclarations )? '}'
+            {
+            dbg.location(250,9);
+            match(input,44,FOLLOW_44_in_enumBody636); if (state.failed) return ;
+            dbg.location(250,13);
+            // Java.g:250:13: ( enumConstants )?
+            int alt24=2;
+            try { dbg.enterSubRule(24);
+            try { dbg.enterDecision(24);
+
+            int LA24_0 = input.LA(1);
+
+            if ( (LA24_0==Identifier||LA24_0==73) ) {
+                alt24=1;
+            }
+            } finally {dbg.exitDecision(24);}
+
+            switch (alt24) {
+                case 1 :
+                    dbg.enterAlt(1);
+
+                    // Java.g:0:0: enumConstants
+                    {
+                    dbg.location(250,13);
+                    pushFollow(FOLLOW_enumConstants_in_enumBody638);
+                    enumConstants();
+
+                    state._fsp--;
+                    if (state.failed) return ;
+
+                    }
+                    break;
+
+            }
+            } finally {dbg.exitSubRule(24);}
+
+            dbg.location(250,28);
+            // Java.g:250:28: ( ',' )?
+            int alt25=2;
+            try { dbg.enterSubRule(25);
+            try { dbg.enterDecision(25);
+
+            int LA25_0 = input.LA(1);
+
+            if ( (LA25_0==41) ) {
+                alt25=1;
+            }
+            } finally {dbg.exitDecision(25);}
+
+            switch (alt25) {
+                case 1 :
+                    dbg.enterAlt(1);
+
+                    // Java.g:0:0: ','
+                    {
+                    dbg.location(250,28);
+                    match(input,41,FOLLOW_41_in_enumBody641); if (state.failed) return ;
+
+                    }
+                    break;
+
+            }
+            } finally {dbg.exitSubRule(25);}
+
+            dbg.location(250,33);
+            // Java.g:250:33: ( enumBodyDeclarations )?
+            int alt26=2;
+            try { dbg.enterSubRule(26);
+            try { dbg.enterDecision(26);
+
+            int LA26_0 = input.LA(1);
+
+            if ( (LA26_0==26) ) {
+                alt26=1;
+            }
+            } finally {dbg.exitDecision(26);}
+
+            switch (alt26) {
+                case 1 :
+                    dbg.enterAlt(1);
+
+                    // Java.g:0:0: enumBodyDeclarations
+                    {
+                    dbg.location(250,33);
+                    pushFollow(FOLLOW_enumBodyDeclarations_in_enumBody644);
+                    enumBodyDeclarations();
+
+                    state._fsp--;
+                    if (state.failed) return ;
+
+                    }
+                    break;
+
+            }
+            } finally {dbg.exitSubRule(26);}
+
+            dbg.location(250,55);
+            match(input,45,FOLLOW_45_in_enumBody647); if (state.failed) return ;
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+            if ( state.backtracking>0 ) { memoize(input, 15, enumBody_StartIndex); }
+        }
+        dbg.location(251, 5);
+
+        }
+        finally {
+            dbg.exitRule(getGrammarFileName(), "enumBody");
+            decRuleLevel();
+            if ( getRuleLevel()==0 ) {dbg.terminate();}
+        }
+
+        return ;
+    }
+    // $ANTLR end "enumBody"
+
+
+    // $ANTLR start "enumConstants"
+    // Java.g:253:1: enumConstants : enumConstant ( ',' enumConstant )* ;
+    public final void enumConstants() throws RecognitionException {
+        int enumConstants_StartIndex = input.index();
+        try { dbg.enterRule(getGrammarFileName(), "enumConstants");
+        if ( getRuleLevel()==0 ) {dbg.commence();}
+        incRuleLevel();
+        dbg.location(253, 1);
+
+        try {
+            if ( state.backtracking>0 && alreadyParsedRule(input, 16) ) { return ; }
+            // Java.g:254:5: ( enumConstant ( ',' enumConstant )* )
+            dbg.enterAlt(1);
+
+            // Java.g:254:9: enumConstant ( ',' enumConstant )*
+            {
+            dbg.location(254,9);
+            pushFollow(FOLLOW_enumConstant_in_enumConstants666);
+            enumConstant();
+
+            state._fsp--;
+            if (state.failed) return ;
+            dbg.location(254,22);
+            // Java.g:254:22: ( ',' enumConstant )*
+            try { dbg.enterSubRule(27);
+
+            loop27:
+            do {
+                int alt27=2;
+                try { dbg.enterDecision(27);
+
+                int LA27_0 = input.LA(1);
+
+                if ( (LA27_0==41) ) {
+                    int LA27_1 = input.LA(2);
+
+                    if ( (LA27_1==Identifier||LA27_1==73) ) {
+                        alt27=1;
+                    }
+
+
+                }
+
+
+                } finally {dbg.exitDecision(27);}
+
+                switch (alt27) {
+            	case 1 :
+            	    dbg.enterAlt(1);
+
+            	    // Java.g:254:23: ',' enumConstant
+            	    {
+            	    dbg.location(254,23);
+            	    match(input,41,FOLLOW_41_in_enumConstants669); if (state.failed) return ;
+            	    dbg.location(254,27);
+            	    pushFollow(FOLLOW_enumConstant_in_enumConstants671);
+            	    enumConstant();
+
+            	    state._fsp--;
+            	    if (state.failed) return ;
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop27;
+                }
+            } while (true);
+            } finally {dbg.exitSubRule(27);}
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+        finally {
+            if ( state.backtracking>0 ) { memoize(input, 16, enumConstants_StartIndex); }
+        }
+        dbg.location(255, 5);
+
+        }
+        finally {
+            dbg.exitRule(getGrammarFileName(), "enumConstants");
+            decRuleLevel();
+            if ( getRuleLevel()==0 ) {dbg.terminate();}
+        }
+
+        return ;
+    }
+    // $ANTLR end "enumConstants"
+
+
+    // $ANTLR start "enumConstant"
+    // Java.g:257:1: enumConstant : ( annotations )? Identifier ( arguments )? ( classBody )? ;
+    public final void enumConstant() throws RecognitionException {
+        int enumConstant_StartIndex = input.index();
+        try { dbg.enterRule(getGrammarFileName(), "enumConstant");
+        if ( getRuleLevel()==0 ) {dbg.commence();}
+        incRuleLevel();
+        dbg.location(257, 1);
+
+        try {
+            if ( state.backtracking>0 && alreadyParsedRule(input, 17) ) { return ; }
+            // Java.g:258:5: ( ( annotations )? Identifier ( arguments )? ( classBody )? )
+            dbg.enterAlt(1);
+
+            // Java.g:258:9: ( annotations )? Identifier ( arguments )? ( classBody )?
+            {
+            dbg.location(258,9);
+            // Java.g:258:9: ( annotations )?
+            int alt28=2;
+            try { dbg.enterSubRule(28);
+            try { dbg.enterDecision(28);
+
+            int LA28_0 = input.LA(1);
+
+            if ( (LA28_0==73) ) {
+                alt28=1;
+            }
+            } finally {dbg.exitDecision(28);}
+
+            switch (alt28) {
+                case 1 :
+                    dbg.enterAlt(1);
+
+                    // Java.g:0:0: annotations
+                    {
+                    dbg.location(258,9);
+                    pushFollow(FOLLOW_annotations_in_enumConstant696);
+                    annotations();
+
+                    state._fsp--;
+                    if (state.failed) return ;
+
+                    }
+                    break;
+
+            }
+            } finally {dbg.exitSubRule(28);}
+
+            dbg.location(258,22);
+            match(input,Identifier,FOLLOW_Identifier_in_enumConstant699); if (state.failed) return ;
+            dbg.location(258,33);
+            // Java.g:258:33: ( arguments )?
+            int alt29=2;
+            try { dbg.enterSubRule(29);
+            try { dbg.enterDecision(29);
+
+            int LA29_0 = input.LA(1);
+
+            if ( (LA29_0==66) ) {
+                alt29=1;
+            }
+            } finally {dbg.exitDecision(29);}
+
+            switch (alt29) {
+                case 1 :
+                    dbg.enterAlt(1);
+
+                    // Java.g:0:0: arguments
+                    {
+                    dbg.location(258,33);
+                    pushFollow(FOLLOW_arguments_in_enumConstant701);
+                    arguments();
+
+                    state._fsp--;
+                    if (state.failed) return ;
+
+                    }
+                    break;
+
+            }
+            } finally {dbg.exitSubRule(29);}
+
+            dbg.location(258,44);
+            // Java.g:258:44: ( classBody )?
+            int alt30=2;
+            try { dbg.enterSubRule(30);
+            try { dbg.enterDecision(30);
+
+            int LA30_0 = input.LA(1);
+
+            if ( (LA30_0==44) ) {
+                alt30=1;
+            }
+            } finally {dbg.exitDecision(30);}
+
+            switch (alt30) {
+                case 1 :
+                    dbg.enterAlt(1);
+
+                    // Java.g:0:0: classBody
+                    {

[... 17684 lines stripped ...]