/** Reinitialise parser. */ static public void ReInit(SimpleCharStream stream, int lexState) { ReInit(stream); SwitchTo(lexState); }
/** Constructor. */ public IrParserTokenManager(SimpleCharStream stream, int lexState) :this(stream) { // this(stream); SwitchTo(lexState); }
/** Reinitialise parser. */ static public void ReInit(SimpleCharStream stream) { jjmatchedPos = jjnewStateCnt = 0; curLexState = defaultLexState; input_stream = stream; ReInitRounds(); }
/** Constructor. */ public IrParserTokenManager(SimpleCharStream stream){ if (input_stream != null) throw new TokenMgrError("ERROR: Second call to constructor of static lexer. You must use ReInit() to initialize the static variables.", TokenMgrError.STATIC_LEXER_ERROR); input_stream = stream; }
/** Constructor with InputStream and supplied encoding */ public AstParser(Stream stream, Encoding encoding) { if (jj_initialized_once) { ReInit(stream, encoding); //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(); } else { jj_initialized_once = true; try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } token_source = new AstParserTokenManager(jj_input_stream); } token = new AstToken(); jj_ntk = AstRegExpId.UNDEFINED; jj_gen = 0; for (int i = 0; i < 14; i++) jj_la1[i] = -1; }
/** Constructor. */ public astParser(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 astParserTokenManager(jj_input_stream); token = new AstToken(); jj_ntk = AstRegExpId.UNDEFINED; jj_gen = 0; for (int i = 0; i < 14; i++) jj_la1[i] = -1; }
/** Constructor. */ public irParser(/* java.io.Reader */ InputStreamReader stream) { if (jj_initialized_once) { Console.Out.WriteLine("ERROR: Second call to constructor of static parser. "); Console.Out.WriteLine(" You must either use ReInit() or set the JavaCC option STATIC to false"); Console.Out.WriteLine(" during parser generation."); throw new Error(); } jj_initialized_once = true; jj_input_stream = new SimpleCharStream(stream, 1, 1); token_source = new irParserTokenManager(jj_input_stream); token = new IrToken(); jj_ntk = RegExpId.UNDEFINED; jj_gen = 0; for (int i = 0; i < 9; i++) jj_la1[i] = -1; }
/** Constructor. */ public miniParser(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 miniParserTokenManager(jj_input_stream); token = new PsrToken(); jj_ntk = -1; jj_gen = 0; for (int i = 0; i < 45; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); }