STParser.java

/* Generated By:JavaCC: Do not edit this line. STParser.java */
package net.metanotion.simpletemplate.parser;

import net.metanotion.simpletemplate.parser.syntaxtree.*;
import java.util.Vector;


public class STParser implements STParserConstants {

  final public Template Template() throws ParseException {
   NodeListOptional n0 = new NodeListOptional();
   HtmlBlock n1;
   NodeToken n2;
   Token n3;
    label_1:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case BEGIN_CALL:
      case BEGIN_SSI:
      case HTML_OTHER:
      case HTML:
        ;
        break;
      default:
        jj_la1[0] = jj_gen;
        break label_1;
      }
      n1 = HtmlBlock();
        n0.addNode(n1);
    }
     n0.nodes.trimToSize();
    n3 = jj_consume_token(0);
      n3.beginColumn++; n3.endColumn++;
      n2 = JTBToolkit.makeNodeToken(n3);
     {if (true) return new Template(n0,n2);}
    throw new Error("Missing return statement in function");
  }

  final public HtmlBlock HtmlBlock() throws ParseException {
   NodeChoice n0;
   NodeToken n1;
   Token n2;
   NodeToken n3;
   Token n4;
   ES n5;
   NodeSequence n6;
   NodeToken n7;
   Token n8;
   SSD n9;
   NodeToken n10;
   Token n11;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case HTML:
      n2 = jj_consume_token(HTML);
                  n1 = JTBToolkit.makeNodeToken(n2);
        n0 = new NodeChoice(n1, 0);
      break;
    case HTML_OTHER:
      n4 = jj_consume_token(HTML_OTHER);
                        n3 = JTBToolkit.makeNodeToken(n4);
        n0 = new NodeChoice(n3, 1);
      break;
    case BEGIN_CALL:
      n5 = ES();
        n0 = new NodeChoice(n5, 2);
      break;
    case BEGIN_SSI:
        n6 = new NodeSequence(3);
      n8 = jj_consume_token(BEGIN_SSI);
                       n7 = JTBToolkit.makeNodeToken(n8);
        n6.addNode(n7);
      n9 = SSD();
        n6.addNode(n9);
      n11 = jj_consume_token(END_SSI);
                      n10 = JTBToolkit.makeNodeToken(n11);
        n6.addNode(n10);
        n0 = new NodeChoice(n6, 3);
      break;
    default:
      jj_la1[1] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
     {if (true) return new HtmlBlock(n0);}
    throw new Error("Missing return statement in function");
  }

  final public ES ES() throws ParseException {
   NodeToken n0;
   Token n1;
   NodeOptional n2 = new NodeOptional();
   ExprSeq n3;
   NodeToken n4;
   Token n5;
    n1 = jj_consume_token(BEGIN_CALL);
                     n0 = JTBToolkit.makeNodeToken(n1);
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case KW_LET:
    case BOOLEAN_LITERAL:
    case ID:
    case OP_LAMBDA:
    case OP_LIFT:
    case L_CURLY:
    case L_PAREN:
    case L_BRACE:
    case DECIMAL_LITERAL:
    case HEX_LITERAL:
    case FLOAT_LITERAL:
    case STRING_LITERAL:
    case SQSTRING_LITERAL:
      n3 = ExprSeq();
        n2.addNode(n3);
      break;
    default:
      jj_la1[2] = jj_gen;
      ;
    }
    n5 = jj_consume_token(END_CALL);
                   n4 = JTBToolkit.makeNodeToken(n5);
     {if (true) return new ES(n0,n2,n4);}
    throw new Error("Missing return statement in function");
  }

  final public ExprSeq ExprSeq() throws ParseException {
   Expression n0;
   NodeListOptional n1 = new NodeListOptional();
   NodeSequence n2;
   NodeToken n3;
   Token n4;
   Expression n5;
    n0 = Expression();
    label_2:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case OP_SEMI:
        ;
        break;
      default:
        jj_la1[3] = jj_gen;
        break label_2;
      }
        n2 = new NodeSequence(2);
      n4 = jj_consume_token(OP_SEMI);
                     n3 = JTBToolkit.makeNodeToken(n4);
        n2.addNode(n3);
      n5 = Expression();
        n2.addNode(n5);
        n1.addNode(n2);
    }
     n1.nodes.trimToSize();
     {if (true) return new ExprSeq(n0,n1);}
    throw new Error("Missing return statement in function");
  }

  final public Expression Expression() throws ParseException {
   NodeChoice n0;
   Apply n1;
   JSObj n2;
   JSArr n3;
   Tuple n4;
   Lambda n5;
   Let n6;
   Literal n7;
   Lift n8;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case ID:
      n1 = Apply();
        n0 = new NodeChoice(n1, 0);
      break;
    case L_CURLY:
      n2 = JSObj();
        n0 = new NodeChoice(n2, 1);
      break;
    case L_BRACE:
      n3 = JSArr();
        n0 = new NodeChoice(n3, 2);
      break;
    case L_PAREN:
      n4 = Tuple();
        n0 = new NodeChoice(n4, 3);
      break;
    case OP_LAMBDA:
      n5 = Lambda();
        n0 = new NodeChoice(n5, 4);
      break;
    case KW_LET:
      n6 = Let();
        n0 = new NodeChoice(n6, 5);
      break;
    case BOOLEAN_LITERAL:
    case DECIMAL_LITERAL:
    case HEX_LITERAL:
    case FLOAT_LITERAL:
    case STRING_LITERAL:
    case SQSTRING_LITERAL:
      n7 = Literal();
        n0 = new NodeChoice(n7, 6);
      break;
    case OP_LIFT:
      n8 = Lift();
        n0 = new NodeChoice(n8, 7);
      break;
    default:
      jj_la1[4] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
     {if (true) return new Expression(n0);}
    throw new Error("Missing return statement in function");
  }

  final public Apply Apply() throws ParseException {
   NodeToken n0;
   Token n1;
   NodeListOptional n2 = new NodeListOptional();
   NodeSequence n3;
   NodeToken n4;
   Token n5;
   NodeToken n6;
   Token n7;
   NodeOptional n8 = new NodeOptional();
   Expression n9;
    n1 = jj_consume_token(ID);
             n0 = JTBToolkit.makeNodeToken(n1);
    label_3:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case OP_DOT:
        ;
        break;
      default:
        jj_la1[5] = jj_gen;
        break label_3;
      }
        n3 = new NodeSequence(2);
      n5 = jj_consume_token(OP_DOT);
                    n4 = JTBToolkit.makeNodeToken(n5);
        n3.addNode(n4);
      n7 = jj_consume_token(ID);
                n6 = JTBToolkit.makeNodeToken(n7);
        n3.addNode(n6);
        n2.addNode(n3);
    }
     n2.nodes.trimToSize();
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case KW_LET:
    case BOOLEAN_LITERAL:
    case ID:
    case OP_LAMBDA:
    case OP_LIFT:
    case L_CURLY:
    case L_PAREN:
    case L_BRACE:
    case DECIMAL_LITERAL:
    case HEX_LITERAL:
    case FLOAT_LITERAL:
    case STRING_LITERAL:
    case SQSTRING_LITERAL:
      n9 = Expression();
        n8.addNode(n9);
      break;
    default:
      jj_la1[6] = jj_gen;
      ;
    }
     {if (true) return new Apply(n0,n2,n8);}
    throw new Error("Missing return statement in function");
  }

  final public JSObj JSObj() throws ParseException {
   NodeToken n0;
   Token n1;
   NodeOptional n2 = new NodeOptional();
   WithParams n3;
   NodeToken n4;
   Token n5;
    n1 = jj_consume_token(L_CURLY);
                  n0 = JTBToolkit.makeNodeToken(n1);
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case ID:
    case STRING_LITERAL:
    case SQSTRING_LITERAL:
      n3 = WithParams();
        n2.addNode(n3);
      break;
    default:
      jj_la1[7] = jj_gen;
      ;
    }
    n5 = jj_consume_token(R_CURLY);
                  n4 = JTBToolkit.makeNodeToken(n5);
     {if (true) return new JSObj(n0,n2,n4);}
    throw new Error("Missing return statement in function");
  }

  final public JSArr JSArr() throws ParseException {
   NodeToken n0;
   Token n1;
   NodeOptional n2 = new NodeOptional();
   Params n3;
   NodeToken n4;
   Token n5;
    n1 = jj_consume_token(L_BRACE);
                  n0 = JTBToolkit.makeNodeToken(n1);
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case KW_LET:
    case BOOLEAN_LITERAL:
    case ID:
    case OP_LAMBDA:
    case OP_LIFT:
    case L_CURLY:
    case L_PAREN:
    case L_BRACE:
    case DECIMAL_LITERAL:
    case HEX_LITERAL:
    case FLOAT_LITERAL:
    case STRING_LITERAL:
    case SQSTRING_LITERAL:
      n3 = Params();
        n2.addNode(n3);
      break;
    default:
      jj_la1[8] = jj_gen;
      ;
    }
    n5 = jj_consume_token(R_BRACE);
                  n4 = JTBToolkit.makeNodeToken(n5);
     {if (true) return new JSArr(n0,n2,n4);}
    throw new Error("Missing return statement in function");
  }

  final public Tuple Tuple() throws ParseException {
   NodeToken n0;
   Token n1;
   NodeOptional n2 = new NodeOptional();
   Params n3;
   NodeToken n4;
   Token n5;
   NodeOptional n6 = new NodeOptional();
   Expression n7;
    n1 = jj_consume_token(L_PAREN);
                  n0 = JTBToolkit.makeNodeToken(n1);
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case KW_LET:
    case BOOLEAN_LITERAL:
    case ID:
    case OP_LAMBDA:
    case OP_LIFT:
    case L_CURLY:
    case L_PAREN:
    case L_BRACE:
    case DECIMAL_LITERAL:
    case HEX_LITERAL:
    case FLOAT_LITERAL:
    case STRING_LITERAL:
    case SQSTRING_LITERAL:
      n3 = Params();
        n2.addNode(n3);
      break;
    default:
      jj_la1[9] = jj_gen;
      ;
    }
    n5 = jj_consume_token(R_PAREN);
                  n4 = JTBToolkit.makeNodeToken(n5);
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case KW_LET:
    case BOOLEAN_LITERAL:
    case ID:
    case OP_LAMBDA:
    case OP_LIFT:
    case L_CURLY:
    case L_PAREN:
    case L_BRACE:
    case DECIMAL_LITERAL:
    case HEX_LITERAL:
    case FLOAT_LITERAL:
    case STRING_LITERAL:
    case SQSTRING_LITERAL:
      n7 = Expression();
        n6.addNode(n7);
      break;
    default:
      jj_la1[10] = jj_gen;
      ;
    }
     {if (true) return new Tuple(n0,n2,n4,n6);}
    throw new Error("Missing return statement in function");
  }

  final public Lambda Lambda() throws ParseException {
   NodeToken n0;
   Token n1;
   NodeToken n2;
   Token n3;
   ExprSeq n4;
   NodeToken n5;
   Token n6;
   NodeOptional n7 = new NodeOptional();
   Expression n8;
    n1 = jj_consume_token(OP_LAMBDA);
                    n0 = JTBToolkit.makeNodeToken(n1);
    n3 = jj_consume_token(L_PAREN);
                  n2 = JTBToolkit.makeNodeToken(n3);
    n4 = ExprSeq();
    n6 = jj_consume_token(R_PAREN);
                  n5 = JTBToolkit.makeNodeToken(n6);
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case KW_LET:
    case BOOLEAN_LITERAL:
    case ID:
    case OP_LAMBDA:
    case OP_LIFT:
    case L_CURLY:
    case L_PAREN:
    case L_BRACE:
    case DECIMAL_LITERAL:
    case HEX_LITERAL:
    case FLOAT_LITERAL:
    case STRING_LITERAL:
    case SQSTRING_LITERAL:
      n8 = Expression();
        n7.addNode(n8);
      break;
    default:
      jj_la1[11] = jj_gen;
      ;
    }
     {if (true) return new Lambda(n0,n2,n4,n5,n7);}
    throw new Error("Missing return statement in function");
  }

  final public Let Let() throws ParseException {
   NodeToken n0;
   Token n1;
   JSObj n2;
   NodeToken n3;
   Token n4;
   ExprSeq n5;
   NodeToken n6;
   Token n7;
   NodeOptional n8 = new NodeOptional();
   Expression n9;
    n1 = jj_consume_token(KW_LET);
                 n0 = JTBToolkit.makeNodeToken(n1);
    n2 = JSObj();
    n4 = jj_consume_token(L_PAREN);
                  n3 = JTBToolkit.makeNodeToken(n4);
    n5 = ExprSeq();
    n7 = jj_consume_token(R_PAREN);
                  n6 = JTBToolkit.makeNodeToken(n7);
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case KW_LET:
    case BOOLEAN_LITERAL:
    case ID:
    case OP_LAMBDA:
    case OP_LIFT:
    case L_CURLY:
    case L_PAREN:
    case L_BRACE:
    case DECIMAL_LITERAL:
    case HEX_LITERAL:
    case FLOAT_LITERAL:
    case STRING_LITERAL:
    case SQSTRING_LITERAL:
      n9 = Expression();
        n8.addNode(n9);
      break;
    default:
      jj_la1[12] = jj_gen;
      ;
    }
     {if (true) return new Let(n0,n2,n3,n5,n6,n8);}
    throw new Error("Missing return statement in function");
  }

  final public Lift Lift() throws ParseException {
   NodeToken n0;
   Token n1;
   NodeOptional n2 = new NodeOptional();
   Expression n3;
    n1 = jj_consume_token(OP_LIFT);
                  n0 = JTBToolkit.makeNodeToken(n1);
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case KW_LET:
    case BOOLEAN_LITERAL:
    case ID:
    case OP_LAMBDA:
    case OP_LIFT:
    case L_CURLY:
    case L_PAREN:
    case L_BRACE:
    case DECIMAL_LITERAL:
    case HEX_LITERAL:
    case FLOAT_LITERAL:
    case STRING_LITERAL:
    case SQSTRING_LITERAL:
      n3 = Expression();
        n2.addNode(n3);
      break;
    default:
      jj_la1[13] = jj_gen;
      ;
    }
     {if (true) return new Lift(n0,n2);}
    throw new Error("Missing return statement in function");
  }

  final public Literal Literal() throws ParseException {
   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;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case DECIMAL_LITERAL:
      n2 = jj_consume_token(DECIMAL_LITERAL);
                             n1 = JTBToolkit.makeNodeToken(n2);
        n0 = new NodeChoice(n1, 0);
      break;
    case HEX_LITERAL:
      n4 = jj_consume_token(HEX_LITERAL);
                         n3 = JTBToolkit.makeNodeToken(n4);
        n0 = new NodeChoice(n3, 1);
      break;
    case FLOAT_LITERAL:
      n6 = jj_consume_token(FLOAT_LITERAL);
                           n5 = JTBToolkit.makeNodeToken(n6);
        n0 = new NodeChoice(n5, 2);
      break;
    case STRING_LITERAL:
      n8 = jj_consume_token(STRING_LITERAL);
                            n7 = JTBToolkit.makeNodeToken(n8);
        n0 = new NodeChoice(n7, 3);
      break;
    case SQSTRING_LITERAL:
      n10 = jj_consume_token(SQSTRING_LITERAL);
                               n9 = JTBToolkit.makeNodeToken(n10);
        n0 = new NodeChoice(n9, 4);
      break;
    case BOOLEAN_LITERAL:
      n12 = jj_consume_token(BOOLEAN_LITERAL);
                              n11 = JTBToolkit.makeNodeToken(n12);
        n0 = new NodeChoice(n11, 5);
      break;
    default:
      jj_la1[14] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
     {if (true) return new Literal(n0);}
    throw new Error("Missing return statement in function");
  }

  final public Params Params() throws ParseException {
   Expression n0;
   NodeListOptional n1 = new NodeListOptional();
   NodeSequence n2;
   NodeToken n3;
   Token n4;
   Expression n5;
    n0 = Expression();
    label_4:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case OP_COMMA:
        ;
        break;
      default:
        jj_la1[15] = jj_gen;
        break label_4;
      }
        n2 = new NodeSequence(2);
      n4 = jj_consume_token(OP_COMMA);
                      n3 = JTBToolkit.makeNodeToken(n4);
        n2.addNode(n3);
      n5 = Expression();
        n2.addNode(n5);
        n1.addNode(n2);
    }
     n1.nodes.trimToSize();
     {if (true) return new Params(n0,n1);}
    throw new Error("Missing return statement in function");
  }

  final public WithParams WithParams() throws ParseException {
   WithParam n0;
   NodeListOptional n1 = new NodeListOptional();
   NodeSequence n2;
   NodeToken n3;
   Token n4;
   WithParam n5;
    n0 = WithParam();
    label_5:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case OP_COMMA:
        ;
        break;
      default:
        jj_la1[16] = jj_gen;
        break label_5;
      }
        n2 = new NodeSequence(2);
      n4 = jj_consume_token(OP_COMMA);
                      n3 = JTBToolkit.makeNodeToken(n4);
        n2.addNode(n3);
      n5 = WithParam();
        n2.addNode(n5);
        n1.addNode(n2);
    }
     n1.nodes.trimToSize();
     {if (true) return new WithParams(n0,n1);}
    throw new Error("Missing return statement in function");
  }

  final public Key Key() throws ParseException {
   NodeChoice n0;
   NodeToken n1;
   Token n2;
   NodeToken n3;
   Token n4;
   NodeToken n5;
   Token n6;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case ID:
      n2 = jj_consume_token(ID);
                n1 = JTBToolkit.makeNodeToken(n2);
        n0 = new NodeChoice(n1, 0);
      break;
    case STRING_LITERAL:
      n4 = jj_consume_token(STRING_LITERAL);
                            n3 = JTBToolkit.makeNodeToken(n4);
        n0 = new NodeChoice(n3, 1);
      break;
    case SQSTRING_LITERAL:
      n6 = jj_consume_token(SQSTRING_LITERAL);
                              n5 = JTBToolkit.makeNodeToken(n6);
        n0 = new NodeChoice(n5, 2);
      break;
    default:
      jj_la1[17] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
     {if (true) return new Key(n0);}
    throw new Error("Missing return statement in function");
  }

  final public WithParam WithParam() throws ParseException {
   Key n0;
   NodeToken n1;
   Token n2;
   Expression n3;
    n0 = Key();
    n2 = jj_consume_token(OP_WITH);
                  n1 = JTBToolkit.makeNodeToken(n2);
    n3 = Expression();
     {if (true) return new WithParam(n0,n1,n3);}
    throw new Error("Missing return statement in function");
  }

  final public SSD SSD() throws ParseException {
   Directive n0;
   NodeToken n1;
   Token n2;
   NodeToken n3;
   Token n4;
   NodeToken n5;
   Token n6;
    n0 = Directive();
    n2 = jj_consume_token(SSIID);
                n1 = JTBToolkit.makeNodeToken(n2);
    n4 = jj_consume_token(SOP_EQ);
                 n3 = JTBToolkit.makeNodeToken(n4);
    n6 = jj_consume_token(SSI_STRING_LITERAL);
                             n5 = JTBToolkit.makeNodeToken(n6);
     {if (true) return new SSD(n0,n1,n3,n5);}
    throw new Error("Missing return statement in function");
  }

  final public Directive Directive() throws ParseException {
   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;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case KW_INC:
      n2 = jj_consume_token(KW_INC);
                    n1 = JTBToolkit.makeNodeToken(n2);
        n0 = new NodeChoice(n1, 0);
      break;
    case KW_ECHO:
      n4 = jj_consume_token(KW_ECHO);
                     n3 = JTBToolkit.makeNodeToken(n4);
        n0 = new NodeChoice(n3, 1);
      break;
    case KW_CONFIG:
      n6 = jj_consume_token(KW_CONFIG);
                       n5 = JTBToolkit.makeNodeToken(n6);
        n0 = new NodeChoice(n5, 2);
      break;
    case KW_EXEC:
      n8 = jj_consume_token(KW_EXEC);
                     n7 = JTBToolkit.makeNodeToken(n8);
        n0 = new NodeChoice(n7, 3);
      break;
    case KW_SET:
      n10 = jj_consume_token(KW_SET);
                     n9 = JTBToolkit.makeNodeToken(n10);
        n0 = new NodeChoice(n9, 4);
      break;
    case KW_IF:
      n12 = jj_consume_token(KW_IF);
                    n11 = JTBToolkit.makeNodeToken(n12);
        n0 = new NodeChoice(n11, 5);
      break;
    case KW_ELIF:
      n14 = jj_consume_token(KW_ELIF);
                      n13 = JTBToolkit.makeNodeToken(n14);
        n0 = new NodeChoice(n13, 6);
      break;
    case KW_ELSE:
      n16 = jj_consume_token(KW_ELSE);
                      n15 = JTBToolkit.makeNodeToken(n16);
        n0 = new NodeChoice(n15, 7);
      break;
    case KW_ENDIF:
      n18 = jj_consume_token(KW_ENDIF);
                       n17 = JTBToolkit.makeNodeToken(n18);
        n0 = new NodeChoice(n17, 8);
      break;
    default:
      jj_la1[18] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
     {if (true) return new Directive(n0);}
    throw new Error("Missing return statement in function");
  }

  /** Generated Token Manager. */
  public STParserTokenManager token_source;
  SimpleCharStream jj_input_stream;
  /** Current token. */
  public Token token;
  /** Next token. */
  public Token jj_nt;
  private int jj_ntk;
  private int jj_gen;
  final private int[] jj_la1 = new int[19];
  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[] {0x1e000,0x1e000,0x570e0000,0x200000,0x570e0000,0x400000,0x570e0000,0x80000,0x570e0000,0x570e0000,0x570e0000,0x570e0000,0x570e0000,0x570e0000,0x40000,0x100000,0x100000,0x80000,0x0,};
   }
   private static void jj_la1_init_1() {
      jj_la1_1 = new int[] {0x0,0x0,0x1f,0x0,0x1f,0x0,0x1f,0x18,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x0,0x0,0x18,0xff80,};
   }

  /** Constructor with InputStream. */
  public STParser(java.io.InputStream stream) {
     this(stream, null);
  }
  /** Constructor with InputStream and supplied encoding */
  public STParser(java.io.InputStream stream, String encoding) {
    try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
    token_source = new STParserTokenManager(jj_input_stream);
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 19; i++) jj_la1[i] = -1;
  }

  /** Reinitialise. */
  public void ReInit(java.io.InputStream stream) {
     ReInit(stream, null);
  }
  /** Reinitialise. */
  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;
    jj_gen = 0;
    for (int i = 0; i < 19; i++) jj_la1[i] = -1;
  }

  /** Constructor. */
  public STParser(java.io.Reader stream) {
    jj_input_stream = new SimpleCharStream(stream, 1, 1);
    token_source = new STParserTokenManager(jj_input_stream);
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 19; i++) jj_la1[i] = -1;
  }

  /** Reinitialise. */
  public void ReInit(java.io.Reader stream) {
    jj_input_stream.ReInit(stream, 1, 1);
    token_source.ReInit(jj_input_stream);
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 19; i++) jj_la1[i] = -1;
  }

  /** Constructor with generated Token Manager. */
  public STParser(STParserTokenManager tm) {
    token_source = tm;
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 19; i++) jj_la1[i] = -1;
  }

  /** Reinitialise. */
  public void ReInit(STParserTokenManager tm) {
    token_source = tm;
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 19; i++) jj_la1[i] = -1;
  }

  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++;
      return token;
    }
    token = oldToken;
    jj_kind = kind;
    throw generateParseException();
  }


