All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javacc-7.0.1.test.tmp.Interpreter.SPLParser Maven / Gradle / Ivy

There is a newer version: 7.0.13
Show newest version
/* SPLParser.java */
/* Generated By:JJTree&JavaCC: Do not edit this line. SPLParser.java */
/** Stupid Programming Language parser. */
public class SPLParser/*@bgen(jjtree)*/implements SPLParserTreeConstants, SPLParserConstants {/*@bgen(jjtree)*/
  protected static JJTSPLParserState jjtree = new JJTSPLParserState();
  /**
   * Returns the root node of the AST.  
   * It only makes sense to call this after a successful parse. 
   * @return the root node
   */
  public Node rootNode() {
    return jjtree.rootNode();
  }

/*
 * Program structuring syntax follows.
 */

/** Compilation unit. */
  static final public void CompilationUnit() throws ParseException {/*@bgen(jjtree) CompilationUnit */
   ASTCompilationUnit jjtn000 = new ASTCompilationUnit(JJTCOMPILATIONUNIT);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
   jjtn000.jjtSetFirstToken(getToken(1));String name;
    try {
      label_1:
      while (true) {
        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
        case INT:
        case BOOL:
        case INTEGER_LITERAL:
        case 9:
        case 29:
        case 31:
        case 32:
        case 34:
        case 36:
        case 38:
        case 39:
        case 40:
        case IDENTIFIER:{
          ;
          break;
          }
        default:
          jj_la1[0] = jj_gen;
          break label_1;
        }
        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
        case INT:
        case BOOL:{
          VarDeclaration();
          jj_consume_token(9);
          break;
          }
        case INTEGER_LITERAL:
        case 9:
        case 29:
        case 31:
        case 32:
        case 34:
        case 36:
        case 38:
        case 39:
        case 40:
        case IDENTIFIER:{
          Statement();
          break;
          }
        default:
          jj_la1[1] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
      }
      jj_consume_token(0);
    } catch (Throwable jjte000) {
if (jjtc000) {
       jjtree.clearNodeScope(jjtn000);
       jjtc000 = false;
     } else {
       jjtree.popNode();
     }
     if (jjte000 instanceof RuntimeException) {
       {if (true) throw (RuntimeException)jjte000;}
     }
     if (jjte000 instanceof ParseException) {
       {if (true) throw (ParseException)jjte000;}
     }
     {if (true) throw (Error)jjte000;}
    } finally {
if (jjtc000) {
       jjtree.closeNodeScope(jjtn000, true);
       jjtn000.jjtSetLastToken(getToken(0));
     }
    }
}

/** Variable declaration. */
  static final public void VarDeclaration() throws ParseException {/*@bgen(jjtree) VarDeclaration */
  ASTVarDeclaration jjtn000 = new ASTVarDeclaration(JJTVARDECLARATION);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
  jjtn000.jjtSetFirstToken(getToken(1));Token t;
    try {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case BOOL:{
        jj_consume_token(BOOL);
jjtn000.type = BOOL;
        break;
        }
      case INT:{
        jj_consume_token(INT);
jjtn000.type = INT;
        break;
        }
      default:
        jj_la1[2] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      t = jj_consume_token(IDENTIFIER);
jjtree.closeNodeScope(jjtn000, true);
    jjtc000 = false;
    jjtn000.jjtSetLastToken(getToken(0));
jjtn000.name = t.image;
    } finally {
if (jjtc000) {
      jjtree.closeNodeScope(jjtn000, true);
      jjtn000.jjtSetLastToken(getToken(0));
    }
    }
}

/*
 * Expression syntax follows.
 */

/** Expression. */
  static final public void Expression() throws ParseException {
    if (jj_2_1(2147483647)) {
      Assignment();
    } else {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case INTEGER_LITERAL:
      case 27:
      case 28:
      case 29:
      case 31:
      case 32:
      case IDENTIFIER:{
        ConditionalOrExpression();
        break;
        }
      default:
        jj_la1[3] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
    }
}

/** Assignment. */
  static final public void Assignment() throws ParseException {/*@bgen(jjtree) #Assignment( 2) */
  ASTAssignment jjtn000 = new ASTAssignment(JJTASSIGNMENT);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
  jjtn000.jjtSetFirstToken(getToken(1));
    try {
      PrimaryExpression();
      jj_consume_token(10);
      Expression();
    } catch (Throwable jjte000) {
if (jjtc000) {
      jjtree.clearNodeScope(jjtn000);
      jjtc000 = false;
    } else {
      jjtree.popNode();
    }
    if (jjte000 instanceof RuntimeException) {
      {if (true) throw (RuntimeException)jjte000;}
    }
    if (jjte000 instanceof ParseException) {
      {if (true) throw (ParseException)jjte000;}
    }
    {if (true) throw (Error)jjte000;}
    } finally {
if (jjtc000) {
      jjtree.closeNodeScope(jjtn000,  2);
      jjtn000.jjtSetLastToken(getToken(0));
    }
    }
}

/** Conditional or expression. */
  static final public void ConditionalOrExpression() throws ParseException {
    ConditionalAndExpression();
    label_2:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case 11:{
        ;
        break;
        }
      default:
        jj_la1[4] = jj_gen;
        break label_2;
      }
      jj_consume_token(11);
ASTOrNode jjtn001 = new ASTOrNode(JJTORNODE);
           boolean jjtc001 = true;
           jjtree.openNodeScope(jjtn001);
           jjtn001.jjtSetFirstToken(getToken(1));
      try {
        ConditionalAndExpression();
      } catch (Throwable jjte001) {
if (jjtc001) {
             jjtree.clearNodeScope(jjtn001);
             jjtc001 = false;
           } else {
             jjtree.popNode();
           }
           if (jjte001 instanceof RuntimeException) {
             {if (true) throw (RuntimeException)jjte001;}
           }
           if (jjte001 instanceof ParseException) {
             {if (true) throw (ParseException)jjte001;}
           }
           {if (true) throw (Error)jjte001;}
      } finally {
if (jjtc001) {
             jjtree.closeNodeScope(jjtn001,  2);
             jjtn001.jjtSetLastToken(getToken(0));
           }
      }
    }
}

/** Conditional and expression. */
  static final public void ConditionalAndExpression() throws ParseException {
    InclusiveOrExpression();
    label_3:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case 12:{
        ;
        break;
        }
      default:
        jj_la1[5] = jj_gen;
        break label_3;
      }
      jj_consume_token(12);
