Ignore:
Timestamp:
Aug 30, 2016, 4:26:01 PM (9 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, 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:
c8dfcd3
Parents:
3906301 (diff), 32a2a99 (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 ctor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r3906301 rfa463f1  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Aug 22 14:30:56 2016
    13 // Update Count     : 1944
     12// Last Modified On : Fri Aug 26 16:45:44 2016
     13// Update Count     : 1964
    1414//
    1515
     
    5454#include "TypeData.h"
    5555#include "LinkageSpec.h"
    56 
    57 union DeclQualifiers {
    58         unsigned int value;                                                                     // assume 32-bits
    59         struct {
    60                 bool Extern : 1;
    61                 bool Static : 1;
    62                 bool Auto : 1;
    63                 bool Register : 1;
    64                 bool Inline : 1;
    65                 bool Fortran : 1;
    66                 bool Noreturn : 1;
    67                 bool Threadlocal : 1;
    68                 bool Extension : 1;
    69                 bool Lvalue : 1;
    70                 bool Const : 1;
    71                 bool Volatile : 1;
    72                 bool Restrict : 1;
    73                 bool Atomic : 1;
    74         } qual;
    75 }; // DeclQualifiers
    76 DeclQualifiers declQualifiers = { 0 };
    77 
    78 union DeclType {
    79         unsigned int value;                                                                     // assume 32-bits
    80         struct {
    81                 bool Char : 1;
    82                 bool Bool : 1;
    83                 bool Short : 1;
    84                 bool Int : 1;
    85                 bool Float : 1;
    86                 bool Double : 1;
    87                 bool Long : 1;
    88                 bool Signed : 1;
    89                 bool Unsigned : 1;
    90                 bool Void : 1;
    91                 bool Complex : 1;
    92                 bool Imaginary : 1;
    93                 bool Valist : 1;
    94         } type;
    95 }; // DeclType
    96 DeclType declTypes = { 0 };
    9756
    9857extern DeclarationNode * parseTree;
     
    649608assignment_operator:
    650609        '='                                                                                     { $$ = OperKinds::Assign; }
     610        | ATassign                                                                      { $$ = OperKinds::AtAssn; }
    651611        | MULTassign                                                            { $$ = OperKinds::MulAssn; }
    652612        | DIVassign                                                                     { $$ = OperKinds::DivAssn; }
     
    13281288        type_qualifier_name
    13291289        | attribute
    1330         //{ $$ = DeclarationNode::newQualifier( DeclarationNode::Attribute ); }
     1290                //{ $$ = DeclarationNode::newQualifier( DeclarationNode::Attribute ); }
    13311291        ;
    13321292
     
    13821342                { $$ = DeclarationNode::newStorageClass( DeclarationNode::Register ); }
    13831343        | INLINE                                                                                        // C99
    1384                 { $$ = DeclarationNode::newStorageClass( DeclarationNode::Inline ); }
     1344                //{ $$ = DeclarationNode::newStorageClass( DeclarationNode::Inline ); }
     1345                { $$ = new DeclarationNode; $$->isInline = true; }
    13851346        | FORTRAN                                                                                       // C99
    13861347                { $$ = DeclarationNode::newStorageClass( DeclarationNode::Fortran ); }
    13871348        | NORETURN                                                                                      // C11
    1388                 { $$ = DeclarationNode::newStorageClass( DeclarationNode::Noreturn ); }
     1349                //{ $$ = DeclarationNode::newStorageClass( DeclarationNode::Noreturn ); }
     1350                { $$ = new DeclarationNode; $$->isNoreturn = true; }
    13891351        | THREADLOCAL                                                                           // C11
    13901352                { $$ = DeclarationNode::newStorageClass( DeclarationNode::Threadlocal ); }
     
    21532115asm_name_opt:                                                                                   // GCC
    21542116        // empty
    2155         | ASM '(' string_literal_list ')' attribute_list_opt
    2156                 { delete $3; }
     2117        | ASM '(' string_literal_list ')' attribute_list_opt { delete $3; }     // FIX ME: unimplemented
    21572118        ;
    21582119
     
    21832144        // empty
    21842145        | any_word
    2185         | any_word '(' comma_expression_opt ')'
    2186                 { delete $3; }
     2146        | any_word '(' comma_expression_opt ')' { delete $3; } // FIX ME: unimplemented
    21872147        ;
    21882148
    21892149any_word:                                                                                               // GCC
    2190         identifier_or_type_name { delete $1; }
    2191         | storage_class { delete $1; }
    2192         | basic_type_name { delete $1; }
    2193         | type_qualifier { delete $1; }
     2150        identifier_or_type_name { delete $1; }                          // FIX ME: unimplemented
     2151        | storage_class { delete $1; }                                          // FIX ME: unimplemented
     2152        | basic_type_name { delete $1; }                                        // FIX ME: unimplemented
     2153        | type_qualifier { delete $1; }                                         // FIX ME: unimplemented
    21942154        ;
    21952155
Note: See TracChangeset for help on using the changeset viewer.