Changes in src/Parser/parser.yy [c25f16b:f259682]
- File:
-
- 1 edited
-
src/Parser/parser.yy (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
rc25f16b rf259682 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jul 12 23:06:44202313 // Update Count : 63 8912 // Last Modified On : Tue Jul 18 22:51:30 2023 13 // Update Count : 6391 14 14 // 15 15 … … 1708 1708 | wor_waituntil_clause wor when_clause_opt ELSE statement 1709 1709 { $$ = new ast::WaitUntilStmt::ClauseNode( ast::WaitUntilStmt::ClauseNode::Op::LEFT_OR, $1, build_waituntil_else( yylloc, $3, maybe_build_compound( yylloc, $5 ) ) ); } 1710 | wor_waituntil_clause wor when_clause_opt timeout statement %prec THEN1711 { $$ = new ast::WaitUntilStmt::ClauseNode( ast::WaitUntilStmt::ClauseNode::Op::LEFT_OR, $1, build_waituntil_timeout( yylloc, $3, $4, maybe_build_compound( yylloc, $5 ) ) ); }1712 // "else" must be conditional after timeout or timeout is never triggered (i.e., it is meaningless)1713 | wor_waituntil_clause wor when_clause_opt timeout statement wor ELSE statement // invalid syntax rule1714 { SemanticError( yylloc, "syntax error, else clause must be conditional after timeout or timeout never triggered." ); $$ = nullptr; }1715 | wor_waituntil_clause wor when_clause_opt timeout statement wor when_clause ELSE statement1716 { $$ = new ast::WaitUntilStmt::ClauseNode( ast::WaitUntilStmt::ClauseNode::Op::LEFT_OR, $1,1717 new ast::WaitUntilStmt::ClauseNode( ast::WaitUntilStmt::ClauseNode::Op::OR,1718 build_waituntil_timeout( yylloc, $3, $4, maybe_build_compound( yylloc, $5 ) ),1719 build_waituntil_else( yylloc, $7, maybe_build_compound( yylloc, $9 ) ) ) ); }1720 1710 ; 1721 1711 1722 1712 waituntil_statement: 1723 1713 wor_waituntil_clause %prec THEN 1724 // SKULLDUGGERY: create an empty compound statement to test parsing of waituntil statement. 1725 { 1726 $$ = new StatementNode( build_waituntil_stmt( yylloc, $1 ) ); 1727 // $$ = new StatementNode( build_compound( yylloc, nullptr ) ); 1728 } 1714 { $$ = new StatementNode( build_waituntil_stmt( yylloc, $1 ) ); } 1729 1715 ; 1730 1716
Note:
See TracChangeset
for help on using the changeset viewer.