Ignore:
Timestamp:
Apr 13, 2016, 5:40:32 PM (9 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
02af22de
Parents:
02ad3f5 (diff), 45161b4d (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 plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r02ad3f5 rb11fac4  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Apr  8 16:21:55 2016
    13 // Update Count     : 1508
     12// Last Modified On : Wed Apr 13 16:58:43 2016
     13// Update Count     : 1519
    1414//
    1515
     
    14381438                { $$ = DeclarationNode::newAggregate( $1, 0, 0, $3 ); }
    14391439        | aggregate_key no_attr_identifier_or_type_name
    1440                 { $$ = DeclarationNode::newAggregate( $1, $2, 0, 0 ); }
    1441         | aggregate_key no_attr_identifier_or_type_name '{' field_declaration_list '}'
    1442                 { $$ = DeclarationNode::newAggregate( $1, $2, 0, $4 ); }
     1440                {
     1441                        typedefTable.makeTypedef( *$2 );
     1442                        $$ = DeclarationNode::newAggregate( $1, $2, 0, 0 );
     1443                }
     1444        | aggregate_key no_attr_identifier_or_type_name
     1445                { typedefTable.makeTypedef( *$2 ); }
     1446                '{' field_declaration_list '}'
     1447                { $$ = DeclarationNode::newAggregate( $1, $2, 0, $5); }
    14431448        | aggregate_key '(' type_name_list ')' '{' field_declaration_list '}' // CFA
    1444                 { $$ = DeclarationNode::newAggregate( $1, 0, $3, $6 ); }
     1449                { $$ = DeclarationNode::newAggregate( $1, 0, $3, $6 ); }
    14451450        | aggregate_key typegen_name                                            // CFA, S/R conflict
    14461451                { $$ = $2; }
     
    15201525        enum_key '{' enumerator_list comma_opt '}'
    15211526                { $$ = DeclarationNode::newEnum( 0, $3 ); }
    1522         | enum_key no_attr_identifier_or_type_name '{' enumerator_list comma_opt '}'
    1523                 { $$ = DeclarationNode::newEnum( $2, $4 ); }
    15241527        | enum_key no_attr_identifier_or_type_name
    1525                 { $$ = DeclarationNode::newEnum( $2, 0 ); }
     1528                {
     1529                        typedefTable.makeTypedef( *$2 );
     1530                        $$ = DeclarationNode::newEnum( $2, 0 );
     1531                }
     1532        | enum_key no_attr_identifier_or_type_name
     1533                { typedefTable.makeTypedef( *$2 ); }
     1534                '{' enumerator_list comma_opt '}'
     1535                { $$ = DeclarationNode::newEnum( $2, $5 ); }
    15261536        ;
    15271537
     
    28132823        std::cout << "Error ";
    28142824        if ( yyfilename ) {
    2815             std::cout << "in file " << yyfilename << " ";
     2825                std::cout << "in file " << yyfilename << " ";
    28162826        } // if
    28172827        std::cout << "at line " << yylineno << " reading token \"" << (yytext[0] == '\0' ? "EOF" : yytext) << "\"" << std::endl;
Note: See TracChangeset for help on using the changeset viewer.