summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-09 20:29:35 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-09 20:29:35 +0300
commit7744c07ec30e671a267929dde70277783a0447ed (patch)
treed3a30acba587dcf507161b1c714950873fa01466 /src
parent21bf666f861ffc3429459663af449a31efb25257 (diff)
downloadparanucker-7744c07ec30e671a267929dde70277783a0447ed.tar.gz
paranucker-7744c07ec30e671a267929dde70277783a0447ed.tar.bz2
paranucker-7744c07ec30e671a267929dde70277783a0447ed.tar.xz
paranucker-7744c07ec30e671a267929dde70277783a0447ed.zip
Add parsing node POINTER_PLUS_EXPR.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.files4
-rw-r--r--src/includes/nodeincludes.h1
-rw-r--r--src/includes/nodeshandling.inc1
-rw-r--r--src/includes/parserdefines.inc1
-rw-r--r--src/nodes/expr/pointerplus_expr.h35
-rw-r--r--src/parsers/expr/pointerplus_expr.cpp39
6 files changed, 80 insertions, 1 deletions
diff --git a/src/Makefile.files b/src/Makefile.files
index bf8669b..a84d6f6 100644
--- a/src/Makefile.files
+++ b/src/Makefile.files
@@ -109,4 +109,6 @@ SRC = analysis/analysis.cpp \
nodes/expr/nop_expr.h \
parsers/expr/nop_expr.cpp \
nodes/expr/cond_expr.h \
- parsers/expr/cond_expr.cpp \ No newline at end of file
+ parsers/expr/cond_expr.cpp \
+ nodes/expr/pointerplus_expr.h \
+ parsers/expr/pointerplus_expr.cpp \ No newline at end of file
diff --git a/src/includes/nodeincludes.h b/src/includes/nodeincludes.h
index a1799bc..12ecde1 100644
--- a/src/includes/nodeincludes.h
+++ b/src/includes/nodeincludes.h
@@ -38,3 +38,4 @@
#include "nodes/expr/loop_expr.h"
#include "nodes/expr/nop_expr.h"
#include "nodes/expr/cond_expr.h"
+#include "nodes/expr/pointerplus_expr.h"
diff --git a/src/includes/nodeshandling.inc b/src/includes/nodeshandling.inc
index 4580f9a..2ee25d0 100644
--- a/src/includes/nodeshandling.inc
+++ b/src/includes/nodeshandling.inc
@@ -37,3 +37,4 @@ handleNodeType(INDIRECT_REF, IndirectRef)
handleNodeType(LOOP_EXPR, LoopExpr)
handleNodeType(NOP_EXPR, NopExpr)
handleNodeType(COND_EXPR, CondExpr)
+handleNodeType(POINTER_PLUS_EXPR, PointerPlusExpr)
diff --git a/src/includes/parserdefines.inc b/src/includes/parserdefines.inc
index d00b8cc..48e74f9 100644
--- a/src/includes/parserdefines.inc
+++ b/src/includes/parserdefines.inc
@@ -37,3 +37,4 @@ parserDefine(IndirectRef);
parserDefine(LoopExpr);
parserDefine(NopExpr);
parserDefine(CondExpr);
+parserDefine(PointerPlusExpr);
diff --git a/src/nodes/expr/pointerplus_expr.h b/src/nodes/expr/pointerplus_expr.h
new file mode 100644
index 0000000..f238e17
--- /dev/null
+++ b/src/nodes/expr/pointerplus_expr.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2015 Andrei Karas
+ *
+ * This file is part of AstDumper.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NODES_EXPR_POINTERPLUSEXPRNODE_H
+#define NODES_EXPR_POINTERPLUSEXPRNODE_H
+
+#include "nodes/base/expr.h"
+
+#include <string>
+
+struct PointerPlusExprNode : public ExprNode
+{
+ PointerPlusExprNode() :
+ ExprNode()
+ {
+ }
+};
+
+#endif // NODES_EXPR_POINTERPLUSEXPRNODE_H
diff --git a/src/parsers/expr/pointerplus_expr.cpp b/src/parsers/expr/pointerplus_expr.cpp
new file mode 100644
index 0000000..3dce95b
--- /dev/null
+++ b/src/parsers/expr/pointerplus_expr.cpp
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2015 Andrei Karas
+ *
+ * This file is part of AstDumper.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "includes/parserincludes.h"
+
+parserDefine(PointerPlusExpr);
+
+#include "parsers/base/expr.h"
+
+#include "nodes/expr/pointerplus_expr.h"
+
+namespace Generic
+{
+
+void parsePointerPlusExprNode(PointerPlusExprNode *node)
+{
+ fillType(node);
+ Log::dump(node);
+
+ fillExprOperands(node);
+}
+
+}