public static TreeNode parse(string gfile, string ifile) { var g = new Grammar(gfile); LL1Parser p = new LL1Parser(g); var tokens = g.tokenize(ifile); return(p.parse(tokens)); }
public void Test_fail() { var parser = new LL1Parser(_grammar); Assert.False(parser.ProcessText(" a + adasda ^ ( b + c )")); }
public void Test_ok() { var parser = new LL1Parser(_grammar); Assert.True(parser.ProcessText(" a + b >= ( b + c )")); }