//
// Generated by JTB 1.2.1
//

options {
   JAVA_UNICODE_ESCAPE = true;
}

PARSER_BEGIN(JavaParser)
package jde.debugger.interpret;

import jde.debugger.interpret.syntaxtree.*;
import java.util.Vector;


public class JavaParser 
{
   public static void main(String args[])
   {
      JavaParser parser;
      if ( args.length == 0 )
      {
         System.out.println("Java Parser Version 1.1:  Reading from standard input . . .");
         parser = new JavaParser(System.in);
      }
      else
         if ( args.length == 1 )
         {
            System.out.println("Java Parser Version 1.1:  Reading from file " + args[0]+ " . . .");
            try
            {
               parser = new JavaParser(new java.io.FileInputStream(args[0]));
            }
            catch (java.io.FileNotFoundException e)
            {
               System.out.println("Java Parser Version 1.1:  File " + args[0]+ " not found.");
               return;
            }
         }
         else
         {
            System.out.println("Java Parser Version 1.1:  Usage is one of:");
            System.out.println("         java JavaParser < inputfile");
            System.out.println("OR");
            System.out.println("         java JavaParser inputfile");
            return;
         }
      try
      {
         parser.CompilationUnit();
         System.out.println("Java Parser Version 1.1:  Java program parsed successfully.");
      }
      catch (ParseException e)
      {
         System.out.println(e.getMessage());
         System.out.println("Java Parser Version 1.1:  Encountered errors during parse.");
      }
   }
}

class JTBToolkit {
   static NodeToken makeNodeToken(Token t) {
      return new NodeToken(t.image.intern(), t.kind, t.beginLine, t.beginColumn, t.endLine, t.endColumn);
   }
}


PARSER_END(JavaParser)

SKIP :
{
   " "
   | "\t"
   | "\n"
   | "\r"
   | "\f"
}

MORE :
{
   "//" : IN_SINGLE_LINE_COMMENT
   | <"/**" ~["/"]>
      {
         input_stream.backup(1);
      } : IN_FORMAL_COMMENT
   | "/*" : IN_MULTI_LINE_COMMENT
}

<IN_SINGLE_LINE_COMMENT> SPECIAL_TOKEN :
{
   <SINGLE_LINE_COMMENT: "\n" | "\r" | "\r\n"> : DEFAULT
}

<IN_FORMAL_COMMENT> SPECIAL_TOKEN :
{
   <FORMAL_COMMENT: "*/"> : DEFAULT
}

<IN_MULTI_LINE_COMMENT> SPECIAL_TOKEN :
{
   <MULTI_LINE_COMMENT: "*/"> : DEFAULT
}

<IN_SINGLE_LINE_COMMENT, IN_FORMAL_COMMENT, IN_MULTI_LINE_COMMENT> MORE :
{
   <~[]>
}

TOKEN :
{
   <ABSTRACT: "abstract">
   | <BOOLEAN: "boolean">
   | <BREAK: "break">
   | <BYTE: "byte">
   | <CASE: "case">
   | <CATCH: "catch">
   | <CHAR: "char">
   | <CLASS: "class">
   | <CONST: "const">
   | <CONTINUE: "continue">
   | <_DEFAULT: "default">
   | <DO: "do">
   | <DOUBLE: "double">
   | <ELSE: "else">
   | <EXTENDS: "extends">
   | <FALSE: "false">
   | <FINAL: "final">
   | <FINALLY: "finally">
   | <FLOAT: "float">
   | <FOR: "for">
   | <GOTO: "goto">
   | <IF: "if">
   | <IMPLEMENTS: "implements">
   | <IMPORT: "import">
   | <INSTANCEOF: "instanceof">
   | <INT: "int">
   | <INTERFACE: "interface">
   | <LONG: "long">
   | <NATIVE: "native">
   | <NEW: "new">
   | <NULL: "null">
   | <PACKAGE: "package">
   | <PRIVATE: "private">
   | <PROTECTED: "protected">
   | <PUBLIC: "public">
   | <RETURN: "return">
   | <SHORT: "short">
   | <STATIC: "static">
   | <SUPER: "super">
   | <SWITCH: "switch">
   | <SYNCHRONIZED: "synchronized">
   | <THIS: "this">
   | <THROW: "throw">
   | <THROWS: "throws">
   | <TRANSIENT: "transient">
   | <TRUE: "true">
   | <TRY: "try">
   | <VOID: "void">
   | <VOLATILE: "volatile">
   | <WHILE: "while">
}

TOKEN :
{
   <INTEGER_LITERAL: <DECIMAL_LITERAL> (["l", "L"])? | <HEX_LITERAL> (["l", "L"])? | <OCTAL_LITERAL> (["l", "L"])?>
   | <#DECIMAL_LITERAL: ["1"-"9"] (["0"-"9"])*>
   | <#HEX_LITERAL: "0" ["x", "X"] (["0"-"9", "a"-"f", "A"-"F"])+>
   | <#OCTAL_LITERAL: "0" (["0"-"7"])*>
   | <FLOATING_POINT_LITERAL: (["0"-"9"])+ "." (["0"-"9"])* (<EXPONENT>)? (["f", "F", "d", "D"])? | "." (["0"-"9"])+ (<EXPONENT>)? (["f", "F", "d", "D"])? | (["0"-"9"])+ <EXPONENT> (["f", "F", "d", "D"])? | (["0"-"9"])+ (<EXPONENT>)? ["f", "F", "d", "D"]>
   | <#EXPONENT: ["e", "E"] (["+", "-"])? (["0"-"9"])+>
   | <CHARACTER_LITERAL: "'" ((~["'", "\\", "\n", "\r"]) | ("\\" (["n", "t", "b", "r", "f", "\\", "'", "\""] | ["0"-"7"] (["0"-"7"])? | ["0"-"3"] ["0"-"7"] ["0"-"7"]))) "'">
   | <STRING_LITERAL: "\"" ((~["\"", "\\", "\n", "\r"]) | ("\\" (["n", "t", "b", "r", "f", "\\", "'", "\""] | ["0"-"7"] (["0"-"7"])? | ["0"-"3"] ["0"-"7"] ["0"-"7"])))* "\"">
}

