Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
    def __str__(self):
        sb = String_Builder()

        for stmt in self.stmts:
            # print(type(stmt))
            sb.append(str(stmt) + "\n")

        return str(sb)
Exemplo n.º 3
0
    def __str__(self):
        sb = String_Builder()
        sb.append("Tuple_Val: ( ")
        sb.append(str(self.expr_list))
        sb.append(" )")

        return str(sb)
Exemplo n.º 4
0
    def __str__(self):
        sb = String_Builder()
        sb.append("Meta_Id_Val: ( ")
        sb.append(self.var_id)
        sb.append(" )")

        return str(sb)
Exemplo n.º 5
0
    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)
Exemplo n.º 6
0
    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)
Exemplo n.º 7
0
 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)
Exemplo n.º 8
0
 def __str__(self):
     sb = String_Builder()
     sb.append("Block_Stmt: (\n")
     sb.append(str(self.stmt_list))
     sb.append(")")
     return str(sb)
Exemplo n.º 9
0
    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
Exemplo n.º 10
0
    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)
Exemplo n.º 11
0
    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)
Exemplo n.º 12
0
    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)
Exemplo n.º 13
0
    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)
Exemplo n.º 14
0
 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)