assertTrue("cannot parse: " + s, !parse.isEmpty());
}
public void testEcmascript4() 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 = "FunctionDeclaration";
Grammar gCNF = new CNFConverter().convertToCNF(g, startSymbol, steps);
CYKParser p = new CYKParser(gCNF);
String s = "function <IDENTIFIER_NAME> ( ) { -- <HEX_INTEGER_LITERAL> >= - <STRING_LITERAL> typeof true , false }";
List<ParseTree> parse = p.parse(s.split(" "), startSymbol);
for (ParseTree parseTree : parse){