예제 #1
0
        private void Boo(string input)
        {
            Debug.WriteLine("Boo");
            AntlrInputStream  antlrInput = new AntlrInputStream(input);
            TSqlLexer         lexer      = new TSqlLexer(antlrInput);
            CommonTokenStream tokens     = new CommonTokenStream(lexer);
            TSqlParser        parser     = new TSqlParser(tokens);

            TSqlParserListenerExtended listener = new TSqlParserListenerExtended();

            parser.search_condition().EnterRule(listener);
        }
예제 #2
0
        private void Baz(string input)
        {
            Debug.WriteLine("Baz");
            AntlrInputStream  inputStream = new AntlrInputStream(input);
            TSqlLexer         lexer       = new TSqlLexer(inputStream);
            CommonTokenStream tokens      = new CommonTokenStream(lexer);
            TSqlParser        parser      = new TSqlParser(tokens);
            var parseTree = parser.search_condition();

            ParseTreeWalker            walker = new ParseTreeWalker();
            TSqlParserListenerExtended loader = new TSqlParserListenerExtended();

            walker.Walk(loader, parseTree);
        }