diff options
Diffstat (limited to 'src/parser.y')
-rw-r--r-- | src/parser.y | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/parser.y b/src/parser.y index f01e0e4..707d85d 100644 --- a/src/parser.y +++ b/src/parser.y | |||
@@ -82,9 +82,9 @@ void yyerror( YYLTYPE *llocp, yyscan_t yyscanner, GameBuilder &, const char *err | |||
82 | 82 | ||
83 | %left NOT | 83 | %left NOT |
84 | %right '=' tokPlusAssign tokMinusAssign tokTimesAssign tokDivideAssign | 84 | %right '=' tokPlusAssign tokMinusAssign tokTimesAssign tokDivideAssign |
85 | %left tokIn tokAnd tokOr | ||
85 | %left '-' '+' | 86 | %left '-' '+' |
86 | %left '*' '/' | 87 | %left '*' '/' |
87 | %left tokIn tokAnd tokOr | ||
88 | %right '<' '>' tokLtEq tokGtEq tokCmp | 88 | %right '<' '>' tokLtEq tokGtEq tokCmp |
89 | %left '(' ')' '[' ']' | 89 | %left '(' ')' '[' ']' |
90 | %left NEG | 90 | %left NEG |
@@ -229,8 +229,8 @@ expr: literal | |||
229 | | expr '[' expr ']' | 229 | | expr '[' expr ']' |
230 | | '[' ']' { bld.addLiteral( Variable( Variable::tList ) ); } | 230 | | '[' ']' { bld.addLiteral( Variable( Variable::tList ) ); } |
231 | | '[' { bld.addLiteral( Variable( Variable::tList ) ); } listValues ']' | 231 | | '[' { bld.addLiteral( Variable( Variable::tList ) ); } listValues ']' |
232 | | '{' '}' | 232 | | '{' '}' { bld.addLiteral( Variable( Variable::tDictionary ) ); } |
233 | | '{' dictValues '}' | 233 | | '{' { bld.addLiteral( Variable( Variable::tDictionary ) ); } dictValues '}' |
234 | | tokNot expr %prec NOT { bld.addNode( AstNode::tNot ); } | 234 | | tokNot expr %prec NOT { bld.addNode( AstNode::tNot ); } |
235 | | '-' expr %prec NEG { bld.addNode( AstNode::tNegate ); } | 235 | | '-' expr %prec NEG { bld.addNode( AstNode::tNegate ); } |
236 | ; | 236 | ; |
@@ -247,8 +247,8 @@ listValues: expr { bld.addNode( AstNode::tAppend ); } | |||
247 | | listValues ',' expr { bld.addNode( AstNode::tAppend ); } | 247 | | listValues ',' expr { bld.addNode( AstNode::tAppend ); } |
248 | ; | 248 | ; |
249 | 249 | ||
250 | dictValues: expr ':' expr | 250 | dictValues: expr ':' expr { bld.addNode( AstNode::tInsert ); } |
251 | | dictValues ',' expr ':' expr | 251 | | dictValues ',' expr ':' expr { bld.addNode( AstNode::tInsert ); } |
252 | ; | 252 | ; |
253 | 253 | ||
254 | commandDecl: tokCommand ':' tokString { bld.beginCommand( *$3 ); } | 254 | commandDecl: tokCommand ':' tokString { bld.beginCommand( *$3 ); } |