TOKEN :
{
   <IDENTIFIER: <LETTER> (<LETTER> | <DIGIT>)*>
   | <#LETTER: ["$", "A"-"Z", "_", "a"-"z", "\u00c0"-"\u00d6", "\u00d8"-"\u00f6", "\u00f8"-"\u00ff", "\u0100"-"\u1fff", "\u3040"-"\u318f", "\u3300"-"\u337f", "\u3400"-"\u3d2d", "\u4e00"-"\u9fff", "\uf900"-"\ufaff"]>
   | <#DIGIT: ["0"-"9", "\u0660"-"\u0669", "\u06f0"-"\u06f9", "\u0966"-"\u096f", "\u09e6"-"\u09ef", "\u0a66"-"\u0a6f", "\u0ae6"-"\u0aef", "\u0b66"-"\u0b6f", "\u0be7"-"\u0bef", "\u0c66"-"\u0c6f", "\u0ce6"-"\u0cef", "\u0d66"-"\u0d6f", "\u0e50"-"\u0e59", "\u0ed0"-"\u0ed9", "\u1040"-"\u1049"]>
}

TOKEN :
{
   <LPAREN: "(">
   | <RPAREN: ")">
   | <LBRACE: "{">
   | <RBRACE: "}">
   | <LBRACKET: "[">
   | <RBRACKET: "]">
   | <SEMICOLON: ";">
   | <COMMA: ",">
   | <DOT: ".">
}

TOKEN :
{
   <ASSIGN: "=">
   | <GT: ">">
   | <LT: "<">
   | <BANG: "!">
   | <TILDE: "~">
   | <HOOK: "?">
   | <COLON: ":">
   | <EQ: "==">
   | <LE: "<=">
   | <GE: ">=">
   | <NE: "!=">
   | <SC_OR: "||">
   | <SC_AND: "&&">
   | <INCR: "++">
   | <DECR: "--">
   | <PLUS: "+">
   | <MINUS: "-">
   | <STAR: "*">
   | <SLASH: "/">
   | <BIT_AND: "&">
   | <BIT_OR: "|">
   | <XOR: "^">
   | <REM: "%">
   | <LSHIFT: "<<">
   | <RSIGNEDSHIFT: ">>">
   | <RUNSIGNEDSHIFT: ">>>">
   | <PLUSASSIGN: "+=">
   | <MINUSASSIGN: "-=">
   | <STARASSIGN: "*=">
   | <SLASHASSIGN: "/=">
   | <ANDASSIGN: "&=">
   | <ORASSIGN: "|=">
   | <XORASSIGN: "^=">
   | <REMASSIGN: "%=">
   | <LSHIFTASSIGN: "<<=">
   | <RSIGNEDSHIFTASSIGN: ">>=">
   | <RUNSIGNEDSHIFTASSIGN: ">>>=">
}

Type Type() :
{
   NodeChoice n0;
   PrimitiveType n1;
   Name n2;
   NodeListOptional n3 = new NodeListOptional();
   NodeSequence n4;
   NodeToken n5;
   Token n6;
   NodeToken n7;
   Token n8;

   {
   }
}
{
   (
      (
         n1=PrimitiveType()
         { n0 = new NodeChoice(n1, 0); }
      |
         n2=Name()
         { n0 = new NodeChoice(n2, 1); }
      )
      
   )
   (
      { n4 = new NodeSequence(2); }
      n6="[" { n5 = JTBToolkit.makeNodeToken(n6); }
      { n4.addNode(n5); }
      n8="]" { n7 = JTBToolkit.makeNodeToken(n8); }
      { n4.addNode(n7); }
      { n3.addNode(n4); }
   )*
   { n3.nodes.trimToSize(); }
   
   { return new Type(n0,n3); }
}

PrimitiveType PrimitiveType() :
{
   NodeChoice n0;
   NodeToken n1;
   Token n2;
   NodeToken n3;
   Token n4;
   NodeToken n5;
   Token n6;
   NodeToken n7;
   Token n8;
   NodeToken n9;
   Token n10;
   NodeToken n11;
   Token n12;
   NodeToken n13;
   Token n14;
   NodeToken n15;
   Token n16;

   {
   }
}
{
   (
      n2="boolean" { n1 = JTBToolkit.makeNodeToken(n2); }
      { n0 = new NodeChoice(n1, 0); }
   |
      n4="char" { n3 = JTBToolkit.makeNodeToken(n4); }
      { n0 = new NodeChoice(n3, 1); }
   |
      n6="byte" { n5 = JTBToolkit.makeNodeToken(n6); }
      { n0 = new NodeChoice(n5, 2); }
   |
      n8="short" { n7 = JTBToolkit.makeNodeToken(n8); }
      { n0 = new NodeChoice(n7, 3); }
   |
      n10="int" { n9 = JTBToolkit.makeNodeToken(n10); }
      { n0 = new NodeChoice(n9, 4); }
   |
      n12="long" { n11 = JTBToolkit.makeNodeToken(n12); }
      { n0 = new NodeChoice(n11, 5); }
   |
      n14="float" { n13 = JTBToolkit.makeNodeToken(n14); }
      { n0 = new NodeChoice(n13, 6); }
   |
      n16="double" { n15 = JTBToolkit.makeNodeToken(n16); }
      { n0 = new NodeChoice(n15, 7); }
   )
   
   { return new PrimitiveType(n0); }
}

