diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-12-23 01:02:51 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-12-23 01:02:51 -0700 |
commit | d7c0a793787eaf52c4302d6d1ea6cc43f7ff9ca7 (patch) | |
tree | ff702f7ef133e80eedb6943b1c0f07f5e7fce1c7 /src/parser.y | |
parent | 7a53f0e95a5ffe13a21fc8d2076e34ee96693ac0 (diff) | |
download | stage-d7c0a793787eaf52c4302d6d1ea6cc43f7ff9ca7.tar.gz stage-d7c0a793787eaf52c4302d6d1ea6cc43f7ff9ca7.tar.bz2 stage-d7c0a793787eaf52c4302d6d1ea6cc43f7ff9ca7.tar.xz stage-d7c0a793787eaf52c4302d6d1ea6cc43f7ff9ca7.zip |
global section is optional now.
Diffstat (limited to 'src/parser.y')
-rw-r--r-- | src/parser.y | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/parser.y b/src/parser.y index 8e198c8..0b1d41b 100644 --- a/src/parser.y +++ b/src/parser.y | |||
@@ -90,8 +90,9 @@ gameDecls: | |||
90 | | gameDecls tokGame '.' tokIdent '=' literal ';' { bld.setGameParam( *($4) ); } | 90 | | gameDecls tokGame '.' tokIdent '=' literal ';' { bld.setGameParam( *($4) ); } |
91 | ; | 91 | ; |
92 | 92 | ||
93 | globalDecl: tokGlobal '{' globalExprList '}' | 93 | globalDecl: |
94 | ; | 94 | | tokGlobal '{' globalExprList '}' |
95 | ; | ||
95 | 96 | ||
96 | globalExprList: | 97 | globalExprList: |
97 | | globalExprList cmpltGlobalExpr | 98 | | globalExprList cmpltGlobalExpr |
@@ -109,7 +110,7 @@ bodyDecl: | |||
109 | | bodyDecl function | 110 | | bodyDecl function |
110 | ; | 111 | ; |
111 | 112 | ||
112 | situation: tokSituation tokSituationName { printf("Read situtaion: %s\n", (*$2).getStr() ); } '{' situationMembers '}' | 113 | situation: tokSituation tokSituationName { bld.beginSituation( *($2) ); } '{' situationMembers '}' { bld.endSituation(); } |
113 | ; | 114 | ; |
114 | 115 | ||
115 | situationMembers: | 116 | situationMembers: |
@@ -124,7 +125,7 @@ situationMode: tokSetup | |||
124 | | tokEnter | 125 | | tokEnter |
125 | ; | 126 | ; |
126 | 127 | ||
127 | function: tokFunction tokIdent '(' ')' '{' '}' | 128 | function: tokFunction tokIdent { bld.beginFunction( *($2) ); } '(' ')' '{' '}' { bld.endFunction(); } |
128 | ; | 129 | ; |
129 | 130 | ||
130 | cmpltExprList: | 131 | cmpltExprList: |