Beispiel #1
0
        //------------------------------------------------------------
        // FUNCBREC.GetActionTypeSym
        //
        /// <summary></summary>
        /// <param name="arity"></param>
        /// <returns></returns>
        //------------------------------------------------------------
        internal AGGTYPESYM GetActionTypeSym(int arity)
        {
            PREDEFTYPE pt;

            switch (arity)
            {
            case 0: pt = PREDEFTYPE.ACTION; break;

            case 1: pt = PREDEFTYPE.G1_ACTION; break;

            case 2: pt = PREDEFTYPE.G2_ACTION; break;

            case 3: pt = PREDEFTYPE.G3_ACTION; break;

            case 4: pt = PREDEFTYPE.G4_ACTION; break;

            case 5: pt = PREDEFTYPE.G5_ACTION; break;

            case 6: pt = PREDEFTYPE.G6_ACTION; break;

            case 7: pt = PREDEFTYPE.G7_ACTION; break;

            case 8: pt = PREDEFTYPE.G8_ACTION; break;

            case 9: pt = PREDEFTYPE.G9_ACTION; break;

            case 10: pt = PREDEFTYPE.G10_ACTION; break;

            case 11: pt = PREDEFTYPE.G11_ACTION; break;

            case 12: pt = PREDEFTYPE.G12_ACTION; break;

            case 13: pt = PREDEFTYPE.G13_ACTION; break;

            case 14: pt = PREDEFTYPE.G14_ACTION; break;

            case 15: pt = PREDEFTYPE.G15_ACTION; break;

            case 16: pt = PREDEFTYPE.G16_ACTION; break;

            default:
                DebugUtil.Assert(false);
                return(null);
            }
            return(Compiler.GetOptPredefType(pt, true));
        }
Beispiel #2
0
        //------------------------------------------------------------
        // FUNCBREC.GetFuncTypeSym
        //
        /// <summary></summary>
        /// <param name="arity"></param>
        /// <returns></returns>
        //------------------------------------------------------------
        internal AGGTYPESYM GetFuncTypeSym(int arity)
        {
            PREDEFTYPE pt;

            switch (arity)
            {
            case 1: pt = PREDEFTYPE.G1_FUNC; break;

            case 2: pt = PREDEFTYPE.G2_FUNC; break;

            case 3: pt = PREDEFTYPE.G3_FUNC; break;

            case 4: pt = PREDEFTYPE.G4_FUNC; break;

            case 5: pt = PREDEFTYPE.G5_FUNC; break;

            default:
                DebugUtil.Assert(false);
                return(null);
            }
            return(Compiler.GetOptPredefType(pt, true));
        }