ResultType ResultType() :
{
   NodeChoice n0;
   NodeToken n1;
   Token n2;
   Type n3;

   {
   }
}
{
   (
      n2="void" { n1 = JTBToolkit.makeNodeToken(n2); }
      { n0 = new NodeChoice(n1, 0); }
   |
      n3=Type()
      { n0 = new NodeChoice(n3, 1); }
   )
   
   { return new ResultType(n0); }
}

Name Name() :
{
   NodeToken n0;
   Token n1;
   NodeListOptional n2 = new NodeListOptional();
   NodeSequence n3;
   NodeToken n4;
   Token n5;
   NodeToken n6;
   Token n7;

   {
   }
}
{
   n1=<IDENTIFIER> { n0 = JTBToolkit.makeNodeToken(n1); }
   (
      LOOKAHEAD(2)
      { n3 = new NodeSequence(2); }
      n5="." { n4 = JTBToolkit.makeNodeToken(n5); }
      { n3.addNode(n4); }
      n7=<IDENTIFIER> { n6 = JTBToolkit.makeNodeToken(n7); }
      { n3.addNode(n6); }
      { n2.addNode(n3); }
   )*
   { n2.nodes.trimToSize(); }
   
   { return new Name(n0,n2); }
}

NameList NameList() :
{
   Name n0;
   NodeListOptional n1 = new NodeListOptional();
   NodeSequence n2;
   NodeToken n3;
   Token n4;
   Name n5;

   {
   }
}
{
   n0=Name()
   (
      { n2 = new NodeSequence(2); }
      n4="," { n3 = JTBToolkit.makeNodeToken(n4); }
      { n2.addNode(n3); }
      n5=Name()
      { n2.addNode(n5); }
      { n1.addNode(n2); }
   )*
   { n1.nodes.trimToSize(); }
   
   { return new NameList(n0,n1); }
}

Expression Expression() :
{
   ConditionalExpression n0;
   NodeOptional n1 = new NodeOptional();
   NodeSequence n2;
   AssignmentOperator n3;
   Expression n4;

   {
   }
}
{
   n0=ConditionalExpression()
   (
      { n2 = new NodeSequence(2); }
      n3=AssignmentOperator()
      { n2.addNode(n3); }
      n4=Expression()
      { n2.addNode(n4); }
      { n1.addNode(n2); }
   )?
   
   { return new Expression(n0,n1); }
}

AssignmentOperator AssignmentOperator() :
{
   NodeChoice n0;
   NodeToken n1;
   Token n2;
   NodeToken n3;
   Token n4;
   NodeToken n5;
   Token n6;
   NodeToken n7;
   Token n8;
   NodeToken n9;
   Token n10;
   NodeToken n11;
   Token n12;
   NodeToken n13;
   Token n14;
   NodeToken n15;
   Token n16;
   NodeToken n17;
   Token n18;
   NodeToken n19;
   Token n20;
   NodeToken n21;
   Token n22;
   NodeToken n23;
   Token n24;

   {
   }
}
{
   (
      n2="=" { n1 = JTBToolkit.makeNodeToken(n2); }
      { n0 = new NodeChoice(n1, 0); }
   |
      n4="*=" { n3 = JTBToolkit.makeNodeToken(n4); }
      { n0 = new NodeChoice(n3, 1); }
   |
      n6="/=" { n5 = JTBToolkit.makeNodeToken(n6); }
      { n0 = new NodeChoice(n5, 2); }
   |
      n8="%=" { n7 = JTBToolkit.makeNodeToken(n8); }
      { n0 = new NodeChoice(n7, 3); }
   |
      n10="+=" { n9 = JTBToolkit.makeNodeToken(n10); }
      { n0 = new NodeChoice(n9, 4); }
   |
      n12="-=" { n11 = JTBToolkit.makeNodeToken(n12); }
      { n0 = new NodeChoice(n11, 5); }
   |
      n14="<<=" { n13 = JTBToolkit.makeNodeToken(n14); }
      { n0 = new NodeChoice(n13, 6); }
   |
      n16=">>=" { n15 = JTBToolkit.makeNodeToken(n16); }
      { n0 = new NodeChoice(n15, 7); }
   |
      n18=">>>=" { n17 = JTBToolkit.makeNodeToken(n18); }
      { n0 = new NodeChoice(n17, 8); }
   |
      n20="&=" { n19 = JTBToolkit.makeNodeToken(n20); }
      { n0 = new NodeChoice(n19, 9); }
   |
      n22="^=" { n21 = JTBToolkit.makeNodeToken(n22); }
      { n0 = new NodeChoice(n21, 10); }
   |
      n24="|=" { n23 = JTBToolkit.makeNodeToken(n24); }
      { n0 = new NodeChoice(n23, 11); }
   )
   
   { return new AssignmentOperator(n0); }
}

ConditionalExpression ConditionalExpression() :
{
   ConditionalOrExpression n0;
   NodeOptional n1 = new NodeOptional();
   NodeSequence n2;
   NodeToken n3;
   Token n4;
   Expression n5;
   NodeToken n6;
   Token n7;
   ConditionalExpression n8;

   {
   }
}
{
   n0=ConditionalOrExpression()
   (
      { n2 = new NodeSequence(4); }
      n4="?" { n3 = JTBToolkit.makeNodeToken(n4); }
      { n2.addNode(n3); }
      n5=Expression()
      { n2.addNode(n5); }
      n7=":" { n6 = JTBToolkit.makeNodeToken(n7); }
      { n2.addNode(n6); }
      n8=ConditionalExpression()
      { n2.addNode(n8); }
      { n1.addNode(n2); }
   )?
   
   { return new ConditionalExpression(n0,n1); }
}