/** Get the next Token. */
  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. */
  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;
  }

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

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

  /** Generate ParseException. */
  public ParseException generateParseException() {
    jj_expentries.clear();
    boolean[] la1tokens = new boolean[51];
    if (jj_kind >= 0) {
      la1tokens[jj_kind] = true;
      jj_kind = -1;
    }
    for (int i = 0; i < 19; i++) {
      if (jj_la1[i] == jj_gen) {
        for (int j = 0; j < 32; j++) {
          if ((jj_la1_0[i] & (1<<j)) != 0) {
            la1tokens[j] = true;
          }
          if ((jj_la1_1[i] & (1<<j)) != 0) {
            la1tokens[32+j] = true;
          }
        }
      }
    }
    for (int i = 0; i < 51; i++) {
      if (la1tokens[i]) {
        jj_expentry = new int[1];
        jj_expentry[0] = i;
        jj_expentries.add(jj_expentry);
      }
    }
    int[][] exptokseq = new int[jj_expentries.size()][];
    for (int i = 0; i < jj_expentries.size(); i++) {
      exptokseq[i] = (int[])jj_expentries.get(i);
    }
    return new ParseException(token, exptokseq, tokenImage);
  }

  /** Enable tracing. */
  final public void enable_tracing() {
  }

  /** Disable tracing. */
  final public void disable_tracing() {
  }

}

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