libTriton
version 1.0 build 1592
Loading...
Searching...
No Matches
src
libtriton
bindings
python
namespaces
initAstNodeNamespace.cpp
Go to the documentation of this file.
1
2
/*
3
** Copyright (C) - Triton
4
**
5
** This program is under the terms of the Apache License 2.0.
6
*/
7
8
#include <
triton/pythonBindings.hpp
>
9
#include <
triton/pythonUtils.hpp
>
10
#include <
triton/pythonXFunctions.hpp
>
11
#include <
triton/ast.hpp
>
12
13
14
89
namespace
triton
{
90
namespace
bindings {
91
namespace
python {
92
93
void
initAstNodeNamespace
(PyObject* astNodeDict) {
94
xPyDict_SetItemString
(astNodeDict,
"ANY"
,
PyLong_FromUint32
(
triton::ast::ANY_NODE
));
95
xPyDict_SetItemString
(astNodeDict,
"ARRAY"
,
PyLong_FromUint32
(
triton::ast::ARRAY_NODE
));
96
xPyDict_SetItemString
(astNodeDict,
"ASSERT"
,
PyLong_FromUint32
(
triton::ast::ASSERT_NODE
));
97
xPyDict_SetItemString
(astNodeDict,
"BSWAP"
,
PyLong_FromUint32
(
triton::ast::BSWAP_NODE
));
98
xPyDict_SetItemString
(astNodeDict,
"BV"
,
PyLong_FromUint32
(
triton::ast::BV_NODE
));
99
xPyDict_SetItemString
(astNodeDict,
"BVADD"
,
PyLong_FromUint32
(
triton::ast::BVADD_NODE
));
100
xPyDict_SetItemString
(astNodeDict,
"BVAND"
,
PyLong_FromUint32
(
triton::ast::BVAND_NODE
));
101
xPyDict_SetItemString
(astNodeDict,
"BVASHR"
,
PyLong_FromUint32
(
triton::ast::BVASHR_NODE
));
102
xPyDict_SetItemString
(astNodeDict,
"BVLSHR"
,
PyLong_FromUint32
(
triton::ast::BVLSHR_NODE
));
103
xPyDict_SetItemString
(astNodeDict,
"BVMUL"
,
PyLong_FromUint32
(
triton::ast::BVMUL_NODE
));
104
xPyDict_SetItemString
(astNodeDict,
"BVNAND"
,
PyLong_FromUint32
(
triton::ast::BVNAND_NODE
));
105
xPyDict_SetItemString
(astNodeDict,
"BVNEG"
,
PyLong_FromUint32
(
triton::ast::BVNEG_NODE
));
106
xPyDict_SetItemString
(astNodeDict,
"BVNOR"
,
PyLong_FromUint32
(
triton::ast::BVNOR_NODE
));
107
xPyDict_SetItemString
(astNodeDict,
"BVNOT"
,
PyLong_FromUint32
(
triton::ast::BVNOT_NODE
));
108
xPyDict_SetItemString
(astNodeDict,
"BVOR"
,
PyLong_FromUint32
(
triton::ast::BVOR_NODE
));
109
xPyDict_SetItemString
(astNodeDict,
"BVROL"
,
PyLong_FromUint32
(
triton::ast::BVROL_NODE
));
110
xPyDict_SetItemString
(astNodeDict,
"BVROR"
,
PyLong_FromUint32
(
triton::ast::BVROR_NODE
));
111
xPyDict_SetItemString
(astNodeDict,
"BVSDIV"
,
PyLong_FromUint32
(
triton::ast::BVSDIV_NODE
));
112
xPyDict_SetItemString
(astNodeDict,
"BVSGE"
,
PyLong_FromUint32
(
triton::ast::BVSGE_NODE
));
113
xPyDict_SetItemString
(astNodeDict,
"BVSGT"
,
PyLong_FromUint32
(
triton::ast::BVSGT_NODE
));
114
xPyDict_SetItemString
(astNodeDict,
"BVSHL"
,
PyLong_FromUint32
(
triton::ast::BVSHL_NODE
));
115
xPyDict_SetItemString
(astNodeDict,
"BVSLE"
,
PyLong_FromUint32
(
triton::ast::BVSLE_NODE
));
116
xPyDict_SetItemString
(astNodeDict,
"BVSLT"
,
PyLong_FromUint32
(
triton::ast::BVSLT_NODE
));
117
xPyDict_SetItemString
(astNodeDict,
"BVSMOD"
,
PyLong_FromUint32
(
triton::ast::BVSMOD_NODE
));
118
xPyDict_SetItemString
(astNodeDict,
"BVSREM"
,
PyLong_FromUint32
(
triton::ast::BVSREM_NODE
));
119
xPyDict_SetItemString
(astNodeDict,
"BVSUB"
,
PyLong_FromUint32
(
triton::ast::BVSUB_NODE
));
120
xPyDict_SetItemString
(astNodeDict,
"BVUDIV"
,
PyLong_FromUint32
(
triton::ast::BVUDIV_NODE
));
121
xPyDict_SetItemString
(astNodeDict,
"BVUGE"
,
PyLong_FromUint32
(
triton::ast::BVUGE_NODE
));
122
xPyDict_SetItemString
(astNodeDict,
"BVUGT"
,
PyLong_FromUint32
(
triton::ast::BVUGT_NODE
));
123
xPyDict_SetItemString
(astNodeDict,
"BVULE"
,
PyLong_FromUint32
(
triton::ast::BVULE_NODE
));
124
xPyDict_SetItemString
(astNodeDict,
"BVULT"
,
PyLong_FromUint32
(
triton::ast::BVULT_NODE
));
125
xPyDict_SetItemString
(astNodeDict,
"BVUREM"
,
PyLong_FromUint32
(
triton::ast::BVUREM_NODE
));
126
xPyDict_SetItemString
(astNodeDict,
"BVXNOR"
,
PyLong_FromUint32
(
triton::ast::BVXNOR_NODE
));
127
xPyDict_SetItemString
(astNodeDict,
"BVXOR"
,
PyLong_FromUint32
(
triton::ast::BVXOR_NODE
));
128
xPyDict_SetItemString
(astNodeDict,
"COMPOUND"
,
PyLong_FromUint32
(
triton::ast::COMPOUND_NODE
));
129
xPyDict_SetItemString
(astNodeDict,
"CONCAT"
,
PyLong_FromUint32
(
triton::ast::CONCAT_NODE
));
130
xPyDict_SetItemString
(astNodeDict,
"DECLARE"
,
PyLong_FromUint32
(
triton::ast::DECLARE_NODE
));
131
xPyDict_SetItemString
(astNodeDict,
"DISTINCT"
,
PyLong_FromUint32
(
triton::ast::DISTINCT_NODE
));
132
xPyDict_SetItemString
(astNodeDict,
"EQUAL"
,
PyLong_FromUint32
(
triton::ast::EQUAL_NODE
));
133
xPyDict_SetItemString
(astNodeDict,
"EXTRACT"
,
PyLong_FromUint32
(
triton::ast::EXTRACT_NODE
));
134
xPyDict_SetItemString
(astNodeDict,
"FORALL"
,
PyLong_FromUint32
(
triton::ast::FORALL_NODE
));
135
xPyDict_SetItemString
(astNodeDict,
"IFF"
,
PyLong_FromUint32
(
triton::ast::IFF_NODE
));
136
xPyDict_SetItemString
(astNodeDict,
"INTEGER"
,
PyLong_FromUint32
(
triton::ast::INTEGER_NODE
));
137
xPyDict_SetItemString
(astNodeDict,
"INVALID"
,
PyLong_FromUint32
(
triton::ast::INVALID_NODE
));
138
xPyDict_SetItemString
(astNodeDict,
"ITE"
,
PyLong_FromUint32
(
triton::ast::ITE_NODE
));
139
xPyDict_SetItemString
(astNodeDict,
"LAND"
,
PyLong_FromUint32
(
triton::ast::LAND_NODE
));
140
xPyDict_SetItemString
(astNodeDict,
"LET"
,
PyLong_FromUint32
(
triton::ast::LET_NODE
));
141
xPyDict_SetItemString
(astNodeDict,
"LNOT"
,
PyLong_FromUint32
(
triton::ast::LNOT_NODE
));
142
xPyDict_SetItemString
(astNodeDict,
"LOR"
,
PyLong_FromUint32
(
triton::ast::LOR_NODE
));
143
xPyDict_SetItemString
(astNodeDict,
"REFERENCE"
,
PyLong_FromUint32
(
triton::ast::REFERENCE_NODE
));
144
xPyDict_SetItemString
(astNodeDict,
"SELECT"
,
PyLong_FromUint32
(
triton::ast::SELECT_NODE
));
145
xPyDict_SetItemString
(astNodeDict,
"STORE"
,
PyLong_FromUint32
(
triton::ast::STORE_NODE
));
146
xPyDict_SetItemString
(astNodeDict,
"STRING"
,
PyLong_FromUint32
(
triton::ast::STRING_NODE
));
147
xPyDict_SetItemString
(astNodeDict,
"SX"
,
PyLong_FromUint32
(
triton::ast::SX_NODE
));
148
xPyDict_SetItemString
(astNodeDict,
"VARIABLE"
,
PyLong_FromUint32
(
triton::ast::VARIABLE_NODE
));
149
xPyDict_SetItemString
(astNodeDict,
"ZX"
,
PyLong_FromUint32
(
triton::ast::ZX_NODE
));
150
}
151
152
};
/* python namespace */
153
};
/* bindings namespace */
154
};
/* triton namespace */
ast.hpp
triton::ast::BVSMOD_NODE
@ BVSMOD_NODE
Definition
astEnums.hpp:52
triton::ast::EQUAL_NODE
@ EQUAL_NODE
Definition
astEnums.hpp:68
triton::ast::INTEGER_NODE
@ INTEGER_NODE
Definition
astEnums.hpp:72
triton::ast::BVSDIV_NODE
@ BVSDIV_NODE
Definition
astEnums.hpp:46
triton::ast::BVROL_NODE
@ BVROL_NODE
Definition
astEnums.hpp:44
triton::ast::BVMUL_NODE
@ BVMUL_NODE
Definition
astEnums.hpp:38
triton::ast::BVNOT_NODE
@ BVNOT_NODE
Definition
astEnums.hpp:42
triton::ast::VARIABLE_NODE
@ VARIABLE_NODE
Definition
astEnums.hpp:82
triton::ast::BVADD_NODE
@ BVADD_NODE
Definition
astEnums.hpp:34
triton::ast::EXTRACT_NODE
@ EXTRACT_NODE
Definition
astEnums.hpp:69
triton::ast::BVXOR_NODE
@ BVXOR_NODE
Definition
astEnums.hpp:62
triton::ast::COMPOUND_NODE
@ COMPOUND_NODE
Definition
astEnums.hpp:64
triton::ast::BVLSHR_NODE
@ BVLSHR_NODE
Definition
astEnums.hpp:37
triton::ast::BVSLE_NODE
@ BVSLE_NODE
Definition
astEnums.hpp:50
triton::ast::ANY_NODE
@ ANY_NODE
Definition
astEnums.hpp:31
triton::ast::IFF_NODE
@ IFF_NODE
Definition
astEnums.hpp:71
triton::ast::LET_NODE
@ LET_NODE
Definition
astEnums.hpp:75
triton::ast::BVUGT_NODE
@ BVUGT_NODE
Definition
astEnums.hpp:57
triton::ast::BVSLT_NODE
@ BVSLT_NODE
Definition
astEnums.hpp:51
triton::ast::BVULE_NODE
@ BVULE_NODE
Definition
astEnums.hpp:58
triton::ast::BVOR_NODE
@ BVOR_NODE
Definition
astEnums.hpp:43
triton::ast::BV_NODE
@ BV_NODE
Definition
astEnums.hpp:63
triton::ast::STRING_NODE
@ STRING_NODE
Definition
astEnums.hpp:80
triton::ast::BVSGE_NODE
@ BVSGE_NODE
Definition
astEnums.hpp:47
triton::ast::INVALID_NODE
@ INVALID_NODE
Definition
astEnums.hpp:30
triton::ast::BVAND_NODE
@ BVAND_NODE
Definition
astEnums.hpp:35
triton::ast::BVNOR_NODE
@ BVNOR_NODE
Definition
astEnums.hpp:41
triton::ast::BVULT_NODE
@ BVULT_NODE
Definition
astEnums.hpp:59
triton::ast::LAND_NODE
@ LAND_NODE
Definition
astEnums.hpp:74
triton::ast::FORALL_NODE
@ FORALL_NODE
Definition
astEnums.hpp:70
triton::ast::BVASHR_NODE
@ BVASHR_NODE
Definition
astEnums.hpp:36
triton::ast::LOR_NODE
@ LOR_NODE
Definition
astEnums.hpp:77
triton::ast::BVSGT_NODE
@ BVSGT_NODE
Definition
astEnums.hpp:48
triton::ast::LNOT_NODE
@ LNOT_NODE
Definition
astEnums.hpp:76
triton::ast::BVUREM_NODE
@ BVUREM_NODE
Definition
astEnums.hpp:60
triton::ast::BVUDIV_NODE
@ BVUDIV_NODE
Definition
astEnums.hpp:55
triton::ast::BVNEG_NODE
@ BVNEG_NODE
Definition
astEnums.hpp:40
triton::ast::ZX_NODE
@ ZX_NODE
Definition
astEnums.hpp:83
triton::ast::ITE_NODE
@ ITE_NODE
Definition
astEnums.hpp:73
triton::ast::CONCAT_NODE
@ CONCAT_NODE
Definition
astEnums.hpp:65
triton::ast::DISTINCT_NODE
@ DISTINCT_NODE
Definition
astEnums.hpp:67
triton::ast::SELECT_NODE
@ SELECT_NODE
Definition
astEnums.hpp:85
triton::ast::BVUGE_NODE
@ BVUGE_NODE
Definition
astEnums.hpp:56
triton::ast::DECLARE_NODE
@ DECLARE_NODE
Definition
astEnums.hpp:66
triton::ast::BVNAND_NODE
@ BVNAND_NODE
Definition
astEnums.hpp:39
triton::ast::BVXNOR_NODE
@ BVXNOR_NODE
Definition
astEnums.hpp:61
triton::ast::STORE_NODE
@ STORE_NODE
Definition
astEnums.hpp:86
triton::ast::BVSUB_NODE
@ BVSUB_NODE
Definition
astEnums.hpp:54
triton::ast::ARRAY_NODE
@ ARRAY_NODE
Definition
astEnums.hpp:84
triton::ast::BSWAP_NODE
@ BSWAP_NODE
Definition
astEnums.hpp:33
triton::ast::BVROR_NODE
@ BVROR_NODE
Definition
astEnums.hpp:45
triton::ast::SX_NODE
@ SX_NODE
Definition
astEnums.hpp:81
triton::ast::REFERENCE_NODE
@ REFERENCE_NODE
Definition
astEnums.hpp:79
triton::ast::BVSHL_NODE
@ BVSHL_NODE
Definition
astEnums.hpp:49
triton::ast::ASSERT_NODE
@ ASSERT_NODE
Definition
astEnums.hpp:32
triton::ast::BVSREM_NODE
@ BVSREM_NODE
Definition
astEnums.hpp:53
triton::bindings::python::initAstNodeNamespace
void initAstNodeNamespace(PyObject *astNodeDict)
Initializes the AST_NODE python namespace.
Definition
initAstNodeNamespace.cpp:93
triton::bindings::python::PyLong_FromUint32
PyObject * PyLong_FromUint32(triton::uint32 value)
Returns a pyObject from a triton::uint32.
Definition
utils.cpp:322
triton::bindings::python::xPyDict_SetItemString
int xPyDict_SetItemString(PyObject *p, const char *key, PyObject *val)
Same as PyDict_SetItemString but decrements reference on object.
Definition
pyXFunctions.cpp:72
triton
The Triton namespace.
Definition
architecture.cpp:27
pythonBindings.hpp
pythonUtils.hpp
pythonXFunctions.hpp
Generated by
1.10.0