ASTAndNode jjtn001 = new ASTAndNode(JJTANDNODE);
           boolean jjtc001 = true;
           jjtree.openNodeScope(jjtn001);
           jjtn001.jjtSetFirstToken(getToken(1));
      try {
        InclusiveOrExpression();
      } catch (Throwable jjte001) {
if (jjtc001) {
             jjtree.clearNodeScope(jjtn001);
             jjtc001 = false;
           } else {
             jjtree.popNode();
           }
           if (jjte001 instanceof RuntimeException) {
             {if (true) throw (RuntimeException)jjte001;}
           }
           if (jjte001 instanceof ParseException) {
             {if (true) throw (ParseException)jjte001;}
           }
           {if (true) throw (Error)jjte001;}
      } finally {
if (jjtc001) {
             jjtree.closeNodeScope(jjtn001,  2);
             jjtn001.jjtSetLastToken(getToken(0));
           }
      }
    }
}

/** Inclusive or expression. */
  static final public void InclusiveOrExpression() throws ParseException {
    ExclusiveOrExpression();
    label_4:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case 13:{
        ;
        break;
        }
      default:
        jj_la1[6] = jj_gen;
        break label_4;
      }
      jj_consume_token(13);
ASTBitwiseOrNode jjtn001 = new ASTBitwiseOrNode(JJTBITWISEORNODE);
          boolean jjtc001 = true;
          jjtree.openNodeScope(jjtn001);
          jjtn001.jjtSetFirstToken(getToken(1));
      try {
        ExclusiveOrExpression();
      } catch (Throwable jjte001) {
if (jjtc001) {
            jjtree.clearNodeScope(jjtn001);
            jjtc001 = false;
          } else {
            jjtree.popNode();
          }
          if (jjte001 instanceof RuntimeException) {
            {if (true) throw (RuntimeException)jjte001;}
          }
          if (jjte001 instanceof ParseException) {
            {if (true) throw (ParseException)jjte001;}
          }
          {if (true) throw (Error)jjte001;}
      } finally {
if (jjtc001) {
            jjtree.closeNodeScope(jjtn001,  2);
            jjtn001.jjtSetLastToken(getToken(0));
          }
      }
    }
}

/** Exclusive or expression. */
  static final public void ExclusiveOrExpression() throws ParseException {
    AndExpression();
    label_5:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case 14:{
        ;
        break;
        }
      default:
        jj_la1[7] = jj_gen;
        break label_5;
      }
      jj_consume_token(14);
ASTBitwiseXorNode jjtn001 = new ASTBitwiseXorNode(JJTBITWISEXORNODE);
          boolean jjtc001 = true;
          jjtree.openNodeScope(jjtn001);
          jjtn001.jjtSetFirstToken(getToken(1));
      try {
        AndExpression();
      } catch (Throwable jjte001) {
if (jjtc001) {
            jjtree.clearNodeScope(jjtn001);
            jjtc001 = false;
          } else {
            jjtree.popNode();
          }
          if (jjte001 instanceof RuntimeException) {
            {if (true) throw (RuntimeException)jjte001;}
          }
          if (jjte001 instanceof ParseException) {
            {if (true) throw (ParseException)jjte001;}
          }
          {if (true) throw (Error)jjte001;}
      } finally {
if (jjtc001) {
            jjtree.closeNodeScope(jjtn001,  2);
            jjtn001.jjtSetLastToken(getToken(0));
          }
      }
    }
}

/** And expression. */
  static final public void AndExpression() throws ParseException {
    EqualityExpression();
    label_6:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case 15:{
        ;
        break;
        }
      default:
        jj_la1[8] = jj_gen;
        break label_6;
      }
      jj_consume_token(15);
ASTBitwiseAndNode jjtn001 = new ASTBitwiseAndNode(JJTBITWISEANDNODE);
          boolean jjtc001 = true;
          jjtree.openNodeScope(jjtn001);
          jjtn001.jjtSetFirstToken(getToken(1));
      try {
        EqualityExpression();
      } catch (Throwable jjte001) {
if (jjtc001) {
            jjtree.clearNodeScope(jjtn001);
            jjtc001 = false;
          } else {
            jjtree.popNode();
          }
          if (jjte001 instanceof RuntimeException) {
            {if (true) throw (RuntimeException)jjte001;}
          }
          if (jjte001 instanceof ParseException) {
            {if (true) throw (ParseException)jjte001;}
          }
          {if (true) throw (Error)jjte001;}
      } finally {
if (jjtc001) {
            jjtree.closeNodeScope(jjtn001,  2);
            jjtn001.jjtSetLastToken(getToken(0));
          }
      }
    }
}

/** Equality expression. */
  static final public void EqualityExpression() throws ParseException {
    RelationalExpression();
    label_7:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case 16:
      case 17:{
        ;
        break;
        }
      default:
        jj_la1[9] = jj_gen;
        break label_7;
      }
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case 16:{
        jj_consume_token(16);
ASTEQNode jjtn001 = new ASTEQNode(JJTEQNODE);
            boolean jjtc001 = true;
            jjtree.openNodeScope(jjtn001);
            jjtn001.jjtSetFirstToken(getToken(1));
        try {
          RelationalExpression();
        } catch (Throwable jjte001) {
if (jjtc001) {
              jjtree.clearNodeScope(jjtn001);
              jjtc001 = false;
            } else {
              jjtree.popNode();
            }
            if (jjte001 instanceof RuntimeException) {
              {if (true) throw (RuntimeException)jjte001;}
            }
            if (jjte001 instanceof ParseException) {
              {if (true) throw (ParseException)jjte001;}
            }
            {if (true) throw (Error)jjte001;}
        } finally {
if (jjtc001) {
              jjtree.closeNodeScope(jjtn001,  2);
              jjtn001.jjtSetLastToken(getToken(0));
            }
        }
        break;
        }
      case 17:{
        jj_consume_token(17);
ASTNENode jjtn002 = new ASTNENode(JJTNENODE);
            boolean jjtc002 = true;
            jjtree.openNodeScope(jjtn002);
            jjtn002.jjtSetFirstToken(getToken(1));
        try {
          RelationalExpression();
        } catch (Throwable jjte002) {
if (jjtc002) {
              jjtree.clearNodeScope(jjtn002);
              jjtc002 = false;
            } else {
              jjtree.popNode();
            }
            if (jjte002 instanceof RuntimeException) {
              {if (true) throw (RuntimeException)jjte002;}
            }
            if (jjte002 instanceof ParseException) {
              {if (true) throw (ParseException)jjte002;}
            }
            {if (true) throw (Error)jjte002;}
        } finally {
if (jjtc002) {
              jjtree.closeNodeScope(jjtn002,  2);
              jjtn002.jjtSetLastToken(getToken(0));
            }
        }
        break;
        }
      default:
        jj_la1[10] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
    }
}

