aboutsummaryrefslogtreecommitdiffstats
path: root/c_compiler/src/c_parser.y
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-03-10 12:48:53 +0000
committerYann Herklotz <ymherklotz@gmail.com>2017-03-10 12:48:53 +0000
commit28251a0c6f4e31c63c12746ffa77e05c669ef80d (patch)
treee1a9dfad8db410a0ae0db0e56f1bfc9accac6262 /c_compiler/src/c_parser.y
parent3e145bf08b1ffcccb4df8f2fc34f5bb95b5b250c (diff)
downloadCompiler-28251a0c6f4e31c63c12746ffa77e05c669ef80d.tar.gz
Compiler-28251a0c6f4e31c63c12746ffa77e05c669ef80d.zip
Changing printasm
Diffstat (limited to 'c_compiler/src/c_parser.y')
-rw-r--r--c_compiler/src/c_parser.y15
1 files changed, 11 insertions, 4 deletions
diff --git a/c_compiler/src/c_parser.y b/c_compiler/src/c_parser.y
index 5866c57..a42463c 100644
--- a/c_compiler/src/c_parser.y
+++ b/c_compiler/src/c_parser.y
@@ -1,8 +1,15 @@
%code requires{
-#include "ast.hpp"
+#include "node.hpp"
+#include "translation_unit.hpp"
+#include "function.hpp"
+#include "declaration.hpp"
+#include "statement.hpp"
+#include "expression.hpp"
+#include "type.hpp"
-extern TranslationUnit* g_root; // A way of getting the AST out
+
+extern Node* g_root; // A way of getting the AST out
//! This is to fix problems when generating C++
// We are declaring the functions provided by Flex, so
@@ -338,9 +345,9 @@ Constant:
%%
-TranslationUnit* g_root; // Definition of variable (to match declaration earlier)
+Node* g_root; // Definition of variable (to match declaration earlier)
-TranslationUnit* parseAST() {
+Node* parseAST() {
g_root = 0;
yyparse();
return g_root;