Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r4cb935e r58dd019  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Nov 29 11:35:52 2016
    13 // Update Count     : 2069
     12// Last Modified On : Tue Dec 13 14:14:52 2016
     13// Update Count     : 2081
    1414//
    1515
     
    153153%type<fctl> for_control_expression
    154154%type<en> subrange
     155%type<constant> asm_name_opt
    155156%type<en> asm_operands_opt asm_operands_list asm_operand
    156157%type<label> label_list
     
    412413argument_expression:
    413414        // empty
    414                 { $$ = 0; }                                                                             // use default argument
     415                { $$ = nullptr; }                                                               // use default argument
    415416        | assignment_expression
    416417        ;
     
    684685comma_expression_opt:
    685686        // empty
    686                 { $$ = 0; }
     687                { $$ = nullptr; }
    687688        | comma_expression
    688689        ;
     
    818819switch_clause_list_opt:                                                                 // CFA
    819820        // empty
    820                 { $$ = 0; }
     821                { $$ = nullptr; }
    821822        | switch_clause_list
    822823        ;
     
    831832choose_clause_list_opt:                                                                 // CFA
    832833        // empty
    833                 { $$ = 0; }
     834                { $$ = nullptr; }
    834835        | choose_clause_list
    835836        ;
     
    854855fall_through:                                                                                   // CFA
    855856        FALLTHRU
    856                 { $$ = 0; }
     857                { $$ = nullptr; }
    857858        | FALLTHRU ';'
    858                 { $$ = 0; }
     859                { $$ = nullptr; }
    859860        ;
    860861
     
    990991asm_operands_opt:                                                                               // GCC
    991992        // empty
    992                 { $$ = 0; }                                                                             // use default argument
     993                { $$ = nullptr; }                                                               // use default argument
    993994        | asm_operands_list
    994995        ;
     
    10091010asm_clobbers_list_opt:                                                                  // GCC
    10101011        // empty
    1011                 { $$ = 0; }                                                                             // use default argument
     1012                { $$ = nullptr; }                                                               // use default argument
    10121013        | string_literal
    10131014                { $$ = new ExpressionNode( $1 ); }
     
    10331034declaration_list_opt:                                                                   // used at beginning of switch statement
    10341035        pop
    1035                 { $$ = 0; }
     1036                { $$ = nullptr; }
    10361037        | declaration_list
    10371038        ;
     
    10451046old_declaration_list_opt:                                                               // used to declare parameter types in K&R style functions
    10461047        pop
    1047                 { $$ = 0; }
     1048                { $$ = nullptr; }
    10481049        | old_declaration_list
    10491050        ;
     
    11201121                {
    11211122                        typedefTable.setNextIdentifier( *$2 );
    1122                         $$ = $1->addName( $2 );
     1123                        $$ = $1->addName( $2 )->addAsmName( $3 );
    11231124                }
    11241125        | new_abstract_tuple identifier_or_type_name asm_name_opt
    11251126                {
    11261127                        typedefTable.setNextIdentifier( *$2 );
    1127                         $$ = $1->addName( $2 );
     1128                        $$ = $1->addName( $2 )->addAsmName( $3 );
    11281129                }
    11291130        | type_qualifier_list new_abstract_tuple identifier_or_type_name asm_name_opt
    11301131                {
    11311132                        typedefTable.setNextIdentifier( *$3 );
    1132                         $$ = $2->addQualifiers( $1 )->addName( $3 );
     1133                        $$ = $2->addQualifiers( $1 )->addName( $3 )->addAsmName( $4 );
    11331134                }
    11341135        ;
     
    12811282                {
    12821283                        typedefTable.addToEnclosingScope( TypedefTable::ID );
    1283                         $$ = ( $2->addType( $1 ))->addInitializer( $4 );
     1284                        $$ = ( $2->addType( $1 ))->addAsmName( $3 )->addInitializer( $4 );
    12841285                }
    12851286        | declaring_list ',' attribute_list_opt declarator asm_name_opt initializer_opt
    12861287                {
    12871288                        typedefTable.addToEnclosingScope( TypedefTable::ID );
    1288                         $$ = $1->appendList( $1->cloneBaseType( $4->addInitializer( $6 ) ) );
     1289                        $$ = $1->appendList( $1->cloneBaseType( $4->addAsmName( $5 )->addInitializer( $6 ) ) );
    12891290                }
    12901291        ;
     
    13061307type_qualifier_list_opt:                                                                // GCC, used in asm_statement
    13071308        // empty
    1308                 { $$ = 0; }
     1309                { $$ = nullptr; }
    13091310        | type_qualifier_list
    13101311        ;
     
    15321533field_declaration_list:
    15331534        // empty
    1534                 { $$ = 0; }
     1535                { $$ = nullptr; }
    15351536        | field_declaration_list field_declaration
    15361537                { $$ = $1 != 0 ? $1->appendList( $2 ) : $2; }
     
    15831584bit_subrange_size_opt:
    15841585        // empty
    1585                 { $$ = 0; }
     1586                { $$ = nullptr; }
    15861587        | bit_subrange_size
    15871588                { $$ = $1; }
     
    16201621enumerator_value_opt:
    16211622        // empty
    1622                 { $$ = 0; }
     1623                { $$ = nullptr; }
    16231624        | '=' constant_expression
    16241625                { $$ = $2; }
     
    16291630new_parameter_type_list_opt:                                                    // CFA
    16301631        // empty
    1631                 { $$ = 0; }
     1632                { $$ = nullptr; }
    16321633        | new_parameter_type_list
    16331634        ;
     
    16641665parameter_type_list_opt:
    16651666        // empty
    1666                 { $$ = 0; }
     1667                { $$ = nullptr; }
    16671668        | parameter_type_list
    16681669        ;
     
    17731774initializer_opt:
    17741775        // empty
    1775                 { $$ = 0; }
     1776                { $$ = nullptr; }
    17761777        | '=' initializer
    17771778                { $$ = $2; }
     
    17871788initializer_list:
    17881789        // empty
    1789                 { $$ = 0; }
     1790                { $$ = nullptr; }
    17901791        | initializer
    17911792        | designation initializer                                       { $$ = $2->set_designators( $1 ); }
     
    18981899assertion_list_opt:                                                                             // CFA
    18991900        // empty
    1900                 { $$ = 0; }
     1901                { $$ = nullptr; }
    19011902        | assertion_list_opt assertion
    19021903                { $$ = $1 != 0 ? $1->appendList( $2 ) : $2; }
     
    19121913                { $$ = $4; }
    19131914        | '|' '(' push type_parameter_list pop ')' '{' push trait_declaration_list '}' '(' type_name_list ')'
    1914                 { $$ = 0; }
     1915                { $$ = nullptr; }
    19151916        ;
    19161917
     
    20322033external_definition_list_opt:
    20332034        // empty
    2034                 { $$ = 0; }
     2035                { $$ = nullptr; }
    20352036        | external_definition_list
    20362037        ;
     
    21552156asm_name_opt:                                                                                   // GCC
    21562157        // empty
    2157         | ASM '(' string_literal_list ')' attribute_list_opt { delete $3; }     // FIX ME: unimplemented
     2158                { $$ = nullptr; }
     2159        | ASM '(' string_literal ')' attribute_list_opt
     2160                { $$ = $3; }
    21582161        ;
    21592162
    21602163attribute_list_opt:                                                                             // GCC
    21612164        // empty
    2162                 { $$ = 0; }
     2165                { $$ = nullptr; }
    21632166        | attribute_list
    21642167        ;
     
    21732176        ATTRIBUTE '(' '(' attribute_parameter_list ')' ')'
    21742177        //              { $$ = DeclarationNode::newQualifier( DeclarationNode::Attribute ); }
    2175                 { $$ = 0; }
     2178                { $$ = nullptr; }
    21762179        ;
    21772180
     
    28822885assignment_opt:
    28832886        // empty
    2884                 { $$ = 0; }
     2887                { $$ = nullptr; }
    28852888        | '=' assignment_expression
    28862889                { $$ = $2; }
Note: See TracChangeset for help on using the changeset viewer.