diff options
Diffstat (limited to 'c_compiler/src/c_parser.y')
-rw-r--r-- | c_compiler/src/c_parser.y | 15 |
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; |