ConditionalOrExpression ConditionalOrExpression() :
{
   ConditionalAndExpression n0;
   NodeListOptional n1 = new NodeListOptional();
   NodeSequence n2;
   NodeToken n3;
   Token n4;
   ConditionalAndExpression n5;

   {
   }
}
{
   n0=ConditionalAndExpression()
   (
      { n2 = new NodeSequence(2); }
      n4="||" { n3 = JTBToolkit.makeNodeToken(n4); }
      { n2.addNode(n3); }
      n5=ConditionalAndExpression()
      { n2.addNode(n5); }
      { n1.addNode(n2); }
   )*
   { n1.nodes.trimToSize(); }
   
   { return new ConditionalOrExpression(n0,n1); }
}

ConditionalAndExpression ConditionalAndExpression() :
{
   InclusiveOrExpression n0;
   NodeListOptional n1 = new NodeListOptional();
   NodeSequence n2;
   NodeToken n3;
   Token n4;
   InclusiveOrExpression n5;

   {
   }
}
{
   n0=InclusiveOrExpression()
   (
      { n2 = new NodeSequence(2); }
      n4="&&" { n3 = JTBToolkit.makeNodeToken(n4); }
      { n2.addNode(n3); }
      n5=InclusiveOrExpression()
      { n2.addNode(n5); }
      { n1.addNode(n2); }
   )*
   { n1.nodes.trimToSize(); }
   
   { return new ConditionalAndExpression(n0,n1); }
}

InclusiveOrExpression InclusiveOrExpression() :
{
   ExclusiveOrExpression n0;
   NodeListOptional n1 = new NodeListOptional();
   NodeSequence n2;
   NodeToken n3;
   Token n4;
   ExclusiveOrExpression n5;

   {
   }
}
{
   n0=ExclusiveOrExpression()
   (
      { n2 = new NodeSequence(2); }
      n4="|" { n3 = JTBToolkit.makeNodeToken(n4); }
      { n2.addNode(n3); }
      n5=ExclusiveOrExpression()
      { n2.addNode(n5); }
      { n1.addNode(n2); }
   )*
   { n1.nodes.trimToSize(); }
   
   { return new InclusiveOrExpression(n0,n1); }
}

ExclusiveOrExpression ExclusiveOrExpression() :
{
   AndExpression n0;
   NodeListOptional n1 = new NodeListOptional();
   NodeSequence n2;
   NodeToken n3;
   Token n4;
   AndExpression n5;

   {
   }
}
{
   n0=AndExpression()
   (
      { n2 = new NodeSequence(2); }
      n4="^" { n3 = JTBToolkit.makeNodeToken(n4); }
      { n2.addNode(n3); }
      n5=AndExpression()
      { n2.addNode(n5); }
      { n1.addNode(n2); }
   )*
   { n1.nodes.trimToSize(); }
   
   { return new ExclusiveOrExpression(n0,n1); }
}

AndExpression AndExpression() :
{
   EqualityExpression n0;
   NodeListOptional n1 = new NodeListOptional();
   NodeSequence n2;
   NodeToken n3;
   Token n4;
   EqualityExpression n5;

   {
   }
}
{
   n0=EqualityExpression()
   (
      { n2 = new NodeSequence(2); }
      n4="&" { n3 = JTBToolkit.makeNodeToken(n4); }
      { n2.addNode(n3); }
      n5=EqualityExpression()
      { n2.addNode(n5); }
      { n1.addNode(n2); }
   )*
   { n1.nodes.trimToSize(); }
   
   { return new AndExpression(n0,n1); }
}

EqualityExpression EqualityExpression() :
{
   InstanceOfExpression n0;
   NodeListOptional n1 = new NodeListOptional();
   NodeSequence n2;
   NodeChoice n3;
   NodeToken n4;
   Token n5;
   NodeToken n6;
   Token n7;
   InstanceOfExpression n8;

   {
   }
}
{
   n0=InstanceOfExpression()
   (
      { n2 = new NodeSequence(2); }
      (
         (
            n5="==" { n4 = JTBToolkit.makeNodeToken(n5); }
            { n3 = new NodeChoice(n4, 0); }
         |
            n7="!=" { n6 = JTBToolkit.makeNodeToken(n7); }
            { n3 = new NodeChoice(n6, 1); }
         )
         
      )
      { n2.addNode(n3); }
      n8=InstanceOfExpression()
      { n2.addNode(n8); }
      { n1.addNode(n2); }
   )*
   { n1.nodes.trimToSize(); }
   
   { return new EqualityExpression(n0,n1); }
}

InstanceOfExpression InstanceOfExpression() :
{
   RelationalExpression n0;
   NodeOptional n1 = new NodeOptional();
   NodeSequence n2;
   NodeToken n3;
   Token n4;
   Type n5;

   {
   }
}
{
   n0=RelationalExpression()
   (
      { n2 = new NodeSequence(2); }
      n4="instanceof" { n3 = JTBToolkit.makeNodeToken(n4); }
      { n2.addNode(n3); }
      n5=Type()
      { n2.addNode(n5); }
      { n1.addNode(n2); }
   )?
   
   { return new InstanceOfExpression(n0,n1); }
}

RelationalExpression RelationalExpression() :
{
   ShiftExpression n0;
   NodeListOptional n1 = new NodeListOptional();
   NodeSequence n2;
   NodeChoice n3;
   NodeToken n4;
   Token n5;
   NodeToken n6;
   Token n7;
   NodeToken n8;
   Token n9;
   NodeToken n10;
   Token n11;
   ShiftExpression n12;

   {
   }
}
{
   n0=ShiftExpression()
   (
      { n2 = new NodeSequence(2); }
      (
         (
            n5="<" { n4 = JTBToolkit.makeNodeToken(n5); }
            { n3 = new NodeChoice(n4, 0); }
         |
            n7=">" { n6 = JTBToolkit.makeNodeToken(n7); }
            { n3 = new NodeChoice(n6, 1); }
         |
            n9="<=" { n8 = JTBToolkit.makeNodeToken(n9); }
            { n3 = new NodeChoice(n8, 2); }
         |
            n11=">=" { n10 = JTBToolkit.makeNodeToken(n11); }
            { n3 = new NodeChoice(n10, 3); }
         )
         
      )
      { n2.addNode(n3); }
      n12=ShiftExpression()
      { n2.addNode(n12); }
      { n1.addNode(n2); }
   )*
   { n1.nodes.trimToSize(); }
   
   { return new RelationalExpression(n0,n1); }
}