/** Relational expression. */
  static final public void RelationalExpression() throws ParseException {
    AdditiveExpression();
    label_8:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case 18:
      case 19:
      case 20:
      case 21:{
        ;
        break;
        }
      default:
        jj_la1[11] = jj_gen;
        break label_8;
      }
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case 18:{
        jj_consume_token(18);
ASTLTNode jjtn001 = new ASTLTNode(JJTLTNODE);
          boolean jjtc001 = true;
          jjtree.openNodeScope(jjtn001);
          jjtn001.jjtSetFirstToken(getToken(1));
        try {
          AdditiveExpression();
        } catch (Throwable jjte001) {
if (jjtc001) {
            jjtree.clearNodeScope(jjtn001);
            jjtc001 = false;
          } else {
            jjtree.popNode();
          }
          if (jjte001 instanceof RuntimeException) {
            {if (true) throw (RuntimeException)jjte001;}
          }
          if (jjte001 instanceof ParseException) {
            {if (true) throw (ParseException)jjte001;}
          }
          {if (true) throw (Error)jjte001;}
        } finally {
if (jjtc001) {
            jjtree.closeNodeScope(jjtn001,  2);
            jjtn001.jjtSetLastToken(getToken(0));
          }
        }
        break;
        }
      case 19:{
        jj_consume_token(19);
ASTGTNode jjtn002 = new ASTGTNode(JJTGTNODE);
          boolean jjtc002 = true;
          jjtree.openNodeScope(jjtn002);
          jjtn002.jjtSetFirstToken(getToken(1));
        try {
          AdditiveExpression();
        } catch (Throwable jjte002) {
if (jjtc002) {
            jjtree.clearNodeScope(jjtn002);
            jjtc002 = false;
          } else {
            jjtree.popNode();
          }
          if (jjte002 instanceof RuntimeException) {
            {if (true) throw (RuntimeException)jjte002;}
          }
          if (jjte002 instanceof ParseException) {
            {if (true) throw (ParseException)jjte002;}
          }
          {if (true) throw (Error)jjte002;}
        } finally {
if (jjtc002) {
            jjtree.closeNodeScope(jjtn002,  2);
            jjtn002.jjtSetLastToken(getToken(0));
          }
        }
        break;
        }
      case 20:{
        jj_consume_token(20);
ASTLENode jjtn003 = new ASTLENode(JJTLENODE);
           boolean jjtc003 = true;
           jjtree.openNodeScope(jjtn003);
           jjtn003.jjtSetFirstToken(getToken(1));
        try {
          AdditiveExpression();
        } catch (Throwable jjte003) {
if (jjtc003) {
             jjtree.clearNodeScope(jjtn003);
             jjtc003 = false;
           } else {
             jjtree.popNode();
           }
           if (jjte003 instanceof RuntimeException) {
             {if (true) throw (RuntimeException)jjte003;}
           }
           if (jjte003 instanceof ParseException) {
             {if (true) throw (ParseException)jjte003;}
           }
           {if (true) throw (Error)jjte003;}
        } finally {
if (jjtc003) {
             jjtree.closeNodeScope(jjtn003,  2);
             jjtn003.jjtSetLastToken(getToken(0));
           }
        }
        break;
        }
      case 21:{
        jj_consume_token(21);
ASTGENode jjtn004 = new ASTGENode(JJTGENODE);
           boolean jjtc004 = true;
           jjtree.openNodeScope(jjtn004);
           jjtn004.jjtSetFirstToken(getToken(1));
        try {
          AdditiveExpression();
        } catch (Throwable jjte004) {
if (jjtc004) {
             jjtree.clearNodeScope(jjtn004);
             jjtc004 = false;
           } else {
             jjtree.popNode();
           }
           if (jjte004 instanceof RuntimeException) {
             {if (true) throw (RuntimeException)jjte004;}
           }
           if (jjte004 instanceof ParseException) {
             {if (true) throw (ParseException)jjte004;}
           }
           {if (true) throw (Error)jjte004;}
        } finally {
if (jjtc004) {
             jjtree.closeNodeScope(jjtn004,  2);
             jjtn004.jjtSetLastToken(getToken(0));
           }
        }
        break;
        }
      default:
        jj_la1[12] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
    }
}

/** Additive expression. */
  static final public void AdditiveExpression() throws ParseException {
    MultiplicativeExpression();
    label_9:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case 22:
      case 23:{
        ;
        break;
        }
      default:
        jj_la1[13] = jj_gen;
        break label_9;
      }
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case 22:{
        jj_consume_token(22);
ASTAddNode jjtn001 = new ASTAddNode(JJTADDNODE);
          boolean jjtc001 = true;
          jjtree.openNodeScope(jjtn001);
          jjtn001.jjtSetFirstToken(getToken(1));
        try {
          MultiplicativeExpression();
        } catch (Throwable jjte001) {
if (jjtc001) {
            jjtree.clearNodeScope(jjtn001);
            jjtc001 = false;
          } else {
            jjtree.popNode();
          }
          if (jjte001 instanceof RuntimeException) {
            {if (true) throw (RuntimeException)jjte001;}
          }
          if (jjte001 instanceof ParseException) {
            {if (true) throw (ParseException)jjte001;}
          }
          {if (true) throw (Error)jjte001;}
        } finally {
if (jjtc001) {
            jjtree.closeNodeScope(jjtn001,  2);
            jjtn001.jjtSetLastToken(getToken(0));
          }
        }
        break;
        }
      case 23:{
        jj_consume_token(23);
ASTSubtractNode jjtn002 = new ASTSubtractNode(JJTSUBTRACTNODE);
          boolean jjtc002 = true;
          jjtree.openNodeScope(jjtn002);
          jjtn002.jjtSetFirstToken(getToken(1));
        try {
          MultiplicativeExpression();
        } catch (Throwable jjte002) {
if (jjtc002) {
            jjtree.clearNodeScope(jjtn002);
            jjtc002 = false;
          } else {
            jjtree.popNode();
          }
          if (jjte002 instanceof RuntimeException) {
            {if (true) throw (RuntimeException)jjte002;}
          }
          if (jjte002 instanceof ParseException) {
            {if (true) throw (ParseException)jjte002;}
          }
          {if (true) throw (Error)jjte002;}
        } finally {
if (jjtc002) {
            jjtree.closeNodeScope(jjtn002,  2);
            jjtn002.jjtSetLastToken(getToken(0));
          }
        }
        break;
        }
      default:
        jj_la1[14] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
    }
}

