JsonGrammar { public LiteralTree NUMBER() { return b.<LiteralTree>nonterminal().is( f.number(b.token(JsonLexer.NUMBER))); } JsonGrammar(GrammarBuilder<InternalSyntaxToken> b, TreeFactory f); JsonTree JSON(); ObjectTree OBJECT(); SyntaxList<PairTree> PAIR_LIST(); PairTree PAIR(); ArrayTree ARRAY(); SyntaxList<ValueTree> VALUE_LIST(); ValueTree VALUE(); LiteralTree STRING(); LiteralTree NUMBER(); BuiltInValueTree BUILT_IN_VALUE();  }
@Test public void number() throws Exception { assertLiteral("1234567890"); assertLiteral("-1234567890"); assertLiteral("0"); assertLiteral("0.0123456789"); assertLiteral("1E2"); assertLiteral("1e2"); assertLiteral("1E+2"); assertLiteral("1E-2"); }