diff options
Diffstat (limited to 'src/builder.cpp')
-rw-r--r-- | src/builder.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/builder.cpp b/src/builder.cpp new file mode 100644 index 0000000..8c72fef --- /dev/null +++ b/src/builder.cpp | |||
@@ -0,0 +1,34 @@ | |||
1 | #include <iostream> | ||
2 | |||
3 | #include "builder.h" | ||
4 | #include "build.tab.h" | ||
5 | |||
6 | Builder::Builder() | ||
7 | { | ||
8 | } | ||
9 | |||
10 | Builder::~Builder() | ||
11 | { | ||
12 | } | ||
13 | |||
14 | void Builder::load( const char *sFN ) | ||
15 | { | ||
16 | file = sFN; | ||
17 | |||
18 | scanBegin(); | ||
19 | yy::BuildParser parser( *this ); | ||
20 | parser.set_debug_level( false ); | ||
21 | parser.parse(); | ||
22 | scanEnd(); | ||
23 | } | ||
24 | |||
25 | void Builder::error( const yy::location &l, const std::string &m ) | ||
26 | { | ||
27 | std::cerr << l << ": " << m << std::endl; | ||
28 | } | ||
29 | |||
30 | void Builder::error( const std::string &m ) | ||
31 | { | ||
32 | std::cerr << m << std::endl; | ||
33 | } | ||
34 | |||