@Test public void test_key_production() { Rule r = new RuleParser("foo `'bar`", "foo", 5).parse(); CompositeRule cr = cast(r, CompositeRule.class); KeyMatchRule rFoo = cast(cr.getRules().get(0), KeyMatchRule.class); assertThat(rFoo.getKey(), is(rk("foo", 5))); KeyMatchRule rBar = cast(cr.getRules().get(1), KeyMatchRule.class); assertThat(rBar.getKey(), is(rk("'bar", 0))); }
public Rule parse() { position = start; return parseSubrule(); }
RuleParser { public Rule parse() { position = start; return parseSubrule(); } }
RuleParser { public Rule parse() { position = start; return parseSubrule(); } RuleParser(String string, String defSymbol, int defPriority);  RuleParser(String string, int start, int end, String defSymbol, int defPriority); }
RuleParser { public Rule parse() { position = start; return parseSubrule(); } RuleParser(String string, String defSymbol, int defPriority);  RuleParser(String string, int start, int end, String defSymbol, int defPriority); Rule parse(); }
RuleParser { public Rule parse() { position = start; return parseSubrule(); } RuleParser(String string, String defSymbol, int defPriority);  RuleParser(String string, int start, int end, String defSymbol, int defPriority); Rule parse();  }