ShiftExpression ShiftExpression() :
{
   AdditiveExpression n0;
   NodeListOptional n1 = new NodeListOptional();
   NodeSequence n2;
   NodeChoice n3;
   NodeToken n4;
   Token n5;
   NodeToken n6;
   Token n7;
   NodeToken n8;
   Token n9;
   AdditiveExpression n10;

   {
   }
}
{
   n0=AdditiveExpression()
   (
      { n2 = new NodeSequence(2); }
      (
         (
            n5="<<" { n4 = JTBToolkit.makeNodeToken(n5); }
            { n3 = new NodeChoice(n4, 0); }
         |
            n7=">>" { n6 = JTBToolkit.makeNodeToken(n7); }
            { n3 = new NodeChoice(n6, 1); }
         |
            n9=">>>" { n8 = JTBToolkit.makeNodeToken(n9); }
            { n3 = new NodeChoice(n8, 2); }
         )
         
      )
      { n2.addNode(n3); }
      n10=AdditiveExpression()
      { n2.addNode(n10); }
      { n1.addNode(n2); }
   )*
   { n1.nodes.trimToSize(); }
   
   { return new ShiftExpression(n0,n1); }
}

AdditiveExpression AdditiveExpression() :
{
   MultiplicativeExpression n0;
   NodeListOptional n1 = new NodeListOptional();
   NodeSequence n2;
   NodeChoice n3;
   NodeToken n4;
   Token n5;
   NodeToken n6;
   Token n7;
   MultiplicativeExpression n8;

   {
   }
}
{
   n0=MultiplicativeExpression()
   (
      { n2 = new NodeSequence(2); }
      (
         (
            n5="+" { n4 = JTBToolkit.makeNodeToken(n5); }
            { n3 = new NodeChoice(n4, 0); }
         |
            n7="-" { n6 = JTBToolkit.makeNodeToken(n7); }
            { n3 = new NodeChoice(n6, 1); }
         )
         
      )
      { n2.addNode(n3); }
      n8=MultiplicativeExpression()
      { n2.addNode(n8); }
      { n1.addNode(n2); }
   )*
   { n1.nodes.trimToSize(); }
   
   { return new AdditiveExpression(n0,n1); }
}

MultiplicativeExpression MultiplicativeExpression() :
{
   UnaryExpression n0;
   NodeListOptional n1 = new NodeListOptional();
   NodeSequence n2;
   NodeChoice n3;
   NodeToken n4;
   Token n5;
   NodeToken n6;
   Token n7;
   NodeToken n8;
   Token n9;
   UnaryExpression n10;

   {
   }
}
{
   n0=UnaryExpression()
   (
      { n2 = new NodeSequence(2); }
      (
         (
            n5="*" { n4 = JTBToolkit.makeNodeToken(n5); }
            { n3 = new NodeChoice(n4, 0); }
         |
            n7="/" { n6 = JTBToolkit.makeNodeToken(n7); }
            { n3 = new NodeChoice(n6, 1); }
         |
            n9="%" { n8 = JTBToolkit.makeNodeToken(n9); }
            { n3 = new NodeChoice(n8, 2); }
         )
         
      )
      { n2.addNode(n3); }
      n10=UnaryExpression()
      { n2.addNode(n10); }
      { n1.addNode(n2); }
   )*
   { n1.nodes.trimToSize(); }
   
   { return new MultiplicativeExpression(n0,n1); }
}

UnaryExpression UnaryExpression() :
{
   NodeChoice n0;
   NodeSequence n1;
   NodeChoice n2;
   NodeToken n3;
   Token n4;
   NodeToken n5;
   Token n6;
   UnaryExpression n7;
   PreIncrementExpression n8;
   PreDecrementExpression n9;
   UnaryExpressionNotPlusMinus n10;

   {
   }
}
{
   (
      { n1 = new NodeSequence(2); }
      (
         (
            n4="+" { n3 = JTBToolkit.makeNodeToken(n4); }
            { n2 = new NodeChoice(n3, 0); }
         |
            n6="-" { n5 = JTBToolkit.makeNodeToken(n6); }
            { n2 = new NodeChoice(n5, 1); }
         )
         
      )
      { n1.addNode(n2); }
      n7=UnaryExpression()
      { n1.addNode(n7); }
      { n0 = new NodeChoice(n1, 0); }
   |
      n8=PreIncrementExpression()
      { n0 = new NodeChoice(n8, 1); }
   |
      n9=PreDecrementExpression()
      { n0 = new NodeChoice(n9, 2); }
   |
      n10=UnaryExpressionNotPlusMinus()
      { n0 = new NodeChoice(n10, 3); }
   )
   
   { return new UnaryExpression(n0); }
}

PreIncrementExpression PreIncrementExpression() :
{
   NodeToken n0;
   Token n1;
   PrimaryExpression n2;

   {
   }
}
{
   n1="++" { n0 = JTBToolkit.makeNodeToken(n1); }
   n2=PrimaryExpression()
   
   { return new PreIncrementExpression(n0,n2); }
}

PreDecrementExpression PreDecrementExpression() :
{
   NodeToken n0;
   Token n1;
   PrimaryExpression n2;

   {
   }
}
{
   n1="--" { n0 = JTBToolkit.makeNodeToken(n1); }
   n2=PrimaryExpression()
   
   { return new PreDecrementExpression(n0,n2); }
}

