Terminals extends Lexicon { public static Parser<String> fragment(final Object... tags) { return Parsers.token(fromFragment(tags)); } private  Terminals(Lexicon lexicon); @Deprecated static Terminals caseInsensitive(String[] ops, String[] keywords); @Deprecated static Terminals caseSensitive(String[] ops, String[] keywords); @Deprecated static Terminals caseInsensitive(
      Parser<String> wordScanner, String[] ops, String[] keywords); @Deprecated static Terminals caseSensitive(
      Parser<String> wordScanner, String[] ops, String[] keywords); @Deprecated static Terminals caseInsensitive(
      Parser<String> wordScanner, String[] ops, String[] keywords, Function<String, ?> wordMap); @Deprecated static Terminals caseSensitive(
      Parser<String> wordScanner, String[] ops, String[] keywords, Function<String, ?> wordMap); static Terminals operators(String... ops); static Terminals operators(Collection<String> ops); Builder words(Parser<String> wordScanner); static Parser<String> identifier(); static Parser<String> fragment(final Object... tags); static final Parser<String> RESERVED; }
@Test public void testIntegerLiteralTokenizer() { assertEquals(Tokens.fragment("1", Tag.INTEGER), Terminals.IntegerLiteral.TOKENIZER.parse("1")); assertEquals(Tokens.fragment("12", Tag.INTEGER), Terminals.IntegerLiteral.TOKENIZER.parse("12")); assertEquals(Tokens.fragment("0", Tag.INTEGER), Terminals.IntegerLiteral.TOKENIZER.parse("0")); assertEquals(Tokens.fragment("01", Tag.INTEGER), Terminals.IntegerLiteral.TOKENIZER.parse("01")); assertFailure(mode, Terminals.IntegerLiteral.TOKENIZER, "12x", 1, 3, "EOF expected, x encountered."); }