/** Multiplicative expression. */
  static final public void MultiplicativeExpression() throws ParseException {
    UnaryExpression();
    label_10:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case 24:
      case 25:
      case 26:{
        ;
        break;
        }
      default:
        jj_la1[15] = jj_gen;
        break label_10;
      }
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case 24:{
        jj_consume_token(24);
ASTMulNode jjtn001 = new ASTMulNode(JJTMULNODE);
          boolean jjtc001 = true;
          jjtree.openNodeScope(jjtn001);
          jjtn001.jjtSetFirstToken(getToken(1));
        try {
          UnaryExpression();
        } catch (Throwable jjte001) {
if (jjtc001) {
            jjtree.clearNodeScope(jjtn001);
            jjtc001 = false;
          } else {
            jjtree.popNode();
          }
          if (jjte001 instanceof RuntimeException) {
            {if (true) throw (RuntimeException)jjte001;}
          }
          if (jjte001 instanceof ParseException) {
            {if (true) throw (ParseException)jjte001;}
          }
          {if (true) throw (Error)jjte001;}
        } finally {
if (jjtc001) {
            jjtree.closeNodeScope(jjtn001,  2);
            jjtn001.jjtSetLastToken(getToken(0));
          }
        }
        break;
        }
      case 25:{
        jj_consume_token(25);
ASTDivNode jjtn002 = new ASTDivNode(JJTDIVNODE);
          boolean jjtc002 = true;
          jjtree.openNodeScope(jjtn002);
          jjtn002.jjtSetFirstToken(getToken(1));
        try {
          UnaryExpression();
        } catch (Throwable jjte002) {
if (jjtc002) {
            jjtree.clearNodeScope(jjtn002);
            jjtc002 = false;
          } else {
            jjtree.popNode();
          }
          if (jjte002 instanceof RuntimeException) {
            {if (true) throw (RuntimeException)jjte002;}
          }
          if (jjte002 instanceof ParseException) {
            {if (true) throw (ParseException)jjte002;}
          }
          {if (true) throw (Error)jjte002;}
        } finally {
if (jjtc002) {
            jjtree.closeNodeScope(jjtn002,  2);
            jjtn002.jjtSetLastToken(getToken(0));
          }
        }
        break;
        }
      case 26:{
        jj_consume_token(26);
ASTModNode jjtn003 = new ASTModNode(JJTMODNODE);
          boolean jjtc003 = true;
          jjtree.openNodeScope(jjtn003);
          jjtn003.jjtSetFirstToken(getToken(1));
        try {
          UnaryExpression();
        } catch (Throwable jjte003) {
if (jjtc003) {
            jjtree.clearNodeScope(jjtn003);
            jjtc003 = false;
          } else {
            jjtree.popNode();
          }
          if (jjte003 instanceof RuntimeException) {
            {if (true) throw (RuntimeException)jjte003;}
          }
          if (jjte003 instanceof ParseException) {
            {if (true) throw (ParseException)jjte003;}
          }
          {if (true) throw (Error)jjte003;}
        } finally {
if (jjtc003) {
            jjtree.closeNodeScope(jjtn003,  2);
            jjtn003.jjtSetLastToken(getToken(0));
          }
        }
        break;
        }
      default:
        jj_la1[16] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
    }
}

/** Unary expression. */
  static final public void UnaryExpression() throws ParseException {
    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
    case 27:{
      jj_consume_token(27);
ASTBitwiseComplNode jjtn001 = new ASTBitwiseComplNode(JJTBITWISECOMPLNODE);
        boolean jjtc001 = true;
        jjtree.openNodeScope(jjtn001);
        jjtn001.jjtSetFirstToken(getToken(1));
      try {
        UnaryExpression();
      } catch (Throwable jjte001) {
if (jjtc001) {
          jjtree.clearNodeScope(jjtn001);
          jjtc001 = false;
        } else {
          jjtree.popNode();
        }
        if (jjte001 instanceof RuntimeException) {
          {if (true) throw (RuntimeException)jjte001;}
        }
        if (jjte001 instanceof ParseException) {
          {if (true) throw (ParseException)jjte001;}
        }
        {if (true) throw (Error)jjte001;}
      } finally {
if (jjtc001) {
          jjtree.closeNodeScope(jjtn001,  1);
          jjtn001.jjtSetLastToken(getToken(0));
        }
      }
      break;
      }
    case 28:{
      jj_consume_token(28);
ASTNotNode jjtn002 = new ASTNotNode(JJTNOTNODE);
        boolean jjtc002 = true;
        jjtree.openNodeScope(jjtn002);
        jjtn002.jjtSetFirstToken(getToken(1));
      try {
        UnaryExpression();
      } catch (Throwable jjte002) {
if (jjtc002) {
          jjtree.clearNodeScope(jjtn002);
          jjtc002 = false;
        } else {
          jjtree.popNode();
        }
        if (jjte002 instanceof RuntimeException) {
          {if (true) throw (RuntimeException)jjte002;}
        }
        if (jjte002 instanceof ParseException) {
          {if (true) throw (ParseException)jjte002;}
        }
        {if (true) throw (Error)jjte002;}
      } finally {
if (jjtc002) {
          jjtree.closeNodeScope(jjtn002,  1);
          jjtn002.jjtSetLastToken(getToken(0));
        }
      }
      break;
      }
    case INTEGER_LITERAL:
    case 29:
    case 31:
    case 32:
    case IDENTIFIER:{
      PrimaryExpression();
      break;
      }
    default:
      jj_la1[17] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
}

/** Primary expression. */
  static final public void PrimaryExpression() throws ParseException {String name;
    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
    case INTEGER_LITERAL:
    case 31:
    case 32:{
      Literal();
      break;
      }
    case IDENTIFIER:{
      Id();
      break;
      }
    case 29:{
      jj_consume_token(29);
      Expression();
      jj_consume_token(30);
      break;
      }
    default:
      jj_la1[18] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
}

/** An Id. */
  static final public void Id() throws ParseException {/*@bgen(jjtree) Id */
   ASTId jjtn000 = new ASTId(JJTID);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
   jjtn000.jjtSetFirstToken(getToken(1));Token t;
    try {
      t = jj_consume_token(IDENTIFIER);
jjtree.closeNodeScope(jjtn000, true);
                       jjtc000 = false;
                       jjtn000.jjtSetLastToken(getToken(0));
jjtn000.name = t.image;
    } finally {
if (jjtc000) {
       jjtree.closeNodeScope(jjtn000, true);
       jjtn000.jjtSetLastToken(getToken(0));
     }
    }
}

/** A literal. */
  static final public void Literal() throws ParseException {Token t;
    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
    case INTEGER_LITERAL:{
ASTIntConstNode jjtn001 = new ASTIntConstNode(JJTINTCONSTNODE);
   boolean jjtc001 = true;
   jjtree.openNodeScope(jjtn001);
   jjtn001.jjtSetFirstToken(getToken(1));
      try {
        t = jj_consume_token(INTEGER_LITERAL);
jjtree.closeNodeScope(jjtn001, true);
      jjtc001 = false;
      jjtn001.jjtSetLastToken(getToken(0));
jjtn001.val = Integer.parseInt(t.image);
      } finally {
if (jjtc001) {
     jjtree.closeNodeScope(jjtn001, true);
     jjtn001.jjtSetLastToken(getToken(0));
   }
      }
      break;
      }
    case 31:
    case 32:{
      BooleanLiteral();
      break;
      }
    default:
      jj_la1[19] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
}

