summaryrefslogtreecommitdiff
path: root/src/parser.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.y')
-rw-r--r--src/parser.y10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/parser.y b/src/parser.y
index 9fb2be9..7242df0 100644
--- a/src/parser.y
+++ b/src/parser.y
@@ -24,6 +24,7 @@ void yyerror( const char *error ) { printf("%s\n", error ); }
24%token tokIf 24%token tokIf
25%token tokThen 25%token tokThen
26%token tokElse 26%token tokElse
27%token tokNot
27%token tokCommand 28%token tokCommand
28%token <sValue> tokSituationName 29%token <sValue> tokSituationName
29%token <sValue> tokIdent 30%token <sValue> tokIdent
@@ -54,6 +55,7 @@ gameExprList:
54 ; 55 ;
55 56
56cmpltGameExpr: gameExpr ';' 57cmpltGameExpr: gameExpr ';'
58 | commandDecl
57 ; 59 ;
58 60
59gameExpr: tokIdent '=' expr 61gameExpr: tokIdent '=' expr
@@ -103,6 +105,14 @@ listValues: expr
103dictValues: expr ':' expr 105dictValues: expr ':' expr
104 | dictValues ',' expr ':' expr 106 | dictValues ',' expr ':' expr
105 ; 107 ;
108
109commandDecl: tokCommand ':' tokString commandParamList '{' '}'
110 ;
111
112commandParamList:
113 | commandParamList tokString
114 | commandParamList tokIdent
115 ;
106%% 116%%
107 117
108int main() 118int main()