Changes in src/Parser/parser.yy [6d49ea3:936e9f4]
- File:
-
- 1 edited
-
src/Parser/parser.yy (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r6d49ea3 r936e9f4 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Aug 17 15:52:12201713 // Update Count : 248 912 // Last Modified On : Wed Aug 16 18:09:14 2017 13 // Update Count : 2485 14 14 // 15 15 … … 796 796 797 797 selection_statement: 798 IF '(' pushif_control_expression ')' statement %prec THEN798 IF '(' if_control_expression ')' statement %prec THEN 799 799 // explicitly deal with the shift/reduce conflict on if/else 800 { $$ = new StatementNode( build_if( $ 4, $6, nullptr ) ); }801 | IF '(' pushif_control_expression ')' statement ELSE statement802 { $$ = new StatementNode( build_if( $ 4, $6, $8) ); }800 { $$ = new StatementNode( build_if( $3, $5, nullptr ) ); } 801 | IF '(' if_control_expression ')' statement ELSE statement 802 { $$ = new StatementNode( build_if( $3, $5, $7 ) ); } 803 803 | SWITCH '(' comma_expression ')' case_clause // CFA 804 804 { $$ = new StatementNode( build_switch( $3, $5 ) ); } … … 823 823 824 824 if_control_expression: 825 comma_expression pop825 comma_expression 826 826 { $$ = new IfCtl( nullptr, $1 ); } 827 | c_declaration // no semi-col on827 | c_declaration // no semi-coln 828 828 { $$ = new IfCtl( $1, nullptr ); } 829 829 | cfa_declaration // no semi-colon 830 830 { $$ = new IfCtl( $1, nullptr ); } 831 | declaration comma_expression // semi-colon separated831 | declaration comma_expression 832 832 { $$ = new IfCtl( $1, $2 ); } 833 833 ;
Note:
See TracChangeset
for help on using the changeset viewer.