diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-12-27 00:04:28 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-12-27 00:04:28 -0700 |
commit | f33fdd93ef93fdbb0e6b3a8e2ecb80b78f1b2816 (patch) | |
tree | 3e62207265b4efbbe1565ea885a615e5a910671c /src/main.cpp | |
parent | 32c32bc48c8fd7cffca301b8919fb26726f6467e (diff) | |
download | stage-f33fdd93ef93fdbb0e6b3a8e2ecb80b78f1b2816.tar.gz stage-f33fdd93ef93fdbb0e6b3a8e2ecb80b78f1b2816.tar.bz2 stage-f33fdd93ef93fdbb0e6b3a8e2ecb80b78f1b2816.tar.xz stage-f33fdd93ef93fdbb0e6b3a8e2ecb80b78f1b2816.zip |
Branch building has started.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 1adb55f..609802c 100644 --- a/src/main.cpp +++ b/src/main.cpp | |||
@@ -5,6 +5,7 @@ typedef void *yyscan_t; | |||
5 | void yylex_init( yyscan_t * ); | 5 | void yylex_init( yyscan_t * ); |
6 | void yylex_destroy( yyscan_t ); | 6 | void yylex_destroy( yyscan_t ); |
7 | void yyparse( yyscan_t, GameBuilder &bld ); | 7 | void yyparse( yyscan_t, GameBuilder &bld ); |
8 | void yyset_in( FILE *, yyscan_t ); | ||
8 | 9 | ||
9 | int main( int argc, char *argv[] ) | 10 | int main( int argc, char *argv[] ) |
10 | { | 11 | { |
@@ -13,9 +14,15 @@ int main( int argc, char *argv[] ) | |||
13 | GameBuilder bld; | 14 | GameBuilder bld; |
14 | 15 | ||
15 | yylex_init( &scanner ); | 16 | yylex_init( &scanner ); |
17 | |||
18 | FILE *in = fopen( argv[1], "rb" ); | ||
19 | yyset_in( in, scanner ); | ||
20 | |||
16 | yyparse( scanner, bld ); | 21 | yyparse( scanner, bld ); |
17 | yylex_destroy( scanner ); | 22 | yylex_destroy( scanner ); |
18 | 23 | ||
24 | fclose( in ); | ||
25 | |||
19 | return 0; | 26 | return 0; |
20 | } | 27 | } |
21 | 28 | ||