Terminals extends Lexicon { public static Parser<String> identifier() { return Identifier.PARSER; } 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 testIdentifierTokenizer() { assertEquals(Tokens.identifier("foo"), Terminals.Identifier.TOKENIZER.parse("foo")); assertEquals(Tokens.identifier("foo1"), Terminals.Identifier.TOKENIZER.parse("foo1")); assertEquals(Tokens.identifier("FOO"), Terminals.Identifier.TOKENIZER.parse("FOO")); assertEquals(Tokens.identifier("FOO_2"), Terminals.Identifier.TOKENIZER.parse("FOO_2")); assertEquals(Tokens.identifier("_foo"), Terminals.Identifier.TOKENIZER.parse("_foo")); assertFailure(mode, Terminals.Identifier.TOKENIZER, "1foo", 1, 1); }