summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/parser.y9
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
93globalDecl: tokGlobal '{' globalExprList '}' 93globalDecl:
94 ; 94 | tokGlobal '{' globalExprList '}'
95 ;
95 96
96globalExprList: 97globalExprList:
97 | globalExprList cmpltGlobalExpr 98 | globalExprList cmpltGlobalExpr
@@ -109,7 +110,7 @@ bodyDecl:
109 | bodyDecl function 110 | bodyDecl function
110 ; 111 ;
111 112
112situation: tokSituation tokSituationName { printf("Read situtaion: %s\n", (*$2).getStr() ); } '{' situationMembers '}' 113situation: tokSituation tokSituationName { bld.beginSituation( *($2) ); } '{' situationMembers '}' { bld.endSituation(); }
113 ; 114 ;
114 115
115situationMembers: 116situationMembers:
@@ -124,7 +125,7 @@ situationMode: tokSetup
124 | tokEnter 125 | tokEnter
125 ; 126 ;
126 127
127function: tokFunction tokIdent '(' ')' '{' '}' 128function: tokFunction tokIdent { bld.beginFunction( *($2) ); } '(' ')' '{' '}' { bld.endFunction(); }
128 ; 129 ;
129 130
130cmpltExprList: 131cmpltExprList: