/** * 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 static int [] zzUnpackAction() { int [] result = new int[18]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; }
final List<StrptimeToken> compiledPattern = new LinkedList<>(); final Reader reader = new StringReader(pattern); // TODO Use try-with-resource statement StrptimeLexer lexer = new StrptimeLexer(reader); while ((token = lexer.yylex()) != null) { if (token.getFormat() != StrptimeFormat.FORMAT_SPECIAL) { compiledPattern.add(token);
public StrptimeToken directive(char c) { StrptimeToken token; if (c == 'z') { int colons = yylength()-1; // can only be colons except the 'z' return StrptimeToken.zoneOffsetColons(colons); } else if ((token = StrptimeToken.format(c)) != null) { return token; } else { return StrptimeToken.special(c); } }
final List<StrptimeToken> compiledPattern = new LinkedList<>(); final Reader reader = new StringReader(pattern); // TODO Use try-with-resource statement StrptimeLexer lexer = new StrptimeLexer(reader); while ((token = lexer.yylex()) != null) { if (token.getFormat() != StrptimeFormat.FORMAT_SPECIAL) { compiledPattern.add(token);
public StrptimeToken directive(char c) { StrptimeToken token; if (c == 'z') { int colons = yylength()-1; // can only be colons except the 'z' return StrptimeToken.zoneOffsetColons(colons); } else if ((token = StrptimeToken.format(c)) != null) { return token; } else { return StrptimeToken.special(c); } }
/** * 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 static int [] zzUnpackAction() { int [] result = new int[18]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; }