@Test public void truncatedUuencodedFile() throws IOException { JFlexSymbolMatcher matcher = new UuencodeFullTokenizer( new StringReader("begin 644 test\n")); JFlexTokenizer tokenizer = new JFlexTokenizer(matcher); CharTermAttribute term = tokenizer.addAttribute(CharTermAttribute.class); assertTrue(tokenizer.incrementToken()); assertEquals("begin", term.toString()); assertTrue(tokenizer.incrementToken()); assertEquals("644", term.toString()); assertTrue(tokenizer.incrementToken()); assertEquals("test", term.toString()); assertFalse(tokenizer.incrementToken()); }
@Override public final boolean incrementToken() throws IOException { boolean notAtEOF; do { clearAttributesEtc(); notAtEOF = matcher.yylex() != matcher.getYYEOF(); } while (!didSetAttribsValues && notAtEOF); return notAtEOF; }
JFlexTokenizer extends Tokenizer implements SymbolMatchedListener { @Override public final boolean incrementToken() throws IOException { boolean notAtEOF; do { clearAttributesEtc(); notAtEOF = matcher.yylex() != matcher.getYYEOF(); } while (!didSetAttribsValues && notAtEOF); return notAtEOF; } }
JFlexTokenizer extends Tokenizer implements SymbolMatchedListener { @Override public final boolean incrementToken() throws IOException { boolean notAtEOF; do { clearAttributesEtc(); notAtEOF = matcher.yylex() != matcher.getYYEOF(); } while (!didSetAttribsValues && notAtEOF); return notAtEOF; } JFlexTokenizer(ScanningSymbolMatcher matcher); }
JFlexTokenizer extends Tokenizer implements SymbolMatchedListener { @Override public final boolean incrementToken() throws IOException { boolean notAtEOF; do { clearAttributesEtc(); notAtEOF = matcher.yylex() != matcher.getYYEOF(); } while (!didSetAttribsValues && notAtEOF); return notAtEOF; } JFlexTokenizer(ScanningSymbolMatcher matcher); @Override void reset(); @Override final void close(); @Override final boolean incrementToken(); @Override void symbolMatched(SymbolMatchedEvent evt); @Override void sourceCodeSeen(SourceCodeSeenEvent evt); }
JFlexTokenizer extends Tokenizer implements SymbolMatchedListener { @Override public final boolean incrementToken() throws IOException { boolean notAtEOF; do { clearAttributesEtc(); notAtEOF = matcher.yylex() != matcher.getYYEOF(); } while (!didSetAttribsValues && notAtEOF); return notAtEOF; } JFlexTokenizer(ScanningSymbolMatcher matcher); @Override void reset(); @Override final void close(); @Override final boolean incrementToken(); @Override void symbolMatched(SymbolMatchedEvent evt); @Override void sourceCodeSeen(SourceCodeSeenEvent evt);  }