/* TcfGrammar.java */
/* Generated By:JJTree&JavaCC: Do not edit this line. TcfGrammar.java */
// package is different to avoid overwriting the JTB grammar's generated files
package grammars.jjttcf;
import grammars.jjttcf.ast_vis.*;


// Different from JTB
//import grammars.jjttcf.visitor.*;
public class TcfGrammar/*@bgen(jjtree)*/implements TcfGrammarTreeConstants, TcfGrammarConstants {/*@bgen(jjtree)*/
  protected static JJTTcfGrammarState jjtree = new JJTTcfGrammarState();public static void main(String args [])
  {
    System.err.println("TcfGrammar Reading ...");
    new TcfGrammar(System.in);
    try
    {
      System.err.println("... Parsing ...");
      // Different from JTB (class names, arguments)
      SimpleNode start = Start();
      System.err.println("... Parsing OK, now visiting ...");
      TcfGrammarDefaultVisitor v = new MyVisitor();
      start.jjtAccept(v, "MyData");
      System.err.println("TcfGrammar ending.");
      System.exit(0);
    }
    catch (ParseException e)
    {
      System.err.print("... Oops! ParseException: ");
      System.err.println(e.getMessage());
      e = null;
      System.err.println("TcfGrammar returning");
      System.exit(-2);
    }
    catch (final Exception e)
    {
      System.err.println("... Oops! Exception: ");
      e.printStackTrace();
      System.err.println("TcfGrammar exiting");
      System.exit(-1);
    }
  }

  private static void info(final String aMsg) {
    String tk0 = getToken(0).toString();
    String tk1 = getToken(1).toString();
    String ct0 = tk0 == null ? "!null!" : tk0.length() == 0 ? "!empty!" : tk0;
    String ct1 = tk1 == null ? "!null!" : tk1.length() == 0 ? "!empty!" : tk1;
    System.err.println(aMsg + ", current token = " + ct0 + ", next token = " + ct1);
  }

// Different from JTB (annotation); here SimpleNode return type for main
  static final public SimpleNode Start() throws ParseException {/*@bgen(jjtree) Start */
  Start jjtn000 = new Start(JJTSTART);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
  jjtn000.jjtSetFirstToken(getToken(1));int[] iva = new int[] { 11 };
    try {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case IDENTIFIER:{
info("before 1st choice");
        Tcf();
info("passed jjtTcf()");
        jj_consume_token(0);
info("after 1st EOF");
jjtree.closeNodeScope(jjtn000, true);
    jjtc000 = false;
    jjtn000.jjtSetLastToken(getToken(0));
// Different from JTB (needs explicit return)
    {if ("" != null) return jjtn000;}
        break;
        }
      case 18:{
System.err.println("nodes will be created or not depending on the input data and differently by JTB and JJT");
info("before 2nd choice");
        try {
          bp_iv1(iva);
        } catch (Exception e) {

        }
info("passed bp_iv1(iva)");
        try {
          bp_iv1$(1);
        } catch (Exception e) {

        }
info("passed bp_iv1$(1)");
        try {
          bp_iv2(iva);
          bp_iv2$(2);
        } catch (Exception e) {

        }
info("passed bp_iv2(iva) bp_iv2$(2)");
        try {
          switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
          case 22:{
            bp_iv3(iva);
            break;
            }
          case 24:{
            bp_iv3_(30);
            break;
            }
          default:
            jj_la1[0] = jj_gen;
            jj_consume_token(-1);
            throw new ParseException();
          }
        } catch (Exception e) {

        }
info("passed bp_iv3(iva) | bp_iv3_(30)");
        try {
          switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
          case 22:{
            bp_iv3(iva);
            break;
            }
          case 23:{
            bp_iv3$(3);
            break;
            }
          default:
            jj_la1[1] = jj_gen;
            jj_consume_token(-1);
            throw new ParseException();
          }
        } catch (Exception e) {

        }
info("passed bp_iv3(iva) | bp_iv3$(3)");
        try {
          bp_iv4(iva);
          bp_iv4$(4);
          bp_iv5(iva);
          bp_iv5$(5);
        } catch (Exception e) {

        }
info("passed bp_iv4(iva) bp_iv4$(4) bp_iv5(iva) bp_iv5$(5)");
        try {
          switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
          case 29:{
            bp_iv6(iva);
            bp_iv7(iva);
            break;
            }
          case 30:{
            bp_iv6$(6);
            bp_iv7$(7);
            break;
            }
          default:
            jj_la1[2] = jj_gen;
            jj_consume_token(-1);
            throw new ParseException();
          }
        } catch (Exception e) {

        }
info("passed bp_iv6(iva) bp_iv7(iva) | bp_iv6$(6) bp_iv7$(7)");
        jj_consume_token(0);
info("after 2nd EOF");
jjtree.closeNodeScope(jjtn000, true);
    jjtc000 = false;
    jjtn000.jjtSetLastToken(getToken(0));
// Different from JTB (needs explicit return)
    {if ("" != null) return jjtn000;}
        break;
        }
      default:
        jj_la1[3] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
    } 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 (jjte000 instanceof IllegalStateException) {
      {if (true) throw (IllegalStateException)jjte000;}
    }
    {if (true) throw (Error)jjte000;}
    } finally {
if (jjtc000) {
      jjtree.closeNodeScope(jjtn000, true);
      jjtn000.jjtSetLastToken(getToken(0));
    }
    }
    throw new Error("Missing return statement in function");
}

