/** * Pushes the specified amount of characters back into the input stream. * * They will be read again by then next call of the scanning method * * @param number the number of characters to be read again. * This number must not be greater than yylength()! */ public void yypushback(int number) { if ( number > yylength() ) zzScanError(ZZ_PUSHBACK_2BIG); zzMarkedPos -= number; }
/** * Pushes the specified amount of characters back into the input stream. * * They will be read again by then next call of the scanning method * * @param number the number of characters to be read again. * This number must not be greater than yylength()! */ public void yypushback(int number) { if ( number > yylength() ) zzScanError(ZZ_PUSHBACK_2BIG); zzMarkedPos -= number; }
/** * Pushes the specified amount of characters back into the input stream. * * They will be read again by then next call of the scanning method * * @param number the number of characters to be read again. * This number must not be greater than yylength()! */ public void yypushback(int number) { if ( number > yylength() ) zzScanError(ZZ_PUSHBACK_2BIG); zzMarkedPos -= number; }
private Token invalidStringOrChar(String message) { yybegin(YYINITIAL); InvalidToken token = new InvalidToken(message, sb.toString()); token.setStartIndex(stringStartChar); token.setStopIndex(yychar + yylength() - 1); token.setLine(stringStartLine); token.setCharPositionInLine(stringStartCol); return token; }
private Token invalidStringOrChar(String message) { yybegin(YYINITIAL); InvalidToken token = new InvalidToken(message, sb.toString()); token.setStartIndex(stringStartChar); token.setStopIndex(yychar + yylength() - 1); token.setLine(stringStartLine); token.setCharPositionInLine(stringStartCol); return token; }
private Token invalidStringOrChar(String message) { yybegin(YYINITIAL); InvalidToken token = new InvalidToken(message, sb.toString()); token.setStartIndex(stringStartChar); token.setStopIndex(yychar + yylength() - 1); token.setLine(stringStartLine); token.setCharPositionInLine(stringStartCol); return token; }
private Token endStringOrChar(int type) { yybegin(YYINITIAL); if (stringOrCharError != null) { return invalidStringOrChar(stringOrCharError); } CommonToken token = new CommonToken(type, sb.toString()); token.setStartIndex(stringStartChar); token.setStopIndex(yychar + yylength() - 1); token.setLine(stringStartLine); token.setCharPositionInLine(stringStartCol); return token; }
private Token endStringOrChar(int type) { yybegin(YYINITIAL); if (stringOrCharError != null) { return invalidStringOrChar(stringOrCharError); } CommonToken token = new CommonToken(type, sb.toString()); token.setStartIndex(stringStartChar); token.setStopIndex(yychar + yylength() - 1); token.setLine(stringStartLine); token.setCharPositionInLine(stringStartCol); return token; }
private Token endStringOrChar(int type) { yybegin(YYINITIAL); if (stringOrCharError != null) { return invalidStringOrChar(stringOrCharError); } CommonToken token = new CommonToken(type, sb.toString()); token.setStartIndex(stringStartChar); token.setStopIndex(yychar + yylength() - 1); token.setLine(stringStartLine); token.setCharPositionInLine(stringStartCol); return token; }
private Token invalidToken(String message, String text) { InvalidToken token = new InvalidToken(message, text); token.setStartIndex(yychar); token.setStopIndex(yychar + yylength() - 1); token.setLine(getLine()); token.setCharPositionInLine(getColumn()); return token; }
private Token invalidToken(String message, String text) { InvalidToken token = new InvalidToken(message, text); token.setStartIndex(yychar); token.setStopIndex(yychar + yylength() - 1); token.setLine(getLine()); token.setCharPositionInLine(getColumn()); return token; }
private Token invalidToken(String message, String text) { InvalidToken token = new InvalidToken(message, text); token.setStartIndex(yychar); token.setStopIndex(yychar + yylength() - 1); token.setLine(getLine()); token.setCharPositionInLine(getColumn()); return token; }
private Token newToken(int type, String text, boolean hidden) { CommonToken token = new CommonToken(type, text); if (hidden) { token.setChannel(Token.HIDDEN_CHANNEL); } token.setStartIndex(yychar); token.setStopIndex(yychar + yylength() - 1); token.setLine(getLine()); token.setCharPositionInLine(getColumn()); return token; }
private Token newToken(int type, String text, boolean hidden) { CommonToken token = new CommonToken(type, text); if (hidden) { token.setChannel(Token.HIDDEN_CHANNEL); } token.setStartIndex(yychar); token.setStopIndex(yychar + yylength() - 1); token.setLine(getLine()); token.setCharPositionInLine(getColumn()); return token; }
private Token newToken(int type, String text, boolean hidden) { CommonToken token = new CommonToken(type, text); if (hidden) { token.setChannel(Token.HIDDEN_CHANNEL); } token.setStartIndex(yychar); token.setStopIndex(yychar + yylength() - 1); token.setLine(getLine()); token.setCharPositionInLine(getColumn()); return token; }