aboutsummaryrefslogtreecommitdiff
path: root/src/builder.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/builder.h')
-rw-r--r--src/builder.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/builder.h b/src/builder.h
index a6f88f4..1d126dc 100644
--- a/src/builder.h
+++ b/src/builder.h
@@ -3,6 +3,8 @@
3 3
4#include <stdint.h> 4#include <stdint.h>
5#include <string> 5#include <string>
6#include <list>
7#include <utility>
6#include "build.tab.h" 8#include "build.tab.h"
7#include "exceptions.h" 9#include "exceptions.h"
8 10
@@ -19,6 +21,8 @@ YY_DECL;
19 21
20subExceptionDecl( BuildException ); 22subExceptionDecl( BuildException );
21 23
24typedef std::list<std::string> StringList;
25
22class Builder 26class Builder
23{ 27{
24public: 28public:
@@ -30,7 +34,6 @@ public:
30 34
31 void load( const std::string &sFile ); 35 void load( const std::string &sFile );
32 36
33
34private: 37private:
35 std::string file; 38 std::string file;
36 void scanBegin(); 39 void scanBegin();
@@ -66,10 +69,30 @@ public: // List functions
66 void addListString( const char *str ); 69 void addListString( const char *str );
67 void addListFunc(); 70 void addListFunc();
68 71
72 typedef std::pair<std::string, Function *> BuildListItem;
73 typedef std::list<BuildListItem> BuildList;
74
75 StringList buildToStringList( BuildList &lSrc, StringList &lIn );
76
77private:
78 BuildList lTmp;
79
69public: // Functions for dealing with rules 80public: // Functions for dealing with rules
81
82public: // Functions for dealing with actions
70 void addAction(); 83 void addAction();
71 void addAction( const char *sName ); 84 void addAction( const char *sName );
72 void addCommand( int nType ); 85 void addCommand( int nType );
86
87private: // Action variables
88 typedef std::pair<int, BuildList> ActionTmpCmd;
89 typedef std::list<ActionTmpCmd> ActionTmpCmdList;
90 typedef std::pair<std::string, ActionTmpCmdList> ActionTmp;
91 typedef std::list<ActionTmp> ActionTmpList;
92 ActionTmpList lActions;
93
94public: // Debug
95 void debugDump();
73}; 96};
74 97
75#endif 98#endif