Beispiel #1
0
 public AstNewObj(AstId id, AstExpList el)
 {
     cid = id; args = el;
 }
Beispiel #2
0
 // EXPRESSIONS
 public IrExpList visit(AstExpList n)
 {
     IrExpList el = new IrExpList();
     for (int i = 0; i < n.Count(); i++)
         el.add(n[i].accept(this));
     return el;
 }
Beispiel #3
0
        /* throws ParseException */
        /* final */
        public static AstExpList astExpList()
        {
            AstExp e; AstExpList el = new AstExpList(); bool done = false;

            jj_consume_token(AstRegExpId.kw56);
            jj_consume_token(AstRegExpId.kwExpList);

            //label_6:
            while (!done)
            {
                switch ((jj_ntk == AstRegExpId.UNDEFINED) ? jj_ntk_fn() : jj_ntk)
                {
                    case AstRegExpId.kw56:
                        break;
                    default:
                        jj_la1[5] = jj_gen;
                        done = true;
                        break /* label_6*/ ;
                }
                if (!done)
                {
                    e = astExp();
                    el.Add(e);
                }
            }

            jj_consume_token(AstRegExpId.kw57);
            return el;
            //throw new Error("Missing return statement in function");
        }
Beispiel #4
0
 public AstCallStmt(AstExp astExp, AstId astId, AstExpList astExpList)
 {
     _obj = astExp;
     _mid = astId;
     _el = astExpList;
 }
Beispiel #5
0
 public AstCall(AstExp e, AstId mi, AstExpList el)
 {
     obj = e; mid = mi; args = el;
 }
Beispiel #6
0
 public void visit(AstExpList n) 
 {
     for (int i = 0; i < n.size(); i++)
         n.elementAt(i).accept(this);
 }
Beispiel #7
0
 public void visit(AstExpList n)
 {
 }
Beispiel #8
0
 /* throws Exception */
 public void visit(AstExpList n)
 {
     for (int i = 0; i < n.Count(); i++)
         n[i].accept(this);
 }
Beispiel #9
0
        /* throws ParseException */
        // --------------------------------------------------------------------------
        // Args -> Expr {"," Expr}
        // --------------------------------------------------------------------------
        /* final */
        public static AstExpList Args()
        {
            AstExp e = null;
            AstExpList el = new AstExpList();
            e = Expr();
            el.Add( e );

            /* label_12: */
            bool done = false;
            while (!done)
            {
                switch ((jj_ntk == MpRegExpId.UNDEFINED) ? jj_ntk_fn() : jj_ntk)
                {
                    case MpRegExpId.COMMA:
                        break;
                    default:
                        jj_la1[23] = jj_gen;
                        done = true;
                        break /* label_12 */;
                }
                if (!done)
                {
                    jj_consume_token(MpRegExpId.COMMA);
                    e = Expr();
                    el.Add(e);
                }
            }
            return el;
        }