diff options
author | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-06-21 06:53:46 (GMT) |
---|---|---|
committer | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-06-21 06:53:46 (GMT) |
commit | 1c2472067c3843342f56b5833c284106ab349417 (patch) | |
tree | fd6f914e8cf19337a14b9663b6bda4a6642b8a70 /parser.y | |
parent | e416017c5e0ef689e9fbc43b520632cde7927c26 (diff) |
Clifford Wolf:
Improved backend data structures
Added dump feature to backend data
git-svn-id: http://svn.clifford.at/openscad/trunk@4 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'parser.y')
-rw-r--r-- | parser.y | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -21,15 +21,16 @@ %{ #include "openscad.h" -#include <stdio.h> -extern int parserdebug; int parserlex(void); void yyerror(char const *s); int lexerget_lineno(void); int lexerlex(void); +QVector<Module*> module_stack; +Module *module; + %} %union { @@ -117,3 +118,15 @@ void yyerror (char const *s) exit(1); } +AbstractModule *parse(FILE *f, int debug) +{ + module_stack.clear(); + module = new Module(); + module_stack.append(module); + + parserdebug = debug; + parserparse(); + + return module; +} + |