/** A boolean literal. */
  static final public void BooleanLiteral() throws ParseException {
    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
    case 31:{
ASTTrueNode jjtn001 = new ASTTrueNode(JJTTRUENODE);
    boolean jjtc001 = true;
    jjtree.openNodeScope(jjtn001);
    jjtn001.jjtSetFirstToken(getToken(1));
      try {
        jj_consume_token(31);
      } finally {
if (jjtc001) {
      jjtree.closeNodeScope(jjtn001, true);
      jjtn001.jjtSetLastToken(getToken(0));
    }
      }
      break;
      }
    case 32:{
ASTFalseNode jjtn002 = new ASTFalseNode(JJTFALSENODE);
    boolean jjtc002 = true;
    jjtree.openNodeScope(jjtn002);
    jjtn002.jjtSetFirstToken(getToken(1));
      try {
        jj_consume_token(32);
      } finally {
if (jjtc002) {
      jjtree.closeNodeScope(jjtn002, true);
      jjtn002.jjtSetLastToken(getToken(0));
    }
      }
      break;
      }
    default:
      jj_la1[20] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
}

/*
 * Statement syntax follows.
 */

/** A statement. */
  static final public void Statement() throws ParseException {
    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
    case 9:{
      jj_consume_token(9);
      break;
      }
    default:
      jj_la1[21] = jj_gen;
      if (jj_2_2(2)) {
        LabeledStatement();
      } else {
        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
        case 34:{
          Block();
          break;
          }
        case INTEGER_LITERAL:
        case 29:
        case 31:
        case 32:
        case IDENTIFIER:{
          StatementExpression();
          break;
          }
        case 36:{
          IfStatement();
          break;
          }
        case 38:{
          WhileStatement();
          break;
          }
        case 39:
        case 40:{
          IOStatement();
          break;
          }
        default:
          jj_la1[22] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
      }
    }
}

/** A labeled statement. */
  static final public void LabeledStatement() throws ParseException {
    jj_consume_token(IDENTIFIER);
    jj_consume_token(33);
    Statement();
}

/** A block. */
  static final public void Block() throws ParseException {/*@bgen(jjtree) Block */
  ASTBlock jjtn000 = new ASTBlock(JJTBLOCK);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
  jjtn000.jjtSetFirstToken(getToken(1));
    try {
      jj_consume_token(34);
      label_11:
      while (true) {
        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
        case INTEGER_LITERAL:
        case 9:
        case 29:
        case 31:
        case 32:
        case 34:
        case 36:
        case 38:
        case 39:
        case 40:
        case IDENTIFIER:{
          ;
          break;
          }
        default:
          jj_la1[23] = jj_gen;
          break label_11;
        }
        Statement();
      }
      jj_consume_token(35);
    } catch (Throwable jjte000) {
if (jjtc000) {
      jjtree.clearNodeScope(jjtn000);
      jjtc000 = false;
    } else {
      jjtree.popNode();
    }
    if (jjte000 instanceof RuntimeException) {
      {if (true) throw (RuntimeException)jjte000;}
    }
    if (jjte000 instanceof ParseException) {
      {if (true) throw (ParseException)jjte000;}
    }
    {if (true) throw (Error)jjte000;}
    } finally {
if (jjtc000) {
      jjtree.closeNodeScope(jjtn000, true);
      jjtn000.jjtSetLastToken(getToken(0));
    }
    }
}

/** A statement expression. */
  static final public void StatementExpression() throws ParseException {/*@bgen(jjtree) StatementExpression */
  ASTStatementExpression jjtn000 = new ASTStatementExpression(JJTSTATEMENTEXPRESSION);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
  jjtn000.jjtSetFirstToken(getToken(1));
    try {
      Assignment();
      jj_consume_token(9);
    } catch (Throwable jjte000) {
if (jjtc000) {
      jjtree.clearNodeScope(jjtn000);
      jjtc000 = false;
    } else {
      jjtree.popNode();
    }
    if (jjte000 instanceof RuntimeException) {
      {if (true) throw (RuntimeException)jjte000;}
    }
    if (jjte000 instanceof ParseException) {
      {if (true) throw (ParseException)jjte000;}
    }
    {if (true) throw (Error)jjte000;}
    } finally {
if (jjtc000) {
      jjtree.closeNodeScope(jjtn000, true);
      jjtn000.jjtSetLastToken(getToken(0));
    }
    }
}

/** An if statement. */
  static final public void IfStatement() throws ParseException {/*@bgen(jjtree) IfStatement */
  ASTIfStatement jjtn000 = new ASTIfStatement(JJTIFSTATEMENT);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
  jjtn000.jjtSetFirstToken(getToken(1));
    try {
      jj_consume_token(36);
      jj_consume_token(29);
      Expression();
      jj_consume_token(30);
      Statement();
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case 37:{
        jj_consume_token(37);
        Statement();
        break;
        }
      default:
        jj_la1[24] = jj_gen;
        ;
      }
    } catch (Throwable jjte000) {
if (jjtc000) {
      jjtree.clearNodeScope(jjtn000);
      jjtc000 = false;
    } else {
      jjtree.popNode();
    }
    if (jjte000 instanceof RuntimeException) {
      {if (true) throw (RuntimeException)jjte000;}
    }
    if (jjte000 instanceof ParseException) {
      {if (true) throw (ParseException)jjte000;}
    }
    {if (true) throw (Error)jjte000;}
    } finally {
if (jjtc000) {
      jjtree.closeNodeScope(jjtn000, true);
      jjtn000.jjtSetLastToken(getToken(0));
    }
    }
}

/** A while statement. */
  static final public void WhileStatement() throws ParseException {/*@bgen(jjtree) WhileStatement */
  ASTWhileStatement jjtn000 = new ASTWhileStatement(JJTWHILESTATEMENT);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
  jjtn000.jjtSetFirstToken(getToken(1));
    try {
      jj_consume_token(38);
      jj_consume_token(29);
      Expression();
      jj_consume_token(30);
      Statement();
    } catch (Throwable jjte000) {
if (jjtc000) {
      jjtree.clearNodeScope(jjtn000);
      jjtc000 = false;
    } else {
      jjtree.popNode();
    }
    if (jjte000 instanceof RuntimeException) {
      {if (true) throw (RuntimeException)jjte000;}
    }
    if (jjte000 instanceof ParseException) {
      {if (true) throw (ParseException)jjte000;}
    }
    {if (true) throw (Error)jjte000;}
    } finally {
if (jjtc000) {
      jjtree.closeNodeScope(jjtn000, true);
      jjtn000.jjtSetLastToken(getToken(0));
    }
    }
}

