Ignore:
Timestamp:
Jul 11, 2018, 11:55:59 AM (6 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, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
0fc52b6
Parents:
fc20514 (diff), 7de22b28 (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:

fix conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    rfc20514 r777ed2b  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jul 11 11:20:51 2018
    13 // Update Count     : 3738
     12// Last Modified On : Wed Jul 11 11:55:24 2018
     13// Update Count     : 3739
    1414//
    1515
     
    18251825                { $$ = DeclarationNode::newFromTypedef( $1 ); }
    18261826        | '.' TYPEDEFname
    1827                 { SemanticError( yylloc, "Qualified name is currently unimplemented." ); $$ = nullptr; }
     1827                { $$ = DeclarationNode::newQualifiedType( DeclarationNode::newFromGlobalScope(), DeclarationNode::newFromTypedef( $2 ) ); }
    18281828        | type_name '.' TYPEDEFname
    1829                 { SemanticError( yylloc, "Qualified name is currently unimplemented." ); $$ = nullptr; }
     1829                { $$ = DeclarationNode::newQualifiedType( $1, DeclarationNode::newFromTypedef( $3 ) ); }
    18301830        | typegen_name
    18311831        | '.' typegen_name
    1832                 { SemanticError( yylloc, "Qualified name is currently unimplemented." ); $$ = nullptr; }
     1832                { $$ = DeclarationNode::newQualifiedType( DeclarationNode::newFromGlobalScope(), $2 ); }
    18331833        | type_name '.' typegen_name
    1834                 { SemanticError( yylloc, "Qualified name is currently unimplemented." ); $$ = nullptr; }
     1834                { $$ = DeclarationNode::newQualifiedType( $1, $3 ); }
    18351835        ;
    18361836
     
    18631863                { forall = false; }                                                             // reset
    18641864          '{' field_declaration_list_opt '}' type_parameters_opt
    1865                 { $$ = DeclarationNode::newAggregate( $1, new string( DeclarationNode::anonymous.newName() ), $7, $5, true )->addQualifiers( $2 ); }
     1865                { $$ = DeclarationNode::newAggregate( $1, nullptr, $7, $5, true )->addQualifiers( $2 ); }
    18661866        | aggregate_key attribute_list_opt no_attr_identifier fred
    18671867                {
     
    18731873        | aggregate_key attribute_list_opt type_name fred
    18741874                {
    1875                         typedefTable.makeTypedef( *$3->type->symbolic.name, forall | typedefTable.getEnclForall() ? TYPEGENname : TYPEDEFname ); // create typedef
     1875                        // for type_name can be a qualified type name S.T, in which case only the last name in the chain needs a typedef (other names in the chain should already have one)
     1876                        typedefTable.makeTypedef( *$3->type->leafName(), forall | typedefTable.getEnclForall() ? TYPEGENname : TYPEDEFname ); // create typedef
    18761877                        forall = false;                                                         // reset
    18771878                }
     
    19361937                { distExt( $3 ); $$ = distAttr( $2, $3 ); }             // mark all fields in list
    19371938        | typedef_declaration ';'                                                       // CFA
    1938                 { SemanticError( yylloc, "Typedef in aggregate is currently unimplemented." ); $$ = nullptr; }
    19391939        | cfa_field_declaring_list ';'                                          // CFA, new style field declaration
    19401940        | EXTENSION cfa_field_declaring_list ';'                        // GCC
    19411941                { distExt( $2 ); $$ = $2; }                                             // mark all fields in list
    19421942        | cfa_typedef_declaration ';'                                           // CFA
    1943                 { SemanticError( yylloc, "Typedef in aggregate is currently unimplemented." ); $$ = nullptr; }
    19441943        | static_assert                                                                         // C11
    19451944        ;
     
    19901989enum_type:                                                                                              // enum
    19911990        ENUM attribute_list_opt '{' enumerator_list comma_opt '}'
    1992                 { $$ = DeclarationNode::newEnum( new string( DeclarationNode::anonymous.newName() ), $4, true )->addQualifiers( $2 ); }
     1991                { $$ = DeclarationNode::newEnum( nullptr, $4, true )->addQualifiers( $2 ); }
    19931992        | ENUM attribute_list_opt no_attr_identifier
    19941993                { typedefTable.makeTypedef( *$3 ); }
Note: See TracChangeset for help on using the changeset viewer.