cprover
|
Expression Pretty Printing. More...
#include "format_expr.h"
#include "arith_tools.h"
#include "byte_operators.h"
#include "expr.h"
#include "expr_iterator.h"
#include "fixedbv.h"
#include "format_type.h"
#include "ieee_float.h"
#include "invariant.h"
#include "mathematical_expr.h"
#include "mp_arith.h"
#include "rational.h"
#include "rational_tools.h"
#include "std_code.h"
#include "std_expr.h"
#include "string2int.h"
#include "string_utils.h"
#include <map>
#include <ostream>
#include <stack>
Go to the source code of this file.
Classes | |
struct | infix_opt |
Functions | |
static bool | bracket_subexpression (const exprt &sub_expr, const exprt &expr) |
We use the precendences that most readers expect (i.e., the ones you learn in primary school), and stay clear of the surprising ones that C has. More... | |
static std::ostream & | format_rec (std::ostream &os, const multi_ary_exprt &src) |
This formats a multi-ary expression, adding parentheses where indicated by bracket_subexpression. More... | |
static std::ostream & | format_rec (std::ostream &os, const binary_exprt &src) |
This formats a binary expression, which we do as for multi-ary expressions. More... | |
static std::ostream & | format_rec (std::ostream &os, const unary_exprt &src) |
This formats a unary expression, adding parentheses very aggressively. More... | |
static std::ostream & | format_rec (std::ostream &os, const constant_exprt &src) |
This formats a constant. More... | |
std::ostream & | fallback_format_rec (std::ostream &os, const exprt &expr) |
std::ostream & | format_rec (std::ostream &os, const exprt &expr) |
Formats an expression in a generic syntax that is inspired by C/C++/Java, and is meant for debugging. More... | |
Variables | |
const std::map< irep_idt, infix_opt > | infix_map |
Expression Pretty Printing.
Definition in file format_expr.cpp.
We use the precendences that most readers expect (i.e., the ones you learn in primary school), and stay clear of the surprising ones that C has.
Definition at line 61 of file format_expr.cpp.
std::ostream& fallback_format_rec | ( | std::ostream & | os, |
const exprt & | expr | ||
) |
Definition at line 191 of file format_expr.cpp.
|
static |
This formats a binary expression, which we do as for multi-ary expressions.
Definition at line 141 of file format_expr.cpp.
|
static |
This formats a constant.
Definition at line 164 of file format_expr.cpp.
std::ostream& format_rec | ( | std::ostream & | os, |
const exprt & | expr | ||
) |
Formats an expression in a generic syntax that is inspired by C/C++/Java, and is meant for debugging.
Definition at line 223 of file format_expr.cpp.
|
static |
This formats a multi-ary expression, adding parentheses where indicated by bracket_subexpression.
Definition at line 101 of file format_expr.cpp.
|
static |
This formats a unary expression, adding parentheses very aggressively.
Definition at line 148 of file format_expr.cpp.
Definition at line 41 of file format_expr.cpp.