示例#1
0
        public static AST.Node APLString(string input, FunctionInformation functionInfo)
        {
            Antlr.Runtime.Lexer lexer = new Grammar.Apl.AplusLexer(new ANTLRStringStream(input ?? ""));
            Grammar.AplusParser parser = new Grammar.AplusParser(new CommonTokenStream(lexer));
            parser.FunctionInfo = functionInfo;

            bool parseOk = parser.Parse();
            return parser.Tree;
        }
示例#2
0
        public static AST.Node APLString(string input, FunctionInformation functionInfo)
        {
            Antlr.Runtime.Lexer lexer  = new Grammar.Apl.AplusLexer(new ANTLRStringStream(input ?? ""));
            Grammar.AplusParser parser = new Grammar.AplusParser(new CommonTokenStream(lexer));
            parser.FunctionInfo = functionInfo;

            bool parseOk = parser.Parse();

            return(parser.Tree);
        }