TerminalParser { static <T> T parse(Parser<T> parser, String source) { return parser.from(INDENTATION.lexer(TOKENIZER, Indentation.WHITESPACES.or(COMMENT).many())) .parse(source); }    }
@Test public void testTokenizer() { Parser<?> tokenizer = TerminalParser.TOKENIZER; tokenizer.parse("*"); tokenizer.parse("+"); tokenizer.parse("?"); assertEquals("foo", tokenizer.parse("'foo'")); assertEquals("foo", tokenizer.parse("\"foo\"")); assertEquals("foo", tokenizer.parse("foo").toString()); }