Exemplo n.º 1
0
 def __makeAbs(self, f, c):
     assert (isinstance(f, list))
     if isinstance(c, pi.Blk):
         body = c
     else:
         body = pi.Blk(c)
     if f == []:
         return pi.Abs(pi.Formals(), body)
     else:
         formals = [e for e in f if e != ',']
         return pi.Abs(formals, body)
Exemplo n.º 2
0
 def __makeAbs(self, f, c):
     assert (isinstance(f, list))
     if isinstance(c, pi.Blk):
         body = c
     else:
         body = pi.Blk(c)
     if f == []:
         return pi.Abs(pi.Formals(), body)
     else:
         # Tatsu roduces list of identifiers and commas from
         # formals = ','%{ identifiers }
         formals = [e for e in f if e != ',']
         return pi.Abs(formals, body)
Exemplo n.º 3
0
    def __makeAbs(self, f, c):
        if isinstance(c, pi.Blk):
            body = c
        else:
            body = pi.Blk(c)

        if f == []:
            return pi.Abs(pi.Formals(), body)
        else:
            formals = []
            for k, v in f.items():
                if not v == None:
                    formals.append(v)
            return pi.Abs(formals, body)