예제 #1
0
        public Node ParseQLSSheet(string qlsSheetText)
        {
            QLSParser parser  = SetupParser(qlsSheetText);
            var       visitor = new ParseTreeVisitor();

            return(visitor.Visit(parser.stylesheet()));
        }
예제 #2
0
        public StylesheetTask Process(StylesheetTask input)
        {
            QLSParser parser  = SetupParser(input.StylesheetText);
            var       visitor = new ParseTreeVisitor();

            input.Ast = visitor.Visit(parser.stylesheet());
            return(input);
        }
예제 #3
0
        public StyleSheet ParseQLSStream(TextReader reader)
        {
            if (reader == null) { throw new ArgumentNullException("reader"); }

            var inputStream = new AntlrInputStream(reader);

            var lexer = new QLSLexer(inputStream);

            var tokens = new CommonTokenStream(lexer);

            var parser = new QLSParser(tokens);

            var visitor = new StyleSheetBuilder();

            return visitor.Visit(parser.stylesheet());
        }