def pp(self, packed=False): _ob = ppr.IOpenBlock() _cb = ppr.ICloseBlock() _nl = ppr.INewline() _let = ppr.IWord('letrec') if self.isRec else ppr.IWord('let') _in = ppr.IWord('in') _definitions = self.pp_definitions(self.deflist, packed) pp_expr = self.expr.pp(packed) return ppr.sequence(_ob, _let, _ob, _definitions, _cb, _in, pp_expr, _cb)
def pp(self, packed=False): _ob = ppr.IOpenBlock() _cb = ppr.ICloseBlock() _case = ppr.IWord('case') _of = ppr.IWord('of') _esac = ppr.IWord('esac') pp_expr = self.expr.pp(packed) alternatives = self.pp_alternatives(self.alts, packed) pp_alts = ppr.sequence(_ob, alternatives, _cb) return ppr.sequence(_ob, _case, pp_expr, _of, pp_alts, _esac, _cb)
def pp(self, packed=False): return ppr.IWord(str(self.intVal))
def pp(self, packed=False): return ppr.IWord(self.ident)
def pp(self, packed=False): _name = self.name.pp(packed) _eq = ppr.IWord('=') _val = self.val.pp(packed) return ppr.sequence(_name, _eq, _val)
def pp(self, packed=False): if len(self.pars) == 0: return ppr.IWord(self.name) else: parlist = [ppr.IWord(par) for par in self.pars] return ppr.sequence(ppr.IWord(self.name), ppr.ISequence(parlist))
def pp(self, packed=False): return ppr.sequence(self.lhs.pp(), ppr.IWord('='), self.expr.pp())
def pp(self, packed=False): return ppr.IWord('No method pp defined for ' + str(type(self)))
def pp(self, packed=False): tag = ppr.sequence(ppr.IStr('<'), self.tag.pp(packed), ppr.IStr('> ')) varlist = [var.pp(packed) for var in self.vars] expr = self.expr.pp(packed) return ppr.sequence(tag, ppr.ISequence(varlist), ppr.IWord('->'), expr)