private Learner() { QueryRanker = null; if (File.Exists(@"Semantics\SQL.grammar")) { Grammar = Utils.Utils.LoadGrammar(@"Semantics\SQL.grammar"); Learner.GrammarNotCompiled = false; } QueryRanker = new Semantics.RankingScore(Grammar); ProgramNodeDict = new Dictionary <string, ProgramNode>(); }
public void SetGrammar(string filename) { Grammar = Utils.Utils.LoadGrammar(filename); QueryRanker = new Semantics.RankingScore(Grammar); Learner.GrammarNotCompiled = false; }