Exemple #1
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");
        }
Exemple #2
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;
        }