diff options
author | Mike Buland <eichlan@xagasoft.com> | 2006-08-21 05:54:52 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2006-08-21 05:54:52 +0000 |
commit | 4887f62bea708f24e03b3f926f2698c60a94c807 (patch) | |
tree | 77271e92cf517cbc2846897f7482c9df5efee124 /src/builder.cpp | |
parent | df5286fe3bca619beb4771da1ffa8ace9613e9e5 (diff) | |
download | build-4887f62bea708f24e03b3f926f2698c60a94c807.tar.gz build-4887f62bea708f24e03b3f926f2698c60a94c807.tar.bz2 build-4887f62bea708f24e03b3f926f2698c60a94c807.tar.xz build-4887f62bea708f24e03b3f926f2698c60a94c807.zip |
Getting there, it compiles, now for the fun sophisticated pieces where the
builder itself tells the lexer which tokens are functions, and which are target
types.
Diffstat (limited to 'src/builder.cpp')
-rw-r--r-- | src/builder.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/builder.cpp b/src/builder.cpp new file mode 100644 index 0000000..1ecbf05 --- /dev/null +++ b/src/builder.cpp | |||
@@ -0,0 +1,30 @@ | |||
1 | #include "builder.h" | ||
2 | |||
3 | Builder::Builder() | ||
4 | { | ||
5 | } | ||
6 | |||
7 | Builder::~Builder() | ||
8 | { | ||
9 | } | ||
10 | |||
11 | void yyparse( Builder &bld ); | ||
12 | |||
13 | void Builder::load( const std::string &sFile ) | ||
14 | { | ||
15 | file = sFile; | ||
16 | scanBegin(); | ||
17 | yyparse( *this ); | ||
18 | scanEnd(); | ||
19 | } | ||
20 | |||
21 | void Builder::error( YYLTYPE *locp, const char *msg ) | ||
22 | { | ||
23 | printf("%s\n", msg ); | ||
24 | } | ||
25 | |||
26 | void Builder::error( const std::string &msg ) | ||
27 | { | ||
28 | printf("%s\n", msg.c_str() ); | ||
29 | } | ||
30 | |||