Changeset dbc733e for src/Parser


Ignore:
Timestamp:
Sep 1, 2017, 9:53:19 PM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
f43df73
Parents:
ba2a68b (diff), b0dfbc4 (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' of plg2:software/cfa/cfa-cc

Location:
src/Parser
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ExpressionNode.cc

    rba2a68b rdbc733e  
    230230        //      ret = new UntypedExpr( new NameExpr( units ), { ret } );
    231231        // } // if
    232                
     232
    233233        delete &str;                                                                            // created by lex
    234234        return ret;
     
    282282} // build_varref
    283283
    284 
     284// TODO: get rid of this and OperKinds and reuse code from OperatorTable
    285285static const char * OperName[] = {                                              // must harmonize with OperKinds
    286286        // diadic
     
    290290        "?[?]", "...",
    291291        // monadic
    292         "+?", "-?", "AddressOf", "*?", "!?", "~?", "++?", "?++", "--?", "?--", "&&"
     292        "+?", "-?", "AddressOf", "*?", "!?", "~?", "++?", "?++", "--?", "?--",
    293293}; // OperName
    294294
  • src/Parser/ParseNode.h

    rba2a68b rdbc733e  
    154154        Index, Range,
    155155        // monadic
    156         UnPlus, UnMinus, AddressOf, PointTo, Neg, BitNeg, Incr, IncrPost, Decr, DecrPost, LabelAddress,
     156        UnPlus, UnMinus, AddressOf, PointTo, Neg, BitNeg, Incr, IncrPost, Decr, DecrPost,
    157157        Ctor, Dtor,
    158158}; // OperKinds
  • src/Parser/parser.yy

    rba2a68b rdbc733e  
    536536                                $$ = new ExpressionNode( build_unary_val( $1, $2 ) );
    537537                                break;
     538                          case OperKinds::And:
     539                                $$ = new ExpressionNode( new AddressExpr( build_addressOf( $2 ) ) );
     540                                break;
    538541                          default:
    539542                                assert( false );
     
    562565        | ATTR_IDENTIFIER '(' type ')'
    563566                { $$ = new ExpressionNode( build_attrtype( build_varref( $1 ), $3 ) ); }
    564 //      | ANDAND IDENTIFIER                                                                     // GCC, address of label
    565 //              { $$ = new ExpressionNode( new OperatorNode( OperKinds::LabelAddress ), new ExpressionNode( build_varref( $2 ) ); }
    566567        ;
    567568
Note: See TracChangeset for help on using the changeset viewer.