// Different from JTB (annotation); here void return type
  static final public void Tcf() throws ParseException {/*@bgen(jjtree) Tcf */
  Tcf jjtn000 = new Tcf(JJTTCF);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
  jjtn000.jjtSetFirstToken(getToken(1));
    try {
      try {
System.err.println("--- jjtTcf in try ---");
        Identifier();
        label_1:
        while (true) {
          switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
          case INTEGER_LITERAL:
          case IDENTIFIER:{
            ;
            break;
            }
          default:
            jj_la1[4] = jj_gen;
            break label_1;
          }
          switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
          case IDENTIFIER:{
            Identifier();
            break;
            }
          case INTEGER_LITERAL:{
            Integer_literal();
            break;
            }
          default:
            jj_la1[5] = jj_gen;
            jj_consume_token(-1);
            throw new ParseException();
          }
        }
        jj_consume_token(16);
System.err.println("--- jjtTcf should not see a node ';' ---");
        Tcf2();
      } catch (NullPointerException npe) {
System.err.println("--- jjtTcf in catch NPE: swallowed NPE: < " + npe.getMessage() + " >");
    // Different from JTB: must explicitly remove node otherwise will be in the tree
    jjtree.popNode();
      } catch (Exception e) {
System.err.println("--- jjtTcf in catch Ex; could occurr with invalid input; " + e);
    e = null;
      } finally {
System.err.println("--- jjtTcf in finally --- ");
      }
NodeTokenJJT jjtn001 = new NodeTokenJJT(JJTNODETOKENJJT);
    boolean jjtc001 = true;
    jjtree.openNodeScope(jjtn001);
    jjtn001.jjtSetFirstToken(getToken(1));
      try {
        jj_consume_token(17);
      } finally {
if (jjtc001) {
      jjtree.closeNodeScope(jjtn001, true);
      jjtn001.jjtSetLastToken(getToken(0));
    }
      }
jjtree.closeNodeScope(jjtn000, true);
    jjtc000 = false;
    jjtn000.jjtSetLastToken(getToken(0));
System.err.println("--- jjtTcf should see '.' and return ---");
    } 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));
    }
    }
}

