def __str__(self): sb = String_Builder() sb.append("Unary_Expr: ( ") sb.append(str(self.op_str)) sb.append(" ") sb.append(str(self.rhs_expr)) sb.append(" ) ") return str(sb)
def __str__(self): sb = String_Builder() for stmt in self.stmts: # print(type(stmt)) sb.append(str(stmt) + "\n") return str(sb)
def __str__(self): sb = String_Builder() sb.append("Tuple_Val: ( ") sb.append(str(self.expr_list)) sb.append(" )") return str(sb)
def __str__(self): sb = String_Builder() sb.append("Meta_Id_Val: ( ") sb.append(self.var_id) sb.append(" )") return str(sb)
def __str__(self): # abbreviated version of the Signal for the parser display signal_time_bound = self.get_time_bound(self.signal_dict) sb = String_Builder() sb.append("SIGNAL") sb.append("[") sb.append(str(signal_time_bound[0])) sb.append(", ") sb.append(str(signal_time_bound[1])) sb.append("](") sb.append(str(len(self))) sb.append(")") return str(sb)
def to_str(self): # display the time bound, the length and the internal representation of the signal # when printing it signal_time_bound = self.get_time_bound(self.signal_dict) sb = String_Builder() sb.append("SIGNAL") sb.append("[") sb.append(str(signal_time_bound[0])) sb.append(", ") sb.append(str(signal_time_bound[1])) sb.append("](") sb.append(str(len(self))) sb.append(") :: ") sb.append(str(self.signal_dict)) return str(sb)
def __str__(self): sb = String_Builder() sb.append("Variable_Decl_Stmt: ( ") sb.append(str(self.decl_type)) sb.append(" ") sb.append(str(self.var_id_val)) sb.append(": ") sb.append(str(self.var_type)) sb.append(" = ") sb.append(str(self.rhs_expr)) sb.append(" )") return str(sb)
def __str__(self): sb = String_Builder() sb.append("Block_Stmt: (\n") sb.append(str(self.stmt_list)) sb.append(")") return str(sb)
def __str__(self): sb = String_Builder() sb.append("Print_Stmt: ( ") sb.append(str(self.expr)) sb.append(", ") sb.append(str(self.token_type)) sb.append(" )") return str(sb) # /stmt implementation
def __str__(self): sb = String_Builder() sb.append("Assign_Stmt: ( ") sb.append(str(self.var_id_expr)) sb.append(" = ") sb.append(str(self.rhs_expr)) sb.append(" )") return str(sb)
def __str__(self): sb = String_Builder() sb.append("While_Stmt: ( ") sb.append(str(self.condition_expr)) sb.append(" ) { ") sb.append(str(self.body_block)) sb.append(" }") return str(sb)
def __str__(self): sb = String_Builder() sb.append("Binary_STL_Expr: ( ") sb.append("(") sb.append(str(self.begin_condition_expr)) sb.append(") ") sb.append(self.op) sb.append(" [") sb.append(str(self.begin_expr)) sb.append(", ") sb.append(str(self.end_expr)) sb.append("] (") sb.append(str(self.end_condition_expr)) sb.append(") (") sb.append(str(self.time_expr)) sb.append(", ") sb.append(str(self.signal_val)) sb.append(") )") return str(sb)
def __str__(self): sb = String_Builder() sb.append("Unary_STL_Expr: ( ") sb.append(self.op) sb.append(" [") sb.append(str(self.time_interval_expr)) sb.append("] (") sb.append(str(self.condition_expr)) sb.append(") (") sb.append(str(self.time_expr)) sb.append(", ") sb.append(str(self.signal_val)) sb.append(") )") return str(sb)
def __str__(self): sb = String_Builder() sb.append("Val: ( ") sb.append(str(self.value)) sb.append(", ") sb.append(str(self.value_type)) sb.append(" )") return str(sb)