@Test public void test_string_production() { Rule r = new RuleParser("'foo\\'' \"bar'\"", "foo", 5).parse(); CompositeRule cr = cast(r, CompositeRule.class); StringMatchRule rFoo = cast(cr.getRules().get(0), StringMatchRule.class); assertThat(rFoo.getString(), is("foo'")); StringMatchRule rBar = cast(cr.getRules().get(1), StringMatchRule.class); assertThat(rBar.getString(), is("bar'")); }
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();  }