// Different from JTB (annotation); here void return type
  static final public void Tcf2() throws ParseException {/*@bgen(jjtree) Tcf2 */
  Tcf2 jjtn000 = new Tcf2(JJTTCF2);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
  jjtn000.jjtSetFirstToken(getToken(1));
    try {
      try {
System.err.println("--- jjtTcf2 in try ---");
        Identifier();
        label_2:
        while (true) {
          switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
          case INTEGER_LITERAL:
          case IDENTIFIER:{
            ;
            break;
            }
          default:
            jj_la1[6] = jj_gen;
            break label_2;
          }
          switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
          case IDENTIFIER:{
            Identifier();
            break;
            }
          case INTEGER_LITERAL:{
            try {
System.err.println("--- jjtTcf2 in subtry ---");
              Integer_literal();
            } catch (NullPointerException npe) {
System.err.println("--- jjtTcf2 in subcatch NPE: swallowed NPE: < " + npe.getMessage() + " >");
        // Different from JTB: must explicitly remove node otherwise will be in the tree
        jjtree.popNode();
            }
            break;
            }
          default:
            jj_la1[7] = jj_gen;
            jj_consume_token(-1);
            throw new ParseException();
          }
        }
      } catch (Exception e) {
System.err.println("--- jjtTcf2 in catch Ex; could occurr with invalid input; " + e);
    e = null;
      } finally {
System.err.println("--- jjtTcf2 in finally --- ");
      }
    } 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));
    }
    }
}

  static final private void bp_iv1(int[] i) throws ParseException, IllegalStateException {/*@bgen(jjtree) bp_iv1 */
  bp_iv1 jjtn000 = new bp_iv1(JJTBP_IV1);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
  jjtn000.jjtSetFirstToken(getToken(1));
    try {
info("iv1 0");
NodeTokenJJT jjtn001 = new NodeTokenJJT(JJTNODETOKENJJT);
    boolean jjtc001 = true;
    jjtree.openNodeScope(jjtn001);
    jjtn001.jjtSetFirstToken(getToken(1));
      try {
        jj_consume_token(18);
      } finally {
if (jjtc001) {
      jjtree.closeNodeScope(jjtn001, true);
      jjtn001.jjtSetLastToken(getToken(0));
    }
      }
info("iv1 1");
      jj_consume_token(NUM_2$);
info("iv1 2");
jjtree.closeNodeScope(jjtn000, true);
    jjtc000 = false;
    jjtn000.jjtSetLastToken(getToken(0));
{if (true) throw new IllegalStateException("dummy ise 1");}
    } finally {
if (jjtc000) {
      jjtree.closeNodeScope(jjtn000, true);
      jjtn000.jjtSetLastToken(getToken(0));
    }
    }
}

  static final private void bp_iv1$(final int i) throws ParseException, IllegalStateException {
info("iv1$ 0");
    jj_consume_token(19);
info("iv1$ 1");
NodeTokenJJT jjtn001 = new NodeTokenJJT(JJTNODETOKENJJT);
    boolean jjtc001 = true;
    jjtree.openNodeScope(jjtn001);
    jjtn001.jjtSetFirstToken(getToken(1));
    try {
      jj_consume_token(NUM_3_9);
    } finally {
if (jjtc001) {
      jjtree.closeNodeScope(jjtn001, true);
      jjtn001.jjtSetLastToken(getToken(0));
    }
    }
info("iv1$ 2");
if (i == 1)
    {
      {if (true) throw new IllegalStateException("dummy ise 1$");}
    }
}

  static final private void bp_iv2(int[] i) throws ParseException, IllegalStateException {/*@bgen(jjtree) bp_iv2 */
  bp_iv2 jjtn000 = new bp_iv2(JJTBP_IV2);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
  jjtn000.jjtSetFirstToken(getToken(1));
    try {
info("iv2 0");
NodeTokenJJT jjtn001 = new NodeTokenJJT(JJTNODETOKENJJT);
    boolean jjtc001 = true;
    jjtree.openNodeScope(jjtn001);
    jjtn001.jjtSetFirstToken(getToken(1));
      try {
        jj_consume_token(20);
      } finally {
if (jjtc001) {
      jjtree.closeNodeScope(jjtn001, true);
      jjtn001.jjtSetLastToken(getToken(0));
    }
      }
info("iv2 1");
      jj_consume_token(NUM_2$);
info("iv2 2");
jjtree.closeNodeScope(jjtn000, true);
    jjtc000 = false;
    jjtn000.jjtSetLastToken(getToken(0));
{if (true) throw new IllegalStateException("dummy ise 2");}
    } finally {
if (jjtc000) {
      jjtree.closeNodeScope(jjtn000, true);
      jjtn000.jjtSetLastToken(getToken(0));
    }
    }
}

  static final private void bp_iv2$(final int i) throws ParseException, IllegalStateException {
info("iv2$ 0");
    jj_consume_token(21);
info("iv2$ 1");
NodeTokenJJT jjtn001 = new NodeTokenJJT(JJTNODETOKENJJT);
    boolean jjtc001 = true;
    jjtree.openNodeScope(jjtn001);
    jjtn001.jjtSetFirstToken(getToken(1));
    try {
      jj_consume_token(NUM_3_9);
    } finally {
if (jjtc001) {
      jjtree.closeNodeScope(jjtn001, true);
      jjtn001.jjtSetLastToken(getToken(0));
    }
    }
info("iv2$ 2");
if (i == 2)
    {
      {if (true) throw new IllegalStateException("dummy ise 2$");}
    }
}

  static final private void bp_iv3(int[] i) throws ParseException, IllegalStateException {/*@bgen(jjtree) bp_iv3 */
  bp_iv3 jjtn000 = new bp_iv3(JJTBP_IV3);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
  jjtn000.jjtSetFirstToken(getToken(1));
    try {
info("iv3 0");
NodeTokenJJT jjtn001 = new NodeTokenJJT(JJTNODETOKENJJT);
    boolean jjtc001 = true;
    jjtree.openNodeScope(jjtn001);
    jjtn001.jjtSetFirstToken(getToken(1));
      try {
        jj_consume_token(22);
      } finally {
if (jjtc001) {
      jjtree.closeNodeScope(jjtn001, true);
      jjtn001.jjtSetLastToken(getToken(0));
    }
      }
info("iv3 1");
      jj_consume_token(NUM_2$);
info("iv3 2");
jjtree.closeNodeScope(jjtn000, true);
    jjtc000 = false;
    jjtn000.jjtSetLastToken(getToken(0));
{if (true) throw new IllegalStateException("dummy ise 3");}
    } finally {
if (jjtc000) {
      jjtree.closeNodeScope(jjtn000, true);
      jjtn000.jjtSetLastToken(getToken(0));
    }
    }
}

  static final private void bp_iv3$(final int i) throws ParseException, IllegalStateException {
info("iv3$ 0");
    jj_consume_token(23);
info("iv3$ 1");
NodeTokenJJT jjtn001 = new NodeTokenJJT(JJTNODETOKENJJT);
    boolean jjtc001 = true;
    jjtree.openNodeScope(jjtn001);
    jjtn001.jjtSetFirstToken(getToken(1));
    try {
      jj_consume_token(NUM_3_9);
    } finally {
if (jjtc001) {
      jjtree.closeNodeScope(jjtn001, true);
      jjtn001.jjtSetLastToken(getToken(0));
    }
    }
info("iv3$ 2");
if (i == 3)
    {
      {if (true) throw new IllegalStateException("dummy ise 3$");}
    }
}

  static final private void bp_iv3_(final int i) throws ParseException, IllegalStateException {/*@bgen(jjtree) bp_iv3_ */
  bp_iv3_ jjtn000 = new bp_iv3_(JJTBP_IV3_);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
  jjtn000.jjtSetFirstToken(getToken(1));
    try {
info("iv3_ 0");
NodeTokenJJT jjtn001 = new NodeTokenJJT(JJTNODETOKENJJT);
    boolean jjtc001 = true;
    jjtree.openNodeScope(jjtn001);
    jjtn001.jjtSetFirstToken(getToken(1));
      try {
        jj_consume_token(24);
      } finally {
if (jjtc001) {
      jjtree.closeNodeScope(jjtn001, true);
      jjtn001.jjtSetLastToken(getToken(0));
    }
      }
info("iv3_ 1");
NodeTokenJJT jjtn002 = new NodeTokenJJT(JJTNODETOKENJJT);
    boolean jjtc002 = true;
    jjtree.openNodeScope(jjtn002);
    jjtn002.jjtSetFirstToken(getToken(1));
      try {
        jj_consume_token(NUM_3_9);
      } finally {
if (jjtc002) {
      jjtree.closeNodeScope(jjtn002, true);
      jjtn002.jjtSetLastToken(getToken(0));
    }
      }
info("iv3_ 2");
jjtree.closeNodeScope(jjtn000, true);
    jjtc000 = false;
    jjtn000.jjtSetLastToken(getToken(0));
if (i == 3)
    {
      {if (true) throw new IllegalStateException("dummy ise 3_");}
    }
    } finally {
if (jjtc000) {
      jjtree.closeNodeScope(jjtn000, true);
      jjtn000.jjtSetLastToken(getToken(0));
    }
    }
}

  static final private void bp_iv4(int[] i) throws ParseException, IllegalStateException {/*@bgen(jjtree) bp_iv4 */
  bp_iv4 jjtn000 = new bp_iv4(JJTBP_IV4);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
  jjtn000.jjtSetFirstToken(getToken(1));
    try {
info("iv4 0");
NodeTokenJJT jjtn001 = new NodeTokenJJT(JJTNODETOKENJJT);
    boolean jjtc001 = true;
    jjtree.openNodeScope(jjtn001);
    jjtn001.jjtSetFirstToken(getToken(1));
      try {
        jj_consume_token(25);
      } finally {
if (jjtc001) {
      jjtree.closeNodeScope(jjtn001, true);
      jjtn001.jjtSetLastToken(getToken(0));
    }
      }
info("iv4 1");
      jj_consume_token(NUM_2$);
info("iv4 2");
jjtree.closeNodeScope(jjtn000, true);
    jjtc000 = false;
    jjtn000.jjtSetLastToken(getToken(0));
{if (true) throw new IllegalStateException("dummy ise 4");}
    } finally {
if (jjtc000) {
      jjtree.closeNodeScope(jjtn000, true);
      jjtn000.jjtSetLastToken(getToken(0));
    }
    }
}

  static final private void bp_iv4$(final int i) throws ParseException, IllegalStateException {
info("iv4$ 0");
    jj_consume_token(26);
info("iv4$ 1");
NodeTokenJJT jjtn001 = new NodeTokenJJT(JJTNODETOKENJJT);
    boolean jjtc001 = true;
    jjtree.openNodeScope(jjtn001);
    jjtn001.jjtSetFirstToken(getToken(1));
    try {
      jj_consume_token(NUM_3_9);
    } finally {
if (jjtc001) {
      jjtree.closeNodeScope(jjtn001, true);
      jjtn001.jjtSetLastToken(getToken(0));
    }
    }
info("iv4$ 2");
if (i == 4)
    {
      {if (true) throw new IllegalStateException("dummy ise 4$");}
    }
}

  static final private void bp_iv5(int[] i) throws ParseException, IllegalStateException {/*@bgen(jjtree) bp_iv5 */
  bp_iv5 jjtn000 = new bp_iv5(JJTBP_IV5);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
  jjtn000.jjtSetFirstToken(getToken(1));
    try {
info("iv5 0");
NodeTokenJJT jjtn001 = new NodeTokenJJT(JJTNODETOKENJJT);
    boolean jjtc001 = true;
    jjtree.openNodeScope(jjtn001);
    jjtn001.jjtSetFirstToken(getToken(1));
      try {
        jj_consume_token(27);
      } finally {
if (jjtc001) {
      jjtree.closeNodeScope(jjtn001, true);
      jjtn001.jjtSetLastToken(getToken(0));
    }
      }
info("iv5 1");
      jj_consume_token(NUM_2$);
info("iv5 2");
jjtree.closeNodeScope(jjtn000, true);
    jjtc000 = false;
    jjtn000.jjtSetLastToken(getToken(0));
{if (true) throw new IllegalStateException("dummy ise 5");}
    } finally {
if (jjtc000) {
      jjtree.closeNodeScope(jjtn000, true);
      jjtn000.jjtSetLastToken(getToken(0));
    }
    }
}

  static final private void bp_iv5$(final int i) throws ParseException, IllegalStateException {
info("iv5$ 0");
    jj_consume_token(28);
info("iv5$ 1");
NodeTokenJJT jjtn001 = new NodeTokenJJT(JJTNODETOKENJJT);
    boolean jjtc001 = true;
    jjtree.openNodeScope(jjtn001);
    jjtn001.jjtSetFirstToken(getToken(1));
    try {
      jj_consume_token(NUM_3_9);
    } finally {
if (jjtc001) {
      jjtree.closeNodeScope(jjtn001, true);
      jjtn001.jjtSetLastToken(getToken(0));
    }
    }
info("iv5$ 2");
if (i == 5)
    {
      {if (true) throw new IllegalStateException("dummy ise 5$");}
    }
}

  static final private void bp_iv6(int[] i) throws ParseException, IllegalStateException {/*@bgen(jjtree) bp_iv6 */
  bp_iv6 jjtn000 = new bp_iv6(JJTBP_IV6);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
  jjtn000.jjtSetFirstToken(getToken(1));
    try {
info("iv6 0");
NodeTokenJJT jjtn001 = new NodeTokenJJT(JJTNODETOKENJJT);
    boolean jjtc001 = true;
    jjtree.openNodeScope(jjtn001);
    jjtn001.jjtSetFirstToken(getToken(1));
      try {
        jj_consume_token(29);
      } finally {
if (jjtc001) {
      jjtree.closeNodeScope(jjtn001, true);
      jjtn001.jjtSetLastToken(getToken(0));
    }
      }
info("iv6 1");
      jj_consume_token(NUM_2$);
info("iv6 2");
jjtree.closeNodeScope(jjtn000, true);
    jjtc000 = false;
    jjtn000.jjtSetLastToken(getToken(0));
{if (true) throw new IllegalStateException("dummy ise 6");}
    } finally {
if (jjtc000) {
      jjtree.closeNodeScope(jjtn000, true);
      jjtn000.jjtSetLastToken(getToken(0));
    }
    }
}

  static final private void bp_iv6$(final int i) throws ParseException, IllegalStateException {
info("iv6$ 0");
    jj_consume_token(30);
info("iv6$ 1");
NodeTokenJJT jjtn001 = new NodeTokenJJT(JJTNODETOKENJJT);
    boolean jjtc001 = true;
    jjtree.openNodeScope(jjtn001);
    jjtn001.jjtSetFirstToken(getToken(1));
    try {
      jj_consume_token(NUM_3_9);
    } finally {
if (jjtc001) {
      jjtree.closeNodeScope(jjtn001, true);
      jjtn001.jjtSetLastToken(getToken(0));
    }
    }
info("iv6$ 2");
if (i == 6)
    {
      {if (true) throw new IllegalStateException("dummy ise 6$");}
    }
}

  static final private void bp_iv7(int[] i) throws ParseException, IllegalStateException {/*@bgen(jjtree) bp_iv7 */
  bp_iv7 jjtn000 = new bp_iv7(JJTBP_IV7);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
  jjtn000.jjtSetFirstToken(getToken(1));
    try {
info("iv7 0");
NodeTokenJJT jjtn001 = new NodeTokenJJT(JJTNODETOKENJJT);
    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));
    }
      }
