RelationParser { static Parser<List<Relation>> fromClause(Parser<Relation> rel) { return TerminalParser.term("from").next(aliasable(rel).sepBy1(TerminalParser.term(","))); }  static Parser<Relation> query();  }
@Test public void testFromClause() { Parser<List<Relation>> parser = RelationParser.fromClause(TABLE); assertListParser(parser, "from a", table("a")); assertListParser(parser, "from a x", new AliasedRelation(table("a"), "x")); assertListParser(parser, "from table1 t1, t2", new AliasedRelation(table("table1"), "t1"), table("t2")); }