def print(self): TokList.printIndent() print('while ', end='') self.cond.print() print(' begin') TokList.increaseIndent() self.stmt_seq.print() TokList.decreaseIndent() TokList.printIndent() print('endwhile;')
def print(self): TokList.printIndent() print('case ', end='') self.id.print() print(' of') TokList.increaseIndent() TokList.printIndent() self.case_line.print() #Necessary for new line printings print() TokList.printIndent() print('else ', end='') self.expr.print() print() TokList.decreaseIndent() TokList.printIndent() print('end;')
def print(self): TokList.printIndent() print('if ', end='') self.cond.print() print(' then') TokList.increaseIndent() self.stmt_seq_then.print() if self.stmt_seq_else is not None: TokList.decreaseIndent() TokList.printIndent() print('else') TokList.increaseIndent() self.stmt_seq_else.print() TokList.decreaseIndent() TokList.printIndent() print('endif;')
def print(self): TokList.printIndent() print('input ', end='') self.idList.print() print(';')
def print(self): TokList.printIndent() print('output ', end='') self.expr.print() print(';')
def print(self): TokList.printIndent() self.id.print() print(':=', end='') self.expr.print() print(';')
def print(self): TokList.printIndent() self.decl.print() print(';') if self.decl_seq is not None: self.decl_seq.print()
def print(self): if self.caseLine is not None: print() TokList.printIndent() print('|', end='') self.caseLine.print()