Changeset 9bd6105 for src


Ignore:
Timestamp:
Aug 26, 2017, 10:29:03 PM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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
Message:

formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r51d6d6a r9bd6105  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Aug 26 14:41:43 2017
    13 // Update Count     : 2711
     12// Last Modified On : Sat Aug 26 17:50:19 2017
     13// Update Count     : 2712
    1414//
    1515
     
    190190
    191191// 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
    193199%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
    195202%type<sn> exception_statement                   handler_clause                          finally_clause
    196203%type<catch_kind> handler_key
    197 %type<en> when_clause                                   when_clause_opt                         timeout
     204%type<en> when_clause                                   when_clause_opt                         waitfor                                         timeout
    198205%type<sn> waitfor_statement
    199 %type<en> waitfor
    200206%type<wfs> waitfor_clause
    201 %type<sn> statement                                             statement_list                          asm_statement
    202 %type<sn> block_item_list                               block_item
    203 %type<en> case_value
    204 %type<sn> case_clause                                   case_value_list                         case_label                                      case_label_list
    205 %type<sn> switch_clause_list_opt                switch_clause_list                      choose_clause_list_opt          choose_clause_list
    206 %type<sn> fall_through                                  fall_through_opt
    207207
    208208// declarations
     
    776776          push push
    777777          local_label_declaration_opt                                           // GCC, local labels
    778           block_item_list                                                                       // C99, intermix declarations and statements
     778          statement_decl_list                                                           // C99, intermix declarations and statements
    779779          pop '}'
    780780                { $$ = new StatementNode( build_compound( $5 ) ); }
    781781        ;
    782782
    783 block_item_list:                                                                                // C99
    784         block_item
    785         | block_item_list push block_item
     783statement_decl_list:                                                                    // C99
     784        statement_decl
     785        | statement_decl_list push statement_decl
    786786                { if ( $1 != 0 ) { $1->set_last( $3 ); $$ = $1; } }
    787787        ;
    788788
    789 block_item:
     789statement_decl:
    790790        declaration                                                                                     // CFA, new & old style declarations
    791791                { $$ = new StatementNode( $1 ); }
     
    805805        ;
    806806
    807 statement_list:
     807statement_list_nodecl:
    808808        statement
    809         | statement_list statement
     809        | statement_list_nodecl statement
    810810                { if ( $1 != 0 ) { $1->set_last( $2 ); $$ = $1; } }
    811811        ;
     
    892892
    893893switch_clause_list:                                                                             // CFA
    894         case_label_list statement_list
     894        case_label_list statement_list_nodecl
    895895                { $$ = $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
    897897                { $$ = (StatementNode *)( $1->set_last( $2->append_last_case( new StatementNode( build_compound( $3 ) ) ) ) ); }
    898898        ;
     
    907907        case_label_list fall_through
    908908                { $$ = $1->append_last_case( $2 ); }
    909         | case_label_list statement_list fall_through_opt
     909        | case_label_list statement_list_nodecl fall_through_opt
    910910                { $$ = $1->append_last_case( new StatementNode( build_compound( (StatementNode *)$2->set_last( $3 ) ) ) ); }
    911911        | choose_clause_list case_label_list fall_through
    912912                { $$ = (StatementNode *)( $1->set_last( $2->append_last_case( $3 ))); }
    913         | choose_clause_list case_label_list statement_list fall_through_opt
     913        | choose_clause_list case_label_list statement_list_nodecl fall_through_opt
    914914                { $$ = (StatementNode *)( $1->set_last( $2->append_last_case( new StatementNode( build_compound( (StatementNode *)$3->set_last( $4 ) ) ) ) ) ); }
    915915        ;
Note: See TracChangeset for help on using the changeset viewer.