Changes in src/Parser/parser.yy [c6b1105:ca35c51]
- File:
-
- 1 edited
-
src/Parser/parser.yy (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
rc6b1105 rca35c51 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jun 27 17:47:56201613 // Update Count : 16 2712 // Last Modified On : Thu Jun 30 13:26:01 2016 13 // Update Count : 1639 14 14 // 15 15 … … 303 303 constant: 304 304 // ENUMERATIONconstant is not included here; it is treated as a variable with type "enumeration constant". 305 INTEGERconstant { $$ = new ConstantNode( ConstantNode::Integer, $1 ); }306 | FLOATINGconstant { $$ = new ConstantNode( ConstantNode::Float, $1 ); }307 | CHARACTERconstant { $$ = new ConstantNode( ConstantNode::Character, $1 ); }305 INTEGERconstant { $$ = makeConstant( ConstantNode::Integer, $1 ); } 306 | FLOATINGconstant { $$ = makeConstant( ConstantNode::Float, $1 ); } 307 | CHARACTERconstant { $$ = makeConstant( ConstantNode::Character, $1 ); } 308 308 ; 309 309 … … 330 330 331 331 string_literal_list: // juxtaposed strings are concatenated 332 STRINGliteral { $$ = new ConstantNode( ConstantNode::String, $1 ); }332 STRINGliteral { $$ = makeConstantStr( ConstantNode::String, $1 ); } 333 333 | string_literal_list STRINGliteral { $$ = $1->appendstr( $2 ); } 334 334 ; … … 682 682 { $$ = new StatementNode( $1 ); } 683 683 | EXTENSION declaration // GCC 684 { $$ = new StatementNode( $2 )/*->set_extension( true )*/; }684 { $$ = (new StatementNode( $2 ))->set_extension( true ); } 685 685 | function_definition 686 686 { $$ = new StatementNode( $1 ); } … … 1472 1472 new_field_declaring_list ';' // CFA, new style field declaration 1473 1473 | EXTENSION new_field_declaring_list ';' // GCC 1474 { $$ = $2 /*->set_extension( true )*/; }1474 { $$ = $2->set_extension( true ); } 1475 1475 | field_declaring_list ';' 1476 1476 | EXTENSION field_declaring_list ';' // GCC 1477 { $$ = $2 /*->set_extension( true )*/; }1477 { $$ = $2->set_extension( true ); } 1478 1478 ; 1479 1479 … … 1991 1991 } 1992 1992 | EXTENSION external_definition 1993 { $$ = $2 /*->set_extension( true )*/; }1993 { $$ = $2->set_extension( true ); } 1994 1994 ; 1995 1995
Note:
See TracChangeset
for help on using the changeset viewer.