/** An IO statement. */
  static final public void IOStatement() throws ParseException {String name;
    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
    case 39:{
      ReadStatement();
      break;
      }
    case 40:{
      WriteStatement();
      break;
      }
    default:
      jj_la1[25] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
}

/** A read statement. */
  static final public void ReadStatement() throws ParseException {/*@bgen(jjtree) ReadStatement */
  ASTReadStatement jjtn000 = new ASTReadStatement(JJTREADSTATEMENT);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
  jjtn000.jjtSetFirstToken(getToken(1));Token t;
    try {
      jj_consume_token(39);
      t = jj_consume_token(IDENTIFIER);
jjtree.closeNodeScope(jjtn000, true);
     jjtc000 = false;
     jjtn000.jjtSetLastToken(getToken(0));
jjtn000.name = t.image;
    } finally {
if (jjtc000) {
       jjtree.closeNodeScope(jjtn000, true);
       jjtn000.jjtSetLastToken(getToken(0));
     }
    }
}

/** A write statement. */
  static final public void WriteStatement() throws ParseException {/*@bgen(jjtree) WriteStatement */
  ASTWriteStatement jjtn000 = new ASTWriteStatement(JJTWRITESTATEMENT);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
  jjtn000.jjtSetFirstToken(getToken(1));Token t;
    try {
      jj_consume_token(40);
      t = jj_consume_token(IDENTIFIER);
jjtree.closeNodeScope(jjtn000, true);
     jjtc000 = false;
     jjtn000.jjtSetLastToken(getToken(0));
jjtn000.name = t.image;
    } finally {
if (jjtc000) {
       jjtree.closeNodeScope(jjtn000, true);
       jjtn000.jjtSetLastToken(getToken(0));
     }
    }
}

  static private boolean jj_2_1(int xla)
 {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return (!jj_3_1()); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(0, xla); }
  }

  static private boolean jj_2_2(int xla)
 {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return (!jj_3_2()); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(1, xla); }
  }

  static private boolean jj_3R_39()
 {
    if (jj_3R_41()) return true;
    Token xsp;
    while (true) {
      xsp = jj_scanpos;
      if (jj_3R_42()) { jj_scanpos = xsp; break; }
    }
    return false;
  }

  static private boolean jj_3R_28()
 {
    if (jj_scan_token(32)) return true;
    return false;
  }

  static private boolean jj_3R_24()
 {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_27()) {
    jj_scanpos = xsp;
    if (jj_3R_28()) return true;
    }
    return false;
  }

  static private boolean jj_3R_27()
 {
    if (jj_scan_token(31)) return true;
    return false;
  }

  static private boolean jj_3R_44()
 {
    if (jj_scan_token(17)) return true;
    if (jj_3R_39()) return true;
    return false;
  }

  static private boolean jj_3R_40()
 {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_43()) {
    jj_scanpos = xsp;
    if (jj_3R_44()) return true;
    }
    return false;
  }

  static private boolean jj_3R_43()
 {
    if (jj_scan_token(16)) return true;
    if (jj_3R_39()) return true;
    return false;
  }

  static private boolean jj_3R_21()
 {
    if (jj_3R_24()) return true;
    return false;
  }

  static private boolean jj_3R_37()
 {
    if (jj_3R_39()) return true;
    Token xsp;
    while (true) {
      xsp = jj_scanpos;
      if (jj_3R_40()) { jj_scanpos = xsp; break; }
    }
    return false;
  }

  static private boolean jj_3R_38()
 {
    if (jj_scan_token(15)) return true;
    if (jj_3R_37()) return true;
    return false;
  }

  static private boolean jj_3R_20()
 {
    if (jj_scan_token(INTEGER_LITERAL)) return true;
    return false;
  }

  static private boolean jj_3R_17()
 {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_20()) {
    jj_scanpos = xsp;
    if (jj_3R_21()) return true;
    }
    return false;
  }

  static private boolean jj_3R_35()
 {
    if (jj_3R_37()) return true;
    Token xsp;
    while (true) {
      xsp = jj_scanpos;
      if (jj_3R_38()) { jj_scanpos = xsp; break; }
    }
    return false;
  }

  static private boolean jj_3R_36()
 {
    if (jj_scan_token(14)) return true;
    if (jj_3R_35()) return true;
    return false;
  }

  static private boolean jj_3R_18()
 {
    if (jj_scan_token(IDENTIFIER)) return true;
    return false;
  }

  static private boolean jj_3R_33()
 {
    if (jj_3R_35()) return true;
    Token xsp;
    while (true) {
      xsp = jj_scanpos;
      if (jj_3R_36()) { jj_scanpos = xsp; break; }
    }
    return false;
  }

  static private boolean jj_3R_34()
 {
    if (jj_scan_token(13)) return true;
    if (jj_3R_33()) return true;
    return false;
  }

  static private boolean jj_3R_31()
 {
    if (jj_3R_33()) return true;
    Token xsp;
    while (true) {
      xsp = jj_scanpos;
      if (jj_3R_34()) { jj_scanpos = xsp; break; }
    }
    return false;
  }

  static private boolean jj_3R_16()
 {
    if (jj_scan_token(29)) return true;
    if (jj_3R_19()) return true;
    if (jj_scan_token(30)) return true;
    return false;
  }

  static private boolean jj_3R_15()
 {
    if (jj_3R_18()) return true;
    return false;
  }

  static private boolean jj_3R_12()
 {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_14()) {
    jj_scanpos = xsp;
    if (jj_3R_15()) {
    jj_scanpos = xsp;
    if (jj_3R_16()) return true;
    }
    }
    return false;
  }

  static private boolean jj_3R_14()
 {
    if (jj_3R_17()) return true;
    return false;
  }

  static private boolean jj_3R_32()
 {
    if (jj_scan_token(12)) return true;
    if (jj_3R_31()) return true;
    return false;
  }

  static private boolean jj_3R_29()
 {
    if (jj_3R_31()) return true;
    Token xsp;
    while (true) {
      xsp = jj_scanpos;
      if (jj_3R_32()) { jj_scanpos = xsp; break; }
    }
    return false;
  }

  static private boolean jj_3R_57()
 {
    if (jj_3R_12()) return true;
    return false;
  }

  static private boolean jj_3R_30()
 {
    if (jj_scan_token(11)) return true;
    if (jj_3R_29()) return true;
    return false;
  }

  static private boolean jj_3R_56()
 {
    if (jj_scan_token(28)) return true;
    if (jj_3R_51()) return true;
    return false;
  }

  static private boolean jj_3R_26()
 {
    if (jj_3R_29()) return true;
    Token xsp;
    while (true) {
      xsp = jj_scanpos;
      if (jj_3R_30()) { jj_scanpos = xsp; break; }
    }
    return false;
  }

  static private boolean jj_3R_55()
 {
    if (jj_scan_token(27)) return true;
    if (jj_3R_51()) return true;
    return false;
  }

  static private boolean jj_3R_51()
 {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_55()) {
    jj_scanpos = xsp;
    if (jj_3R_56()) {
    jj_scanpos = xsp;
    if (jj_3R_57()) return true;
    }
    }
    return false;
  }

  static private boolean jj_3_1()
 {
    if (jj_3R_12()) return true;
    if (jj_scan_token(10)) return true;
    return false;
  }

  static private boolean jj_3R_60()
 {
    if (jj_scan_token(26)) return true;
    if (jj_3R_51()) return true;
    return false;
  }

  static private boolean jj_3R_25()
 {
    if (jj_3R_12()) return true;
    if (jj_scan_token(10)) return true;
    if (jj_3R_19()) return true;
    return false;
  }

  static private boolean jj_3R_59()
 {
    if (jj_scan_token(25)) return true;
    if (jj_3R_51()) return true;
    return false;
  }

  static private boolean jj_3R_58()
 {
    if (jj_scan_token(24)) return true;
    if (jj_3R_51()) return true;
    return false;
  }

  static private boolean jj_3R_52()
 {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_58()) {
    jj_scanpos = xsp;
    if (jj_3R_59()) {
    jj_scanpos = xsp;
    if (jj_3R_60()) return true;
    }
    }
    return false;
  }

  static private boolean jj_3R_23()
 {
    if (jj_3R_26()) return true;
    return false;
  }

  static private boolean jj_3R_13()
 {
    if (jj_scan_token(IDENTIFIER)) return true;
    if (jj_scan_token(33)) return true;
    return false;
  }

  static private boolean jj_3R_45()
 {
    if (jj_3R_51()) return true;
    Token xsp;
    while (true) {
      xsp = jj_scanpos;
      if (jj_3R_52()) { jj_scanpos = xsp; break; }
    }
    return false;
  }

  static private boolean jj_3R_22()
 {
    if (jj_3R_25()) return true;
    return false;
  }

  static private boolean jj_3R_19()
 {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_22()) {
    jj_scanpos = xsp;
    if (jj_3R_23()) return true;
    }
    return false;
  }

  static private boolean jj_3R_54()
 {
    if (jj_scan_token(23)) return true;
    if (jj_3R_45()) return true;
    return false;
  }

  static private boolean jj_3R_53()
 {
    if (jj_scan_token(22)) return true;
    if (jj_3R_45()) return true;
    return false;
  }

  static private boolean jj_3R_46()
 {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_53()) {
    jj_scanpos = xsp;
    if (jj_3R_54()) return true;
    }
    return false;
  }

  static private boolean jj_3R_41()
 {
    if (jj_3R_45()) return true;
    Token xsp;
    while (true) {
      xsp = jj_scanpos;
      if (jj_3R_46()) { jj_scanpos = xsp; break; }
    }
    return false;
  }

  static private boolean jj_3_2()
 {
    if (jj_3R_13()) return true;
    return false;
  }

  static private boolean jj_3R_50()
 {
    if (jj_scan_token(21)) return true;
    if (jj_3R_41()) return true;
    return false;
  }

  static private boolean jj_3R_49()
 {
    if (jj_scan_token(20)) return true;
    if (jj_3R_41()) return true;
    return false;
  }

  static private boolean jj_3R_48()
 {
    if (jj_scan_token(19)) return true;
    if (jj_3R_41()) return true;
    return false;
  }

  static private boolean jj_3R_47()
 {
    if (jj_scan_token(18)) return true;
    if (jj_3R_41()) return true;
    return false;
  }

  static private boolean jj_3R_42()
 {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_47()) {
    jj_scanpos = xsp;
    if (jj_3R_48()) {
    jj_scanpos = xsp;
    if (jj_3R_49()) {
    jj_scanpos = xsp;
    if (jj_3R_50()) return true;
    }
    }
    }
    return false;
  }

  static private boolean jj_initialized_once = false;
  /** Generated Token Manager. */
  static public SPLParserTokenManager token_source;
  static SimpleCharStream jj_input_stream;
  /** Current token. */
  static public Token token;
  /** Next token. */
  static public Token jj_nt;
  static private int jj_ntk;
  static private Token jj_scanpos, jj_lastpos;
  static private int jj_la;
  static private int jj_gen;
  static final private int[] jj_la1 = new int[26];
  static private int[] jj_la1_0;
  static private int[] jj_la1_1;
  static {
	   jj_la1_init_0();
	   jj_la1_init_1();
	}
	private static void jj_la1_init_0() {
	   jj_la1_0 = new int[] {0xa00003c0,0xa00003c0,0xc0,0xb8000100,0x800,0x1000,0x2000,0x4000,0x8000,0x30000,0x30000,0x3c0000,0x3c0000,0xc00000,0xc00000,0x7000000,0x7000000,0xb8000100,0xa0000100,0x80000100,0x80000000,0x200,0xa0000100,0xa0000300,0x0,0x0,};
	}
	private static void jj_la1_init_1() {
	   jj_la1_1 = new int[] {0x3d5,0x3d5,0x0,0x201,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x201,0x201,0x1,0x1,0x0,0x3d5,0x3d5,0x20,0x180,};
	}
  static final private JJCalls[] jj_2_rtns = new JJCalls[2];
  static private boolean jj_rescan = false;
  static private int jj_gc = 0;

  /** Constructor with InputStream. */
  public SPLParser(java.io.InputStream stream) {
	  this(stream, null);
  }
  /** Constructor with InputStream and supplied encoding */
  public SPLParser(java.io.InputStream stream, String encoding) {
	 if (jj_initialized_once) {
	   System.out.println("ERROR: Second call to constructor of static parser.  ");
	   System.out.println("	   You must either use ReInit() or set the JavaCC option STATIC to false");
	   System.out.println("	   during parser generation.");
	   throw new Error();
	 }
	 jj_initialized_once = true;
	 try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
	 token_source = new SPLParserTokenManager(jj_input_stream);
	 token = new Token();
	 jj_ntk = -1;
	 jj_gen = 0;
	 for (int i = 0; i < 26; i++) jj_la1[i] = -1;
	 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
  }

  /** Reinitialise. */
  static public void ReInit(java.io.InputStream stream) {
	  ReInit(stream, null);
  }
  /** Reinitialise. */
  static public void ReInit(java.io.InputStream stream, String encoding) {
	 try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
	 token_source.ReInit(jj_input_stream);
	 token = new Token();
	 jj_ntk = -1;
	 jjtree.reset();
	 jj_gen = 0;
	 for (int i = 0; i < 26; i++) jj_la1[i] = -1;
	 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
  }

  /** Constructor. */
  public SPLParser(java.io.Reader stream) {
	 if (jj_initialized_once) {
	   System.out.println("ERROR: Second call to constructor of static parser. ");
	   System.out.println("	   You must either use ReInit() or set the JavaCC option STATIC to false");
	   System.out.println("	   during parser generation.");
	   throw new Error();
	 }
	 jj_initialized_once = true;
	 jj_input_stream = new SimpleCharStream(stream, 1, 1);
	 token_source = new SPLParserTokenManager(jj_input_stream);
	 token = new Token();
	 jj_ntk = -1;
	 jj_gen = 0;
	 for (int i = 0; i < 26; i++) jj_la1[i] = -1;
	 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
  }

  /** Reinitialise. */
  static public void ReInit(java.io.Reader stream) {
	if (jj_input_stream == null) {
	   jj_input_stream = new SimpleCharStream(stream, 1, 1);
	} else {
	   jj_input_stream.ReInit(stream, 1, 1);
	}
	if (token_source == null) {
 token_source = new SPLParserTokenManager(jj_input_stream);
	}

	 token_source.ReInit(jj_input_stream);
	 token = new Token();
	 jj_ntk = -1;
	 jjtree.reset();
	 jj_gen = 0;
	 for (int i = 0; i < 26; i++) jj_la1[i] = -1;
	 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
  }

  /** Constructor with generated Token Manager. */
  public SPLParser(SPLParserTokenManager tm) {
	 if (jj_initialized_once) {
	   System.out.println("ERROR: Second call to constructor of static parser. ");
	   System.out.println("	   You must either use ReInit() or set the JavaCC option STATIC to false");
	   System.out.println("	   during parser generation.");
	   throw new Error();
	 }
	 jj_initialized_once = true;
	 token_source = tm;
	 token = new Token();
	 jj_ntk = -1;
	 jj_gen = 0;
	 for (int i = 0; i < 26; i++) jj_la1[i] = -1;
	 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
  }

  /** Reinitialise. */
  public void ReInit(SPLParserTokenManager tm) {
	 token_source = tm;
	 token = new Token();
	 jj_ntk = -1;
	 jjtree.reset();
	 jj_gen = 0;
	 for (int i = 0; i < 26; i++) jj_la1[i] = -1;
	 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
  }

  static private Token jj_consume_token(int kind) throws ParseException {
	 Token oldToken;
	 if ((oldToken = token).next != null) token = token.next;
	 else token = token.next = token_source.getNextToken();
	 jj_ntk = -1;
	 if (token.kind == kind) {
	   jj_gen++;
	   if (++jj_gc > 100) {
		 jj_gc = 0;
		 for (int i = 0; i < jj_2_rtns.length; i++) {
		   JJCalls c = jj_2_rtns[i];
		   while (c != null) {
			 if (c.gen < jj_gen) c.first = null;
			 c = c.next;
		   }
		 }
	   }
	   return token;
	 }
	 token = oldToken;
	 jj_kind = kind;
	 throw generateParseException();
  }

  @SuppressWarnings("serial")
  static private final class LookaheadSuccess extends java.lang.Error { }
  static final private LookaheadSuccess jj_ls = new LookaheadSuccess();
  static private boolean jj_scan_token(int kind) {
	 if (jj_scanpos == jj_lastpos) {
	   jj_la--;
	   if (jj_scanpos.next == null) {
		 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
	   } else {
		 jj_lastpos = jj_scanpos = jj_scanpos.next;
	   }
	 } else {
	   jj_scanpos = jj_scanpos.next;
	 }
	 if (jj_rescan) {
	   int i = 0; Token tok = token;
	   while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
	   if (tok != null) jj_add_error_token(kind, i);
	 }
	 if (jj_scanpos.kind != kind) return true;
	 if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
	 return false;
  }


