summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-12-27 00:04:28 -0700
committerMike Buland <eichlan@xagasoft.com>2011-12-27 00:04:28 -0700
commitf33fdd93ef93fdbb0e6b3a8e2ecb80b78f1b2816 (patch)
tree3e62207265b4efbbe1565ea885a615e5a910671c /src/main.cpp
parent32c32bc48c8fd7cffca301b8919fb26726f6467e (diff)
downloadstage-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.cpp7
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;
5void yylex_init( yyscan_t * ); 5void yylex_init( yyscan_t * );
6void yylex_destroy( yyscan_t ); 6void yylex_destroy( yyscan_t );
7void yyparse( yyscan_t, GameBuilder &bld ); 7void yyparse( yyscan_t, GameBuilder &bld );
8void yyset_in( FILE *, yyscan_t );
8 9
9int main( int argc, char *argv[] ) 10int 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