Changeset 9bd6105 for src/Parser
- Timestamp:
- Aug 26, 2017, 10:29:03 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- eca3d10
- Parents:
- 51d6d6a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r51d6d6a r9bd6105 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Aug 26 1 4:41:43201713 // Update Count : 271 112 // Last Modified On : Sat Aug 26 17:50:19 2017 13 // Update Count : 2712 14 14 // 15 15 … … 190 190 191 191 // statements 192 %type<sn> labeled_statement compound_statement expression_statement selection_statement 192 %type<sn> statement labeled_statement compound_statement 193 %type<sn> statement_decl statement_decl_list statement_list_nodecl 194 %type<sn> selection_statement 195 %type<sn> switch_clause_list_opt switch_clause_list choose_clause_list_opt choose_clause_list 196 %type<en> case_value 197 %type<sn> case_clause case_value_list case_label case_label_list 198 %type<sn> fall_through fall_through_opt 193 199 %type<sn> iteration_statement jump_statement 194 %type<sn> with_clause_opt with_statement 200 %type<sn> expression_statement asm_statement 201 %type<sn> with_statement with_clause_opt 195 202 %type<sn> exception_statement handler_clause finally_clause 196 203 %type<catch_kind> handler_key 197 %type<en> when_clause when_clause_opt timeout204 %type<en> when_clause when_clause_opt waitfor timeout 198 205 %type<sn> waitfor_statement 199 %type<en> waitfor200 206 %type<wfs> waitfor_clause 201 %type<sn> statement statement_list asm_statement202 %type<sn> block_item_list block_item203 %type<en> case_value204 %type<sn> case_clause case_value_list case_label case_label_list205 %type<sn> switch_clause_list_opt switch_clause_list choose_clause_list_opt choose_clause_list206 %type<sn> fall_through fall_through_opt207 207 208 208 // declarations … … 776 776 push push 777 777 local_label_declaration_opt // GCC, local labels 778 block_item_list// C99, intermix declarations and statements778 statement_decl_list // C99, intermix declarations and statements 779 779 pop '}' 780 780 { $$ = new StatementNode( build_compound( $5 ) ); } 781 781 ; 782 782 783 block_item_list:// C99784 block_item785 | block_item_list push block_item783 statement_decl_list: // C99 784 statement_decl 785 | statement_decl_list push statement_decl 786 786 { if ( $1 != 0 ) { $1->set_last( $3 ); $$ = $1; } } 787 787 ; 788 788 789 block_item:789 statement_decl: 790 790 declaration // CFA, new & old style declarations 791 791 { $$ = new StatementNode( $1 ); } … … 805 805 ; 806 806 807 statement_list :807 statement_list_nodecl: 808 808 statement 809 | statement_list statement809 | statement_list_nodecl statement 810 810 { if ( $1 != 0 ) { $1->set_last( $2 ); $$ = $1; } } 811 811 ; … … 892 892 893 893 switch_clause_list: // CFA 894 case_label_list statement_list 894 case_label_list statement_list_nodecl 895 895 { $$ = $1->append_last_case( new StatementNode( build_compound( $2 ) ) ); } 896 | switch_clause_list case_label_list statement_list 896 | switch_clause_list case_label_list statement_list_nodecl 897 897 { $$ = (StatementNode *)( $1->set_last( $2->append_last_case( new StatementNode( build_compound( $3 ) ) ) ) ); } 898 898 ; … … 907 907 case_label_list fall_through 908 908 { $$ = $1->append_last_case( $2 ); } 909 | case_label_list statement_list fall_through_opt909 | case_label_list statement_list_nodecl fall_through_opt 910 910 { $$ = $1->append_last_case( new StatementNode( build_compound( (StatementNode *)$2->set_last( $3 ) ) ) ); } 911 911 | choose_clause_list case_label_list fall_through 912 912 { $$ = (StatementNode *)( $1->set_last( $2->append_last_case( $3 ))); } 913 | choose_clause_list case_label_list statement_list fall_through_opt913 | choose_clause_list case_label_list statement_list_nodecl fall_through_opt 914 914 { $$ = (StatementNode *)( $1->set_last( $2->append_last_case( new StatementNode( build_compound( (StatementNode *)$3->set_last( $4 ) ) ) ) ) ); } 915 915 ;
Note: See TracChangeset
for help on using the changeset viewer.