Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r58dd019 r4cb935e  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Dec 13 14:14:52 2016
    13 // Update Count     : 2081
     12// Last Modified On : Tue Nov 29 11:35:52 2016
     13// Update Count     : 2069
    1414//
    1515
     
    153153%type<fctl> for_control_expression
    154154%type<en> subrange
    155 %type<constant> asm_name_opt
    156155%type<en> asm_operands_opt asm_operands_list asm_operand
    157156%type<label> label_list
     
    413412argument_expression:
    414413        // empty
    415                 { $$ = nullptr; }                                                               // use default argument
     414                { $$ = 0; }                                                                             // use default argument
    416415        | assignment_expression
    417416        ;
     
    685684comma_expression_opt:
    686685        // empty
    687                 { $$ = nullptr; }
     686                { $$ = 0; }
    688687        | comma_expression
    689688        ;
     
    819818switch_clause_list_opt:                                                                 // CFA
    820819        // empty
    821                 { $$ = nullptr; }
     820                { $$ = 0; }
    822821        | switch_clause_list
    823822        ;
     
    832831choose_clause_list_opt:                                                                 // CFA
    833832        // empty
    834                 { $$ = nullptr; }
     833                { $$ = 0; }
    835834        | choose_clause_list
    836835        ;
     
    855854fall_through:                                                                                   // CFA
    856855        FALLTHRU
    857                 { $$ = nullptr; }
     856                { $$ = 0; }
    858857        | FALLTHRU ';'
    859                 { $$ = nullptr; }
     858                { $$ = 0; }
    860859        ;
    861860
     
    991990asm_operands_opt:                                                                               // GCC
    992991        // empty
    993                 { $$ = nullptr; }                                                               // use default argument
     992                { $$ = 0; }                                                                             // use default argument
    994993        | asm_operands_list
    995994        ;
     
    10101009asm_clobbers_list_opt:                                                                  // GCC
    10111010        // empty
    1012                 { $$ = nullptr; }                                                               // use default argument
     1011                { $$ = 0; }                                                                             // use default argument
    10131012        | string_literal
    10141013                { $$ = new ExpressionNode( $1 ); }
     
    10341033declaration_list_opt:                                                                   // used at beginning of switch statement
    10351034        pop
    1036                 { $$ = nullptr; }
     1035                { $$ = 0; }
    10371036        | declaration_list
    10381037        ;
     
    10461045old_declaration_list_opt:                                                               // used to declare parameter types in K&R style functions
    10471046        pop
    1048                 { $$ = nullptr; }
     1047                { $$ = 0; }
    10491048        | old_declaration_list
    10501049        ;
     
    11211120                {
    11221121                        typedefTable.setNextIdentifier( *$2 );
    1123                         $$ = $1->addName( $2 )->addAsmName( $3 );
     1122                        $$ = $1->addName( $2 );
    11241123                }
    11251124        | new_abstract_tuple identifier_or_type_name asm_name_opt
    11261125                {
    11271126                        typedefTable.setNextIdentifier( *$2 );
    1128                         $$ = $1->addName( $2 )->addAsmName( $3 );
     1127                        $$ = $1->addName( $2 );
    11291128                }
    11301129        | type_qualifier_list new_abstract_tuple identifier_or_type_name asm_name_opt
    11311130                {
    11321131                        typedefTable.setNextIdentifier( *$3 );
    1133                         $$ = $2->addQualifiers( $1 )->addName( $3 )->addAsmName( $4 );
     1132                        $$ = $2->addQualifiers( $1 )->addName( $3 );
    11341133                }
    11351134        ;
     
    12821281                {
    12831282                        typedefTable.addToEnclosingScope( TypedefTable::ID );
    1284                         $$ = ( $2->addType( $1 ))->addAsmName( $3 )->addInitializer( $4 );
     1283                        $$ = ( $2->addType( $1 ))->addInitializer( $4 );
    12851284                }
    12861285        | declaring_list ',' attribute_list_opt declarator asm_name_opt initializer_opt
    12871286                {
    12881287                        typedefTable.addToEnclosingScope( TypedefTable::ID );
    1289                         $$ = $1->appendList( $1->cloneBaseType( $4->addAsmName( $5 )->addInitializer( $6 ) ) );
     1288                        $$ = $1->appendList( $1->cloneBaseType( $4->addInitializer( $6 ) ) );
    12901289                }
    12911290        ;
     
    13071306type_qualifier_list_opt:                                                                // GCC, used in asm_statement
    13081307        // empty
    1309                 { $$ = nullptr; }
     1308                { $$ = 0; }
    13101309        | type_qualifier_list
    13111310        ;
     
    15331532field_declaration_list:
    15341533        // empty
    1535                 { $$ = nullptr; }
     1534                { $$ = 0; }
    15361535        | field_declaration_list field_declaration
    15371536                { $$ = $1 != 0 ? $1->appendList( $2 ) : $2; }
     
    15841583bit_subrange_size_opt:
    15851584        // empty
    1586                 { $$ = nullptr; }
     1585                { $$ = 0; }
    15871586        | bit_subrange_size
    15881587                { $$ = $1; }
     
    16211620enumerator_value_opt:
    16221621        // empty
    1623                 { $$ = nullptr; }
     1622                { $$ = 0; }
    16241623        | '=' constant_expression
    16251624                { $$ = $2; }
     
    16301629new_parameter_type_list_opt:                                                    // CFA
    16311630        // empty
    1632                 { $$ = nullptr; }
     1631                { $$ = 0; }
    16331632        | new_parameter_type_list
    16341633        ;
     
    16651664parameter_type_list_opt:
    16661665        // empty
    1667                 { $$ = nullptr; }
     1666                { $$ = 0; }
    16681667        | parameter_type_list
    16691668        ;
     
    17741773initializer_opt:
    17751774        // empty
    1776                 { $$ = nullptr; }
     1775                { $$ = 0; }
    17771776        | '=' initializer
    17781777                { $$ = $2; }
     
    17881787initializer_list:
    17891788        // empty
    1790                 { $$ = nullptr; }
     1789                { $$ = 0; }
    17911790        | initializer
    17921791        | designation initializer                                       { $$ = $2->set_designators( $1 ); }
     
    18991898assertion_list_opt:                                                                             // CFA
    19001899        // empty
    1901                 { $$ = nullptr; }
     1900                { $$ = 0; }
    19021901        | assertion_list_opt assertion
    19031902                { $$ = $1 != 0 ? $1->appendList( $2 ) : $2; }
     
    19131912                { $$ = $4; }
    19141913        | '|' '(' push type_parameter_list pop ')' '{' push trait_declaration_list '}' '(' type_name_list ')'
    1915                 { $$ = nullptr; }
     1914                { $$ = 0; }
    19161915        ;
    19171916
     
    20332032external_definition_list_opt:
    20342033        // empty
    2035                 { $$ = nullptr; }
     2034                { $$ = 0; }
    20362035        | external_definition_list
    20372036        ;
     
    21562155asm_name_opt:                                                                                   // GCC
    21572156        // empty
    2158                 { $$ = nullptr; }
    2159         | ASM '(' string_literal ')' attribute_list_opt
    2160                 { $$ = $3; }
     2157        | ASM '(' string_literal_list ')' attribute_list_opt { delete $3; }     // FIX ME: unimplemented
    21612158        ;
    21622159
    21632160attribute_list_opt:                                                                             // GCC
    21642161        // empty
    2165                 { $$ = nullptr; }
     2162                { $$ = 0; }
    21662163        | attribute_list
    21672164        ;
     
    21762173        ATTRIBUTE '(' '(' attribute_parameter_list ')' ')'
    21772174        //              { $$ = DeclarationNode::newQualifier( DeclarationNode::Attribute ); }
    2178                 { $$ = nullptr; }
     2175                { $$ = 0; }
    21792176        ;
    21802177
     
    28852882assignment_opt:
    28862883        // empty
    2887                 { $$ = nullptr; }
     2884                { $$ = 0; }
    28882885        | '=' assignment_expression
    28892886                { $$ = $2; }
Note: See TracChangeset for help on using the changeset viewer.