UnaryExpressionNotPlusMinus UnaryExpressionNotPlusMinus() :
{
   NodeChoice n0;
   NodeSequence n1;
   NodeChoice n2;
   NodeToken n3;
   Token n4;
   NodeToken n5;
   Token n6;
   UnaryExpression n7;
   CastExpression n8;
   PostfixExpression n9;

   {
   }
}
{
   (
      { n1 = new NodeSequence(2); }
      (
         (
            n4="~" { n3 = JTBToolkit.makeNodeToken(n4); }
            { n2 = new NodeChoice(n3, 0); }
         |
            n6="!" { n5 = JTBToolkit.makeNodeToken(n6); }
            { n2 = new NodeChoice(n5, 1); }
         )
         
      )
      { n1.addNode(n2); }
      n7=UnaryExpression()
      { n1.addNode(n7); }
      { n0 = new NodeChoice(n1, 0); }
   |
      LOOKAHEAD(CastLookahead())
      n8=CastExpression()
      { n0 = new NodeChoice(n8, 1); }
   |
      n9=PostfixExpression()
      { n0 = new NodeChoice(n9, 2); }
   )
   
   { return new UnaryExpressionNotPlusMinus(n0); }
}

CastLookahead CastLookahead() :
{
   NodeChoice n0;
   NodeSequence n1;
   NodeToken n2;
   Token n3;
   PrimitiveType n4;
   NodeSequence n5;
   NodeToken n6;
   Token n7;
   Name n8;
   NodeToken n9;
   Token n10;
   NodeToken n11;
   Token n12;
   NodeSequence n13;
   NodeToken n14;
   Token n15;
   Name n16;
   NodeToken n17;
   Token n18;
   NodeChoice n19;
   NodeToken n20;
   Token n21;
   NodeToken n22;
   Token n23;
   NodeToken n24;
   Token n25;
   NodeToken n26;
   Token n27;
   NodeToken n28;
   Token n29;
   NodeToken n30;
   Token n31;
   NodeToken n32;
   Token n33;
   Literal n34;

   {
   }
}
{
   (
      LOOKAHEAD(2)
      { n1 = new NodeSequence(3); }
      n3="(" { n2 = JTBToolkit.makeNodeToken(n3); }
      { n1.addNode(n2); }
      n4=PrimitiveType()
      { n1.addNode(n4); }
      { n0 = new NodeChoice(n1, 0); }
   |
      LOOKAHEAD("(" Name() "[")
      { n5 = new NodeSequence(5); }
      n7="(" { n6 = JTBToolkit.makeNodeToken(n7); }
      { n5.addNode(n6); }
      n8=Name()
      { n5.addNode(n8); }
      n10="[" { n9 = JTBToolkit.makeNodeToken(n10); }
      { n5.addNode(n9); }
      n12="]" { n11 = JTBToolkit.makeNodeToken(n12); }
      { n5.addNode(n11); }
      { n0 = new NodeChoice(n5, 1); }
   |
      { n13 = new NodeSequence(4); }
      n15="(" { n14 = JTBToolkit.makeNodeToken(n15); }
      { n13.addNode(n14); }
      n16=Name()
      { n13.addNode(n16); }
      n18=")" { n17 = JTBToolkit.makeNodeToken(n18); }
      { n13.addNode(n17); }
      (
         (
            n21="~" { n20 = JTBToolkit.makeNodeToken(n21); }
            { n19 = new NodeChoice(n20, 0); }
         |
            n23="!" { n22 = JTBToolkit.makeNodeToken(n23); }
            { n19 = new NodeChoice(n22, 1); }
         |
            n25="(" { n24 = JTBToolkit.makeNodeToken(n25); }
            { n19 = new NodeChoice(n24, 2); }
         |
            n27=<IDENTIFIER> { n26 = JTBToolkit.makeNodeToken(n27); }
            { n19 = new NodeChoice(n26, 3); }
         |
            n29="this" { n28 = JTBToolkit.makeNodeToken(n29); }
            { n19 = new NodeChoice(n28, 4); }
         |
            n31="super" { n30 = JTBToolkit.makeNodeToken(n31); }
            { n19 = new NodeChoice(n30, 5); }
         |
            n33="new" { n32 = JTBToolkit.makeNodeToken(n33); }
            { n19 = new NodeChoice(n32, 6); }
         |
            n34=Literal()
            { n19 = new NodeChoice(n34, 7); }
         )
         
      )
      { n13.addNode(n19); }
      { n0 = new NodeChoice(n13, 2); }
   )
   
   { return new CastLookahead(n0); }
}

PostfixExpression PostfixExpression() :
{
   PrimaryExpression n0;
   NodeOptional n1 = new NodeOptional();
   NodeChoice n2;
   NodeToken n3;
   Token n4;
   NodeToken n5;
   Token n6;

   {
   }
}
{
   n0=PrimaryExpression()
   (
      (
         n4="++" { n3 = JTBToolkit.makeNodeToken(n4); }
         { n2 = new NodeChoice(n3, 0); }
      |
         n6="--" { n5 = JTBToolkit.makeNodeToken(n6); }
         { n2 = new NodeChoice(n5, 1); }
      )
      { n1.addNode(n2); }
   )?
   
   { return new PostfixExpression(n0,n1); }
}

CastExpression CastExpression() :
{
   NodeChoice n0;
   NodeSequence n1;
   NodeToken n2;
   Token n3;
   Type n4;
   NodeToken n5;
   Token n6;
   UnaryExpression n7;
   NodeSequence n8;
   NodeToken n9;
   Token n10;
   Type n11;
   NodeToken n12;
   Token n13;
   UnaryExpressionNotPlusMinus n14;

   {
   }
}
{
   (
      LOOKAHEAD("(" PrimitiveType())
      { n1 = new NodeSequence(5); }
      n3="(" { n2 = JTBToolkit.makeNodeToken(n3); }
      { n1.addNode(n2); }
      n4=Type()
      { n1.addNode(n4); }
      n6=")" { n5 = JTBToolkit.makeNodeToken(n6); }
      { n1.addNode(n5); }
      n7=UnaryExpression()
      { n1.addNode(n7); }
      { n0 = new NodeChoice(n1, 0); }
   |
      { n8 = new NodeSequence(4); }
      n10="(" { n9 = JTBToolkit.makeNodeToken(n10); }
      { n8.addNode(n9); }
      n11=Type()
      { n8.addNode(n11); }
      n13=")" { n12 = JTBToolkit.makeNodeToken(n13); }
      { n8.addNode(n12); }
      n14=UnaryExpressionNotPlusMinus()
      { n8.addNode(n14); }
      { n0 = new NodeChoice(n8, 1); }
   )
   
   { return new CastExpression(n0); }
}