info("iv7 1");
      jj_consume_token(NUM_2$);
info("iv7 2");
jjtree.closeNodeScope(jjtn000, true);
    jjtc000 = false;
    jjtn000.jjtSetLastToken(getToken(0));
{if (true) throw new IllegalStateException("dummy ise 7");}
    } finally {
if (jjtc000) {
      jjtree.closeNodeScope(jjtn000, true);
      jjtn000.jjtSetLastToken(getToken(0));
    }
    }
}

  static final private void bp_iv7$(final int i) throws ParseException, IllegalStateException {
info("iv7$ 0");
    jj_consume_token(32);
info("iv7$ 1");
NodeTokenJJT jjtn001 = new NodeTokenJJT(JJTNODETOKENJJT);
    boolean jjtc001 = true;
    jjtree.openNodeScope(jjtn001);
    jjtn001.jjtSetFirstToken(getToken(1));
    try {
      jj_consume_token(NUM_3_9);
    } finally {
if (jjtc001) {
      jjtree.closeNodeScope(jjtn001, true);
      jjtn001.jjtSetLastToken(getToken(0));
    }
    }
info("iv7$ 2");
if (i == 7)
    {
      {if (true) throw new IllegalStateException("dummy ise 7$");}
    }
}

// Different from JTB (annotation)
  static final public void Identifier() throws ParseException {/*@bgen(jjtree) Identifier */
  Identifier jjtn000 = new Identifier(JJTIDENTIFIER);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
  jjtn000.jjtSetFirstToken(getToken(1));Token tk = null;
    try {
      tk = jj_consume_token(IDENTIFIER);
jjtree.closeNodeScope(jjtn000, true);
    jjtc000 = false;
    jjtn000.jjtSetLastToken(getToken(0));
System.err.println("--- Identifier found < " + tk.image + " > ---");
    } finally {
if (jjtc000) {
      jjtree.closeNodeScope(jjtn000, true);
      jjtn000.jjtSetLastToken(getToken(0));
    }
    }
}

