/** @return starting character for token. */ public char BeginToken() throws java.io.IOException { if (inBuf > 0) { --inBuf; if (++bufpos == bufsize) bufpos = 0; tokenBegin = bufpos; return buffer[bufpos]; } tokenBegin = 0; bufpos = -1; return readChar(); }
/** @return starting character for token. */ public char BeginToken() throws java.io.IOException { if (inBuf > 0) { --inBuf; if (++bufpos == bufsize) bufpos = 0; tokenBegin = bufpos; return buffer[bufpos]; } tokenBegin = 0; bufpos = -1; return readChar(); }
/** @return starting character for token. */ public char BeginToken() throws java.io.IOException { if (inBuf > 0) { --inBuf; if (++bufpos == bufsize) bufpos = 0; tokenBegin = bufpos; return buffer[bufpos]; } tokenBegin = 0; bufpos = -1; return readChar(); }
private int jjStartNfaWithStates_0(int pos, int kind, int state) { jjmatchedKind = kind; jjmatchedPos = pos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return pos + 1; } return jjMoveNfa_0(state, pos + 1); } static final long[] jjbitVec0 = {
private int jjStartNfaWithStates_0(int pos, int kind, int state) { jjmatchedKind = kind; jjmatchedPos = pos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return pos + 1; } return jjMoveNfa_0(state, pos + 1); } static final long[] jjbitVec0 = {
private int jjStartNfaWithStates_0(int pos, int kind, int state) { jjmatchedKind = kind; jjmatchedPos = pos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return pos + 1; } return jjMoveNfa_0(state, pos + 1); } static final long[] jjbitVec0 = {
private int jjMoveStringLiteralDfa1_1(long active0) { try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return 1; } switch(curChar) { case 42: if ((active0 & 0x40L) != 0L) return jjStopAtPos(1, 6); break; case 47: if ((active0 & 0x80L) != 0L) return jjStopAtPos(1, 7); break; default : return 2; } return 2; } static final int[] jjnextStates = {
private int jjMoveStringLiteralDfa1_1(long active0) { try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return 1; } switch(curChar) { case 42: if ((active0 & 0x40L) != 0L) return jjStopAtPos(1, 6); break; case 47: if ((active0 & 0x80L) != 0L) return jjStopAtPos(1, 7); break; default : return 2; } return 2; } static final int[] jjnextStates = {
private int jjMoveStringLiteralDfa1_1(long active0) { try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return 1; } switch(curChar) { case 42: if ((active0 & 0x40L) != 0L) return jjStopAtPos(1, 6); break; case 47: if ((active0 & 0x80L) != 0L) return jjStopAtPos(1, 7); break; default : return 2; } return 2; } static final int[] jjnextStates = {
private int jjMoveStringLiteralDfa18_0(long old4, long active4, long old5, long active5) { if (((active4 &= old4) | (active5 &= old5)) == 0L) return jjStartNfa_0(16, 0L, 0L, 0L, 0L, old4, old5, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(17, 0L, 0L, 0L, 0L, 0L, active5, 0L); return 18; } switch(curChar) { case 68: case 100: if ((active5 & 0x800000L) != 0L) return jjStartNfaWithStates_0(18, 343, 59); break; default : break; } return jjStartNfa_0(17, 0L, 0L, 0L, 0L, 0L, active5, 0L); } private int jjStartNfaWithStates_0(int pos, int kind, int state)
private int jjMoveStringLiteralDfa18_0(long old4, long active4, long old5, long active5) { if (((active4 &= old4) | (active5 &= old5)) == 0L) return jjStartNfa_0(16, 0L, 0L, 0L, 0L, old4, old5, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(17, 0L, 0L, 0L, 0L, 0L, active5, 0L); return 18; } switch(curChar) { case 68: case 100: if ((active5 & 0x10000L) != 0L) return jjStartNfaWithStates_0(18, 336, 60); break; default : break; } return jjStartNfa_0(17, 0L, 0L, 0L, 0L, 0L, active5, 0L); } private int jjStartNfaWithStates_0(int pos, int kind, int state)
private int jjMoveStringLiteralDfa18_0(long old4, long active4, long old5, long active5) { if (((active4 &= old4) | (active5 &= old5)) == 0L) return jjStartNfa_0(16, 0L, 0L, 0L, 0L, old4, old5, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(17, 0L, 0L, 0L, 0L, 0L, active5, 0L); return 18; } switch(curChar) { case 68: case 100: if ((active5 & 0x800000L) != 0L) return jjStartNfaWithStates_0(18, 343, 59); break; default : break; } return jjStartNfa_0(17, 0L, 0L, 0L, 0L, 0L, active5, 0L); } private int jjStartNfaWithStates_0(int pos, int kind, int state)
@Override public Token getNextToken() { try { Token t = super.getNextToken(); //if we're in the default lex state, keep track of a history of tokens //this logic is not perfect as deep lookaheads can ruin the positioning if (tokenCount == 0) { head = t; } tokenCount++; if (tokenCount > 10) { head = head.next; } return t; } catch (TokenMgrError err) { Token t = new Token(); t.kind = INVALID_TOKEN; t.beginColumn = this.input_stream.getBeginColumn(); t.beginLine = this.input_stream.getBeginLine(); t.endColumn = t.beginColumn; t.endLine = t.beginLine; t.image = this.input_stream.GetImage().substring(0, 1); try { //mark the char a consumed this.input_stream.readChar(); } catch (IOException e) { } return t; } }
@Override public Token getNextToken() { try { Token t = super.getNextToken(); //if we're in the default lex state, keep track of a history of tokens //this logic is not perfect as deep lookaheads can ruin the positioning if (tokenCount == 0) { head = t; } tokenCount++; if (tokenCount > 10) { head = head.next; } return t; } catch (TokenMgrError err) { Token t = new Token(); t.kind = INVALID_TOKEN; t.beginColumn = this.input_stream.getBeginColumn(); t.beginLine = this.input_stream.getBeginLine(); t.endColumn = t.beginColumn; t.endLine = t.beginLine; t.image = this.input_stream.GetImage().substring(0, 1); try { //mark the char a consumed this.input_stream.readChar(); } catch (IOException e) { } return t; } }
private int jjMoveStringLiteralDfa17_0(long old1, long active1, long old4, long active4, long old5, long active5) { if (((active1 &= old1) | (active4 &= old4) | (active5 &= old5)) == 0L) return jjStartNfa_0(15, 0L, old1, 0L, 0L, old4, old5, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(16, 0L, 0L, 0L, 0L, active4, active5, 0L); return 17; } switch(curChar) { case 69: case 101: if ((active4 & 0x20000000L) != 0L) return jjStartNfaWithStates_0(17, 285, 59); break; case 78: case 110: return jjMoveStringLiteralDfa18_0(active4, 0L, active5, 0x800000L); default : break; } return jjStartNfa_0(16, 0L, 0L, 0L, 0L, active4, active5, 0L); } private int jjMoveStringLiteralDfa18_0(long old4, long active4, long old5, long active5)
private int jjMoveStringLiteralDfa17_0(long old1, long active1, long old4, long active4, long old5, long active5) { if (((active1 &= old1) | (active4 &= old4) | (active5 &= old5)) == 0L) return jjStartNfa_0(15, 0L, old1, 0L, 0L, old4, old5, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(16, 0L, 0L, 0L, 0L, active4, active5, 0L); return 17; } switch(curChar) { case 69: case 101: if ((active4 & 0x20000000L) != 0L) return jjStartNfaWithStates_0(17, 285, 60); break; case 78: case 110: return jjMoveStringLiteralDfa18_0(active4, 0L, active5, 0x10000L); default : break; } return jjStartNfa_0(16, 0L, 0L, 0L, 0L, active4, active5, 0L); } private int jjMoveStringLiteralDfa18_0(long old4, long active4, long old5, long active5)
private int jjMoveStringLiteralDfa17_0(long old1, long active1, long old4, long active4, long old5, long active5) { if (((active1 &= old1) | (active4 &= old4) | (active5 &= old5)) == 0L) return jjStartNfa_0(15, 0L, old1, 0L, 0L, old4, old5, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(16, 0L, 0L, 0L, 0L, active4, active5, 0L); return 17; } switch(curChar) { case 69: case 101: if ((active4 & 0x20000000L) != 0L) return jjStartNfaWithStates_0(17, 285, 59); break; case 78: case 110: return jjMoveStringLiteralDfa18_0(active4, 0L, active5, 0x800000L); default : break; } return jjStartNfa_0(16, 0L, 0L, 0L, 0L, active4, active5, 0L); } private int jjMoveStringLiteralDfa18_0(long old4, long active4, long old5, long active5)
private int jjMoveStringLiteralDfa15_0(long old1, long active1, long old3, long active3, long old4, long active4, long old5, long active5) { if (((active1 &= old1) | (active3 &= old3) | (active4 &= old4) | (active5 &= old5)) == 0L) return jjStartNfa_0(13, 0L, old1, 0L, old3, old4, old5, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(14, 0L, active1, 0L, 0L, active4, active5, 0L); return 15; } switch(curChar) { case 67: case 99: return jjMoveStringLiteralDfa16_0(active1, 0L, active4, 0L, active5, 0x10000L); case 73: case 105: return jjMoveStringLiteralDfa16_0(active1, 0L, active4, 0x20000000L, active5, 0L); case 76: case 108: return jjMoveStringLiteralDfa16_0(active1, 0L, active4, 0x40000000L, active5, 0L); case 77: case 109: return jjMoveStringLiteralDfa16_0(active1, 0x40L, active4, 0L, active5, 0L); default : break; } return jjStartNfa_0(14, 0L, active1, 0L, 0L, active4, active5, 0L); } private int jjMoveStringLiteralDfa16_0(long old1, long active1, long old4, long active4, long old5, long active5)
private int jjMoveStringLiteralDfa15_0(long old1, long active1, long old3, long active3, long old4, long active4, long old5, long active5) { if (((active1 &= old1) | (active3 &= old3) | (active4 &= old4) | (active5 &= old5)) == 0L) return jjStartNfa_0(13, 0L, old1, 0L, old3, old4, old5, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(14, 0L, active1, 0L, 0L, active4, active5, 0L); return 15; } switch(curChar) { case 67: case 99: return jjMoveStringLiteralDfa16_0(active1, 0L, active4, 0L, active5, 0x800000L); case 73: case 105: return jjMoveStringLiteralDfa16_0(active1, 0L, active4, 0x20000000L, active5, 0L); case 76: case 108: return jjMoveStringLiteralDfa16_0(active1, 0L, active4, 0x40000000L, active5, 0L); case 77: case 109: return jjMoveStringLiteralDfa16_0(active1, 0x40L, active4, 0L, active5, 0L); default : break; } return jjStartNfa_0(14, 0L, active1, 0L, 0L, active4, active5, 0L); } private int jjMoveStringLiteralDfa16_0(long old1, long active1, long old4, long active4, long old5, long active5)
private int jjMoveStringLiteralDfa15_0(long old1, long active1, long old3, long active3, long old4, long active4, long old5, long active5) { if (((active1 &= old1) | (active3 &= old3) | (active4 &= old4) | (active5 &= old5)) == 0L) return jjStartNfa_0(13, 0L, old1, 0L, old3, old4, old5, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(14, 0L, active1, 0L, 0L, active4, active5, 0L); return 15; } switch(curChar) { case 67: case 99: return jjMoveStringLiteralDfa16_0(active1, 0L, active4, 0L, active5, 0x800000L); case 73: case 105: return jjMoveStringLiteralDfa16_0(active1, 0L, active4, 0x20000000L, active5, 0L); case 76: case 108: return jjMoveStringLiteralDfa16_0(active1, 0L, active4, 0x40000000L, active5, 0L); case 77: case 109: return jjMoveStringLiteralDfa16_0(active1, 0x40L, active4, 0L, active5, 0L); default : break; } return jjStartNfa_0(14, 0L, active1, 0L, 0L, active4, active5, 0L); } private int jjMoveStringLiteralDfa16_0(long old1, long active1, long old4, long active4, long old5, long active5)