Ignore:
Timestamp:
Feb 21, 2020, 3:36:36 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
c7a900a
Parents:
8c50aed (diff), c744563a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into park_unpark

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r8c50aed ra505021  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Feb  1 10:04:40 2020
    13 // Update Count     : 4440
     12// Last Modified On : Fri Feb 21 14:47:29 2020
     13// Update Count     : 4468
    1414//
    1515
     
    166166} // rebindForall
    167167
    168 NameExpr * build_postfix_name( const string * name ) {
    169         NameExpr * new_name = build_varref( new string( "?`" + *name ) );
    170         delete name;
    171         return new_name;
     168string * build_postfix_name( string * name ) {
     169        *name = string("__postfix_func_") + *name;
     170        return name;
    172171} // build_postfix_name
    173172
     
    633632                { $$ = new ExpressionNode( build_func( $1, $3 ) ); }
    634633        | postfix_expression '`' identifier                                     // CFA, postfix call
    635                 { $$ = new ExpressionNode( build_func( new ExpressionNode( build_postfix_name( $3 ) ), $1 ) ); }
     634                { $$ = new ExpressionNode( build_func( new ExpressionNode( build_varref( build_postfix_name( $3 ) ) ), $1 ) ); }
    636635        | constant '`' identifier                                                       // CFA, postfix call
    637                 { $$ = new ExpressionNode( build_func( new ExpressionNode( build_postfix_name( $3 ) ), $1 ) ); }
     636                { $$ = new ExpressionNode( build_func( new ExpressionNode( build_varref( build_postfix_name( $3 ) ) ), $1 ) ); }
    638637        | string_literal '`' identifier                                         // CFA, postfix call
    639                 { $$ = new ExpressionNode( build_func( new ExpressionNode( build_postfix_name( $3 ) ), new ExpressionNode( $1 ) ) ); }
     638                { $$ = new ExpressionNode( build_func( new ExpressionNode( build_varref( build_postfix_name( $3 ) ) ), new ExpressionNode( $1 ) ) ); }
    640639        | postfix_expression '.' identifier
    641640                { $$ = new ExpressionNode( build_fieldSel( $1, build_varref( $3 ) ) ); }
     
    15901589                // type_specifier can resolve to just TYPEDEFname (e.g., typedef int T; int f( T );). Therefore this must be
    15911590                // flattened to allow lookahead to the '(' without having to reduce identifier_or_type_name.
    1592         cfa_abstract_tuple identifier_or_type_name '(' push cfa_parameter_ellipsis_list_opt pop ')'
     1591        cfa_abstract_tuple identifier_or_type_name '(' push cfa_parameter_ellipsis_list_opt pop ')' attribute_list_opt
    15931592                // To obtain LR(1 ), this rule must be factored out from function return type (see cfa_abstract_declarator).
    1594                 { $$ = DeclarationNode::newFunction( $2, $1, $5, 0 ); }
    1595         | cfa_function_return identifier_or_type_name '(' push cfa_parameter_ellipsis_list_opt pop ')'
    1596                 { $$ = DeclarationNode::newFunction( $2, $1, $5, 0 ); }
     1593                { $$ = DeclarationNode::newFunction( $2, $1, $5, 0 )->addQualifiers( $8 ); }
     1594        | cfa_function_return identifier_or_type_name '(' push cfa_parameter_ellipsis_list_opt pop ')' attribute_list_opt
     1595                { $$ = DeclarationNode::newFunction( $2, $1, $5, 0 )->addQualifiers( $8 ); }
    15971596        ;
    15981597
Note: See TracChangeset for help on using the changeset viewer.