// Different from JTB (annotation)
  static final public void Integer_literal() throws ParseException {/*@bgen(jjtree) Integer_literal */
  Integer_literal jjtn000 = new Integer_literal(JJTINTEGER_LITERAL);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
  jjtn000.jjtSetFirstToken(getToken(1));Token tk = null;
    try {
      tk = jj_consume_token(INTEGER_LITERAL);
jjtree.closeNodeScope(jjtn000, true);
    jjtc000 = false;
    jjtn000.jjtSetLastToken(getToken(0));
System.err.println("--- Integer_literal found < " + tk.image + " > ---");
    {if (true) throw new NullPointerException("boum");}
    } finally {
if (jjtc000) {
      jjtree.closeNodeScope(jjtn000, true);
      jjtn000.jjtSetLastToken(getToken(0));
    }
    }
}

  static void justSkip() throws ParseException, IllegalStateException {Token tk = getNextToken();
  throw new IllegalStateException();
  }

  static private boolean jj_initialized_once = false;
  /** Generated Token Manager. */
  static public TcfGrammarTokenManager 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 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_init_0();
	   jj_la1_init_1();
	}
	private static void jj_la1_init_0() {
	   jj_la1_0 = new int[] {0x1400000,0xc00000,0x60000000,0x42000,0x2080,0x2080,0x2080,0x2080,};
	}
	private static void jj_la1_init_1() {
	   jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,};
	}

  /** Constructor with InputStream. */
  public TcfGrammar(java.io.InputStream stream) {
	  this(stream, null);
  }
  /** Constructor with InputStream and supplied encoding */
  public TcfGrammar(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 TcfGrammarTokenManager(jj_input_stream);
	 token = new Token();
	 jj_ntk = -1;
	 jj_gen = 0;
	 for (int i = 0; i < 8; i++) jj_la1[i] = -1;
  }

  /** 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 < 8; i++) jj_la1[i] = -1;
  }

  /** Constructor. */
  public TcfGrammar(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 TcfGrammarTokenManager(jj_input_stream);
	 token = new Token();
	 jj_ntk = -1;
	 jj_gen = 0;
	 for (int i = 0; i < 8; i++) jj_la1[i] = -1;
  }

  /** 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 TcfGrammarTokenManager(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 < 8; i++) jj_la1[i] = -1;
  }

  /** Constructor with generated Token Manager. */
  public TcfGrammar(TcfGrammarTokenManager 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;
  }

  /** Reinitialise. */
  public void ReInit(TcfGrammarTokenManager 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 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. */
  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<int[]> jj_expentries = new java.util.ArrayList<int[]>();
  static private int[] jj_expentry;
  static private int jj_kind = -1;

  /** Generate ParseException. */
  static public ParseException generateParseException() {
	 jj_expentries.clear();
	 boolean[] la1tokens = new boolean[33];
	 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 < 33; 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] = jj_expentries.get(i);
	 }
	 return new ParseException(token, exptokseq, tokenImage);
  }

  static private boolean trace_enabled;