PrimaryExpression PrimaryExpression() :
{
   PrimaryPrefix n0;
   NodeListOptional n1 = new NodeListOptional();
   PrimarySuffix n2;

   {
   }
}
{
   n0=PrimaryPrefix()
   (
      LOOKAHEAD(2)
      n2=PrimarySuffix()
      { n1.addNode(n2); }
   )*
   { n1.nodes.trimToSize(); }
   
   { return new PrimaryExpression(n0,n1); }
}

PrimaryPrefix PrimaryPrefix() :
{
   NodeChoice n0;
   Literal n1;
   NodeToken n2;
   Token n3;
   NodeSequence n4;
   NodeToken n5;
   Token n6;
   NodeToken n7;
   Token n8;
   NodeToken n9;
   Token n10;
   NodeSequence n11;
   NodeToken n12;
   Token n13;
   Expression n14;
   NodeToken n15;
   Token n16;
   AllocationExpression n17;
   NodeSequence n18;
   ResultType n19;
   NodeToken n20;
   Token n21;
   NodeToken n22;
   Token n23;
   Name n24;

   {
   }
}
{
   (
      n1=Literal()
      { n0 = new NodeChoice(n1, 0); }
   |
      n3="this" { n2 = JTBToolkit.makeNodeToken(n3); }
      { n0 = new NodeChoice(n2, 1); }
   |
      { n4 = new NodeSequence(3); }
      n6="super" { n5 = JTBToolkit.makeNodeToken(n6); }
      { n4.addNode(n5); }
      n8="." { n7 = JTBToolkit.makeNodeToken(n8); }
      { n4.addNode(n7); }
      n10=<IDENTIFIER> { n9 = JTBToolkit.makeNodeToken(n10); }
      { n4.addNode(n9); }
      { n0 = new NodeChoice(n4, 2); }
   |
      { n11 = new NodeSequence(3); }
      n13="(" { n12 = JTBToolkit.makeNodeToken(n13); }
      { n11.addNode(n12); }
      n14=Expression()
      { n11.addNode(n14); }
      n16=")" { n15 = JTBToolkit.makeNodeToken(n16); }
      { n11.addNode(n15); }
      { n0 = new NodeChoice(n11, 3); }
   |
      n17=AllocationExpression()
      { n0 = new NodeChoice(n17, 4); }
   |
      LOOKAHEAD(ResultType() "." "class")
      { n18 = new NodeSequence(4); }
      n19=ResultType()
      { n18.addNode(n19); }
      n21="." { n20 = JTBToolkit.makeNodeToken(n21); }
      { n18.addNode(n20); }
      n23="class" { n22 = JTBToolkit.makeNodeToken(n23); }
      { n18.addNode(n22); }
      { n0 = new NodeChoice(n18, 5); }
   |
      n24=Name()
      { n0 = new NodeChoice(n24, 6); }
   )
   
   { return new PrimaryPrefix(n0); }
}

PrimarySuffix PrimarySuffix() :
{
   NodeChoice n0;
   NodeSequence n1;
   NodeToken n2;
   Token n3;
   NodeToken n4;
   Token n5;
   NodeSequence n6;
   NodeToken n7;
   Token n8;
   AllocationExpression n9;
   NodeSequence n10;
   NodeToken n11;
   Token n12;
   Expression n13;
   NodeToken n14;
   Token n15;
   NodeSequence n16;
   NodeToken n17;
   Token n18;
   NodeToken n19;
   Token n20;
   Arguments n21;

   {
   }
}
{
   (
      LOOKAHEAD(2)
      { n1 = new NodeSequence(3); }
      n3="." { n2 = JTBToolkit.makeNodeToken(n3); }
      { n1.addNode(n2); }
      n5="this" { n4 = JTBToolkit.makeNodeToken(n5); }
      { n1.addNode(n4); }
      { n0 = new NodeChoice(n1, 0); }
   |
      LOOKAHEAD(2)
      { n6 = new NodeSequence(3); }
      n8="." { n7 = JTBToolkit.makeNodeToken(n8); }
      { n6.addNode(n7); }
      n9=AllocationExpression()
      { n6.addNode(n9); }
      { n0 = new NodeChoice(n6, 1); }
   |
      { n10 = new NodeSequence(3); }
      n12="[" { n11 = JTBToolkit.makeNodeToken(n12); }
      { n10.addNode(n11); }
      n13=Expression()
      { n10.addNode(n13); }
      n15="]" { n14 = JTBToolkit.makeNodeToken(n15); }
      { n10.addNode(n14); }
      { n0 = new NodeChoice(n10, 2); }
   |
      { n16 = new NodeSequence(2); }
      n18="." { n17 = JTBToolkit.makeNodeToken(n18); }
      { n16.addNode(n17); }
      n20=<IDENTIFIER> { n19 = JTBToolkit.makeNodeToken(n20); }
      { n16.addNode(n19); }
      { n0 = new NodeChoice(n16, 3); }
   |
      n21=Arguments()
      { n0 = new NodeChoice(n21, 4); }
   )
   
   { return new PrimarySuffix(n0); }
}

