Esempio n. 1
0
 def newPool(name: str, superPool, types: [], cls):
     """allocate correct pool type and add it to types"""
     try:
         if name == "boolean":
             superPool = P0(len(types), cls)
             return superPool
         elif name == "if":
             superPool = P1(len(types), cls)
             return superPool
         elif name == "int":
             superPool = P2(len(types), cls)
             return superPool
         elif name == "∀":
             superPool = P3(len(types), cls)
             return superPool
         else:
             if superPool is None:
                 superPool = BasePool(len(types), name,
                                      StoragePool.noKnownFields,
                                      StoragePool.noAutoFields, cls)
             else:
                 superPool = superPool.makeSubPool(len(types), name, cls)
         return superPool
     finally:
         types.append(superPool)
Esempio n. 2
0
    def newPool(name: str, superPool, types: [], cls):
        """allocate correct pool type and add it to types"""
        try:
            if name == "testenum":
                superPool = P0(len(types), cls)
                return superPool
            elif name == "testenum:last":
                superPool = P1(len(types), superPool, cls)
                return superPool

            elif name == "testenum:third":
                superPool = P2(len(types), superPool, cls)
                return superPool

            elif name == "testenum:second":
                superPool = P3(len(types), superPool, cls)
                return superPool

            elif name == "testenum:default":
                superPool = P4(len(types), superPool, cls)
                return superPool

            else:
                if superPool is None:
                    superPool = BasePool(len(types), name,
                                         StoragePool.noKnownFields,
                                         StoragePool.noAutoFields, cls)
                else:
                    superPool = superPool.makeSubPool(len(types), name, cls)
            return superPool
        finally:
            types.append(superPool)
Esempio n. 3
0
 def newPool(name: str, superPool, types: [], cls):
     """allocate correct pool type and add it to types"""
     try:
         if name == "abuser":
             superPool = P0(len(types), cls)
             return superPool
         elif name == "badtype":
             superPool = P1(len(types), cls)
             return superPool
         elif name == "expression":
             superPool = P2(len(types), cls)
             return superPool
         elif name == "externmixin":
             superPool = P3(len(types), cls)
             return superPool
         elif name == "nowasingleton":
             superPool = P4(len(types), cls)
             return superPool
         elif name == "uid":
             superPool = P5(len(types), cls)
             return superPool
         elif name == "user":
             superPool = P6(len(types), cls)
             return superPool
         else:
             if superPool is None:
                 superPool = BasePool(len(types), name,
                                      StoragePool.noKnownFields,
                                      StoragePool.noAutoFields, cls)
             else:
                 superPool = superPool.makeSubPool(len(types), name, cls)
         return superPool
     finally:
         types.append(superPool)
Esempio n. 4
0
 def newPool(name: str, superPool, types: [], cls):
     """allocate correct pool type and add it to types"""
     try:
         if name == "basicbool":
             superPool = P0(len(types), cls)
             return superPool
         elif name == "basicfloat32":
             superPool = P1(len(types), cls)
             return superPool
         elif name == "basicfloat64":
             superPool = P2(len(types), cls)
             return superPool
         elif name == "basicfloats":
             superPool = P3(len(types), cls)
             return superPool
         elif name == "basicint16":
             superPool = P4(len(types), cls)
             return superPool
         elif name == "basicint32":
             superPool = P5(len(types), cls)
             return superPool
         elif name == "basicint64i":
             superPool = P6(len(types), cls)
             return superPool
         elif name == "basicint64v":
             superPool = P7(len(types), cls)
             return superPool
         elif name == "basicint8":
             superPool = P8(len(types), cls)
             return superPool
         elif name == "basicintegers":
             superPool = P9(len(types), cls)
             return superPool
         elif name == "basicstring":
             superPool = P10(len(types), cls)
             return superPool
         elif name == "basictypes":
             superPool = P11(len(types), cls)
             return superPool
         else:
             if superPool is None:
                 superPool = BasePool(len(types), name,
                                      StoragePool.noKnownFields,
                                      StoragePool.noAutoFields, cls)
             else:
                 superPool = superPool.makeSubPool(len(types), name, cls)
         return superPool
     finally:
         types.append(superPool)
Esempio n. 5
0
 def newPool(name: str, superPool, types: [], cls):
     """allocate correct pool type and add it to types"""
     try:
         if name == "comment":
             superPool = P0(len(types), cls)
             return superPool
         elif name == "defaultboardercases":
             superPool = P1(len(types), cls)
             return superPool
         elif name == "operator":
             superPool = P2(len(types), cls)
             return superPool
         elif name == "properties":
             superPool = P3(len(types), cls)
             return superPool
         elif name == "none":
             superPool = P4(len(types), superPool, cls)
             return superPool
              
         elif name == "regularproperty":
             superPool = P5(len(types), superPool, cls)
             return superPool
              
         elif name == "system":
             superPool = P6(len(types), superPool, cls)
             return superPool
              
         elif name == "rangeboardercases":
             superPool = P7(len(types), cls)
             return superPool
         elif name == "term":
             superPool = P8(len(types), cls)
             return superPool
         else:
             if superPool is None:
                 superPool = BasePool(len(types), name, StoragePool.noKnownFields, StoragePool.noAutoFields, cls)
             else:
                 superPool = superPool.makeSubPool(len(types), name, cls)
         return superPool
     finally:
         types.append(superPool)