/** Trace enabled. */
  static final public boolean trace_enabled() {
	 return trace_enabled;
  }

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

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

}

// Different from JTB (superclass name, arguments, return types)
/** Tracing visitor, in same file for simplicity; just traces */
class MyVisitor extends TcfGrammarDefaultVisitor
{
  /** {@inheritDoc} */
  @Override
  public void visit(NodeTokenJJT n, Object data)
  {
//    System.err.println("*** Entering visit NodeTokenJJT ***");
    super.visit(n, data);
    System.err.println("*** Just visited <" + n.jjtGetFirstToken()+"> ***");
//    System.err.println("*** Exiting visit NodeTokenJJT ***");
  }

  /** {@inheritDoc} */
  @Override
  public void visit(Start n, Object data)
  {
    System.err.println("*** Entering visit Start ***");
    super.visit(n, data);
    System.err.println("*** Exiting visit Start ***");
  }

  /** {@inheritDoc} */
  @Override
  public void visit(Tcf n, Object data)
  {
    System.err.println("*** Entering visit Tcf ***");
    super.visit(n, data);
    System.err.println("*** Exiting visit Tcf ***");
  }

  /** {@inheritDoc} */
  @Override
  public void visit(Tcf2 n, Object data)
  {
    System.err.println("*** Entering visit Tcf2 ***");
    super.visit(n, data);
    System.err.println("*** Exiting visit Tcf2 ***");
  }

