assertTrue("cannot parse: " + s, !parse.isEmpty());
}
public void testEcmascript6() throws Exception{
String grammarFile = "tests/resources/ecmascript.txt";
Grammar g = new Parser(grammarFile).parse();
assertTrue(!g.isCNF());
List<Grammar> steps = new ArrayList<Grammar>();
final String startSymbol = "Expression";
Grammar gCNF = new CNFConverter().convertToCNF(g, startSymbol, steps);
CYKParser p = new CYKParser(gCNF);
String s = "typeof true , false";
List<ParseTree> parse = p.parse(s.split(" "), startSymbol);
for (ParseTree parseTree : parse){