Ignore:
Timestamp:
Feb 18, 2020, 8:48:49 PM (22 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
6988dc6
Parents:
5ccee64
Message:

rewrite most of OperatorTable? and change caller modules to use new interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r5ccee64 r60a8062  
    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 : Sun Feb 16 08:22:14 2020
     13// Update Count     : 4461
    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 ) ) ); }
Note: See TracChangeset for help on using the changeset viewer.