/* Generated By:JJTree&JavaCC: Do not edit this line. JajaCode.java */
        package jajacode.jjtree;

        public class JajaCode/*@bgen(jjtree)*/implements JajaCodeTreeConstants, JajaCodeConstants {/*@bgen(jjtree)*/
  protected static JJTJajaCodeState jjtree = new JJTJajaCodeState();public static void main (String arg[]) throws ParseException {
      JajaCode jjc = new JajaCode(System.in) ;
        jjc.Classe() ;
      }
  
  public JJTJajaCodeState getJJTree() {
		return jjtree;
	}

/** -------------------- Grammaire  ------------------------- */
/** 
 *  <classe>             := <adresse> <instrs> ";" <classe>
 *                       := 
 *  <instrs>             := "init"
 *						 := "swap"
 *						 := "new" "(" <ident> "," <type> "," <sorte> "," <adresse> ")"
 *						 := "newarray" "(" <ident> "," <type> ")"
 *                       := "invoke" "(" <ident> ")"
 *                       := "return"
 *                       := "push" "(" <valeur> ")"
 *                       := "pop"
 *                       := "load" "(" <ident> ")"
 *                       := "aload" "(" <ident> ")"
 *                       := "store" "(" <ident> ")"
 *                       := "astore" "(" <ident> ")"
 *                       := "if" "(" <adresse> ")"
 *                       := "goto" "(" <adresse> ")"
 *                       := "inc" "(" <ident> ")"
 *                       := "ainc" "(" <ident> ")"
 *                       := <oper>
 *                       := "nop"
 *                       := "jcstop"
 *  <ident>              := ["a-"z","A"-"Z"] (["a-"z","A"-"Z","0"-"9"])*
 *  <type>               := "entier"
 *                       := "booleen"
 *                       := "void"
 *  <sorte>              := "var"
 *                       := "meth"
 *                       := "cst"
 *  <nombre>             := ["0"-"9"] (["0"-"9"])*
 *                       := "vrai"
 *                       := "faux"
 *						 := 
 *  <oper>               := <oper2>
 *                       := <oper1>
 *  <oper1>              := "neg"
 *                       := "not"
 *  <oper2>              := "add"
 *                       := "sub"
 *                       := "mul"
 *                       := "div"
 *                       := "cmp"
 *                       := "sup"
 *                       := "or"
 *                       := "and"
 *
 **/

/** ---------------- Regles syntaxiques --------------------- */

/*
 * A ajouter dans ASTJCIdent
 	private String ident;
	 
	public void setValeur(String str){
		this.ident=str;
	}
	  
	public String getValeur(){
		return this.ident;
	}
 * A ajouter dans ASTJCType
	private String type;
	 
	public void setValeur(String str){
		this.type=str;
	}
	  
	public String getValeur(){
		return this.type;
	}
  * A ajouter dans ASTJCSorte
	private String sorte;
	 
	public void setValeur(String str){
		this.sorte=str;
	}
	  
	public String getValeur(){
		return this.sorte;
	}
 * A ajouter dans ASTJCNbre
	private int nombre;
  	
  	public void setValeur(int nb){
		this.nombre=nb;
  	}
  
  	public int getValeur(){
		return this.nombre;
  	}
 * A ajouter dans JajaCode
	public JJTJajaCodeState getJJTree() {
		return jjtree;
	}
 * A modifier dans JJTJajaCodeState
 	public class JJTJajaCodeState {
 		
 	public Node rootNode() {
 */
  static final public void Classe() throws ParseException {
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case NOMBRE:
      Adresse();
      Instrs();
      jj_consume_token(POINTVIRGULE);
                                         ASTJajaCode jjtn001 = new ASTJajaCode(JJTJAJACODE);
                                         boolean jjtc001 = true;
                                         jjtree.openNodeScope(jjtn001);
      try {
        Classe();
      } 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,  3);
                                         }
      }
      break;
    case 0:
                                                                 ASTJCNil jjtn002 = new ASTJCNil(JJTJCNIL);
                                                                 boolean jjtc002 = true;
                                                                 jjtree.openNodeScope(jjtn002);
      try {
        jj_consume_token(0);
      } finally {
                                                                 if (jjtc002) {
                                                                   jjtree.closeNodeScope(jjtn002, true);
                                                                 }
      }
      break;
    default:
      jj_la1[0] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
  }

  static final public void Instrs() throws ParseException {
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case INIT:
         ASTInit jjtn001 = new ASTInit(JJTINIT);
         boolean jjtc001 = true;
         jjtree.openNodeScope(jjtn001);
      try {
        jj_consume_token(INIT);
      } finally {
         if (jjtc001) {
           jjtree.closeNodeScope(jjtn001, true);
         }
      }
      break;
    case SWAP:
         ASTSwap jjtn002 = new ASTSwap(JJTSWAP);
         boolean jjtc002 = true;
         jjtree.openNodeScope(jjtn002);
      try {
        jj_consume_token(SWAP);
      } finally {
         if (jjtc002) {
           jjtree.closeNodeScope(jjtn002, true);
         }
      }
      break;
    case NEW:
      jj_consume_token(NEW);
      jj_consume_token(PAROUV);
      Ident();
      jj_consume_token(VIRGULE);
      Type();
      jj_consume_token(VIRGULE);
      Sorte();
      jj_consume_token(VIRGULE);
      Adresse();
                                                                                       ASTNew jjtn003 = new ASTNew(JJTNEW);
                                                                                       boolean jjtc003 = true;
                                                                                       jjtree.openNodeScope(jjtn003);
      try {
        jj_consume_token(PARFERM);
      } finally {
                                                                                       if (jjtc003) {
                                                                                         jjtree.closeNodeScope(jjtn003,  4);
                                                                                       }
      }
      break;
    case NEWARRAY:
      jj_consume_token(NEWARRAY);
      jj_consume_token(PAROUV);
      Ident();
      jj_consume_token(VIRGULE);
      Type();
                                                      ASTNewArray jjtn004 = new ASTNewArray(JJTNEWARRAY);
                                                      boolean jjtc004 = true;
                                                      jjtree.openNodeScope(jjtn004);
      try {
        jj_consume_token(PARFERM);
      } finally {
                                                      if (jjtc004) {
                                                        jjtree.closeNodeScope(jjtn004,  2);
                                                      }
      }
      break;
    case INVOKE:
      jj_consume_token(INVOKE);
      jj_consume_token(PAROUV);
      Ident();
                                   ASTInvoke jjtn005 = new ASTInvoke(JJTINVOKE);
                                   boolean jjtc005 = true;
                                   jjtree.openNodeScope(jjtn005);
      try {
        jj_consume_token(PARFERM);
      } finally {
                                   if (jjtc005) {
                                     jjtree.closeNodeScope(jjtn005,  1);
                                   }
      }
      break;
    case RETURN:
         ASTReturn jjtn006 = new ASTReturn(JJTRETURN);
         boolean jjtc006 = true;
         jjtree.openNodeScope(jjtn006);
      try {
        jj_consume_token(RETURN);
      } finally {
         if (jjtc006) {
           jjtree.closeNodeScope(jjtn006, true);
         }
      }
      break;
    case PUSH:
      jj_consume_token(PUSH);
      jj_consume_token(PAROUV);
      Valeur();
                                  ASTPush jjtn007 = new ASTPush(JJTPUSH);
                                  boolean jjtc007 = true;
                                  jjtree.openNodeScope(jjtn007);
      try {
        jj_consume_token(PARFERM);
      } finally {
                                  if (jjtc007) {
                                    jjtree.closeNodeScope(jjtn007,  1);
                                  }
      }
      break;
    case POP:
         ASTPop jjtn008 = new ASTPop(JJTPOP);
         boolean jjtc008 = true;
         jjtree.openNodeScope(jjtn008);
      try {
        jj_consume_token(POP);
      } finally {
         if (jjtc008) {
           jjtree.closeNodeScope(jjtn008, true);
         }
      }
      break;
    case LOAD:
      jj_consume_token(LOAD);
      jj_consume_token(PAROUV);
      Ident();
                                 ASTLoad jjtn009 = new ASTLoad(JJTLOAD);
                                 boolean jjtc009 = true;
                                 jjtree.openNodeScope(jjtn009);
      try {
        jj_consume_token(PARFERM);
      } finally {
                                 if (jjtc009) {
                                   jjtree.closeNodeScope(jjtn009,  1);
                                 }
      }
      break;
    case ALOAD:
      jj_consume_token(ALOAD);
      jj_consume_token(PAROUV);
      Ident();
                                  ASTALoad jjtn010 = new ASTALoad(JJTALOAD);
                                  boolean jjtc010 = true;
                                  jjtree.openNodeScope(jjtn010);
      try {
        jj_consume_token(PARFERM);
      } finally {
                                  if (jjtc010) {
                                    jjtree.closeNodeScope(jjtn010,  1);
                                  }
      }
      break;
    case STORE:
      jj_consume_token(STORE);
      jj_consume_token(PAROUV);
      Ident();
                                  ASTStore jjtn011 = new ASTStore(JJTSTORE);
                                  boolean jjtc011 = true;
                                  jjtree.openNodeScope(jjtn011);
      try {
        jj_consume_token(PARFERM);
      } finally {
                                  if (jjtc011) {
                                    jjtree.closeNodeScope(jjtn011,  1);
                                  }
      }
      break;
    case ASTORE:
      jj_consume_token(ASTORE);
      jj_consume_token(PAROUV);
      Ident();
                                   ASTAStore jjtn012 = new ASTAStore(JJTASTORE);
                                   boolean jjtc012 = true;
                                   jjtree.openNodeScope(jjtn012);
      try {
        jj_consume_token(PARFERM);
      } finally {
                                   if (jjtc012) {
                                     jjtree.closeNodeScope(jjtn012,  1);
                                   }
      }
      break;
    case IF:
      jj_consume_token(IF);
      jj_consume_token(PAROUV);
      Adresse();
                                 ASTIf jjtn013 = new ASTIf(JJTIF);
                                 boolean jjtc013 = true;
                                 jjtree.openNodeScope(jjtn013);
      try {
        jj_consume_token(PARFERM);
      } finally {
                                 if (jjtc013) {
                                   jjtree.closeNodeScope(jjtn013,  1);
                                 }
      }
      break;
    case GOTO:
      jj_consume_token(GOTO);
      jj_consume_token(PAROUV);
      Adresse();
                                   ASTGoto jjtn014 = new ASTGoto(JJTGOTO);
                                   boolean jjtc014 = true;
                                   jjtree.openNodeScope(jjtn014);
      try {
        jj_consume_token(PARFERM);
      } finally {
                                   if (jjtc014) {
                                     jjtree.closeNodeScope(jjtn014,  1);
                                   }
      }
      break;
    case INC:
      jj_consume_token(INC);
      jj_consume_token(PAROUV);
      Ident();
                                ASTInc jjtn015 = new ASTInc(JJTINC);
                                boolean jjtc015 = true;
                                jjtree.openNodeScope(jjtn015);
      try {
        jj_consume_token(PARFERM);
      } finally {
                                if (jjtc015) {
                                  jjtree.closeNodeScope(jjtn015,  1);
                                }
      }
      break;
    case AINC:
      jj_consume_token(AINC);
      jj_consume_token(PAROUV);
      Ident();
                                 ASTAInc jjtn016 = new ASTAInc(JJTAINC);
                                 boolean jjtc016 = true;
                                 jjtree.openNodeScope(jjtn016);
      try {
        jj_consume_token(PARFERM);
      } finally {
                                 if (jjtc016) {
                                   jjtree.closeNodeScope(jjtn016, true);
                                 }
      }
      break;
    case NOP:
         ASTNop jjtn017 = new ASTNop(JJTNOP);
         boolean jjtc017 = true;
         jjtree.openNodeScope(jjtn017);
      try {
        jj_consume_token(NOP);
      } finally {
         if (jjtc017) {
           jjtree.closeNodeScope(jjtn017, true);
         }
      }
      break;
    case JCSTOP:
         ASTJCStop jjtn018 = new ASTJCStop(JJTJCSTOP);
         boolean jjtc018 = true;
         jjtree.openNodeScope(jjtn018);
      try {
        jj_consume_token(JCSTOP);
      } finally {
         if (jjtc018) {
           jjtree.closeNodeScope(jjtn018, true);
         }
      }
      break;
    case ADD:
    case AND:
    case CMP:
    case DIV:
    case INF:
    case MUL:
    case NEG:
    case NOT:
    case OR:
    case SUB:
    case SUP:
      Oper();
      break;
    default:
      jj_la1[1] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
  }

  static final public void Ident() throws ParseException {
                         /*@bgen(jjtree) JCIdent */
  ASTJCIdent jjtn000 = new ASTJCIdent(JJTJCIDENT);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
    try {
      jj_consume_token(IDENTIFIER);
                       jjtree.closeNodeScope(jjtn000, true);
                       jjtc000 = false;
                       jjtn000.setValeur(token.image);
    } finally {
          if (jjtc000) {
            jjtree.closeNodeScope(jjtn000, true);
          }
    }
  }

  static final public void Type() throws ParseException {
                       /*@bgen(jjtree) JCType */
  ASTJCType jjtn000 = new ASTJCType(JJTJCTYPE);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
    try {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case ENTIER:
        jj_consume_token(ENTIER);
        break;
      case BOOLEEN:
        jj_consume_token(BOOLEEN);
        break;
      case VOID:
        jj_consume_token(VOID);
        break;
      default:
        jj_la1[2] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
                                            jjtree.closeNodeScope(jjtn000, true);
                                            jjtc000 = false;
                                            jjtn000.setValeur(token.image);
    } finally {
          if (jjtc000) {
            jjtree.closeNodeScope(jjtn000, true);
          }
    }
  }

  static final public void Sorte() throws ParseException {
                         /*@bgen(jjtree) JCSorte */
  ASTJCSorte jjtn000 = new ASTJCSorte(JJTJCSORTE);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
    try {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case VAR:
        jj_consume_token(VAR);
        break;
      case METH:
        jj_consume_token(METH);
        break;
      case CST:
        jj_consume_token(CST);
        break;
      default:
        jj_la1[3] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
                                     jjtree.closeNodeScope(jjtn000, true);
                                     jjtc000 = false;
                                     jjtn000.setValeur(token.image);
    } finally {
          if (jjtc000) {
            jjtree.closeNodeScope(jjtn000, true);
          }
    }
  }

  static final public void Valeur() throws ParseException {
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case TRUE:
            ASTJCVrai jjtn001 = new ASTJCVrai(JJTJCVRAI);
            boolean jjtc001 = true;
            jjtree.openNodeScope(jjtn001);
      try {
        jj_consume_token(TRUE);
      } finally {
            if (jjtc001) {
              jjtree.closeNodeScope(jjtn001, true);
            }
      }
      break;
    case FALSE:
            ASTJCFaux jjtn002 = new ASTJCFaux(JJTJCFAUX);
            boolean jjtc002 = true;
            jjtree.openNodeScope(jjtn002);
      try {
        jj_consume_token(FALSE);
      } finally {
            if (jjtc002) {
              jjtree.closeNodeScope(jjtn002, true);
            }
      }
      break;
    case NOMBRE:
      Nombre();
      break;
    default:
      jj_la1[4] = jj_gen;
            ASTJCNil jjtn003 = new ASTJCNil(JJTJCNIL);
            boolean jjtc003 = true;
            jjtree.openNodeScope(jjtn003);
      try {
            jjtree.closeNodeScope(jjtn003, true);
            jjtc003 = false;

      } finally {
            if (jjtc003) {
              jjtree.closeNodeScope(jjtn003, true);
            }
      }
    }
  }

  static final public void Adresse() throws ParseException {
    Nombre();
  }

  static final public void Oper() throws ParseException {
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case ADD:
    case AND:
    case CMP:
    case DIV:
    case INF:
    case MUL:
    case OR:
    case SUB:
    case SUP:
      Oper2();
      break;
    case NEG:
    case NOT:
      Oper1();
      break;
    default:
      jj_la1[5] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
  }

  static final public void Oper1() throws ParseException {
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case NEG:
            ASTNeg jjtn001 = new ASTNeg(JJTNEG);
            boolean jjtc001 = true;
            jjtree.openNodeScope(jjtn001);
      try {
        jj_consume_token(NEG);
      } finally {
            if (jjtc001) {
              jjtree.closeNodeScope(jjtn001, true);
            }
      }
      break;
    case NOT:
            ASTNot jjtn002 = new ASTNot(JJTNOT);
            boolean jjtc002 = true;
            jjtree.openNodeScope(jjtn002);
      try {
        jj_consume_token(NOT);
      } finally {
            if (jjtc002) {
              jjtree.closeNodeScope(jjtn002, true);
            }
      }
      break;
    default:
      jj_la1[6] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
  }

  static final public void Oper2() throws ParseException {
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case ADD:
            ASTAdd jjtn001 = new ASTAdd(JJTADD);
            boolean jjtc001 = true;
            jjtree.openNodeScope(jjtn001);
      try {
        jj_consume_token(ADD);
      } finally {
            if (jjtc001) {
              jjtree.closeNodeScope(jjtn001, true);
            }
      }
      break;
    case SUB:
            ASTSub jjtn002 = new ASTSub(JJTSUB);
            boolean jjtc002 = true;
            jjtree.openNodeScope(jjtn002);
      try {
        jj_consume_token(SUB);
      } finally {
            if (jjtc002) {
              jjtree.closeNodeScope(jjtn002, true);
            }
      }
      break;
    case MUL:
            ASTMul jjtn003 = new ASTMul(JJTMUL);
            boolean jjtc003 = true;
            jjtree.openNodeScope(jjtn003);
      try {
        jj_consume_token(MUL);
      } finally {
            if (jjtc003) {
              jjtree.closeNodeScope(jjtn003, true);
            }
      }
      break;
    case DIV:
            ASTDiv jjtn004 = new ASTDiv(JJTDIV);
            boolean jjtc004 = true;
            jjtree.openNodeScope(jjtn004);
      try {
        jj_consume_token(DIV);
      } finally {
            if (jjtc004) {
              jjtree.closeNodeScope(jjtn004, true);
            }
      }
      break;
    case CMP:
            ASTCmp jjtn005 = new ASTCmp(JJTCMP);
            boolean jjtc005 = true;
            jjtree.openNodeScope(jjtn005);
      try {
        jj_consume_token(CMP);
      } finally {
            if (jjtc005) {
              jjtree.closeNodeScope(jjtn005, true);
            }
      }
      break;
    case SUP:
            ASTSup jjtn006 = new ASTSup(JJTSUP);
            boolean jjtc006 = true;
            jjtree.openNodeScope(jjtn006);
      try {
        jj_consume_token(SUP);
      } finally {
            if (jjtc006) {
              jjtree.closeNodeScope(jjtn006, true);
            }
      }
      break;
    case INF:
            ASTInf jjtn007 = new ASTInf(JJTINF);
            boolean jjtc007 = true;
            jjtree.openNodeScope(jjtn007);
      try {
        jj_consume_token(INF);
      } finally {
            if (jjtc007) {
              jjtree.closeNodeScope(jjtn007, true);
            }
      }
      break;
    case OR:
            ASTOr jjtn008 = new ASTOr(JJTOR);
            boolean jjtc008 = true;
            jjtree.openNodeScope(jjtn008);
      try {
        jj_consume_token(OR);
      } finally {
            if (jjtc008) {
              jjtree.closeNodeScope(jjtn008, true);
            }
      }
      break;
    case AND:
            ASTAnd jjtn009 = new ASTAnd(JJTAND);
            boolean jjtc009 = true;
            jjtree.openNodeScope(jjtn009);
      try {
        jj_consume_token(AND);
      } finally {
            if (jjtc009) {
              jjtree.closeNodeScope(jjtn009, true);
            }
      }
      break;
    default:
      jj_la1[7] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
  }

  static final public void Nombre() throws ParseException {
                           /*@bgen(jjtree) #JCNbre(true) */
                            ASTJCNbre jjtn000 = new ASTJCNbre(JJTJCNBRE);
                            boolean jjtc000 = true;
                            jjtree.openNodeScope(jjtn000);int x = 0;
    try {
      jj_consume_token(NOMBRE);
               jjtree.closeNodeScope(jjtn000, true);
               jjtc000 = false;
        try {
                x = Integer.parseInt(token.image);
        } catch (NumberFormatException ee) {
                System.err.println("Error: " + token.image + " is not a number.");
                x = 0;
        }
        jjtn000.setValeur(x);
    } finally {
      if (jjtc000) {
        jjtree.closeNodeScope(jjtn000, true);
      }
    }
  }

  static private boolean jj_initialized_once = false;
  static public JajaCodeTokenManager token_source;
  static SimpleCharStream jj_input_stream;
  static public Token token, jj_nt;
  static private int jj_ntk;
  static private int jj_gen;
  static final private int[] jj_la1 = new int[8];
  static private int[] jj_la1_0;
  static private int[] jj_la1_1;
  static {
      jj_la1_0();
      jj_la1_1();
   }
   private static void jj_la1_0() {
      jj_la1_0 = new int[] {0x1,0xfeff33e0,0x4400,0x1000800,0x8000,0xc6083120,0x44000000,0x82083120,};
   }
   private static void jj_la1_1() {
      jj_la1_1 = new int[] {0x8000,0x7f,0x2000,0x1000,0x8080,0x30,0x0,0x30,};
   }

  public JajaCode(java.io.InputStream stream) {
     this(stream, null);
  }
  public JajaCode(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 JajaCodeTokenManager(jj_input_stream);
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 8; i++) jj_la1[i] = -1;
  }

  static public void ReInit(java.io.InputStream stream) {
     ReInit(stream, null);
  }
  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 < 8; i++) jj_la1[i] = -1;
  }

  public JajaCode(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 JajaCodeTokenManager(jj_input_stream);
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 8; i++) jj_la1[i] = -1;
  }

  static 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;
    jjtree.reset();
    jj_gen = 0;
    for (int i = 0; i < 8; i++) jj_la1[i] = -1;
  }

  public JajaCode(JajaCodeTokenManager 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 < 8; i++) jj_la1[i] = -1;
  }

  public void ReInit(JajaCodeTokenManager tm) {
    token_source = tm;
    token = new Token();
    jj_ntk = -1;
    jjtree.reset();
    jj_gen = 0;
    for (int i = 0; i < 8; i++) jj_la1[i] = -1;
  }

  static final 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();
  }

  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;
  }

  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 final 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);
  }

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

  static public ParseException generateParseException() {
    jj_expentries.removeAllElements();
    boolean[] la1tokens = new boolean[48];
    if (jj_kind >= 0) {
      la1tokens[jj_kind] = true;
      jj_kind = -1;
    }
    for (int i = 0; i < 8; 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 < 48; i++) {
      if (la1tokens[i]) {
        jj_expentry = new int[1];
        jj_expentry[0] = i;
        jj_expentries.addElement(jj_expentry);
      }
    }
    int[][] exptokseq = new int[jj_expentries.size()][];
    for (int i = 0; i < jj_expentries.size(); i++) {
      exptokseq[i] = (int[])jj_expentries.elementAt(i);
    }
    return new ParseException(token, exptokseq, tokenImage);
  }

  static final public void enable_tracing() {
  }

  static final public void disable_tracing() {
  }

        }
