/// <summary> /// Parses the given CPL into an AST. /// </summary> /// <param name="p_strCplCode">The CPL to convert.</param> /// <returns>The AST built from the given CPL.</returns> private ITree GenerateAst(string p_strCplCode) { ErrorTracker ertErrors = new ErrorTracker(); AntlrParserBase cpbParser = ParserFactory.CreateParser(p_strCplCode, ertErrors); ITree astCPL = cpbParser.Parse(); if (ertErrors.HasErrors) throw new ArgumentException("Invalid CPL:" + Environment.NewLine + ertErrors.ToString(), "p_strCplCode"); return astCPL; }