diff options
-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: |