/** Get the next Token. */
  static final public Token getNextToken() {
	 if (token.next != null) token = token.next;
	 else token = token.next = token_source.getNextToken();
	 jj_ntk = -1;
	 jj_gen++;
	 return token;
  }

/** Get the specific Token. */
  static final public Token getToken(int index) {
	 Token t = token;
	 for (int i = 0; i < index; i++) {
	   if (t.next != null) t = t.next;
	   else t = t.next = token_source.getNextToken();
	 }
	 return t;
  }

  static private int jj_ntk_f() {
	 if ((jj_nt=token.next) == null)
	   return (jj_ntk = (token.next=token_source.getNextToken()).kind);
	 else
	   return (jj_ntk = jj_nt.kind);
  }

  static private java.util.List jj_expentries = new java.util.ArrayList();
  static private int[] jj_expentry;
  static private int jj_kind = -1;
  static private int[] jj_lasttokens = new int[100];
  static private int jj_endpos;

  static private void jj_add_error_token(int kind, int pos) {
	 if (pos >= 100) {
		return;
	 }

	 if (pos == jj_endpos + 1) {
	   jj_lasttokens[jj_endpos++] = kind;
	 } else if (jj_endpos != 0) {
	   jj_expentry = new int[jj_endpos];

	   for (int i = 0; i < jj_endpos; i++) {
		 jj_expentry[i] = jj_lasttokens[i];
	   }

	   for (int[] oldentry : jj_expentries) {
		 if (oldentry.length == jj_expentry.length) {
		   boolean isMatched = true;

		   for (int i = 0; i < jj_expentry.length; i++) {
			 if (oldentry[i] != jj_expentry[i]) {
			   isMatched = false;
			   break;
			 }

		   }
		   if (isMatched) {
			 jj_expentries.add(jj_expentry);
			 break;
		   }
		 }
	   }

	   if (pos != 0) {
		 jj_lasttokens[(jj_endpos = pos) - 1] = kind;
	   }
	 }
  }

  /** Generate ParseException. */
  static public ParseException generateParseException() {
	 jj_expentries.clear();
	 boolean[] la1tokens = new boolean[44];
	 if (jj_kind >= 0) {
	   la1tokens[jj_kind] = true;
	   jj_kind = -1;
	 }
	 for (int i = 0; i < 26; i++) {
	   if (jj_la1[i] == jj_gen) {
		 for (int j = 0; j < 32; j++) {
		   if ((jj_la1_0[i] & (1< jj_gen) {
			 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
			 switch (i) {
			   case 0: jj_3_1(); break;
			   case 1: jj_3_2(); break;
			 }
		   }
		   p = p.next;
		 } while (p != null);

		 } catch(LookaheadSuccess ls) { }
	 }
	 jj_rescan = false;
  }

  static private void jj_save(int index, int xla) {
	 JJCalls p = jj_2_rtns[index];
	 while (p.gen > jj_gen) {
	   if (p.next == null) { p = p.next = new JJCalls(); break; }
	   p = p.next;
	 }

	 p.gen = jj_gen + xla - jj_la; 
	 p.first = token;
	 p.arg = xla;
  }

  static final class JJCalls {
	 int gen;
	 Token first;
	 int arg;
	 JJCalls next;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy