Beispiel #1
0
        public Form1()
        {
            InitializeComponent();

            var grammar = new CustomDslGrammar();
            _parser = new Parser(grammar);
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            var grammar = new CustomDslGrammar();
            var parser = new Parser(grammar);
            var tree = parser.Parse("${Field.A} > 2 AND (NOT ${FieldB} < 3)");
            var rootNode = (AstNode)tree.Root.AstNode;
            var visitor = new CustomDslSqlVisitor();
            visitor.Visit(rootNode);
            Console.WriteLine(visitor.GetSqlExpression());

        }