예제 #1
0
            public override StringTemplate GenExpr(CodeGenerator generator, TemplateGroup templates, DFA dfa)
            {
                StringTemplate eST = null;

                if (templates != null)
                {
                    eST = templates.GetInstanceOf("notPredicate");
                }
                else
                {
                    eST = new StringTemplate("!(<pred>)");
                }

                eST.SetAttribute("pred", ctx.GenExpr(generator, templates, dfa));
                return(eST);
            }
예제 #2
0
            public override StringTemplate GenExpr(CodeGenerator generator,
                                                   StringTemplateGroup templates,
                                                   DFA dfa)
            {
                StringTemplate eST = null;

                if (templates != null)
                {
                    eST = templates.GetInstanceOf("andPredicates");
                }
                else
                {
                    eST = new StringTemplate("($left$&&$right$)");
                }
                eST.SetAttribute("left", _left.GenExpr(generator, templates, dfa));
                eST.SetAttribute("right", _right.GenExpr(generator, templates, dfa));
                return(eST);
            }