Literal Literal() :
{
   NodeChoice n0;
   NodeToken n1;
   Token n2;
   NodeToken n3;
   Token n4;
   NodeToken n5;
   Token n6;
   NodeToken n7;
   Token n8;
   BooleanLiteral n9;
   NullLiteral n10;

   {
   }
}
{
   (
      n2=<INTEGER_LITERAL> { n1 = JTBToolkit.makeNodeToken(n2); }
      { n0 = new NodeChoice(n1, 0); }
   |
      n4=<FLOATING_POINT_LITERAL> { n3 = JTBToolkit.makeNodeToken(n4); }
      { n0 = new NodeChoice(n3, 1); }
   |
      n6=<CHARACTER_LITERAL> { n5 = JTBToolkit.makeNodeToken(n6); }
      { n0 = new NodeChoice(n5, 2); }
   |
      n8=<STRING_LITERAL> { n7 = JTBToolkit.makeNodeToken(n8); }
      { n0 = new NodeChoice(n7, 3); }
   |
      n9=BooleanLiteral()
      { n0 = new NodeChoice(n9, 4); }
   |
      n10=NullLiteral()
      { n0 = new NodeChoice(n10, 5); }
   )
   
   { return new Literal(n0); }
}

BooleanLiteral BooleanLiteral() :
{
   NodeChoice n0;
   NodeToken n1;
   Token n2;
   NodeToken n3;
   Token n4;

   {
   }
}
{
   (
      n2="true" { n1 = JTBToolkit.makeNodeToken(n2); }
      { n0 = new NodeChoice(n1, 0); }
   |
      n4="false" { n3 = JTBToolkit.makeNodeToken(n4); }
      { n0 = new NodeChoice(n3, 1); }
   )
   
   { return new BooleanLiteral(n0); }
}

NullLiteral NullLiteral() :
{
   NodeToken n0;
   Token n1;

   {
   }
}
{
   n1="null" { n0 = JTBToolkit.makeNodeToken(n1); }
   
   { return new NullLiteral(n0); }
}

Arguments Arguments() :
{
   NodeToken n0;
   Token n1;
   NodeOptional n2 = new NodeOptional();
   ArgumentList n3;
   NodeToken n4;
   Token n5;

   {
   }
}
{
   n1="(" { n0 = JTBToolkit.makeNodeToken(n1); }
   (
      n3=ArgumentList()
      { n2.addNode(n3); }
   )?
   n5=")" { n4 = JTBToolkit.makeNodeToken(n5); }
   
   { return new Arguments(n0,n2,n4); }
}

ArgumentList ArgumentList() :
{
   Expression n0;
   NodeListOptional n1 = new NodeListOptional();
   NodeSequence n2;
   NodeToken n3;
   Token n4;
   Expression n5;

   {
   }
}
{
   n0=Expression()
   (
      { n2 = new NodeSequence(2); }
      n4="," { n3 = JTBToolkit.makeNodeToken(n4); }
      { n2.addNode(n3); }
      n5=Expression()
      { n2.addNode(n5); }
      { n1.addNode(n2); }
   )*
   { n1.nodes.trimToSize(); }
   
   { return new ArgumentList(n0,n1); }
}

AllocationExpression AllocationExpression() :
{
   NodeChoice n0;
   NodeSequence n1;
   NodeToken n2;
   Token n3;
   PrimitiveType n4;
   ArrayDimsAndInits n5;
   NodeSequence n6;
   NodeToken n7;
   Token n8;
   Name n9;
   NodeChoice n10;
   ArrayDimsAndInits n11;
   Arguments n12;

   {
   }
}
{
   (
      LOOKAHEAD(2)
      { n1 = new NodeSequence(4); }
      n3="new" { n2 = JTBToolkit.makeNodeToken(n3); }
      { n1.addNode(n2); }
      n4=PrimitiveType()
      { n1.addNode(n4); }
      n5=ArrayDimsAndInits()
      { n1.addNode(n5); }
      { n0 = new NodeChoice(n1, 0); }
   |
      { n6 = new NodeSequence(3); }
      n8="new" { n7 = JTBToolkit.makeNodeToken(n8); }
      { n6.addNode(n7); }
      n9=Name()
      { n6.addNode(n9); }
      (
         (
            n11=ArrayDimsAndInits()
            { n10 = new NodeChoice(n11, 0); }
         |
            n12=Arguments()
            { n10 = new NodeChoice(n12, 1); }
         )
         
      )
      { n6.addNode(n10); }
      { n0 = new NodeChoice(n6, 1); }
   )
   
   { return new AllocationExpression(n0); }
}

ArrayDimsAndInits ArrayDimsAndInits() :
{
   NodeList n0 = new NodeList();
   NodeSequence n1;
   NodeToken n2;
   Token n3;
   Expression n4;
   NodeToken n5;
   Token n6;
   NodeListOptional n7 = new NodeListOptional();
   NodeSequence n8;
   NodeToken n9;
   Token n10;
   NodeToken n11;
   Token n12;

   {
   }
}
{
   (
      LOOKAHEAD(2)
      { n1 = new NodeSequence(3); }
      n3="[" { n2 = JTBToolkit.makeNodeToken(n3); }
      { n1.addNode(n2); }
      n4=Expression()
      { n1.addNode(n4); }
      n6="]" { n5 = JTBToolkit.makeNodeToken(n6); }
      { n1.addNode(n5); }
      { n0.addNode(n1); }
   )+
   { n0.nodes.trimToSize(); }
   (
      LOOKAHEAD(2)
      { n8 = new NodeSequence(2); }
      n10="[" { n9 = JTBToolkit.makeNodeToken(n10); }
      { n8.addNode(n9); }
      n12="]" { n11 = JTBToolkit.makeNodeToken(n12); }
      { n8.addNode(n11); }
      { n7.addNode(n8); }
   )*
   { n7.nodes.trimToSize(); }
   
   { return new ArrayDimsAndInits(n0,n7); }
}
