Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    rfaddbd8 r2298f728  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Oct  5 14:10:46 2016
    13 // Update Count     : 2002
     12// Last Modified On : Sat Sep 24 11:30:40 2016
     13// Update Count     : 1991
    1414//
    1515
     
    196196%type<decl> field_declaration field_declaration_list field_declarator field_declaring_list
    197197%type<en> field field_list
    198 %type<tok> field_name
    199198
    200199%type<decl> external_function_definition function_definition function_array function_declarator function_no_ptr function_ptr
     
    379378                { $$ = new ExpressionNode( build_fieldSel( $1, build_varref( $3 ) ) ); }
    380379        | postfix_expression '.' '[' push field_list pop ']' // CFA, tuple field selector
    381         | postfix_expression '.' INTEGERconstant
    382380        | postfix_expression ARROW no_attr_identifier
    383381                { $$ = new ExpressionNode( build_pfieldSel( $1, build_varref( $3 ) ) ); }
     
    392390                {
    393391                        Token fn;
    394                         fn.str = new std::string( "?{}" );                      // location undefined - use location of '{'?
    395                         $$ = new ExpressionNode( new ConstructorExpr( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( $1 )->set_last( $3 ) ) ) );
     392                        fn.str = new string( "?{}" );                           // location undefined
     393                        $$ = new ExpressionNode( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( $1 )->set_last( $3 ) ) );
    396394                }
    397395        ;
     
    415413
    416414field:                                                                                                  // CFA, tuple field selector
    417         field_name
     415        no_attr_identifier
     416                { $$ = new ExpressionNode( build_varref( $1 ) ); }
    418417                // ambiguity with .0 so space required after field-selection, e.g.
    419418                //   struct S { int 0, 1; } s; s. 0 = 0; s. 1 = 1;
    420                 { $$ = new ExpressionNode( build_varref( $1 ) ); }
    421         | field_name '.' field
     419        | no_attr_identifier '.' field
    422420                { $$ = new ExpressionNode( build_fieldSel( $3, build_varref( $1 ) ) ); }
    423         | field_name '.' '[' push field_list pop ']'
     421        | no_attr_identifier '.' '[' push field_list pop ']'
    424422                { $$ = new ExpressionNode( build_fieldSel( $5, build_varref( $1 ) ) ); }
    425         | field_name ARROW field
     423        | no_attr_identifier ARROW field
    426424                { $$ = new ExpressionNode( build_pfieldSel( $3, build_varref( $1 ) ) ); }
    427         | field_name ARROW '[' push field_list pop ']'
     425        | no_attr_identifier ARROW '[' push field_list pop ']'
    428426                { $$ = new ExpressionNode( build_pfieldSel( $5, build_varref( $1 ) ) ); }
    429         ;
    430 
    431 field_name:
    432         no_attr_identifier
    433         | INTEGERconstant
    434427        ;
    435428
     
    20122005                {
    20132006                        linkageStack.push( linkage );                           // handle nested extern "C"/"Cforall"
    2014                         linkage = LinkageSpec::linkageCheck( $2 );
     2007                        linkage = LinkageSpec::fromString( *$2 );
    20152008                }
    20162009          '{' external_definition_list_opt '}'                          // C++-style linkage specifier
Note: See TracChangeset for help on using the changeset viewer.