  /** {@inheritDoc} */
  @Override
  public void visit(bp_iv1 n, Object data)
  {
    System.err.println("*** Entering visit bp_iv1 ***");
    super.visit(n, data);
    System.err.println("*** Exiting visit bp_iv1 ***");
  }

  /** {@inheritDoc} */
  @Override
  public void visit(bp_iv2 n, Object data)
  {
    System.err.println("*** Entering visit bp_iv2 ***");
    super.visit(n, data);
    System.err.println("*** Exiting visit bp_iv2 ***");
  }

  /** {@inheritDoc} */
  @Override
  public void visit(bp_iv3 n, Object data)
  {
    System.err.println("*** Entering visit bp_iv3 ***");
    super.visit(n, data);
    System.err.println("*** Exiting visit bp_iv3 ***");
  }

  /** {@inheritDoc} */
  @Override
  public void visit(bp_iv3_ n, Object data)
  {
    System.err.println("*** Entering visit bp_iv3_ ***");
    super.visit(n, data);
    System.err.println("*** Exiting visit bp_iv3_ ***");
  }

  /** {@inheritDoc} */
  @Override
  public void visit(bp_iv4 n, Object data)
  {
    System.err.println("*** Entering visit bp_iv4 ***");
    super.visit(n, data);
    System.err.println("*** Exiting visit bp_iv4 ***");
  }

