Exemple #1
0
 def __str__(self):
     res = ['goto case ', ozify(self.testreg), '\n']
     is_first = True
     for pattern, target_pc in zip(self.patterns, self.target_pcs):
         if is_first:
             res.append('  of ')
             is_first = False
         else:
             res.append('  [] ')
         res.append(ozify(pattern))
         res.append(' then ')
         res.append(str(target_pc))
         res.append('\n')
     if self.else_pc is not None:
         res.append('  else ')
         res.append(str(self.else_pc))
         res.append('\n')
     res.append('end')
     return ''.join(res)
Exemple #2
0
 def __str__(self):
     return '{0} <- _\n{1} <- {0}'.format(ozify(self.target1), ozify(self.target2))
Exemple #3
0
 def __str__(self):
     retval = ('{{'+'{} {}'+'}}').format(ozify(self.func), ' '.join(map(ozify, self.args)))
     if self.is_tail_call:
         retval = 'tail ' + retval
     return retval
Exemple #4
0
 def __str__(self):
     return '{} <- _'.format(ozify(self.target))
Exemple #5
0
 def __str__(self):
     return '{} <- {}\n{} <- {}'.format(
         ozify(self.target1), ozify(self.src1),
         ozify(self.target2), ozify(self.src2)
     )
Exemple #6
0
 def __str__(self):
     return '{} {} {}'.format(
         ozify(self.target),
         '=' if self.is_unify else '<-',
         ozify(self.src)
     )
Exemple #7
0
 def __str__(self):
     return '{} <- {{Object.getClass {}}}'.format(ozify(self.target), ozify(self.src))
Exemple #8
0
 def __str__(self):
     return '{} <- {} {} {}'.format(ozify(self.result),
                                    ozify(self.op1), self.binop, ozify(self.op2))