Example #1
0
 public IrFuncList visit(IrFuncList t)
 {
     IrFuncList funcs = new IrFuncList();
     for (int i = 0; i < t.Count(); i++)
     {
         IrFunc s = ((IrFunc)t[i]).accept(this);
         funcs.Add(s);
     }
     return funcs;
 }
Example #2
0
 // MethodDeclList ---
 public IrFuncList visit(AstMethodDeclList n)
 {
     IrFuncList funcs = new IrFuncList();
     for (int i = 0; i < n.Count(); i++)
         funcs.Add(n[i].accept(this));
     return funcs;
 }
Example #3
0
        public IrProg Program()
        {
            IrFuncList funcs = new IrFuncList();
            IrFunc seg;
            bool done = false;

            jj_consume_token(RegExpId.kwPROG);

            while (!done)
            {
                switch ((jj_ntk == RegExpId.UNDEFINED) ? jj_ntk_fn() : jj_ntk)
                {
                    case RegExpId.ID:

                        seg = FUNC();
                        funcs.Add(seg);
                        break;

                    default:

                        jj_la1[0] = jj_gen;
                        done=true;
                        break;
                }
            }

            jj_consume_token(0);
            return new IrProg(funcs);
        }