1 |
|
/****************************************************************************** |
2 |
|
* Top contributors (to current version): |
3 |
|
* Andrew Reynolds |
4 |
|
* |
5 |
|
* This file is part of the cvc5 project. |
6 |
|
* |
7 |
|
* Copyright (c) 2009-2021 by the authors listed in the file AUTHORS |
8 |
|
* in the top-level source directory and their institutional affiliations. |
9 |
|
* All rights reserved. See the file COPYING in the top-level source |
10 |
|
* directory for licensing information. |
11 |
|
* **************************************************************************** |
12 |
|
* |
13 |
|
* Implementation for parsed operators. |
14 |
|
*/ |
15 |
|
|
16 |
|
#include "parser/parse_op.h" |
17 |
|
|
18 |
|
namespace cvc5 { |
19 |
|
|
20 |
|
std::ostream& operator<<(std::ostream& os, const ParseOp& p) |
21 |
|
{ |
22 |
|
std::stringstream out; |
23 |
|
out << "(ParseOp"; |
24 |
|
if (!p.d_expr.isNull()) |
25 |
|
{ |
26 |
|
out << " :expr " << p.d_expr; |
27 |
|
} |
28 |
|
if (!p.d_op.isNull()) |
29 |
|
{ |
30 |
|
out << " :op " << p.d_op; |
31 |
|
} |
32 |
|
if (p.d_kind != api::NULL_EXPR) |
33 |
|
{ |
34 |
|
out << " :kind " << p.d_kind; |
35 |
|
} |
36 |
|
if (!p.d_type.isNull()) |
37 |
|
{ |
38 |
|
out << " :type " << p.d_type; |
39 |
|
} |
40 |
|
if (!p.d_name.empty()) |
41 |
|
{ |
42 |
|
out << " :name " << p.d_name; |
43 |
|
} |
44 |
|
out << ")"; |
45 |
|
return os << out.str(); |
46 |
|
} |
47 |
|
|
48 |
|
} // namespace cvc5 |