Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r8e9cbb2 rc6b1105  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jun 30 21:15:54 2016
    13 // Update Count     : 1657
     12// Last Modified On : Mon Jun 27 17:47:56 2016
     13// Update Count     : 1627
    1414//
    1515
     
    303303constant:
    304304                // ENUMERATIONconstant is not included here; it is treated as a variable with type "enumeration constant".
    305 INTEGERconstant                                                                 { $$ = makeConstant( ConstantNode::Integer, $1 ); }
    306         | FLOATINGconstant                                                      { $$ = makeConstant( ConstantNode::Float, $1 ); }
    307         | CHARACTERconstant                                                     { $$ = makeConstant( ConstantNode::Character, $1 ); }
     305        INTEGERconstant                                                         { $$ = new ConstantNode( ConstantNode::Integer, $1 ); }
     306        | FLOATINGconstant                                                      { $$ = new ConstantNode( ConstantNode::Float, $1 ); }
     307        | CHARACTERconstant                                                     { $$ = new ConstantNode( ConstantNode::Character, $1 ); }
    308308        ;
    309309
     
    330330
    331331string_literal_list:                                                                    // juxtaposed strings are concatenated
    332         STRINGliteral                                                           { $$ = makeConstantStr( ConstantNode::String, $1 ); }
     332        STRINGliteral                                                           { $$ = new ConstantNode( ConstantNode::String, $1 ); }
    333333        | string_literal_list STRINGliteral                     { $$ = $1->appendstr( $2 ); }
    334334        ;
     
    682682                { $$ = new StatementNode( $1 ); }
    683683        | EXTENSION declaration                                                         // GCC
    684                 {       // mark all fields in list
    685                         for ( DeclarationNode *iter = $2; iter != NULL; iter = (DeclarationNode *)iter->get_link() )
    686                                 iter->set_extension( true );
    687                         $$ = new StatementNode( $2 );
    688                 }
     684                { $$ = new StatementNode( $2 )/*->set_extension( true )*/; }
    689685        | function_definition
    690686                { $$ = new StatementNode( $1 ); }
     
    14761472        new_field_declaring_list ';'                                            // CFA, new style field declaration
    14771473        | EXTENSION new_field_declaring_list ';'                        // GCC
    1478                 { $$ = $2->set_extension( true ); }
     1474                { $$ = $2/*->set_extension( true )*/; }
    14791475        | field_declaring_list ';'
    14801476        | EXTENSION field_declaring_list ';'                            // GCC
    1481                 {       // mark all fields in list
    1482                         for ( DeclarationNode *iter = $2; iter != NULL; iter = (DeclarationNode *)iter->get_link() )
    1483                                 iter->set_extension( true );
    1484                         $$ = $2;
    1485                 }
     1477                { $$ = $2/*->set_extension( true )*/; }
    14861478        ;
    14871479
     
    19991991                }
    20001992        | EXTENSION external_definition
    2001                 {       // mark all fields in list
    2002                         for ( DeclarationNode *iter = $2; iter != NULL; iter = (DeclarationNode *)iter->get_link() )
    2003                                 iter->set_extension( true );
    2004                         $$ = $2;
    2005                 }
     1993                { $$ = $2/*->set_extension( true )*/; }
    20061994        ;
    20071995
Note: See TracChangeset for help on using the changeset viewer.