diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-02-06 01:21:36 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-02-06 01:21:36 -0700 |
commit | e10e9ee07c03d7ee5752b8122ecddaef40dfd5d5 (patch) | |
tree | a2a53a4d9ebdbc6e53079c75e294a39e7ae87877 /src/parser.y | |
parent | e150ee5e1ce33b0a4913d53e5df4658ea508eb6e (diff) | |
download | stage-e10e9ee07c03d7ee5752b8122ecddaef40dfd5d5.tar.gz stage-e10e9ee07c03d7ee5752b8122ecddaef40dfd5d5.tar.bz2 stage-e10e9ee07c03d7ee5752b8122ecddaef40dfd5d5.tar.xz stage-e10e9ee07c03d7ee5752b8122ecddaef40dfd5d5.zip |
Option input type situations almost done.
Interfaces just need some work.
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 e127627..b50b897 100644 --- a/src/parser.y +++ b/src/parser.y | |||
@@ -121,9 +121,9 @@ bodyDecl: | |||
121 | | bodyDecl function | 121 | | bodyDecl function |
122 | ; | 122 | ; |
123 | 123 | ||
124 | situationMode: tokSituation tokSituationName { bld.beginSituation( *($2) ); } | 124 | situationMode: tokSituation tokSituationName { bld.beginSituation( *($2), Situation::inputCommand ); } |
125 | | tokCommand tokSituation tokSituationName { bld.beginSituation( *($2) ); } | 125 | | tokCommand tokSituation tokSituationName { bld.beginSituation( *($3), Situation::inputCommand ); } |
126 | | tokOption tokSituation tokSituationName { bld.beginSituation( *($2) ); } | 126 | | tokOption tokSituation tokSituationName { bld.beginSituation( *($3), Situation::inputOption ); } |
127 | ; | 127 | ; |
128 | 128 | ||
129 | situation: situationMode '{' situationMembers '}' { bld.endSituation(); } | 129 | situation: situationMode '{' situationMembers '}' { bld.endSituation(); } |
@@ -284,7 +284,8 @@ dictValues: expr ':' expr { bld.addNode( AstNode::tInsert ); } | |||
284 | | dictValues ',' expr ':' expr { bld.addNode( AstNode::tInsert ); } | 284 | | dictValues ',' expr ':' expr { bld.addNode( AstNode::tInsert ); } |
285 | ; | 285 | ; |
286 | 286 | ||
287 | optionDecl: tokOption ':' tokString '{' cmpltExprList '}' | 287 | optionDecl: tokOption ':' tokString { bld.beginOption( *$3 ); } '{' |
288 | cmpltExprList '}' { bld.closeOption(); } | ||
288 | ; | 289 | ; |
289 | 290 | ||
290 | commandDecl: tokCommand ':' tokString { bld.beginCommand( *$3 ); } | 291 | commandDecl: tokCommand ':' tokString { bld.beginCommand( *$3 ); } |