  /** {@inheritDoc} */
  @Override
  public void visit(bp_iv5 n, Object data)
  {
    System.err.println("*** Entering visit bp_iv5 ***");
    super.visit(n, data);
    System.err.println("*** Exiting visit bp_iv5 ***");
  }

  /** {@inheritDoc} */
  @Override
  public void visit(bp_iv6 n, Object data)
  {
    System.err.println("*** Entering visit bp_iv6 ***");
    super.visit(n, data);
    System.err.println("*** Exiting visit bp_iv6 ***");
  }

  /** {@inheritDoc} */
  @Override
  public void visit(bp_iv7 n, Object data)
  {
    System.err.println("*** Entering visit bp_iv7 ***");
    super.visit(n, data);
    System.err.println("*** Exiting visit bp_iv7 ***");
  }

  /** {@inheritDoc} */
  @Override
  public void visit(Identifier n, Object data)
  {
    System.err.println("*** Entering visit Identifier ***");
    super.visit(n, data);
    System.err.println("*** Just visited '" + n.jjtGetFirstToken() +"' ***");
    System.err.println("*** Exiting visit Identifier ***");
  }

  /** {@inheritDoc} */
  @Override
  public void visit(Integer_literal n, Object data)
  {
    System.err.println("*** Entering visit Integer_literal ***");
    super.visit(n, data);
    System.err.println("*** Just visited '" + n.jjtGetFirstToken() +"' ***");
    System.err.println("*** Exiting visit Integer_literal ***");
  }

}
