/** * Creates a new Python Token Manager from the given source code. * * @param source * the source code */ public PythonTokenManager(Reader source) { tokenManager = new PythonParserTokenManager(new SimpleCharStream(source)); }
/** Start. */ public char BeginToken() throws java.io.IOException { tokenBegin = -1; char c = readChar(); tokenBegin = bufpos; return c; }
protected Token jjFillToken() { final Token t; final String curTokenImage; final int beginLine; final int endLine; final int beginColumn; final int endColumn; String im = jjstrLiteralImages[jjmatchedKind]; curTokenImage = (im == null) ? input_stream.GetImage() : im; beginLine = input_stream.getBeginLine(); beginColumn = input_stream.getBeginColumn(); endLine = input_stream.getEndLine(); endColumn = input_stream.getEndColumn(); t = Token.newToken(jjmatchedKind, curTokenImage); t.beginLine = beginLine; t.endLine = endLine; t.beginColumn = beginColumn; t.endColumn = endColumn; return t; }
bufpos = maxNextCharInd = 0; else ExpandBuff(false); ExpandBuff(true); else available = tokenBegin; backup(0); if (tokenBegin == -1) tokenBegin = bufpos;
curChar = input_stream.BeginToken(); input_stream.backup(curPos - jjmatchedPos - 1); if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) jjmatchedKind = 0x7fffffff; try { curChar = input_stream.readChar(); continue; int error_line = input_stream.getEndLine(); int error_column = input_stream.getEndColumn(); String error_after = null; boolean EOFSeen = false; try { input_stream.readChar(); input_stream.backup(1); } catch (java.io.IOException e1) { EOFSeen = true; error_after = curPos <= 1 ? "" : input_stream.GetImage(); if (curChar == '\n' || curChar == '\r') { error_line++; input_stream.backup(1); error_after = curPos <= 1 ? "" : input_stream.GetImage();
/** Reinitialise. */ public void ReInit(java.io.Reader dstream) { ReInit(dstream, 1, 1, 4096); } /** Constructor. */
int strPos = jjmatchedPos; int seenUpto; input_stream.backup(seenUpto = curPos + 1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { throw new Error("Internal Error"); } curPos = 0; if ((i = jjnewStateCnt) == (startsAt = 106 - (jjnewStateCnt = startsAt))) break; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { break; } try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { throw new Error("Internal Error : Please send a bug report."); }
@Override public String GetImage() { String image = super.GetImage(); return CONTINUATION.matcher(image).replaceAll(""); } }
/** Reinitialise. */ public void ReInit(java.io.InputStream dstream, String encoding, int startline, int startcolumn) throws java.io.UnsupportedEncodingException { ReInit(dstream, encoding, startline, startcolumn, 4096); } /** Reinitialise. */
bufpos = maxNextCharInd = 0; else ExpandBuff(false); ExpandBuff(true); else available = tokenBegin; backup(0); if (tokenBegin == -1) tokenBegin = bufpos;
@Override public String GetImage() { String image = super.GetImage(); return CONTINUATION.matcher(image).replaceAll(""); } }
/** * Creates a new Ecmascript 5 Token Manager from the given source code. * * @param source * the source code */ public Ecmascript5TokenManager(Reader source) { tokenManager = new Ecmascript5ParserTokenManager(new SimpleCharStream(source)); }
@Override public char readChar() throws IOException { char c = super.readChar(); if (c == BACKSLASH) { char c1 = super.readChar(); if (c1 == NEWLINE) { c = super.readChar(); } else if (c1 == CARRIAGE_RETURN) { char c2 = super.readChar(); if (c2 == NEWLINE) { c = super.readChar(); } else { backup(2); } } else { backup(1); } } return c; }
/** Reinitialise. */ public void ReInit(java.io.Reader dstream, int startline, int startcolumn) { ReInit(dstream, startline, startcolumn, 4096); }
/** * Creates a new Objective-C Token Manager from the given source code. * * @param source * the source code */ public ObjectiveCTokenManager(Reader source) { tokenManager = new ObjectiveCParserTokenManager(new SimpleCharStream(source)); }
private int jjMoveStringLiteralDfa1_2(long active0) { try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return 1; } switch(curChar) { case 47: if ((active0 & 0x4000000000L) != 0L) return jjStopAtPos(1, 38); break; default : return 2; } return 2; } private int jjMoveStringLiteralDfa0_3()
/** Reinitialise. */ public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException { ReInit(dstream, encoding, 1, 1, 4096); }
/** * Creates a new Matlab Token Manager from the given source code. * * @param source * the source code */ public MatlabTokenManager(Reader source) { tokenManager = new MatlabParserTokenManager(new SimpleCharStream(source)); }
private int jjMoveStringLiteralDfa1_1(long active0) { try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return 1; } switch(curChar) { case 47: if ((active0 & 0x2000000000L) != 0L) return jjStopAtPos(1, 37); break; default : return 2; } return 2; } static final int[] jjnextStates = {
/** Reinitialise. */ public void ReInit(java.io.InputStream dstream) { ReInit(dstream, 1, 1, 4096); } /** Reinitialise. */