Changeset dd020c0


Ignore:
Timestamp:
Mar 3, 2017, 10:12:02 PM (8 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:
8191203
Parents:
f37147b
Message:

first attempt to create function specifiers

Location:
src
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    rf37147b rdd020c0  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 16 14:56:29 2017
    13 // Update Count     : 418
     12// Last Modified On : Fri Mar  3 21:18:47 2017
     13// Update Count     : 465
    1414//
    1515
     
    134134
    135135                handleStorageClass( functionDecl );
    136                 if ( functionDecl->get_isInline() ) {
    137                         output << "inline ";
    138                 } // if
    139                 if ( functionDecl->get_isNoreturn() ) {
    140                         output << "_Noreturn ";
    141                 } // if
     136                DeclarationNode::print_FuncSpec( output, functionDecl->get_funcSpec() );
     137
    142138                output << genType( functionDecl->get_functionType(), mangleName( functionDecl ), pretty );
    143139
     
    835831        }
    836832
    837 
    838833        void CodeGenerator::visit( ReturnStmt * returnStmt ) {
    839834                output << "return ";
     
    899894        }
    900895
    901         void CodeGenerator::handleStorageClass( Declaration * decl ) {
     896        void CodeGenerator::handleStorageClass( DeclarationWithType * decl ) {
    902897                switch ( decl->get_storageClass() ) {
     898                        //output << DeclarationNode::storageClassNames[decl->get_storageClass()] << ' ';
    903899                  case DeclarationNode::Extern:
    904900                        output << "extern ";
     
    913909                        output << "register ";
    914910                        break;
    915                   case DeclarationNode::Inline:
    916                         output << "inline ";
    917                         break;
    918                   case DeclarationNode::Fortran:
    919                         output << "fortran ";
    920                         break;
    921                   case DeclarationNode::Noreturn:
    922                         output << "_Noreturn ";
    923                         break;
    924911                  case DeclarationNode::Threadlocal:
    925                         output << "_Thread_local ";
    926                         break;
     912                        output << "_Thread_local ";
     913                        break;
    927914                  case DeclarationNode::NoStorageClass:
    928915                        break;
     916                  default:
     917                        assert( false );
    929918                } // switch
    930         }
     919        } // CodeGenerator::handleStorageClass
    931920
    932921        std::string genName( DeclarationWithType * decl ) {
  • src/CodeGen/CodeGenerator.h

    rf37147b rdd020c0  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb  9 15:06:21 2017
    13 // Update Count     : 49
     12// Last Modified On : Wed Mar  1 16:20:04 2017
     13// Update Count     : 50
    1414//
    1515
     
    123123
    124124                void printDesignators( std::list< Expression * > & );
    125                 void handleStorageClass( Declaration *decl );
     125                void handleStorageClass( DeclarationWithType *decl );
    126126                void handleAggregate( AggregateDecl *aggDecl );
    127127                void handleTypedef( NamedTypeDecl *namedType );
  • src/CodeGen/FixNames.cc

    rf37147b rdd020c0  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Mon Apr 11 15:38:10 2016
    13 // Update Count     : 1
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Mar  3 21:52:17 2017
     13// Update Count     : 6
    1414//
    1515
     
    4444                        LinkageSpec::Cforall,
    4545                        main_type = new FunctionType( Type::Qualifiers(), true ),
    46                         nullptr, false, false
     46                        nullptr
    4747                ) };
    4848                main_type->get_returnVals().push_back(
     
    5050                );
    5151
    52                 auto&& name = SymTab::Mangler::mangle( mainDecl.get() );
     52                auto && name = SymTab::Mangler::mangle( mainDecl.get() );
    5353                // std::cerr << name << std::endl;
    5454                return name;
     
    6161                        LinkageSpec::Cforall,
    6262                        main_type = new FunctionType( Type::Qualifiers(), false ),
    63                         nullptr, false, false
     63                        nullptr
    6464                ) };
    6565                main_type->get_returnVals().push_back(
  • src/GenPoly/Box.cc

    rf37147b rdd020c0  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 16 14:57:16 2017
    13 // Update Count     : 297
     12// Last Modified On : Fri Mar  3 21:57:15 2017
     13// Update Count     : 310
    1414//
    1515
     
    299299                // because each unit generates copies of the default routines for each aggregate.
    300300                FunctionDecl *layoutDecl = new FunctionDecl(
    301                         layoutofName( typeDecl ), functionNesting > 0 ? DeclarationNode::NoStorageClass : DeclarationNode::Static, LinkageSpec::AutoGen, layoutFnType, new CompoundStmt( noLabels ), true, false );
     301                        layoutofName( typeDecl ), functionNesting > 0 ? DeclarationNode::NoStorageClass : DeclarationNode::Static, LinkageSpec::AutoGen, layoutFnType, new CompoundStmt( noLabels ),
     302                        std::list< Attribute * >(), DeclarationNode::FuncSpec( DeclarationNode::InlineSpec ) );
    302303                layoutDecl->fixUniqueId();
    303304                return layoutDecl;
     
    910911                        adapterBody->get_kids().push_back( bodyStmt );
    911912                        std::string adapterName = makeAdapterName( mangleName );
    912                         return new FunctionDecl( adapterName, DeclarationNode::NoStorageClass, LinkageSpec::C, adapterType, adapterBody, false, false );
     913                        return new FunctionDecl( adapterName, DeclarationNode::NoStorageClass, LinkageSpec::C, adapterType, adapterBody );
    913914                }
    914915
  • src/GenPoly/Specialize.cc

    rf37147b rdd020c0  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Thu Apr 28 15:17:45 2016
    13 // Update Count     : 24
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Mar  3 21:54:45 2017
     13// Update Count     : 28
    1414//
    1515
     
    155155                } // if
    156156                // create new thunk with same signature as formal type (C linkage, empty body)
    157                 FunctionDecl *thunkFunc = new FunctionDecl( thunkNamer.newName(), DeclarationNode::NoStorageClass, LinkageSpec::C, newType, new CompoundStmt( noLabels ), false, false );
     157                FunctionDecl *thunkFunc = new FunctionDecl( thunkNamer.newName(), DeclarationNode::NoStorageClass, LinkageSpec::C, newType, new CompoundStmt( noLabels ) );
    158158                thunkFunc->fixUniqueId();
    159159
  • src/InitTweak/FixGlobalInit.cc

    rf37147b rdd020c0  
    1010// Created On       : Mon May 04 15:14:56 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jun 29 22:33:15 2016
    13 // Update Count     : 4
     12// Last Modified On : Fri Mar  3 21:55:33 2017
     13// Update Count     : 9
    1414//
    1515
     
    8787                        dtorParameters.push_back( new ConstantExpr( Constant::from_int( 102 ) ) );
    8888                }
    89                 initFunction = new FunctionDecl( "_init_" + fixedName, DeclarationNode::Static, LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt( noLabels ), false, false );
     89                initFunction = new FunctionDecl( "_init_" + fixedName, DeclarationNode::Static, LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt( noLabels ) );
    9090                initFunction->get_attributes().push_back( new Attribute( "constructor", ctorParameters ) );
    91                 destroyFunction = new FunctionDecl( "_destroy_" + fixedName, DeclarationNode::Static, LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt( noLabels ), false, false );
     91                destroyFunction = new FunctionDecl( "_destroy_" + fixedName, DeclarationNode::Static, LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt( noLabels ) );
    9292                destroyFunction->get_attributes().push_back( new Attribute( "destructor", dtorParameters ) );
    9393        }
  • src/InitTweak/FixInit.cc

    rf37147b rdd020c0  
    1010// Created On       : Wed Jan 13 16:29:30 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 16 14:58:43 2017
    13 // Update Count     : 35
     12// Last Modified On : Fri Mar  3 21:56:11 2017
     13// Update Count     : 39
    1414//
    1515
     
    731731
    732732                                                        // void __objName_dtor_atexitN(...) {...}
    733                                                         FunctionDecl * dtorCaller = new FunctionDecl( objDecl->get_mangleName() + dtorCallerNamer.newName(), DeclarationNode::Static, LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt( noLabels ), false, false );
     733                                                        FunctionDecl * dtorCaller = new FunctionDecl( objDecl->get_mangleName() + dtorCallerNamer.newName(), DeclarationNode::Static, LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt( noLabels ) );
    734734                                                        dtorCaller->fixUniqueId();
    735735                                                        dtorCaller->get_statements()->push_back( dtorStmt );
  • src/Parser/DeclarationNode.cc

    rf37147b rdd020c0  
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 23 22:21:06 2017
    13 // Update Count     : 775
     12// Last Modified On : Fri Mar  3 21:38:34 2017
     13// Update Count     : 862
    1414//
    1515
     
    3232
    3333// These must remain in the same order as the corresponding DeclarationNode enumerations.
    34 const char * DeclarationNode::storageName[] = { "extern", "static", "auto", "register", "inline", "fortran", "_Noreturn", "_Thread_local", "NoStorageClass" };
    35 const char * DeclarationNode::qualifierName[] = { "const", "restrict", "volatile", "lvalue", "_Atomic", "NoQualifier" };
    36 const char * DeclarationNode::basicTypeName[] = { "void", "_Bool", "char", "int", "float", "double", "long double", "NoBasicType" };
    37 const char * DeclarationNode::complexTypeName[] = { "_Complex", "_Imaginary", "NoComplexType" };
    38 const char * DeclarationNode::signednessName[] = { "signed", "unsigned", "NoSignedness" };
    39 const char * DeclarationNode::lengthName[] = { "short", "long", "long long", "NoLength" };
    40 const char * DeclarationNode::aggregateName[] = { "struct", "union", "context" };
    41 const char * DeclarationNode::typeClassName[] = { "otype", "dtype", "ftype" };
    42 const char * DeclarationNode::builtinTypeName[] = { "__builtin_va_list" };
     34const char * DeclarationNode::storageClassNames[] = { "extern", "static", "auto", "register", "_Thread_local", "inline", "fortran", "_Noreturn", "NoStorageClassNames" };
     35const char * DeclarationNode::funcSpecifierNames[] = { "inline", "fortran", "_Noreturn", "NoFunctionSpecifierNames" };
     36const char * DeclarationNode::typeQualifierNames[] = { "const", "restrict", "volatile", "lvalue", "_Atomic", "NoTypeQualifierNames" };
     37const char * DeclarationNode::basicTypeNames[] = { "void", "_Bool", "char", "int", "float", "double", "long double", "NoBasicTypeNames" };
     38const char * DeclarationNode::complexTypeNames[] = { "_Complex", "_Imaginary", "NoComplexTypeNames" };
     39const char * DeclarationNode::signednessNames[] = { "signed", "unsigned", "NoSignednessNames" };
     40const char * DeclarationNode::lengthNames[] = { "short", "long", "long long", "NoLengthNames" };
     41const char * DeclarationNode::aggregateNames[] = { "struct", "union", "context", "NoAggregateNames" };
     42const char * DeclarationNode::typeClassNames[] = { "otype", "dtype", "ftype", "NoTypeClassNames" };
     43const char * DeclarationNode::builtinTypeNames[] = { "__builtin_va_list", "NoBuiltinTypeNames" };
    4344
    4445UniqueName DeclarationNode::anonymous( "__anonymous" );
     
    5051                storageClass( NoStorageClass ),
    5152                bitfieldWidth( nullptr ),
    52                 isInline( false ),
    53                 isNoreturn( false ),
    5453                hasEllipsis( false ),
    5554                linkage( ::linkage ),
     
    9291        newnode->storageClass = storageClass;
    9392        newnode->bitfieldWidth = maybeClone( bitfieldWidth );
    94         newnode->isInline = isInline;
    95         newnode->isNoreturn = isNoreturn;
     93        newnode->funcSpec = funcSpec;
    9694        newnode->enumeratorValue.reset( maybeClone( enumeratorValue.get() ) );
    9795        newnode->hasEllipsis = hasEllipsis;
     
    118116}
    119117
     118void DeclarationNode::print_FuncSpec( std::ostream & output, DeclarationNode::FuncSpec funcSpec ) {
     119        if ( funcSpec.any() ) {                                                         // function specifiers?
     120                for ( unsigned int i = 0; i < DeclarationNode::NoFuncSpecifier; i += 1 ) {
     121                        if ( funcSpec[i] ) {
     122                                output << DeclarationNode::funcSpecifierNames[i] << ' ';
     123                        } // if
     124                } // for
     125        } // if
     126} // print_FuncSpec
     127
    120128void DeclarationNode::print( std::ostream &os, int indent ) const {
    121129        os << string( indent, ' ' );
     
    130138        } // if
    131139
    132         if ( storageClass != NoStorageClass ) os << DeclarationNode::storageName[storageClass] << ' ';
    133         if ( isInline ) os << DeclarationNode::storageName[Inline] << ' ';
    134         if ( isNoreturn ) os << DeclarationNode::storageName[Noreturn] << ' ';
     140        if ( storageClass != NoStorageClass ) os << DeclarationNode::storageClassNames[storageClass] << ' ';
     141        print_FuncSpec( os, funcSpec );
     142
    135143        if ( type ) {
    136144                type->print( os, indent );
     
    183191} // DeclarationNode::newFunction
    184192
    185 DeclarationNode * DeclarationNode::newQualifier( Qualifier q ) {
     193
     194DeclarationNode * DeclarationNode::newStorageClass( DeclarationNode::StorageClass sc ) {
     195        DeclarationNode * newnode = new DeclarationNode;
     196        newnode->storageClass = sc;
     197        return newnode;
     198} // DeclarationNode::newStorageClass
     199
     200DeclarationNode * DeclarationNode::newFuncSpecifier( DeclarationNode::FuncSpecifier fs ) {
     201        DeclarationNode * newnode = new DeclarationNode;
     202        newnode->funcSpec[ fs ] = true;
     203        return newnode;
     204} // DeclarationNode::newFuncSpecifier
     205
     206DeclarationNode * DeclarationNode::newTypeQualifier( TypeQualifier tq ) {
    186207        DeclarationNode * newnode = new DeclarationNode;
    187208        newnode->type = new TypeData();
    188         newnode->type->qualifiers[ q ] = 1;
     209        newnode->type->typeQualifiers[ tq ] = true;
    189210        return newnode;
    190211} // DeclarationNode::newQualifier
     212
     213DeclarationNode * DeclarationNode::newBasicType( BasicType bt ) {
     214        DeclarationNode * newnode = new DeclarationNode;
     215        newnode->type = new TypeData( TypeData::Basic );
     216        newnode->type->basictype = bt;
     217        return newnode;
     218} // DeclarationNode::newBasicType
     219
     220DeclarationNode * DeclarationNode::newComplexType( ComplexType ct ) {
     221        DeclarationNode * newnode = new DeclarationNode;
     222        newnode->type = new TypeData( TypeData::Basic );
     223        newnode->type->complextype = ct;
     224        return newnode;
     225} // DeclarationNode::newComplexType
     226
     227DeclarationNode * DeclarationNode::newSignedNess( Signedness sn ) {
     228        DeclarationNode * newnode = new DeclarationNode;
     229        newnode->type = new TypeData( TypeData::Basic );
     230        newnode->type->signedness = sn;
     231        return newnode;
     232} // DeclarationNode::newSignedNess
     233
     234DeclarationNode * DeclarationNode::newLength( Length lnth ) {
     235        DeclarationNode * newnode = new DeclarationNode;
     236        newnode->type = new TypeData( TypeData::Basic );
     237        newnode->type->length = lnth;
     238        return newnode;
     239} // DeclarationNode::newLength
    191240
    192241DeclarationNode * DeclarationNode::newForall( DeclarationNode * forall ) {
     
    196245        return newnode;
    197246} // DeclarationNode::newForall
    198 
    199 DeclarationNode * DeclarationNode::newStorageClass( DeclarationNode::StorageClass sc ) {
    200         DeclarationNode * newnode = new DeclarationNode;
    201         newnode->storageClass = sc;
    202         return newnode;
    203 } // DeclarationNode::newStorageClass
    204 
    205 DeclarationNode * DeclarationNode::newBasicType( BasicType bt ) {
    206         DeclarationNode * newnode = new DeclarationNode;
    207         newnode->type = new TypeData( TypeData::Basic );
    208         newnode->type->basictype = bt;
    209         return newnode;
    210 } // DeclarationNode::newBasicType
    211 
    212 DeclarationNode * DeclarationNode::newComplexType( ComplexType ct ) {
    213         DeclarationNode * newnode = new DeclarationNode;
    214         newnode->type = new TypeData( TypeData::Basic );
    215         newnode->type->complextype = ct;
    216         return newnode;
    217 } // DeclarationNode::newComplexType
    218 
    219 DeclarationNode * DeclarationNode::newSignedNess( Signedness sn ) {
    220         DeclarationNode * newnode = new DeclarationNode;
    221         newnode->type = new TypeData( TypeData::Basic );
    222         newnode->type->signedness = sn;
    223         return newnode;
    224 } // DeclarationNode::newSignedNess
    225 
    226 DeclarationNode * DeclarationNode::newLength( Length lnth ) {
    227         DeclarationNode * newnode = new DeclarationNode;
    228         newnode->type = new TypeData( TypeData::Basic );
    229         newnode->type->length = lnth;
    230         return newnode;
    231 } // DeclarationNode::newLength
    232247
    233248DeclarationNode * DeclarationNode::newFromTypedef( string * name ) {
     
    428443
    429444void DeclarationNode::checkQualifiers( const TypeData * src, const TypeData * dst ) {
    430         TypeData::Qualifiers qsrc = src->qualifiers, qdst = dst->qualifiers; // optimization
    431 
    432         if ( (qsrc & qdst).any() ) {                                            // common qualifier ?
    433                 for ( int i = 0; i < NoQualifier; i += 1 ) {    // find common qualifiers
     445        const TypeData::TypeQualifiers &qsrc = src->typeQualifiers, &qdst = dst->typeQualifiers; // optimization
     446
     447        if ( (qsrc & qdst).any() ) {                                             // common qualifier ?
     448                for ( unsigned int i = 0; i < NoTypeQualifier; i += 1 ) { // find common qualifiers
    434449                        if ( qsrc[i] && qdst[i] ) {
    435                                 appendError( error, string( "duplicate " ) + DeclarationNode::qualifierName[i] );
     450                                appendError( error, string( "duplicate " ) + DeclarationNode::typeQualifierNames[i] );
    436451                        } // if
    437452                } // for
     
    440455
    441456void DeclarationNode::checkStorageClasses( DeclarationNode * q ) {
     457        const FuncSpec &src = funcSpec, &dst = q->funcSpec; // optimization
     458        if ( (src & dst).any() ) {                                                      // common specifier ?
     459                for ( unsigned int i = 0; i < NoFuncSpecifier; i += 1 ) { // find common specifier
     460                        if ( src[i] && dst[i] ) {
     461                                appendError( error, string( "duplicate " ) + DeclarationNode::funcSpecifierNames[i] );
     462                        } // if
     463                } // for
     464        } // if
     465
    442466        if ( storageClass != NoStorageClass && q->storageClass != NoStorageClass ) {
    443467                if ( storageClass == q->storageClass ) {                // duplicate qualifier
    444                         appendError( error, string( "duplicate " ) + storageName[ storageClass ] );
     468                        appendError( error, string( "duplicate " ) + storageClassNames[ storageClass ] );
    445469                } else {                                                                                // only one storage class
    446                         appendError( error, string( "conflicting " ) + storageName[ storageClass ] + " & " + storageName[ q->storageClass ] );
     470                        appendError( error, string( "conflicting " ) + storageClassNames[ storageClass ] + " & " + storageClassNames[ q->storageClass ] );
    447471                        q->storageClass = storageClass;                         // FIX ERROR, prevent assertions from triggering
    448472                } // if
    449473        } // if
     474
    450475        appendError( error, q->error );
    451476} // DeclarationNode::checkStorageClasses
    452477
    453478DeclarationNode * DeclarationNode::copyStorageClasses( DeclarationNode * q ) {
    454         isInline = isInline || q->isInline;
    455         isNoreturn = isNoreturn || q->isNoreturn;
     479        funcSpec = funcSpec | q->funcSpec;
     480
    456481        // do not overwrite an existing value with NoStorageClass
    457482        if ( q->storageClass != NoStorageClass ) {
     
    481506                src = nullptr;
    482507        } else {
    483                 dst->qualifiers |= src->qualifiers;
     508                dst->typeQualifiers |= src->typeQualifiers;
    484509        } // if
    485510} // addQualifiersToType
     
    539564                switch ( dst->kind ) {
    540565                  case TypeData::Unknown:
    541                         src->qualifiers |= dst->qualifiers;
     566                        src->typeQualifiers |= dst->typeQualifiers;
    542567                        dst = src;
    543568                        src = nullptr;
    544569                        break;
    545570                  case TypeData::Basic:
    546                         dst->qualifiers |= src->qualifiers;
     571                        dst->typeQualifiers |= src->typeQualifiers;
    547572                        if ( src->kind != TypeData::Unknown ) {
    548573                                assert( src->kind == TypeData::Basic );
     
    551576                                        dst->basictype = src->basictype;
    552577                                } else if ( src->basictype != DeclarationNode::NoBasicType )
    553                                         throw SemanticError( string( "conflicting type specifier " ) + DeclarationNode::basicTypeName[ src->basictype ] + " in type: ", src );
     578                                        throw SemanticError( string( "conflicting type specifier " ) + DeclarationNode::basicTypeNames[ src->basictype ] + " in type: ", src );
    554579
    555580                                if ( dst->complextype == DeclarationNode::NoComplexType ) {
    556581                                        dst->complextype = src->complextype;
    557582                                } else if ( src->complextype != DeclarationNode::NoComplexType )
    558                                         throw SemanticError( string( "conflicting type specifier " ) + DeclarationNode::complexTypeName[ src->complextype ] + " in type: ", src );
     583                                        throw SemanticError( string( "conflicting type specifier " ) + DeclarationNode::complexTypeNames[ src->complextype ] + " in type: ", src );
    559584
    560585                                if ( dst->signedness == DeclarationNode::NoSignedness ) {
    561586                                        dst->signedness = src->signedness;
    562587                                } else if ( src->signedness != DeclarationNode::NoSignedness )
    563                                         throw SemanticError( string( "conflicting type specifier " ) + DeclarationNode::signednessName[ src->signedness ] + " in type: ", src );
     588                                        throw SemanticError( string( "conflicting type specifier " ) + DeclarationNode::signednessNames[ src->signedness ] + " in type: ", src );
    564589
    565590                                if ( dst->length == DeclarationNode::NoLength ) {
     
    568593                                        dst->length = DeclarationNode::LongLong;
    569594                                } else if ( src->length != DeclarationNode::NoLength )
    570                                         throw SemanticError( string( "conflicting type specifier " ) + DeclarationNode::lengthName[ src->length ] + " in type: ", src );
     595                                        throw SemanticError( string( "conflicting type specifier " ) + DeclarationNode::lengthNames[ src->length ] + " in type: ", src );
    571596                        } // if
    572597                        break;
     
    580605                                        dst->base->aggInst.params = maybeClone( src->aggregate.actuals );
    581606                                } // if
    582                                 dst->base->qualifiers |= src->qualifiers;
     607                                dst->base->typeQualifiers |= src->typeQualifiers;
    583608                                src = nullptr;
    584609                                break;
     
    612637                                                type->aggInst.hoistType = o->type->enumeration.body;
    613638                                        } // if
    614                                         type->qualifiers |= o->type->qualifiers;
     639                                        type->typeQualifiers |= o->type->typeQualifiers;
    615640                                } else {
    616641                                        type = o->type;
     
    768793                                        p->type->base->aggInst.params = maybeClone( type->aggregate.actuals );
    769794                                } // if
    770                                 p->type->base->qualifiers |= type->qualifiers;
     795                                p->type->base->typeQualifiers |= type->typeQualifiers;
    771796                                break;
    772797
     
    805830                                        lastArray->base->aggInst.params = maybeClone( type->aggregate.actuals );
    806831                                } // if
    807                                 lastArray->base->qualifiers |= type->qualifiers;
     832                                lastArray->base->typeQualifiers |= type->typeQualifiers;
    808833                                break;
    809834                          default:
     
    10051030        } // if
    10061031
    1007 //      if ( variable.name ) {
    10081032        if ( variable.tyClass != NoTypeClass ) {
    10091033                static const TypeDecl::Kind kindMap[] = { TypeDecl::Any, TypeDecl::Dtype, TypeDecl::Ftype, TypeDecl::Ttype };
    10101034                assertf( sizeof(kindMap)/sizeof(kindMap[0] == NoTypeClass-1), "DeclarationNode::build: kindMap is out of sync." );
    10111035                assertf( variable.tyClass < sizeof(kindMap)/sizeof(kindMap[0]), "Variable's tyClass is out of bounds." );
    1012 //              TypeDecl * ret = new TypeDecl( *variable.name, DeclarationNode::NoStorageClass, nullptr, kindMap[ variable.tyClass ] );
    10131036                TypeDecl * ret = new TypeDecl( *name, DeclarationNode::NoStorageClass, nullptr, kindMap[ variable.tyClass ] );
    10141037                buildList( variable.assertions, ret->get_assertions() );
     
    10171040
    10181041        if ( type ) {
    1019                 return buildDecl( type, name ? *name : string( "" ), storageClass, maybeBuild< Expression >( bitfieldWidth ), isInline, isNoreturn, linkage, asmName, maybeBuild< Initializer >(initializer), attributes )->set_extension( extension );
    1020         } // if
    1021 
    1022         if ( ! isInline && ! isNoreturn ) {
    1023                 assertf( name, "ObjectDecl are assumed to have names\n" );
    1024                 return (new ObjectDecl( *name, storageClass, linkage, maybeBuild< Expression >( bitfieldWidth ), nullptr, maybeBuild< Initializer >( initializer ) ))->set_asmName( asmName )->set_extension( extension );
    1025         } // if
    1026 
    1027         throw SemanticError( "invalid function specifier ", this );
     1042                // Function specifiers can only appear on a function definition/declaration.
     1043                //
     1044                //    inline _Noreturn int f();                 // allowed
     1045                //    inline _Noreturn int g( int i );  // allowed
     1046                //    inline _Noreturn int i;                   // disallowed
     1047                if ( type->kind != TypeData::Function && funcSpec.any() ) {
     1048                        throw SemanticError( "invalid function specifier for ", this );
     1049                } // if
     1050                return buildDecl( type, name ? *name : string( "" ), storageClass, maybeBuild< Expression >( bitfieldWidth ), funcSpec, linkage, asmName, maybeBuild< Initializer >(initializer), attributes )->set_extension( extension );
     1051        } // if
     1052
     1053        // SUE's cannot have function specifiers, either
     1054        //
     1055        //    inlne _Noreturn struct S { ... };         // disallowed
     1056        //    inlne _Noreturn enum   E { ... };         // disallowed
     1057        if ( funcSpec.any() ) {
     1058                throw SemanticError( "invalid function specifier for ", this );
     1059        } // if
     1060        assertf( name, "ObjectDecl must a have name\n" );
     1061        return (new ObjectDecl( *name, storageClass, linkage, maybeBuild< Expression >( bitfieldWidth ), nullptr, maybeBuild< Initializer >( initializer ) ))->set_asmName( asmName )->set_extension( extension );
    10281062}
    10291063
     
    10321066
    10331067        if ( attr.expr ) {
    1034 //              return new AttrType( buildQualifiers( type ), *attr.name, attr.expr->build() );
    10351068                return new AttrType( buildQualifiers( type ), *name, attr.expr->build(), attributes );
    10361069        } else if ( attr.type ) {
    1037 //              return new AttrType( buildQualifiers( type ), *attr.name, attr.type->buildType() );
    10381070                return new AttrType( buildQualifiers( type ), *name, attr.type->buildType(), attributes );
    10391071        } // if
  • src/Parser/ParseNode.h

    rf37147b rdd020c0  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 23 15:22:10 2017
    13 // Update Count     : 662
     12// Last Modified On : Fri Mar  3 21:34:27 2017
     13// Update Count     : 704
    1414//
    1515
     
    1919#include <string>
    2020#include <list>
     21#include <bitset>
    2122#include <iterator>
    2223#include <memory>
     
    203204        // These must remain in the same order as the corresponding DeclarationNode names.
    204205
    205         // enum StorageClass { Extern, Static, Auto, Register, NoStorageClass };
    206         // enum FunctionSpec { Inline, Fortran, Noreturn, NoFunctionSpec };
    207         // enum Qualifier { Const, Restrict, Volatile, Lvalue, Atomic, Threadlocal, Mutex, NoQualifier };
    208 
    209         enum StorageClass { Extern, Static, Auto, Register, Inline, Fortran, Noreturn, Threadlocal, NoStorageClass, };
    210         enum Qualifier { Const, Restrict, Volatile, Lvalue, Atomic, NoQualifier };
     206        enum StorageClass { Extern, Static, Auto, Register, Threadlocal, NoStorageClass };
     207        enum FuncSpecifier { Inline, Noreturn, Fortran, NoFuncSpecifier,
     208                                        InlineSpec = 1 << Inline, NoreturnSpec = 1 << Noreturn, FortranSpec = 1 << Fortran };
     209        enum TypeQualifier { Const, Restrict, Volatile, Lvalue, Atomic, NoTypeQualifier };
    211210        enum BasicType { Void, Bool, Char, Int, Float, Double, LongDouble, NoBasicType };
    212211        enum ComplexType { Complex, Imaginary, NoComplexType };
     
    217216        enum BuiltinType { Valist, Zero, One, NoBuiltinType };
    218217
    219         static const char * storageName[];
    220         static const char * qualifierName[];
    221         static const char * basicTypeName[];
    222         static const char * complexTypeName[];
    223         static const char * signednessName[];
    224         static const char * lengthName[];
    225         static const char * aggregateName[];
    226         static const char * typeClassName[];
    227         static const char * builtinTypeName[];
    228 
    229         static DeclarationNode * newFunction( std::string * name, DeclarationNode * ret, DeclarationNode * param, StatementNode * body, bool newStyle = false );
    230         static DeclarationNode * newQualifier( Qualifier );
    231         static DeclarationNode * newForall( DeclarationNode * );
     218        static const char * storageClassNames[];
     219        static const char * funcSpecifierNames[];
     220        static const char * typeQualifierNames[];
     221        static const char * basicTypeNames[];
     222        static const char * complexTypeNames[];
     223        static const char * signednessNames[];
     224        static const char * lengthNames[];
     225        static const char * aggregateNames[];
     226        static const char * typeClassNames[];
     227        static const char * builtinTypeNames[];
     228
    232229        static DeclarationNode * newStorageClass( StorageClass );
     230        static DeclarationNode * newFuncSpecifier( FuncSpecifier );
     231        static DeclarationNode * newTypeQualifier( TypeQualifier );
    233232        static DeclarationNode * newBasicType( BasicType );
    234233        static DeclarationNode * newComplexType( ComplexType );
    235         static DeclarationNode * newSignedNess( Signedness sn );
    236         static DeclarationNode * newLength( Length lnth );
     234        static DeclarationNode * newSignedNess( Signedness );
     235        static DeclarationNode * newLength( Length );
    237236        static DeclarationNode * newBuiltinType( BuiltinType );
     237        static DeclarationNode * newForall( DeclarationNode * );
    238238        static DeclarationNode * newFromTypedef( std::string * );
     239        static DeclarationNode * newFunction( std::string * name, DeclarationNode * ret, DeclarationNode * param, StatementNode * body, bool newStyle = false );
    239240        static DeclarationNode * newAggregate( Aggregate kind, const std::string * name, ExpressionNode * actuals, DeclarationNode * fields, bool body );
    240241        static DeclarationNode * newEnum( std::string * name, DeclarationNode * constants, bool body );
     
    324325        TypeData * type;
    325326        StorageClass storageClass;
     327
     328        typedef std::bitset< DeclarationNode::NoFuncSpecifier > FuncSpec;
     329        FuncSpec funcSpec;
     330        static void print_FuncSpec( std::ostream & output, FuncSpec funcSpec );
     331
    326332        ExpressionNode * bitfieldWidth;
    327         bool isInline, isNoreturn;
    328333        std::unique_ptr<ExpressionNode> enumeratorValue;
    329334        bool hasEllipsis;
  • src/Parser/TypeData.cc

    rf37147b rdd020c0  
    1010// Created On       : Sat May 16 15:12:51 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 23 21:48:55 2017
    13 // Update Count     : 485
     12// Last Modified On : Fri Mar  3 21:59:10 2017
     13// Update Count     : 516
    1414//
    1515
     
    157157TypeData * TypeData::clone() const {
    158158        TypeData * newtype = new TypeData( kind );
    159         newtype->qualifiers = qualifiers;
     159        newtype->typeQualifiers = typeQualifiers;
    160160        newtype->base = maybeClone( base );
    161161        newtype->forall = maybeClone( forall );
     
    226226
    227227void TypeData::print( ostream &os, int indent ) const {
    228         for ( int i = 0; i < DeclarationNode::NoQualifier; i += 1 ) {
    229                 if ( qualifiers[i] ) os << DeclarationNode::qualifierName[ i ] << ' ';
     228        for ( int i = 0; i < DeclarationNode::NoTypeQualifier; i += 1 ) {
     229                if ( typeQualifiers[i] ) os << DeclarationNode::typeQualifierNames[ i ] << ' ';
    230230        } // for
    231231
     
    250250                break;
    251251          case Basic:
    252                 if ( signedness != DeclarationNode::NoSignedness ) os << DeclarationNode::signednessName[ signedness ] << " ";
    253                 if ( length != DeclarationNode::NoLength ) os << DeclarationNode::lengthName[ length ] << " ";
     252                if ( signedness != DeclarationNode::NoSignedness ) os << DeclarationNode::signednessNames[ signedness ] << " ";
     253                if ( length != DeclarationNode::NoLength ) os << DeclarationNode::lengthNames[ length ] << " ";
    254254                assert( basictype != DeclarationNode::NoBasicType );
    255                 os << DeclarationNode::basicTypeName[ basictype ] << " ";
    256                 if ( complextype != DeclarationNode::NoComplexType ) os << DeclarationNode::complexTypeName[ complextype ] << " ";
     255                os << DeclarationNode::basicTypeNames[ basictype ] << " ";
     256                if ( complextype != DeclarationNode::NoComplexType ) os << DeclarationNode::complexTypeNames[ complextype ] << " ";
    257257                break;
    258258          case Array:
     
    301301                break;
    302302          case Aggregate:
    303                 os << DeclarationNode::aggregateName[ aggregate.kind ] << ' ' << *aggregate.name << endl;
     303                os << DeclarationNode::aggregateNames[ aggregate.kind ] << ' ' << *aggregate.name << endl;
    304304                if ( aggregate.params ) {
    305305                        os << string( indent + 2, ' ' ) << "with type parameters " << endl;
     
    399399                        FunctionType * dtorType = new FunctionType( Type::Qualifiers(), false );
    400400                        dtorType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, nullptr, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), td->get_name(), *i ) ), nullptr ) );
    401                         td->get_assertions().push_front( new FunctionDecl( "^?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, dtorType, nullptr, false, false ) );
     401                        td->get_assertions().push_front( new FunctionDecl( "^?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, dtorType, nullptr ) );
    402402
    403403                        // add copy ctor:  void ?{}(T *, T)
     
    405405                        copyCtorType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, nullptr, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), td->get_name(), *i ) ), nullptr ) );
    406406                        copyCtorType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, nullptr, new TypeInstType( Type::Qualifiers(), td->get_name(), *i ), nullptr ) );
    407                         td->get_assertions().push_front( new FunctionDecl( "?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, copyCtorType, nullptr, false, false ) );
     407                        td->get_assertions().push_front( new FunctionDecl( "?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, copyCtorType, nullptr ) );
    408408
    409409                        // add default ctor:  void ?{}(T *)
    410410                        FunctionType * ctorType = new FunctionType( Type::Qualifiers(), false );
    411411                        ctorType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, nullptr, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), td->get_name(), *i ) ), nullptr ) );
    412                         td->get_assertions().push_front( new FunctionDecl( "?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, ctorType, nullptr, false, false ) );
     412                        td->get_assertions().push_front( new FunctionDecl( "?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, ctorType, nullptr ) );
    413413
    414414                        // add assignment operator:  T * ?=?(T *, T)
     
    417417                        assignType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, nullptr, new TypeInstType( Type::Qualifiers(), td->get_name(), *i ), nullptr ) );
    418418                        assignType->get_returnVals().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, nullptr, new TypeInstType( Type::Qualifiers(), td->get_name(), *i ), nullptr ) );
    419                         td->get_assertions().push_front( new FunctionDecl( "?=?", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, assignType, nullptr, false, false ) );
     419                        td->get_assertions().push_front( new FunctionDecl( "?=?", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, assignType, nullptr ) );
    420420                } // if
    421421        } // for
     
    494494Type::Qualifiers buildQualifiers( const TypeData * td ) {
    495495        Type::Qualifiers q;
    496         q.isConst = td->qualifiers[ DeclarationNode::Const ];
    497         q.isVolatile = td->qualifiers[ DeclarationNode::Volatile ];
    498         q.isRestrict = td->qualifiers[ DeclarationNode::Restrict ];
    499         q.isLvalue = td->qualifiers[ DeclarationNode::Lvalue ];
    500         q.isAtomic = td->qualifiers[ DeclarationNode::Atomic ];;
     496        q.isConst = td->typeQualifiers[ DeclarationNode::Const ];
     497        q.isVolatile = td->typeQualifiers[ DeclarationNode::Volatile ];
     498        q.isRestrict = td->typeQualifiers[ DeclarationNode::Restrict ];
     499        q.isLvalue = td->typeQualifiers[ DeclarationNode::Lvalue ];
     500        q.isAtomic = td->typeQualifiers[ DeclarationNode::Atomic ];;
    501501        return q;
    502502} // buildQualifiers
     
    516516          case DeclarationNode::Bool:
    517517                if ( td->signedness != DeclarationNode::NoSignedness ) {
    518                         throw SemanticError( string( "invalid type specifier " ) + DeclarationNode::signednessName[ td->signedness ] + " in type: ", td );
     518                        throw SemanticError( string( "invalid type specifier " ) + DeclarationNode::signednessNames[ td->signedness ] + " in type: ", td );
    519519                } // if
    520520                if ( td->length != DeclarationNode::NoLength ) {
    521                         throw SemanticError( string( "invalid type specifier " ) + DeclarationNode::lengthName[ td->length ] + " in type: ", td );
     521                        throw SemanticError( string( "invalid type specifier " ) + DeclarationNode::lengthNames[ td->length ] + " in type: ", td );
    522522                } // if
    523523
     
    532532
    533533                if ( td->length != DeclarationNode::NoLength ) {
    534                         throw SemanticError( string( "invalid type specifier " ) + DeclarationNode::lengthName[ td->length ] + " in type: ", td );
     534                        throw SemanticError( string( "invalid type specifier " ) + DeclarationNode::lengthNames[ td->length ] + " in type: ", td );
    535535                } // if
    536536
     
    562562          FloatingPoint: ;
    563563                if ( td->signedness != DeclarationNode::NoSignedness ) {
    564                         throw SemanticError( string( "invalid type specifier " ) + DeclarationNode::signednessName[ td->signedness ] + " in type: ", td );
     564                        throw SemanticError( string( "invalid type specifier " ) + DeclarationNode::signednessNames[ td->signedness ] + " in type: ", td );
    565565                } // if
    566566                if ( td->length == DeclarationNode::Short || td->length == DeclarationNode::LongLong ) {
    567                         throw SemanticError( string( "invalid type specifier " ) + DeclarationNode::lengthName[ td->length ] + " in type: ", td );
     567                        throw SemanticError( string( "invalid type specifier " ) + DeclarationNode::lengthNames[ td->length ] + " in type: ", td );
    568568                } // if
    569569                if ( td->basictype == DeclarationNode::Float && td->length == DeclarationNode::Long ) {
     
    784784} // buildTypeof
    785785
    786 Declaration * buildDecl( const TypeData * td, const string &name, DeclarationNode::StorageClass sc, Expression * bitfieldWidth, bool isInline, bool isNoreturn, LinkageSpec::Spec linkage, ConstantExpr *asmName, Initializer * init, std::list< Attribute * > attributes ) {
     786Declaration * buildDecl( const TypeData * td, const string &name, DeclarationNode::StorageClass sc, Expression * bitfieldWidth, DeclarationNode::FuncSpec funcSpec, LinkageSpec::Spec linkage, ConstantExpr *asmName, Initializer * init, std::list< Attribute * > attributes ) {
    787787        if ( td->kind == TypeData::Function ) {
    788788                if ( td->function.idList ) {                                    // KR function ?
     
    793793                Statement * stmt = maybeBuild<Statement>( td->function.body );
    794794                CompoundStmt * body = dynamic_cast< CompoundStmt* >( stmt );
    795                 decl = new FunctionDecl( name, sc, linkage, buildFunction( td ), body, isInline, isNoreturn, attributes );
     795                decl = new FunctionDecl( name, sc, linkage, buildFunction( td ), body, attributes, funcSpec );
    796796                return decl->set_asmName( asmName );
    797797        } else if ( td->kind == TypeData::Aggregate ) {
     
    802802                return buildSymbolic( td, name, sc );
    803803        } else {
    804                 return (new ObjectDecl( name, sc, linkage, bitfieldWidth, typebuild( td ), init, attributes, isInline, isNoreturn ))->set_asmName( asmName );
     804                return (new ObjectDecl( name, sc, linkage, bitfieldWidth, typebuild( td ), init, attributes ))->set_asmName( asmName );
    805805        } // if
    806806        return nullptr;
     
    820820                        break;
    821821                  default:
    822                         ft->get_returnVals().push_back( dynamic_cast< DeclarationWithType* >( buildDecl( td->base,  "", DeclarationNode::NoStorageClass, nullptr, false, false, LinkageSpec::Cforall, nullptr ) ) );
     822                        ft->get_returnVals().push_back( dynamic_cast< DeclarationWithType* >( buildDecl( td->base, "", DeclarationNode::NoStorageClass, nullptr, DeclarationNode::FuncSpecifier(), LinkageSpec::Cforall, nullptr ) ) );
    823823                } // switch
    824824        } else {
  • src/Parser/TypeData.h

    rf37147b rdd020c0  
    1010// Created On       : Sat May 16 15:18:36 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 23 17:14:46 2017
    13 // Update Count     : 158
     12// Last Modified On : Fri Mar  3 20:56:53 2017
     13// Update Count     : 167
    1414//
    1515
     
    7676        DeclarationNode::Length length = DeclarationNode::NoLength;
    7777        DeclarationNode::BuiltinType builtintype = DeclarationNode::NoBuiltinType;
    78         typedef std::bitset< DeclarationNode::NoQualifier > Qualifiers;
    79         Qualifiers qualifiers;
     78        typedef std::bitset< DeclarationNode::NoTypeQualifier > TypeQualifiers;
     79        TypeQualifiers typeQualifiers;
    8080        DeclarationNode * forall;
    8181
     
    113113TupleType * buildTuple( const TypeData * );
    114114TypeofType * buildTypeof( const TypeData * );
    115 Declaration * buildDecl( const TypeData *, const std::string &, DeclarationNode::StorageClass, Expression *, bool isInline, bool isNoreturn, LinkageSpec::Spec, ConstantExpr *asmName, Initializer * init = nullptr, std::list< class Attribute * > attributes = std::list< class Attribute * >() );
     115Declaration * buildDecl( const TypeData *, const std::string &, DeclarationNode::StorageClass, Expression *, DeclarationNode::FuncSpec funcSpec, LinkageSpec::Spec, ConstantExpr *asmName, Initializer * init = nullptr, std::list< class Attribute * > attributes = std::list< class Attribute * >() );
    116116FunctionType * buildFunction( const TypeData * );
    117117void buildKRFunction( const TypeData::Function_t & function );
  • src/Parser/parser.cc

    rf37147b rdd020c0  
    892892     240,   299,   115,    -1,   242,    -1,   237,   242,    -1,   241,
    893893     237,   242,    -1,   243,    -1,   242,   243,    -1,     5,    -1,
    894        7,    -1,     4,    -1,     6,    -1,     8,    -1,     9,    -1,
    895       72,    -1,    74,    -1,    16,    -1,    21,    -1,    20,    -1,
     894       7,    -1,     4,    -1,     6,    -1,    74,    -1,     8,    -1,
     895       9,    -1,    72,    -1,    16,    -1,    21,    -1,    20,    -1,
    896896      18,    -1,    19,    -1,    17,    -1,    22,    -1,    23,    -1,
    897897      15,    -1,    27,    -1,    28,    -1,    29,    -1,    26,    -1,
     
    10921092    1391,  1396,  1397,  1401,  1403,  1405,  1407,  1409,  1412,  1411,
    10931093    1423,  1424,  1426,  1436,  1437,  1442,  1444,  1446,  1448,  1450,
    1094     1453,  1455,  1458,  1463,  1465,  1467,  1469,  1471,  1473,  1475,
    1095     1477,  1479,  1481,  1483,  1485,  1487,  1489,  1491,  1497,  1498,
    1096     1500,  1502,  1504,  1509,  1510,  1516,  1517,  1519,  1521,  1526,
    1097     1528,  1530,  1532,  1537,  1538,  1540,  1542,  1547,  1548,  1550,
    1098     1555,  1556,  1558,  1560,  1565,  1566,  1568,  1573,  1574,  1576,
    1099     1578,  1583,  1585,  1587,  1592,  1593,  1597,  1598,  1602,  1605,
    1100     1604,  1608,  1610,  1614,  1619,  1624,  1626,  1632,  1633,  1638,
    1101     1639,  1644,  1647,  1655,  1656,  1658,  1660,  1665,  1666,  1672,
    1102     1673,  1675,  1678,  1681,  1686,  1687,  1692,  1697,  1700,  1699,
    1103     1703,  1707,  1715,  1717,  1723,  1724,  1732,  1733,  1737,  1738,
    1104     1739,  1741,  1743,  1750,  1751,  1753,  1755,  1760,  1761,  1767,
    1105     1768,  1772,  1773,  1778,  1779,  1780,  1782,  1790,  1791,  1793,
    1106     1796,  1798,  1802,  1803,  1804,  1806,  1808,  1813,  1818,  1826,
    1107     1828,  1837,  1839,  1844,  1845,  1846,  1850,  1851,  1852,  1856,
    1108     1857,  1858,  1862,  1863,  1864,  1869,  1870,  1875,  1876,  1878,
    1109     1883,  1884,  1889,  1890,  1891,  1892,  1893,  1908,  1909,  1914,
    1110     1915,  1921,  1923,  1926,  1928,  1930,  1953,  1954,  1956,  1958,
    1111     1963,  1964,  1966,  1971,  1976,  1977,  1983,  1982,  1986,  1990,
    1112     1992,  1994,  1996,  2002,  2003,  2008,  2013,  2015,  2020,  2022,
    1113     2023,  2025,  2030,  2032,  2034,  2039,  2041,  2046,  2051,  2059,
    1114     2065,  2064,  2078,  2079,  2084,  2085,  2089,  2094,  2099,  2107,
    1115     2112,  2123,  2124,  2129,  2130,  2136,  2137,  2141,  2142,  2143,
    1116     2148,  2147,  2158,  2166,  2172,  2178,  2187,  2193,  2199,  2205,
    1117     2211,  2219,  2225,  2233,  2239,  2248,  2249,  2250,  2254,  2260,
    1118     2261,  2271,  2272,  2276,  2277,  2282,  2287,  2288,  2294,  2295,
    1119     2297,  2302,  2303,  2304,  2305,  2340,  2342,  2343,  2345,  2350,
    1120     2355,  2360,  2362,  2364,  2369,  2371,  2373,  2375,  2380,  2382,
    1121     2391,  2393,  2394,  2399,  2401,  2403,  2408,  2410,  2412,  2417,
    1122     2419,  2421,  2433,  2434,  2435,  2439,  2441,  2443,  2448,  2450,
    1123     2452,  2457,  2459,  2461,  2476,  2478,  2479,  2481,  2486,  2487,
    1124     2492,  2494,  2496,  2501,  2503,  2505,  2507,  2512,  2514,  2516,
    1125     2526,  2528,  2529,  2531,  2536,  2538,  2540,  2545,  2547,  2549,
    1126     2551,  2556,  2558,  2560,  2573,  2575,  2576,  2578,  2583,  2588,
    1127     2596,  2598,  2600,  2605,  2607,  2612,  2614,  2631,  2632,  2634,
    1128     2639,  2641,  2643,  2645,  2647,  2652,  2653,  2655,  2657,  2662,
    1129     2664,  2666,  2672,  2674,  2676,  2680,  2682,  2684,  2686,  2720,
    1130     2721,  2723,  2728,  2730,  2732,  2734,  2736,  2741,  2742,  2744,
    1131     2746,  2751,  2753,  2755,  2761,  2762,  2764,  2773,  2776,  2778,
    1132     2781,  2783,  2785,  2799,  2800,  2802,  2807,  2809,  2811,  2813,
    1133     2815,  2820,  2821,  2823,  2825,  2830,  2832,  2840,  2841,  2842,
    1134     2847,  2848,  2853,  2855,  2857,  2859,  2861,  2863,  2870,  2872,
    1135     2874,  2876,  2878,  2881,  2883,  2885,  2887,  2889,  2894,  2896,
    1136     2898,  2903,  2929,  2930,  2932,  2936,  2937,  2941,  2943,  2945,
    1137     2947,  2949,  2951,  2958,  2960,  2962,  2964,  2966,  2968,  2973,
    1138     2980,  2982,  3000,  3002,  3007,  3008
     1094    1453,  1455,  1457,  1462,  1464,  1466,  1468,  1470,  1472,  1474,
     1095    1476,  1478,  1480,  1482,  1484,  1486,  1488,  1490,  1496,  1497,
     1096    1499,  1501,  1503,  1508,  1509,  1515,  1516,  1518,  1520,  1525,
     1097    1527,  1529,  1531,  1536,  1537,  1539,  1541,  1546,  1547,  1549,
     1098    1554,  1555,  1557,  1559,  1564,  1565,  1567,  1572,  1573,  1575,
     1099    1577,  1582,  1584,  1586,  1591,  1592,  1596,  1597,  1601,  1604,
     1100    1603,  1607,  1609,  1613,  1618,  1623,  1625,  1631,  1632,  1637,
     1101    1638,  1643,  1646,  1654,  1655,  1657,  1659,  1664,  1665,  1671,
     1102    1672,  1674,  1677,  1680,  1685,  1686,  1691,  1696,  1699,  1698,
     1103    1702,  1706,  1714,  1716,  1722,  1723,  1731,  1732,  1736,  1737,
     1104    1738,  1740,  1742,  1749,  1750,  1752,  1754,  1759,  1760,  1766,
     1105    1767,  1771,  1772,  1777,  1778,  1779,  1781,  1789,  1790,  1792,
     1106    1795,  1797,  1801,  1802,  1803,  1805,  1807,  1812,  1817,  1825,
     1107    1827,  1836,  1838,  1843,  1844,  1845,  1849,  1850,  1851,  1855,
     1108    1856,  1857,  1861,  1862,  1863,  1868,  1869,  1874,  1875,  1877,
     1109    1882,  1883,  1888,  1889,  1890,  1891,  1892,  1907,  1908,  1913,
     1110    1914,  1920,  1922,  1925,  1927,  1929,  1952,  1953,  1955,  1957,
     1111    1962,  1963,  1965,  1970,  1975,  1976,  1982,  1981,  1985,  1989,
     1112    1991,  1993,  1995,  2001,  2002,  2007,  2012,  2014,  2019,  2021,
     1113    2022,  2024,  2029,  2031,  2033,  2038,  2040,  2045,  2050,  2058,
     1114    2064,  2063,  2077,  2078,  2083,  2084,  2088,  2093,  2098,  2106,
     1115    2111,  2122,  2123,  2128,  2129,  2135,  2136,  2140,  2141,  2142,
     1116    2147,  2146,  2157,  2165,  2171,  2177,  2186,  2192,  2198,  2204,
     1117    2210,  2218,  2224,  2232,  2238,  2247,  2248,  2249,  2253,  2259,
     1118    2260,  2270,  2271,  2275,  2276,  2281,  2286,  2287,  2293,  2294,
     1119    2296,  2301,  2302,  2303,  2304,  2339,  2341,  2342,  2344,  2349,
     1120    2354,  2359,  2361,  2363,  2368,  2370,  2372,  2374,  2379,  2381,
     1121    2390,  2392,  2393,  2398,  2400,  2402,  2407,  2409,  2411,  2416,
     1122    2418,  2420,  2432,  2433,  2434,  2438,  2440,  2442,  2447,  2449,
     1123    2451,  2456,  2458,  2460,  2475,  2477,  2478,  2480,  2485,  2486,
     1124    2491,  2493,  2495,  2500,  2502,  2504,  2506,  2511,  2513,  2515,
     1125    2525,  2527,  2528,  2530,  2535,  2537,  2539,  2544,  2546,  2548,
     1126    2550,  2555,  2557,  2559,  2572,  2574,  2575,  2577,  2582,  2587,
     1127    2595,  2597,  2599,  2604,  2606,  2611,  2613,  2630,  2631,  2633,
     1128    2638,  2640,  2642,  2644,  2646,  2651,  2652,  2654,  2656,  2661,
     1129    2663,  2665,  2671,  2673,  2675,  2679,  2681,  2683,  2685,  2719,
     1130    2720,  2722,  2727,  2729,  2731,  2733,  2735,  2740,  2741,  2743,
     1131    2745,  2750,  2752,  2754,  2760,  2761,  2763,  2772,  2775,  2777,
     1132    2780,  2782,  2784,  2798,  2799,  2801,  2806,  2808,  2810,  2812,
     1133    2814,  2819,  2820,  2822,  2824,  2829,  2831,  2839,  2840,  2841,
     1134    2846,  2847,  2852,  2854,  2856,  2858,  2860,  2862,  2869,  2871,
     1135    2873,  2875,  2877,  2880,  2882,  2884,  2886,  2888,  2893,  2895,
     1136    2897,  2902,  2928,  2929,  2931,  2935,  2936,  2940,  2942,  2944,
     1137    2946,  2948,  2950,  2957,  2959,  2961,  2963,  2965,  2967,  2972,
     1138    2979,  2981,  2999,  3001,  3006,  3007
    11391139};
    11401140#endif
     
    14511451static const yytype_uint16 yydefact[] =
    14521452{
    1453      307,   307,   327,   325,   328,   326,   329,   330,   313,   315,
     1453     307,   307,   327,   325,   328,   326,   330,   331,   313,   315,
    14541454     314,     0,   316,   341,   333,   338,   336,   337,   335,   334,
    14551455     339,   340,   346,   347,   345,   342,   343,   344,   571,   395,
    1456      396,     0,     0,     0,   307,     0,   317,   331,   332,     9,
     1456     396,     0,     0,     0,   307,     0,   317,   332,   329,     9,
    14571457     381,     0,    10,    16,    17,     0,     2,    72,    73,   589,
    14581458      11,   307,   547,   253,     3,   477,     3,   266,     0,     3,
     
    69096909/* Line 1806 of yacc.c  */
    69106910#line 1402 "parser.yy"
    6911     { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Const ); }
     6911    { (yyval.decl) = DeclarationNode::newTypeQualifier( DeclarationNode::Const ); }
    69126912    break;
    69136913
     
    69166916/* Line 1806 of yacc.c  */
    69176917#line 1404 "parser.yy"
    6918     { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Restrict ); }
     6918    { (yyval.decl) = DeclarationNode::newTypeQualifier( DeclarationNode::Restrict ); }
    69196919    break;
    69206920
     
    69236923/* Line 1806 of yacc.c  */
    69246924#line 1406 "parser.yy"
    6925     { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Volatile ); }
     6925    { (yyval.decl) = DeclarationNode::newTypeQualifier( DeclarationNode::Volatile ); }
    69266926    break;
    69276927
     
    69306930/* Line 1806 of yacc.c  */
    69316931#line 1408 "parser.yy"
    6932     { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Lvalue ); }
     6932    { (yyval.decl) = DeclarationNode::newTypeQualifier( DeclarationNode::Lvalue ); }
    69336933    break;
    69346934
     
    69376937/* Line 1806 of yacc.c  */
    69386938#line 1410 "parser.yy"
    6939     { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Atomic ); }
     6939    { (yyval.decl) = DeclarationNode::newTypeQualifier( DeclarationNode::Atomic ); }
    69406940    break;
    69416941
     
    70117011
    70127012/* Line 1806 of yacc.c  */
    7013 #line 1452 "parser.yy"
    7014     { (yyval.decl) = new DeclarationNode; (yyval.decl)->isInline = true; }
     7013#line 1451 "parser.yy"
     7014    { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Threadlocal ); }
    70157015    break;
    70167016
     
    70197019/* Line 1806 of yacc.c  */
    70207020#line 1454 "parser.yy"
    7021     { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Fortran ); }
     7021    { (yyval.decl) = DeclarationNode::newFuncSpecifier( DeclarationNode::Inline ); }
    70227022    break;
    70237023
     
    70257025
    70267026/* Line 1806 of yacc.c  */
    7027 #line 1457 "parser.yy"
    7028     { (yyval.decl) = new DeclarationNode; (yyval.decl)->isNoreturn = true; }
     7027#line 1456 "parser.yy"
     7028    { (yyval.decl) = DeclarationNode::newFuncSpecifier( DeclarationNode::Fortran ); }
    70297029    break;
    70307030
     
    70327032
    70337033/* Line 1806 of yacc.c  */
    7034 #line 1459 "parser.yy"
    7035     { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Threadlocal ); }
     7034#line 1458 "parser.yy"
     7035    { (yyval.decl) = DeclarationNode::newFuncSpecifier( DeclarationNode::Noreturn ); }
    70367036    break;
    70377037
     
    70397039
    70407040/* Line 1806 of yacc.c  */
    7041 #line 1464 "parser.yy"
     7041#line 1463 "parser.yy"
    70427042    { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Char ); }
    70437043    break;
     
    70467046
    70477047/* Line 1806 of yacc.c  */
    7048 #line 1466 "parser.yy"
     7048#line 1465 "parser.yy"
    70497049    { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Double ); }
    70507050    break;
     
    70537053
    70547054/* Line 1806 of yacc.c  */
    7055 #line 1468 "parser.yy"
     7055#line 1467 "parser.yy"
    70567056    { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Float ); }
    70577057    break;
     
    70607060
    70617061/* Line 1806 of yacc.c  */
    7062 #line 1470 "parser.yy"
     7062#line 1469 "parser.yy"
    70637063    { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Int ); }
    70647064    break;
     
    70677067
    70687068/* Line 1806 of yacc.c  */
    7069 #line 1472 "parser.yy"
     7069#line 1471 "parser.yy"
    70707070    { (yyval.decl) = DeclarationNode::newLength( DeclarationNode::Long ); }
    70717071    break;
     
    70747074
    70757075/* Line 1806 of yacc.c  */
    7076 #line 1474 "parser.yy"
     7076#line 1473 "parser.yy"
    70777077    { (yyval.decl) = DeclarationNode::newLength( DeclarationNode::Short ); }
    70787078    break;
     
    70817081
    70827082/* Line 1806 of yacc.c  */
    7083 #line 1476 "parser.yy"
     7083#line 1475 "parser.yy"
    70847084    { (yyval.decl) = DeclarationNode::newSignedNess( DeclarationNode::Signed ); }
    70857085    break;
     
    70887088
    70897089/* Line 1806 of yacc.c  */
    7090 #line 1478 "parser.yy"
     7090#line 1477 "parser.yy"
    70917091    { (yyval.decl) = DeclarationNode::newSignedNess( DeclarationNode::Unsigned ); }
    70927092    break;
     
    70957095
    70967096/* Line 1806 of yacc.c  */
    7097 #line 1480 "parser.yy"
     7097#line 1479 "parser.yy"
    70987098    { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Void ); }
    70997099    break;
     
    71027102
    71037103/* Line 1806 of yacc.c  */
    7104 #line 1482 "parser.yy"
     7104#line 1481 "parser.yy"
    71057105    { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Bool ); }
    71067106    break;
     
    71097109
    71107110/* Line 1806 of yacc.c  */
    7111 #line 1484 "parser.yy"
     7111#line 1483 "parser.yy"
    71127112    { (yyval.decl) = DeclarationNode::newComplexType( DeclarationNode::Complex ); }
    71137113    break;
     
    71167116
    71177117/* Line 1806 of yacc.c  */
    7118 #line 1486 "parser.yy"
     7118#line 1485 "parser.yy"
    71197119    { (yyval.decl) = DeclarationNode::newComplexType( DeclarationNode::Imaginary ); }
    71207120    break;
     
    71237123
    71247124/* Line 1806 of yacc.c  */
    7125 #line 1488 "parser.yy"
     7125#line 1487 "parser.yy"
    71267126    { (yyval.decl) = DeclarationNode::newBuiltinType( DeclarationNode::Valist ); }
    71277127    break;
     
    71307130
    71317131/* Line 1806 of yacc.c  */
    7132 #line 1490 "parser.yy"
     7132#line 1489 "parser.yy"
    71337133    { (yyval.decl) = DeclarationNode::newBuiltinType( DeclarationNode::Zero ); }
    71347134    break;
     
    71377137
    71387138/* Line 1806 of yacc.c  */
    7139 #line 1492 "parser.yy"
     7139#line 1491 "parser.yy"
    71407140    { (yyval.decl) = DeclarationNode::newBuiltinType( DeclarationNode::One ); }
    71417141    break;
     
    71447144
    71457145/* Line 1806 of yacc.c  */
    7146 #line 1499 "parser.yy"
     7146#line 1498 "parser.yy"
    71477147    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    71487148    break;
     
    71517151
    71527152/* Line 1806 of yacc.c  */
    7153 #line 1501 "parser.yy"
     7153#line 1500 "parser.yy"
    71547154    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    71557155    break;
     
    71587158
    71597159/* Line 1806 of yacc.c  */
    7160 #line 1503 "parser.yy"
     7160#line 1502 "parser.yy"
    71617161    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); }
    71627162    break;
     
    71657165
    71667166/* Line 1806 of yacc.c  */
    7167 #line 1505 "parser.yy"
     7167#line 1504 "parser.yy"
    71687168    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addType( (yyvsp[(1) - (3)].decl) ); }
    71697169    break;
     
    71727172
    71737173/* Line 1806 of yacc.c  */
    7174 #line 1511 "parser.yy"
     7174#line 1510 "parser.yy"
    71757175    { (yyval.decl) = (yyvsp[(2) - (3)].decl)->addQualifiers( (yyvsp[(1) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); }
    71767176    break;
     
    71797179
    71807180/* Line 1806 of yacc.c  */
    7181 #line 1518 "parser.yy"
     7181#line 1517 "parser.yy"
    71827182    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    71837183    break;
     
    71867186
    71877187/* Line 1806 of yacc.c  */
    7188 #line 1520 "parser.yy"
     7188#line 1519 "parser.yy"
    71897189    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    71907190    break;
     
    71937193
    71947194/* Line 1806 of yacc.c  */
    7195 #line 1522 "parser.yy"
     7195#line 1521 "parser.yy"
    71967196    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addType( (yyvsp[(2) - (2)].decl) ); }
    71977197    break;
     
    72007200
    72017201/* Line 1806 of yacc.c  */
    7202 #line 1527 "parser.yy"
     7202#line 1526 "parser.yy"
    72037203    { (yyval.decl) = (yyvsp[(3) - (4)].decl); }
    72047204    break;
     
    72077207
    72087208/* Line 1806 of yacc.c  */
    7209 #line 1529 "parser.yy"
     7209#line 1528 "parser.yy"
    72107210    { (yyval.decl) = DeclarationNode::newTypeof( (yyvsp[(3) - (4)].en) ); }
    72117211    break;
     
    72147214
    72157215/* Line 1806 of yacc.c  */
    7216 #line 1531 "parser.yy"
     7216#line 1530 "parser.yy"
    72177217    { (yyval.decl) = DeclarationNode::newAttr( (yyvsp[(1) - (4)].tok), (yyvsp[(3) - (4)].decl) ); }
    72187218    break;
     
    72217221
    72227222/* Line 1806 of yacc.c  */
    7223 #line 1533 "parser.yy"
     7223#line 1532 "parser.yy"
    72247224    { (yyval.decl) = DeclarationNode::newAttr( (yyvsp[(1) - (4)].tok), (yyvsp[(3) - (4)].en) ); }
    72257225    break;
     
    72287228
    72297229/* Line 1806 of yacc.c  */
    7230 #line 1539 "parser.yy"
     7230#line 1538 "parser.yy"
    72317231    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    72327232    break;
     
    72357235
    72367236/* Line 1806 of yacc.c  */
    7237 #line 1541 "parser.yy"
     7237#line 1540 "parser.yy"
    72387238    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    72397239    break;
     
    72427242
    72437243/* Line 1806 of yacc.c  */
    7244 #line 1543 "parser.yy"
     7244#line 1542 "parser.yy"
    72457245    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); }
    72467246    break;
     
    72497249
    72507250/* Line 1806 of yacc.c  */
    7251 #line 1549 "parser.yy"
     7251#line 1548 "parser.yy"
    72527252    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    72537253    break;
     
    72567256
    72577257/* Line 1806 of yacc.c  */
    7258 #line 1551 "parser.yy"
     7258#line 1550 "parser.yy"
    72597259    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    72607260    break;
     
    72637263
    72647264/* Line 1806 of yacc.c  */
    7265 #line 1557 "parser.yy"
     7265#line 1556 "parser.yy"
    72667266    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    72677267    break;
     
    72707270
    72717271/* Line 1806 of yacc.c  */
    7272 #line 1559 "parser.yy"
     7272#line 1558 "parser.yy"
    72737273    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    72747274    break;
     
    72777277
    72787278/* Line 1806 of yacc.c  */
    7279 #line 1561 "parser.yy"
     7279#line 1560 "parser.yy"
    72807280    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); }
    72817281    break;
     
    72847284
    72857285/* Line 1806 of yacc.c  */
    7286 #line 1567 "parser.yy"
     7286#line 1566 "parser.yy"
    72877287    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    72887288    break;
     
    72917291
    72927292/* Line 1806 of yacc.c  */
    7293 #line 1569 "parser.yy"
     7293#line 1568 "parser.yy"
    72947294    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    72957295    break;
     
    72987298
    72997299/* Line 1806 of yacc.c  */
    7300 #line 1575 "parser.yy"
     7300#line 1574 "parser.yy"
    73017301    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    73027302    break;
     
    73057305
    73067306/* Line 1806 of yacc.c  */
    7307 #line 1577 "parser.yy"
     7307#line 1576 "parser.yy"
    73087308    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    73097309    break;
     
    73127312
    73137313/* Line 1806 of yacc.c  */
    7314 #line 1579 "parser.yy"
     7314#line 1578 "parser.yy"
    73157315    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); }
    73167316    break;
     
    73197319
    73207320/* Line 1806 of yacc.c  */
    7321 #line 1584 "parser.yy"
     7321#line 1583 "parser.yy"
    73227322    { (yyval.decl) = DeclarationNode::newFromTypedef( (yyvsp[(1) - (1)].tok) ); }
    73237323    break;
     
    73267326
    73277327/* Line 1806 of yacc.c  */
    7328 #line 1586 "parser.yy"
     7328#line 1585 "parser.yy"
    73297329    { (yyval.decl) = DeclarationNode::newFromTypedef( (yyvsp[(2) - (2)].tok) )->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    73307330    break;
     
    73337333
    73347334/* Line 1806 of yacc.c  */
    7335 #line 1588 "parser.yy"
     7335#line 1587 "parser.yy"
    73367336    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    73377337    break;
     
    73407340
    73417341/* Line 1806 of yacc.c  */
    7342 #line 1603 "parser.yy"
     7342#line 1602 "parser.yy"
    73437343    { (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (5)].aggKey), nullptr, nullptr, (yyvsp[(4) - (5)].decl), true )->addQualifiers( (yyvsp[(2) - (5)].decl) ); }
    73447344    break;
     
    73477347
    73487348/* Line 1806 of yacc.c  */
    7349 #line 1605 "parser.yy"
     7349#line 1604 "parser.yy"
    73507350    { typedefTable.makeTypedef( *(yyvsp[(3) - (3)].tok) ); }
    73517351    break;
     
    73547354
    73557355/* Line 1806 of yacc.c  */
    7356 #line 1607 "parser.yy"
     7356#line 1606 "parser.yy"
    73577357    { (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (7)].aggKey), (yyvsp[(3) - (7)].tok), nullptr, (yyvsp[(6) - (7)].decl), true )->addQualifiers( (yyvsp[(2) - (7)].decl) ); }
    73587358    break;
     
    73617361
    73627362/* Line 1806 of yacc.c  */
    7363 #line 1609 "parser.yy"
     7363#line 1608 "parser.yy"
    73647364    { (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (8)].aggKey), nullptr, (yyvsp[(4) - (8)].en), (yyvsp[(7) - (8)].decl), false )->addQualifiers( (yyvsp[(2) - (8)].decl) ); }
    73657365    break;
     
    73687368
    73697369/* Line 1806 of yacc.c  */
    7370 #line 1615 "parser.yy"
     7370#line 1614 "parser.yy"
    73717371    {
    73727372                        typedefTable.makeTypedef( *(yyvsp[(3) - (3)].tok) );
     
    73787378
    73797379/* Line 1806 of yacc.c  */
    7380 #line 1620 "parser.yy"
     7380#line 1619 "parser.yy"
    73817381    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) ); }
    73827382    break;
     
    73857385
    73867386/* Line 1806 of yacc.c  */
    7387 #line 1625 "parser.yy"
     7387#line 1624 "parser.yy"
    73887388    { (yyval.aggKey) = DeclarationNode::Struct; }
    73897389    break;
     
    73927392
    73937393/* Line 1806 of yacc.c  */
    7394 #line 1627 "parser.yy"
     7394#line 1626 "parser.yy"
    73957395    { (yyval.aggKey) = DeclarationNode::Union; }
    73967396    break;
     
    73997399
    74007400/* Line 1806 of yacc.c  */
    7401 #line 1632 "parser.yy"
     7401#line 1631 "parser.yy"
    74027402    { (yyval.decl) = nullptr; }
    74037403    break;
     
    74067406
    74077407/* Line 1806 of yacc.c  */
    7408 #line 1634 "parser.yy"
     7408#line 1633 "parser.yy"
    74097409    { (yyval.decl) = (yyvsp[(1) - (2)].decl) ? (yyvsp[(1) - (2)].decl)->appendList( (yyvsp[(2) - (2)].decl) ) : (yyvsp[(2) - (2)].decl); }
    74107410    break;
     
    74137413
    74147414/* Line 1806 of yacc.c  */
    7415 #line 1640 "parser.yy"
     7415#line 1639 "parser.yy"
    74167416    {
    74177417                        distExt( (yyvsp[(2) - (3)].decl) );                                                             // mark all fields in list
     
    74237423
    74247424/* Line 1806 of yacc.c  */
    7425 #line 1645 "parser.yy"
     7425#line 1644 "parser.yy"
    74267426    {
    74277427                        (yyval.decl) = distAttr( (yyvsp[(1) - (3)].decl), (yyvsp[(2) - (3)].decl) ); }
     
    74317431
    74327432/* Line 1806 of yacc.c  */
    7433 #line 1648 "parser.yy"
     7433#line 1647 "parser.yy"
    74347434    {
    74357435                        distExt( (yyvsp[(3) - (4)].decl) );                                                             // mark all fields in list
     
    74417441
    74427442/* Line 1806 of yacc.c  */
    7443 #line 1657 "parser.yy"
     7443#line 1656 "parser.yy"
    74447444    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addName( (yyvsp[(2) - (2)].tok) ); }
    74457445    break;
     
    74487448
    74497449/* Line 1806 of yacc.c  */
    7450 #line 1659 "parser.yy"
     7450#line 1658 "parser.yy"
    74517451    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(1) - (3)].decl)->cloneType( (yyvsp[(3) - (3)].tok) ) ); }
    74527452    break;
     
    74557455
    74567456/* Line 1806 of yacc.c  */
    7457 #line 1661 "parser.yy"
     7457#line 1660 "parser.yy"
    74587458    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->appendList( (yyvsp[(1) - (2)].decl)->cloneType( 0 ) ); }
    74597459    break;
     
    74627462
    74637463/* Line 1806 of yacc.c  */
    7464 #line 1667 "parser.yy"
     7464#line 1666 "parser.yy"
    74657465    { (yyval.decl) = (yyvsp[(1) - (4)].decl)->appendList( (yyvsp[(4) - (4)].decl)->addQualifiers( (yyvsp[(3) - (4)].decl) ) ); }
    74667466    break;
     
    74697469
    74707470/* Line 1806 of yacc.c  */
    7471 #line 1672 "parser.yy"
     7471#line 1671 "parser.yy"
    74727472    { (yyval.decl) = DeclarationNode::newName( 0 ); /* XXX */ }
    74737473    break;
     
    74767476
    74777477/* Line 1806 of yacc.c  */
    7478 #line 1674 "parser.yy"
     7478#line 1673 "parser.yy"
    74797479    { (yyval.decl) = DeclarationNode::newBitfield( (yyvsp[(1) - (1)].en) ); }
    74807480    break;
     
    74837483
    74847484/* Line 1806 of yacc.c  */
    7485 #line 1677 "parser.yy"
     7485#line 1676 "parser.yy"
    74867486    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addBitfield( (yyvsp[(2) - (2)].en) ); }
    74877487    break;
     
    74907490
    74917491/* Line 1806 of yacc.c  */
    7492 #line 1680 "parser.yy"
     7492#line 1679 "parser.yy"
    74937493    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addBitfield( (yyvsp[(2) - (2)].en) ); }
    74947494    break;
     
    74977497
    74987498/* Line 1806 of yacc.c  */
    7499 #line 1686 "parser.yy"
     7499#line 1685 "parser.yy"
    75007500    { (yyval.en) = nullptr; }
    75017501    break;
     
    75047504
    75057505/* Line 1806 of yacc.c  */
    7506 #line 1688 "parser.yy"
     7506#line 1687 "parser.yy"
    75077507    { (yyval.en) = (yyvsp[(1) - (1)].en); }
    75087508    break;
     
    75117511
    75127512/* Line 1806 of yacc.c  */
    7513 #line 1693 "parser.yy"
     7513#line 1692 "parser.yy"
    75147514    { (yyval.en) = (yyvsp[(2) - (2)].en); }
    75157515    break;
     
    75187518
    75197519/* Line 1806 of yacc.c  */
    7520 #line 1698 "parser.yy"
     7520#line 1697 "parser.yy"
    75217521    { (yyval.decl) = DeclarationNode::newEnum( nullptr, (yyvsp[(4) - (6)].decl), true )->addQualifiers( (yyvsp[(2) - (6)].decl) ); }
    75227522    break;
     
    75257525
    75267526/* Line 1806 of yacc.c  */
    7527 #line 1700 "parser.yy"
     7527#line 1699 "parser.yy"
    75287528    { typedefTable.makeTypedef( *(yyvsp[(3) - (3)].tok) ); }
    75297529    break;
     
    75327532
    75337533/* Line 1806 of yacc.c  */
    7534 #line 1702 "parser.yy"
     7534#line 1701 "parser.yy"
    75357535    { (yyval.decl) = DeclarationNode::newEnum( (yyvsp[(3) - (8)].tok), (yyvsp[(6) - (8)].decl), true )->addQualifiers( (yyvsp[(2) - (8)].decl) ); }
    75367536    break;
     
    75397539
    75407540/* Line 1806 of yacc.c  */
    7541 #line 1708 "parser.yy"
     7541#line 1707 "parser.yy"
    75427542    {
    75437543                        typedefTable.makeTypedef( *(yyvsp[(3) - (3)].tok) );
     
    75497549
    75507550/* Line 1806 of yacc.c  */
    7551 #line 1716 "parser.yy"
     7551#line 1715 "parser.yy"
    75527552    { (yyval.decl) = DeclarationNode::newEnumConstant( (yyvsp[(1) - (2)].tok), (yyvsp[(2) - (2)].en) ); }
    75537553    break;
     
    75567556
    75577557/* Line 1806 of yacc.c  */
    7558 #line 1718 "parser.yy"
     7558#line 1717 "parser.yy"
    75597559    { (yyval.decl) = (yyvsp[(1) - (4)].decl)->appendList( DeclarationNode::newEnumConstant( (yyvsp[(3) - (4)].tok), (yyvsp[(4) - (4)].en) ) ); }
    75607560    break;
     
    75637563
    75647564/* Line 1806 of yacc.c  */
    7565 #line 1723 "parser.yy"
     7565#line 1722 "parser.yy"
    75667566    { (yyval.en) = nullptr; }
    75677567    break;
     
    75707570
    75717571/* Line 1806 of yacc.c  */
    7572 #line 1725 "parser.yy"
     7572#line 1724 "parser.yy"
    75737573    { (yyval.en) = (yyvsp[(2) - (2)].en); }
    75747574    break;
     
    75777577
    75787578/* Line 1806 of yacc.c  */
    7579 #line 1732 "parser.yy"
     7579#line 1731 "parser.yy"
    75807580    { (yyval.decl) = nullptr; }
    75817581    break;
     
    75847584
    75857585/* Line 1806 of yacc.c  */
    7586 #line 1740 "parser.yy"
     7586#line 1739 "parser.yy"
    75877587    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); }
    75887588    break;
     
    75917591
    75927592/* Line 1806 of yacc.c  */
    7593 #line 1742 "parser.yy"
     7593#line 1741 "parser.yy"
    75947594    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->addVarArgs(); }
    75957595    break;
     
    75987598
    75997599/* Line 1806 of yacc.c  */
    7600 #line 1744 "parser.yy"
     7600#line 1743 "parser.yy"
    76017601    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->addVarArgs(); }
    76027602    break;
     
    76057605
    76067606/* Line 1806 of yacc.c  */
    7607 #line 1752 "parser.yy"
     7607#line 1751 "parser.yy"
    76087608    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); }
    76097609    break;
     
    76127612
    76137613/* Line 1806 of yacc.c  */
    7614 #line 1754 "parser.yy"
     7614#line 1753 "parser.yy"
    76157615    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); }
    76167616    break;
     
    76197619
    76207620/* Line 1806 of yacc.c  */
    7621 #line 1756 "parser.yy"
     7621#line 1755 "parser.yy"
    76227622    { (yyval.decl) = (yyvsp[(1) - (9)].decl)->appendList( (yyvsp[(5) - (9)].decl) )->appendList( (yyvsp[(9) - (9)].decl) ); }
    76237623    break;
     
    76267626
    76277627/* Line 1806 of yacc.c  */
    7628 #line 1762 "parser.yy"
     7628#line 1761 "parser.yy"
    76297629    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); }
    76307630    break;
     
    76337633
    76347634/* Line 1806 of yacc.c  */
    7635 #line 1767 "parser.yy"
     7635#line 1766 "parser.yy"
    76367636    { (yyval.decl) = nullptr; }
    76377637    break;
     
    76407640
    76417641/* Line 1806 of yacc.c  */
    7642 #line 1774 "parser.yy"
     7642#line 1773 "parser.yy"
    76437643    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->addVarArgs(); }
    76447644    break;
     
    76477647
    76487648/* Line 1806 of yacc.c  */
    7649 #line 1781 "parser.yy"
     7649#line 1780 "parser.yy"
    76507650    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); }
    76517651    break;
     
    76547654
    76557655/* Line 1806 of yacc.c  */
    7656 #line 1783 "parser.yy"
     7656#line 1782 "parser.yy"
    76577657    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); }
    76587658    break;
     
    76617661
    76627662/* Line 1806 of yacc.c  */
    7663 #line 1792 "parser.yy"
     7663#line 1791 "parser.yy"
    76647664    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addName( (yyvsp[(2) - (3)].tok) ); }
    76657665    break;
     
    76687668
    76697669/* Line 1806 of yacc.c  */
    7670 #line 1795 "parser.yy"
     7670#line 1794 "parser.yy"
    76717671    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addName( (yyvsp[(2) - (3)].tok) ); }
    76727672    break;
     
    76757675
    76767676/* Line 1806 of yacc.c  */
    7677 #line 1797 "parser.yy"
     7677#line 1796 "parser.yy"
    76787678    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addName( (yyvsp[(3) - (4)].tok) )->addQualifiers( (yyvsp[(1) - (4)].decl) ); }
    76797679    break;
     
    76827682
    76837683/* Line 1806 of yacc.c  */
    7684 #line 1807 "parser.yy"
     7684#line 1806 "parser.yy"
    76857685    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    76867686    break;
     
    76897689
    76907690/* Line 1806 of yacc.c  */
    7691 #line 1814 "parser.yy"
     7691#line 1813 "parser.yy"
    76927692    {
    76937693                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    76997699
    77007700/* Line 1806 of yacc.c  */
    7701 #line 1819 "parser.yy"
     7701#line 1818 "parser.yy"
    77027702    {
    77037703                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    77097709
    77107710/* Line 1806 of yacc.c  */
    7711 #line 1827 "parser.yy"
     7711#line 1826 "parser.yy"
    77127712    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addInitializer( (yyvsp[(2) - (2)].en) ? new InitializerNode( (yyvsp[(2) - (2)].en) ) : nullptr ); }
    77137713    break;
     
    77167716
    77177717/* Line 1806 of yacc.c  */
    7718 #line 1829 "parser.yy"
     7718#line 1828 "parser.yy"
    77197719    { (yyval.decl) = (yyvsp[(2) - (3)].decl)->addType( (yyvsp[(1) - (3)].decl) )->addInitializer( (yyvsp[(3) - (3)].en) ? new InitializerNode( (yyvsp[(3) - (3)].en) ) : nullptr ); }
    77207720    break;
     
    77237723
    77247724/* Line 1806 of yacc.c  */
    7725 #line 1838 "parser.yy"
     7725#line 1837 "parser.yy"
    77267726    { (yyval.decl) = DeclarationNode::newName( (yyvsp[(1) - (1)].tok) ); }
    77277727    break;
     
    77307730
    77317731/* Line 1806 of yacc.c  */
    7732 #line 1840 "parser.yy"
     7732#line 1839 "parser.yy"
    77337733    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( DeclarationNode::newName( (yyvsp[(3) - (3)].tok) ) ); }
    77347734    break;
     
    77377737
    77387738/* Line 1806 of yacc.c  */
    7739 #line 1865 "parser.yy"
     7739#line 1864 "parser.yy"
    77407740    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); }
    77417741    break;
     
    77447744
    77457745/* Line 1806 of yacc.c  */
    7746 #line 1875 "parser.yy"
     7746#line 1874 "parser.yy"
    77477747    { (yyval.in) = nullptr; }
    77487748    break;
     
    77517751
    77527752/* Line 1806 of yacc.c  */
    7753 #line 1877 "parser.yy"
     7753#line 1876 "parser.yy"
    77547754    { (yyval.in) = (yyvsp[(2) - (2)].in); }
    77557755    break;
     
    77587758
    77597759/* Line 1806 of yacc.c  */
    7760 #line 1879 "parser.yy"
     7760#line 1878 "parser.yy"
    77617761    { (yyval.in) = (yyvsp[(2) - (2)].in)->set_maybeConstructed( false ); }
    77627762    break;
     
    77657765
    77667766/* Line 1806 of yacc.c  */
     7767#line 1882 "parser.yy"
     7768    { (yyval.in) = new InitializerNode( (yyvsp[(1) - (1)].en) ); }
     7769    break;
     7770
     7771  case 481:
     7772
     7773/* Line 1806 of yacc.c  */
    77677774#line 1883 "parser.yy"
    7768     { (yyval.in) = new InitializerNode( (yyvsp[(1) - (1)].en) ); }
    7769     break;
    7770 
    7771   case 481:
    7772 
    7773 /* Line 1806 of yacc.c  */
    7774 #line 1884 "parser.yy"
    77757775    { (yyval.in) = new InitializerNode( (yyvsp[(2) - (4)].in), true ); }
    77767776    break;
     
    77797779
    77807780/* Line 1806 of yacc.c  */
    7781 #line 1889 "parser.yy"
     7781#line 1888 "parser.yy"
    77827782    { (yyval.in) = nullptr; }
    77837783    break;
     
    77867786
    77877787/* Line 1806 of yacc.c  */
     7788#line 1890 "parser.yy"
     7789    { (yyval.in) = (yyvsp[(2) - (2)].in)->set_designators( (yyvsp[(1) - (2)].en) ); }
     7790    break;
     7791
     7792  case 485:
     7793
     7794/* Line 1806 of yacc.c  */
    77887795#line 1891 "parser.yy"
    7789     { (yyval.in) = (yyvsp[(2) - (2)].in)->set_designators( (yyvsp[(1) - (2)].en) ); }
    7790     break;
    7791 
    7792   case 485:
    7793 
    7794 /* Line 1806 of yacc.c  */
    7795 #line 1892 "parser.yy"
    77967796    { (yyval.in) = (InitializerNode *)( (yyvsp[(1) - (3)].in)->set_last( (yyvsp[(3) - (3)].in) ) ); }
    77977797    break;
     
    78007800
    78017801/* Line 1806 of yacc.c  */
    7802 #line 1894 "parser.yy"
     7802#line 1893 "parser.yy"
    78037803    { (yyval.in) = (InitializerNode *)( (yyvsp[(1) - (4)].in)->set_last( (yyvsp[(4) - (4)].in)->set_designators( (yyvsp[(3) - (4)].en) ) ) ); }
    78047804    break;
     
    78077807
    78087808/* Line 1806 of yacc.c  */
    7809 #line 1910 "parser.yy"
     7809#line 1909 "parser.yy"
    78107810    { (yyval.en) = new ExpressionNode( build_varref( (yyvsp[(1) - (2)].tok) ) ); }
    78117811    break;
     
    78147814
    78157815/* Line 1806 of yacc.c  */
    7816 #line 1916 "parser.yy"
     7816#line 1915 "parser.yy"
    78177817    { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (2)].en)->set_last( (yyvsp[(2) - (2)].en) ) ); }
    78187818    break;
     
    78217821
    78227822/* Line 1806 of yacc.c  */
    7823 #line 1922 "parser.yy"
     7823#line 1921 "parser.yy"
    78247824    { (yyval.en) = new ExpressionNode( build_varref( (yyvsp[(2) - (2)].tok) ) ); }
    78257825    break;
     
    78287828
    78297829/* Line 1806 of yacc.c  */
    7830 #line 1925 "parser.yy"
     7830#line 1924 "parser.yy"
    78317831    { (yyval.en) = (yyvsp[(3) - (5)].en); }
    78327832    break;
     
    78357835
    78367836/* Line 1806 of yacc.c  */
    7837 #line 1927 "parser.yy"
     7837#line 1926 "parser.yy"
    78387838    { (yyval.en) = (yyvsp[(3) - (5)].en); }
    78397839    break;
     
    78427842
    78437843/* Line 1806 of yacc.c  */
    7844 #line 1929 "parser.yy"
     7844#line 1928 "parser.yy"
    78457845    { (yyval.en) = new ExpressionNode( build_range( (yyvsp[(3) - (7)].en), (yyvsp[(5) - (7)].en) ) ); }
    78467846    break;
     
    78497849
    78507850/* Line 1806 of yacc.c  */
    7851 #line 1931 "parser.yy"
     7851#line 1930 "parser.yy"
    78527852    { (yyval.en) = (yyvsp[(4) - (6)].en); }
    78537853    break;
     
    78567856
    78577857/* Line 1806 of yacc.c  */
    7858 #line 1955 "parser.yy"
     7858#line 1954 "parser.yy"
    78597859    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    78607860    break;
     
    78637863
    78647864/* Line 1806 of yacc.c  */
    7865 #line 1957 "parser.yy"
     7865#line 1956 "parser.yy"
    78667866    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    78677867    break;
     
    78707870
    78717871/* Line 1806 of yacc.c  */
    7872 #line 1959 "parser.yy"
     7872#line 1958 "parser.yy"
    78737873    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); }
    78747874    break;
     
    78777877
    78787878/* Line 1806 of yacc.c  */
    7879 #line 1965 "parser.yy"
     7879#line 1964 "parser.yy"
    78807880    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    78817881    break;
     
    78847884
    78857885/* Line 1806 of yacc.c  */
    7886 #line 1967 "parser.yy"
     7886#line 1966 "parser.yy"
    78877887    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    78887888    break;
     
    78917891
    78927892/* Line 1806 of yacc.c  */
    7893 #line 1972 "parser.yy"
     7893#line 1971 "parser.yy"
    78947894    { (yyval.decl) = DeclarationNode::newFromTypeGen( (yyvsp[(1) - (4)].tok), (yyvsp[(3) - (4)].en) ); }
    78957895    break;
     
    78987898
    78997899/* Line 1806 of yacc.c  */
    7900 #line 1978 "parser.yy"
     7900#line 1977 "parser.yy"
    79017901    { (yyval.decl) = (yyvsp[(1) - (4)].decl)->appendList( (yyvsp[(3) - (4)].decl) ); }
    79027902    break;
     
    79057905
    79067906/* Line 1806 of yacc.c  */
    7907 #line 1983 "parser.yy"
     7907#line 1982 "parser.yy"
    79087908    { typedefTable.addToEnclosingScope( *(yyvsp[(2) - (2)].tok), TypedefTable::TD ); }
    79097909    break;
     
    79127912
    79137913/* Line 1806 of yacc.c  */
    7914 #line 1985 "parser.yy"
     7914#line 1984 "parser.yy"
    79157915    { (yyval.decl) = DeclarationNode::newTypeParam( (yyvsp[(1) - (4)].tclass), (yyvsp[(2) - (4)].tok) )->addAssertions( (yyvsp[(4) - (4)].decl) ); }
    79167916    break;
     
    79197919
    79207920/* Line 1806 of yacc.c  */
    7921 #line 1991 "parser.yy"
     7921#line 1990 "parser.yy"
    79227922    { (yyval.tclass) = DeclarationNode::Otype; }
    79237923    break;
     
    79267926
    79277927/* Line 1806 of yacc.c  */
    7928 #line 1993 "parser.yy"
     7928#line 1992 "parser.yy"
    79297929    { (yyval.tclass) = DeclarationNode::Dtype; }
    79307930    break;
     
    79337933
    79347934/* Line 1806 of yacc.c  */
    7935 #line 1995 "parser.yy"
     7935#line 1994 "parser.yy"
    79367936    { (yyval.tclass) = DeclarationNode::Ftype; }
    79377937    break;
     
    79407940
    79417941/* Line 1806 of yacc.c  */
    7942 #line 1997 "parser.yy"
     7942#line 1996 "parser.yy"
    79437943    { (yyval.tclass) = DeclarationNode::Ttype; }
    79447944    break;
     
    79477947
    79487948/* Line 1806 of yacc.c  */
    7949 #line 2002 "parser.yy"
     7949#line 2001 "parser.yy"
    79507950    { (yyval.decl) = nullptr; }
    79517951    break;
     
    79547954
    79557955/* Line 1806 of yacc.c  */
    7956 #line 2004 "parser.yy"
     7956#line 2003 "parser.yy"
    79577957    { (yyval.decl) = (yyvsp[(1) - (2)].decl) ? (yyvsp[(1) - (2)].decl)->appendList( (yyvsp[(2) - (2)].decl) ) : (yyvsp[(2) - (2)].decl); }
    79587958    break;
     
    79617961
    79627962/* Line 1806 of yacc.c  */
    7963 #line 2009 "parser.yy"
     7963#line 2008 "parser.yy"
    79647964    {
    79657965                        typedefTable.openTrait( *(yyvsp[(2) - (5)].tok) );
     
    79717971
    79727972/* Line 1806 of yacc.c  */
    7973 #line 2014 "parser.yy"
     7973#line 2013 "parser.yy"
    79747974    { (yyval.decl) = (yyvsp[(4) - (5)].decl); }
    79757975    break;
     
    79787978
    79797979/* Line 1806 of yacc.c  */
    7980 #line 2016 "parser.yy"
     7980#line 2015 "parser.yy"
    79817981    { (yyval.decl) = nullptr; }
    79827982    break;
     
    79857985
    79867986/* Line 1806 of yacc.c  */
    7987 #line 2021 "parser.yy"
     7987#line 2020 "parser.yy"
    79887988    { (yyval.en) = new ExpressionNode( build_typevalue( (yyvsp[(1) - (1)].decl) ) ); }
    79897989    break;
     
    79927992
    79937993/* Line 1806 of yacc.c  */
    7994 #line 2024 "parser.yy"
     7994#line 2023 "parser.yy"
    79957995    { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (3)].en)->set_last( new ExpressionNode( build_typevalue( (yyvsp[(3) - (3)].decl) ) ) ) ); }
    79967996    break;
     
    79997999
    80008000/* Line 1806 of yacc.c  */
    8001 #line 2026 "parser.yy"
     8001#line 2025 "parser.yy"
    80028002    { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (3)].en)->set_last( (yyvsp[(3) - (3)].en) )); }
    80038003    break;
     
    80068006
    80078007/* Line 1806 of yacc.c  */
    8008 #line 2031 "parser.yy"
     8008#line 2030 "parser.yy"
    80098009    { (yyval.decl) = (yyvsp[(2) - (2)].decl); }
    80108010    break;
     
    80138013
    80148014/* Line 1806 of yacc.c  */
    8015 #line 2033 "parser.yy"
     8015#line 2032 "parser.yy"
    80168016    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addQualifiers( (yyvsp[(1) - (3)].decl) ); }
    80178017    break;
     
    80208020
    80218021/* Line 1806 of yacc.c  */
    8022 #line 2035 "parser.yy"
     8022#line 2034 "parser.yy"
    80238023    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl)->copyStorageClasses( (yyvsp[(1) - (3)].decl) ) ); }
    80248024    break;
     
    80278027
    80288028/* Line 1806 of yacc.c  */
    8029 #line 2040 "parser.yy"
     8029#line 2039 "parser.yy"
    80308030    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addAssertions( (yyvsp[(2) - (2)].decl) ); }
    80318031    break;
     
    80348034
    80358035/* Line 1806 of yacc.c  */
    8036 #line 2042 "parser.yy"
     8036#line 2041 "parser.yy"
    80378037    { (yyval.decl) = (yyvsp[(1) - (4)].decl)->addAssertions( (yyvsp[(2) - (4)].decl) )->addType( (yyvsp[(4) - (4)].decl) ); }
    80388038    break;
     
    80418041
    80428042/* Line 1806 of yacc.c  */
    8043 #line 2047 "parser.yy"
     8043#line 2046 "parser.yy"
    80448044    {
    80458045                        typedefTable.addToEnclosingScope( *(yyvsp[(1) - (1)].tok), TypedefTable::TD );
     
    80518051
    80528052/* Line 1806 of yacc.c  */
    8053 #line 2052 "parser.yy"
     8053#line 2051 "parser.yy"
    80548054    {
    80558055                        typedefTable.addToEnclosingScope( *(yyvsp[(1) - (6)].tok), TypedefTable::TG );
     
    80618061
    80628062/* Line 1806 of yacc.c  */
    8063 #line 2060 "parser.yy"
     8063#line 2059 "parser.yy"
    80648064    {
    80658065                        typedefTable.addToEnclosingScope( *(yyvsp[(2) - (9)].tok), TypedefTable::ID );
     
    80718071
    80728072/* Line 1806 of yacc.c  */
    8073 #line 2065 "parser.yy"
     8073#line 2064 "parser.yy"
    80748074    {
    80758075                        typedefTable.enterTrait( *(yyvsp[(2) - (8)].tok) );
     
    80818081
    80828082/* Line 1806 of yacc.c  */
    8083 #line 2070 "parser.yy"
     8083#line 2069 "parser.yy"
    80848084    {
    80858085                        typedefTable.leaveTrait();
     
    80928092
    80938093/* Line 1806 of yacc.c  */
    8094 #line 2080 "parser.yy"
     8094#line 2079 "parser.yy"
    80958095    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ); }
    80968096    break;
     
    80998099
    81008100/* Line 1806 of yacc.c  */
    8101 #line 2090 "parser.yy"
     8101#line 2089 "parser.yy"
    81028102    {
    81038103                        typedefTable.addToEnclosingScope2( TypedefTable::ID );
     
    81098109
    81108110/* Line 1806 of yacc.c  */
    8111 #line 2095 "parser.yy"
     8111#line 2094 "parser.yy"
    81128112    {
    81138113                        typedefTable.addToEnclosingScope2( TypedefTable::ID );
     
    81198119
    81208120/* Line 1806 of yacc.c  */
    8121 #line 2100 "parser.yy"
     8121#line 2099 "parser.yy"
    81228122    {
    81238123                        typedefTable.addToEnclosingScope2( *(yyvsp[(5) - (5)].tok), TypedefTable::ID );
     
    81298129
    81308130/* Line 1806 of yacc.c  */
    8131 #line 2108 "parser.yy"
     8131#line 2107 "parser.yy"
    81328132    {
    81338133                        typedefTable.addToEnclosingScope2( TypedefTable::ID );
     
    81398139
    81408140/* Line 1806 of yacc.c  */
    8141 #line 2113 "parser.yy"
     8141#line 2112 "parser.yy"
    81428142    {
    81438143                        typedefTable.addToEnclosingScope2( TypedefTable::ID );
     
    81498149
    81508150/* Line 1806 of yacc.c  */
    8151 #line 2123 "parser.yy"
     8151#line 2122 "parser.yy"
    81528152    {}
    81538153    break;
     
    81568156
    81578157/* Line 1806 of yacc.c  */
    8158 #line 2125 "parser.yy"
     8158#line 2124 "parser.yy"
    81598159    { parseTree = parseTree ? parseTree->appendList( (yyvsp[(1) - (1)].decl) ) : (yyvsp[(1) - (1)].decl);       }
    81608160    break;
     
    81638163
    81648164/* Line 1806 of yacc.c  */
    8165 #line 2131 "parser.yy"
     8165#line 2130 "parser.yy"
    81668166    { (yyval.decl) = (yyvsp[(1) - (3)].decl) ? (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ) : (yyvsp[(3) - (3)].decl); }
    81678167    break;
     
    81708170
    81718171/* Line 1806 of yacc.c  */
    8172 #line 2136 "parser.yy"
     8172#line 2135 "parser.yy"
    81738173    { (yyval.decl) = nullptr; }
    81748174    break;
     
    81778177
    81788178/* Line 1806 of yacc.c  */
    8179 #line 2144 "parser.yy"
     8179#line 2143 "parser.yy"
    81808180    {
    81818181                        (yyval.decl) = DeclarationNode::newAsmStmt( new StatementNode( build_asmstmt( false, (yyvsp[(3) - (5)].constant), 0 ) ) );
     
    81868186
    81878187/* Line 1806 of yacc.c  */
    8188 #line 2148 "parser.yy"
     8188#line 2147 "parser.yy"
    81898189    {
    81908190                        linkageStack.push( linkage );                           // handle nested extern "C"/"Cforall"
     
    81968196
    81978197/* Line 1806 of yacc.c  */
    8198 #line 2153 "parser.yy"
     8198#line 2152 "parser.yy"
    81998199    {
    82008200                        linkage = linkageStack.top();
     
    82078207
    82088208/* Line 1806 of yacc.c  */
    8209 #line 2159 "parser.yy"
     8209#line 2158 "parser.yy"
    82108210    {
    82118211                        distExt( (yyvsp[(2) - (2)].decl) );                                                             // mark all fields in list
     
    82178217
    82188218/* Line 1806 of yacc.c  */
    8219 #line 2173 "parser.yy"
     8219#line 2172 "parser.yy"
    82208220    {
    82218221                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    82288228
    82298229/* Line 1806 of yacc.c  */
    8230 #line 2179 "parser.yy"
     8230#line 2178 "parser.yy"
    82318231    {
    82328232                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    82398239
    82408240/* Line 1806 of yacc.c  */
    8241 #line 2188 "parser.yy"
     8241#line 2187 "parser.yy"
    82428242    {
    82438243                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    82508250
    82518251/* Line 1806 of yacc.c  */
    8252 #line 2194 "parser.yy"
     8252#line 2193 "parser.yy"
    82538253    {
    82548254                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    82618261
    82628262/* Line 1806 of yacc.c  */
    8263 #line 2200 "parser.yy"
     8263#line 2199 "parser.yy"
    82648264    {
    82658265                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    82728272
    82738273/* Line 1806 of yacc.c  */
    8274 #line 2206 "parser.yy"
     8274#line 2205 "parser.yy"
    82758275    {
    82768276                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    82838283
    82848284/* Line 1806 of yacc.c  */
    8285 #line 2212 "parser.yy"
     8285#line 2211 "parser.yy"
    82868286    {
    82878287                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    82948294
    82958295/* Line 1806 of yacc.c  */
    8296 #line 2220 "parser.yy"
     8296#line 2219 "parser.yy"
    82978297    {
    82988298                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    83058305
    83068306/* Line 1806 of yacc.c  */
    8307 #line 2226 "parser.yy"
     8307#line 2225 "parser.yy"
    83088308    {
    83098309                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    83168316
    83178317/* Line 1806 of yacc.c  */
    8318 #line 2234 "parser.yy"
     8318#line 2233 "parser.yy"
    83198319    {
    83208320                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    83278327
    83288328/* Line 1806 of yacc.c  */
    8329 #line 2240 "parser.yy"
     8329#line 2239 "parser.yy"
    83308330    {
    83318331                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    83388338
    83398339/* Line 1806 of yacc.c  */
    8340 #line 2255 "parser.yy"
     8340#line 2254 "parser.yy"
    83418341    { (yyval.en) = new ExpressionNode( build_range( (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    83428342    break;
     
    83458345
    83468346/* Line 1806 of yacc.c  */
    8347 #line 2260 "parser.yy"
     8347#line 2259 "parser.yy"
    83488348    { (yyval.decl) = nullptr; }
    83498349    break;
     
    83528352
    83538353/* Line 1806 of yacc.c  */
    8354 #line 2262 "parser.yy"
     8354#line 2261 "parser.yy"
    83558355    {
    83568356                        DeclarationNode * name = new DeclarationNode();
     
    83638363
    83648364/* Line 1806 of yacc.c  */
    8365 #line 2271 "parser.yy"
     8365#line 2270 "parser.yy"
    83668366    { (yyval.decl) = nullptr; }
    83678367    break;
     
    83708370
    83718371/* Line 1806 of yacc.c  */
    8372 #line 2278 "parser.yy"
     8372#line 2277 "parser.yy"
    83738373    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    83748374    break;
     
    83778377
    83788378/* Line 1806 of yacc.c  */
    8379 #line 2283 "parser.yy"
     8379#line 2282 "parser.yy"
    83808380    { (yyval.decl) = (yyvsp[(4) - (6)].decl); }
    83818381    break;
     
    83848384
    83858385/* Line 1806 of yacc.c  */
    8386 #line 2289 "parser.yy"
     8386#line 2288 "parser.yy"
    83878387    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addQualifiers( (yyvsp[(1) - (3)].decl) ); }
    83888388    break;
     
    83918391
    83928392/* Line 1806 of yacc.c  */
    8393 #line 2294 "parser.yy"
     8393#line 2293 "parser.yy"
    83948394    { (yyval.decl) = nullptr; }
    83958395    break;
     
    83988398
    83998399/* Line 1806 of yacc.c  */
    8400 #line 2296 "parser.yy"
     8400#line 2295 "parser.yy"
    84018401    { (yyval.decl) = DeclarationNode::newAttribute( (yyvsp[(1) - (1)].tok) ); }
    84028402    break;
     
    84058405
    84068406/* Line 1806 of yacc.c  */
    8407 #line 2298 "parser.yy"
     8407#line 2297 "parser.yy"
    84088408    { (yyval.decl) = DeclarationNode::newAttribute( (yyvsp[(1) - (4)].tok), (yyvsp[(3) - (4)].en) ); }
    84098409    break;
     
    84128412
    84138413/* Line 1806 of yacc.c  */
    8414 #line 2306 "parser.yy"
     8414#line 2305 "parser.yy"
    84158415    { (yyval.tok) = Token{ new string( "__const__" ) }; }
    84168416    break;
     
    84198419
    84208420/* Line 1806 of yacc.c  */
    8421 #line 2341 "parser.yy"
     8421#line 2340 "parser.yy"
    84228422    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    84238423    break;
     
    84268426
    84278427/* Line 1806 of yacc.c  */
    8428 #line 2344 "parser.yy"
     8428#line 2343 "parser.yy"
    84298429    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    84308430    break;
     
    84338433
    84348434/* Line 1806 of yacc.c  */
    8435 #line 2346 "parser.yy"
     8435#line 2345 "parser.yy"
    84368436    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    84378437    break;
     
    84408440
    84418441/* Line 1806 of yacc.c  */
    8442 #line 2351 "parser.yy"
     8442#line 2350 "parser.yy"
    84438443    {
    84448444                        typedefTable.setNextIdentifier( *(yyvsp[(1) - (1)].tok) );
     
    84508450
    84518451/* Line 1806 of yacc.c  */
    8452 #line 2356 "parser.yy"
     8452#line 2355 "parser.yy"
    84538453    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    84548454    break;
     
    84578457
    84588458/* Line 1806 of yacc.c  */
    8459 #line 2361 "parser.yy"
     8459#line 2360 "parser.yy"
    84608460    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    84618461    break;
     
    84648464
    84658465/* Line 1806 of yacc.c  */
    8466 #line 2363 "parser.yy"
     8466#line 2362 "parser.yy"
    84678467    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    84688468    break;
     
    84718471
    84728472/* Line 1806 of yacc.c  */
    8473 #line 2365 "parser.yy"
     8473#line 2364 "parser.yy"
    84748474    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addQualifiers( (yyvsp[(4) - (4)].decl) ); }
    84758475    break;
     
    84788478
    84798479/* Line 1806 of yacc.c  */
    8480 #line 2370 "parser.yy"
     8480#line 2369 "parser.yy"
    84818481    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); }
    84828482    break;
     
    84858485
    84868486/* Line 1806 of yacc.c  */
    8487 #line 2372 "parser.yy"
     8487#line 2371 "parser.yy"
    84888488    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    84898489    break;
     
    84928492
    84938493/* Line 1806 of yacc.c  */
    8494 #line 2374 "parser.yy"
     8494#line 2373 "parser.yy"
    84958495    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    84968496    break;
     
    84998499
    85008500/* Line 1806 of yacc.c  */
    8501 #line 2376 "parser.yy"
     8501#line 2375 "parser.yy"
    85028502    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    85038503    break;
     
    85068506
    85078507/* Line 1806 of yacc.c  */
    8508 #line 2381 "parser.yy"
     8508#line 2380 "parser.yy"
    85098509    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    85108510    break;
     
    85138513
    85148514/* Line 1806 of yacc.c  */
    8515 #line 2383 "parser.yy"
     8515#line 2382 "parser.yy"
    85168516    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    85178517    break;
     
    85208520
    85218521/* Line 1806 of yacc.c  */
    8522 #line 2392 "parser.yy"
     8522#line 2391 "parser.yy"
    85238523    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    85248524    break;
     
    85278527
    85288528/* Line 1806 of yacc.c  */
    8529 #line 2395 "parser.yy"
     8529#line 2394 "parser.yy"
    85308530    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    85318531    break;
     
    85348534
    85358535/* Line 1806 of yacc.c  */
    8536 #line 2400 "parser.yy"
     8536#line 2399 "parser.yy"
    85378537    { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); }
    85388538    break;
     
    85418541
    85428542/* Line 1806 of yacc.c  */
    8543 #line 2402 "parser.yy"
     8543#line 2401 "parser.yy"
    85448544    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    85458545    break;
     
    85488548
    85498549/* Line 1806 of yacc.c  */
    8550 #line 2404 "parser.yy"
     8550#line 2403 "parser.yy"
    85518551    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    85528552    break;
     
    85558555
    85568556/* Line 1806 of yacc.c  */
    8557 #line 2409 "parser.yy"
     8557#line 2408 "parser.yy"
    85588558    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    85598559    break;
     
    85628562
    85638563/* Line 1806 of yacc.c  */
    8564 #line 2411 "parser.yy"
     8564#line 2410 "parser.yy"
    85658565    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    85668566    break;
     
    85698569
    85708570/* Line 1806 of yacc.c  */
    8571 #line 2413 "parser.yy"
     8571#line 2412 "parser.yy"
    85728572    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    85738573    break;
     
    85768576
    85778577/* Line 1806 of yacc.c  */
    8578 #line 2418 "parser.yy"
     8578#line 2417 "parser.yy"
    85798579    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    85808580    break;
     
    85838583
    85848584/* Line 1806 of yacc.c  */
    8585 #line 2420 "parser.yy"
     8585#line 2419 "parser.yy"
    85868586    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    85878587    break;
     
    85908590
    85918591/* Line 1806 of yacc.c  */
    8592 #line 2422 "parser.yy"
     8592#line 2421 "parser.yy"
    85938593    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    85948594    break;
     
    85978597
    85988598/* Line 1806 of yacc.c  */
    8599 #line 2440 "parser.yy"
     8599#line 2439 "parser.yy"
    86008600    { (yyval.decl) = (yyvsp[(1) - (4)].decl)->addIdList( (yyvsp[(3) - (4)].decl) ); }
    86018601    break;
     
    86048604
    86058605/* Line 1806 of yacc.c  */
    8606 #line 2442 "parser.yy"
     8606#line 2441 "parser.yy"
    86078607    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    86088608    break;
     
    86118611
    86128612/* Line 1806 of yacc.c  */
    8613 #line 2444 "parser.yy"
     8613#line 2443 "parser.yy"
    86148614    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    86158615    break;
     
    86188618
    86198619/* Line 1806 of yacc.c  */
    8620 #line 2449 "parser.yy"
     8620#line 2448 "parser.yy"
    86218621    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    86228622    break;
     
    86258625
    86268626/* Line 1806 of yacc.c  */
    8627 #line 2451 "parser.yy"
     8627#line 2450 "parser.yy"
    86288628    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    86298629    break;
     
    86328632
    86338633/* Line 1806 of yacc.c  */
    8634 #line 2453 "parser.yy"
     8634#line 2452 "parser.yy"
    86358635    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    86368636    break;
     
    86398639
    86408640/* Line 1806 of yacc.c  */
    8641 #line 2458 "parser.yy"
     8641#line 2457 "parser.yy"
    86428642    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    86438643    break;
     
    86468646
    86478647/* Line 1806 of yacc.c  */
    8648 #line 2460 "parser.yy"
     8648#line 2459 "parser.yy"
    86498649    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    86508650    break;
     
    86538653
    86548654/* Line 1806 of yacc.c  */
    8655 #line 2462 "parser.yy"
     8655#line 2461 "parser.yy"
    86568656    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    86578657    break;
     
    86608660
    86618661/* Line 1806 of yacc.c  */
    8662 #line 2477 "parser.yy"
     8662#line 2476 "parser.yy"
    86638663    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    86648664    break;
     
    86678667
    86688668/* Line 1806 of yacc.c  */
    8669 #line 2480 "parser.yy"
     8669#line 2479 "parser.yy"
    86708670    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    86718671    break;
     
    86748674
    86758675/* Line 1806 of yacc.c  */
    8676 #line 2482 "parser.yy"
     8676#line 2481 "parser.yy"
    86778677    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    86788678    break;
     
    86818681
    86828682/* Line 1806 of yacc.c  */
    8683 #line 2488 "parser.yy"
     8683#line 2487 "parser.yy"
    86848684    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    86858685    break;
     
    86888688
    86898689/* Line 1806 of yacc.c  */
    8690 #line 2493 "parser.yy"
     8690#line 2492 "parser.yy"
    86918691    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    86928692    break;
     
    86958695
    86968696/* Line 1806 of yacc.c  */
    8697 #line 2495 "parser.yy"
     8697#line 2494 "parser.yy"
    86988698    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    86998699    break;
     
    87028702
    87038703/* Line 1806 of yacc.c  */
    8704 #line 2497 "parser.yy"
     8704#line 2496 "parser.yy"
    87058705    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addQualifiers( (yyvsp[(4) - (4)].decl) ); }
    87068706    break;
     
    87098709
    87108710/* Line 1806 of yacc.c  */
    8711 #line 2502 "parser.yy"
     8711#line 2501 "parser.yy"
    87128712    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); }
    87138713    break;
     
    87168716
    87178717/* Line 1806 of yacc.c  */
    8718 #line 2504 "parser.yy"
     8718#line 2503 "parser.yy"
    87198719    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    87208720    break;
     
    87238723
    87248724/* Line 1806 of yacc.c  */
    8725 #line 2506 "parser.yy"
     8725#line 2505 "parser.yy"
    87268726    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    87278727    break;
     
    87308730
    87318731/* Line 1806 of yacc.c  */
    8732 #line 2508 "parser.yy"
     8732#line 2507 "parser.yy"
    87338733    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    87348734    break;
     
    87378737
    87388738/* Line 1806 of yacc.c  */
    8739 #line 2513 "parser.yy"
     8739#line 2512 "parser.yy"
    87408740    { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); }
    87418741    break;
     
    87448744
    87458745/* Line 1806 of yacc.c  */
    8746 #line 2515 "parser.yy"
     8746#line 2514 "parser.yy"
    87478747    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    87488748    break;
     
    87518751
    87528752/* Line 1806 of yacc.c  */
    8753 #line 2517 "parser.yy"
     8753#line 2516 "parser.yy"
    87548754    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    87558755    break;
     
    87588758
    87598759/* Line 1806 of yacc.c  */
    8760 #line 2527 "parser.yy"
     8760#line 2526 "parser.yy"
    87618761    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    87628762    break;
     
    87658765
    87668766/* Line 1806 of yacc.c  */
    8767 #line 2530 "parser.yy"
     8767#line 2529 "parser.yy"
    87688768    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    87698769    break;
     
    87728772
    87738773/* Line 1806 of yacc.c  */
    8774 #line 2532 "parser.yy"
     8774#line 2531 "parser.yy"
    87758775    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    87768776    break;
     
    87798779
    87808780/* Line 1806 of yacc.c  */
    8781 #line 2537 "parser.yy"
     8781#line 2536 "parser.yy"
    87828782    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    87838783    break;
     
    87868786
    87878787/* Line 1806 of yacc.c  */
    8788 #line 2539 "parser.yy"
     8788#line 2538 "parser.yy"
    87898789    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    87908790    break;
     
    87938793
    87948794/* Line 1806 of yacc.c  */
    8795 #line 2541 "parser.yy"
     8795#line 2540 "parser.yy"
    87968796    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addQualifiers( (yyvsp[(4) - (4)].decl) ); }
    87978797    break;
     
    88008800
    88018801/* Line 1806 of yacc.c  */
    8802 #line 2546 "parser.yy"
     8802#line 2545 "parser.yy"
    88038803    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); }
    88048804    break;
     
    88078807
    88088808/* Line 1806 of yacc.c  */
    8809 #line 2548 "parser.yy"
     8809#line 2547 "parser.yy"
    88108810    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    88118811    break;
     
    88148814
    88158815/* Line 1806 of yacc.c  */
    8816 #line 2550 "parser.yy"
     8816#line 2549 "parser.yy"
    88178817    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    88188818    break;
     
    88218821
    88228822/* Line 1806 of yacc.c  */
    8823 #line 2552 "parser.yy"
     8823#line 2551 "parser.yy"
    88248824    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    88258825    break;
     
    88288828
    88298829/* Line 1806 of yacc.c  */
    8830 #line 2557 "parser.yy"
     8830#line 2556 "parser.yy"
    88318831    { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); }
    88328832    break;
     
    88358835
    88368836/* Line 1806 of yacc.c  */
    8837 #line 2559 "parser.yy"
     8837#line 2558 "parser.yy"
    88388838    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    88398839    break;
     
    88428842
    88438843/* Line 1806 of yacc.c  */
    8844 #line 2561 "parser.yy"
     8844#line 2560 "parser.yy"
    88458845    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    88468846    break;
     
    88498849
    88508850/* Line 1806 of yacc.c  */
    8851 #line 2574 "parser.yy"
     8851#line 2573 "parser.yy"
    88528852    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    88538853    break;
     
    88568856
    88578857/* Line 1806 of yacc.c  */
    8858 #line 2577 "parser.yy"
     8858#line 2576 "parser.yy"
    88598859    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    88608860    break;
     
    88638863
    88648864/* Line 1806 of yacc.c  */
    8865 #line 2579 "parser.yy"
     8865#line 2578 "parser.yy"
    88668866    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    88678867    break;
     
    88708870
    88718871/* Line 1806 of yacc.c  */
    8872 #line 2584 "parser.yy"
     8872#line 2583 "parser.yy"
    88738873    {
    88748874                        typedefTable.setNextIdentifier( *(yyvsp[(1) - (1)].tok) );
     
    88808880
    88818881/* Line 1806 of yacc.c  */
    8882 #line 2589 "parser.yy"
     8882#line 2588 "parser.yy"
    88838883    {
    88848884                        typedefTable.setNextIdentifier( *(yyvsp[(1) - (1)].tok) );
     
    88908890
    88918891/* Line 1806 of yacc.c  */
    8892 #line 2597 "parser.yy"
     8892#line 2596 "parser.yy"
    88938893    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    88948894    break;
     
    88978897
    88988898/* Line 1806 of yacc.c  */
    8899 #line 2599 "parser.yy"
     8899#line 2598 "parser.yy"
    89008900    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    89018901    break;
     
    89048904
    89058905/* Line 1806 of yacc.c  */
    8906 #line 2601 "parser.yy"
     8906#line 2600 "parser.yy"
    89078907    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addQualifiers( (yyvsp[(4) - (4)].decl) ); }
    89088908    break;
     
    89118911
    89128912/* Line 1806 of yacc.c  */
    8913 #line 2606 "parser.yy"
     8913#line 2605 "parser.yy"
    89148914    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); }
    89158915    break;
     
    89188918
    89198919/* Line 1806 of yacc.c  */
    8920 #line 2608 "parser.yy"
     8920#line 2607 "parser.yy"
    89218921    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    89228922    break;
     
    89258925
    89268926/* Line 1806 of yacc.c  */
    8927 #line 2613 "parser.yy"
     8927#line 2612 "parser.yy"
    89288928    { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); }
    89298929    break;
     
    89328932
    89338933/* Line 1806 of yacc.c  */
    8934 #line 2615 "parser.yy"
     8934#line 2614 "parser.yy"
    89358935    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    89368936    break;
     
    89398939
    89408940/* Line 1806 of yacc.c  */
    8941 #line 2633 "parser.yy"
     8941#line 2632 "parser.yy"
    89428942    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    89438943    break;
     
    89468946
    89478947/* Line 1806 of yacc.c  */
    8948 #line 2635 "parser.yy"
     8948#line 2634 "parser.yy"
    89498949    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    89508950    break;
     
    89538953
    89548954/* Line 1806 of yacc.c  */
    8955 #line 2640 "parser.yy"
     8955#line 2639 "parser.yy"
    89568956    { (yyval.decl) = DeclarationNode::newPointer( 0 ); }
    89578957    break;
     
    89608960
    89618961/* Line 1806 of yacc.c  */
    8962 #line 2642 "parser.yy"
     8962#line 2641 "parser.yy"
    89638963    { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); }
    89648964    break;
     
    89678967
    89688968/* Line 1806 of yacc.c  */
    8969 #line 2644 "parser.yy"
     8969#line 2643 "parser.yy"
    89708970    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    89718971    break;
     
    89748974
    89758975/* Line 1806 of yacc.c  */
    8976 #line 2646 "parser.yy"
     8976#line 2645 "parser.yy"
    89778977    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    89788978    break;
     
    89818981
    89828982/* Line 1806 of yacc.c  */
    8983 #line 2648 "parser.yy"
     8983#line 2647 "parser.yy"
    89848984    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addQualifiers( (yyvsp[(4) - (4)].decl) ); }
    89858985    break;
     
    89888988
    89898989/* Line 1806 of yacc.c  */
    8990 #line 2654 "parser.yy"
     8990#line 2653 "parser.yy"
    89918991    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    89928992    break;
     
    89958995
    89968996/* Line 1806 of yacc.c  */
    8997 #line 2656 "parser.yy"
     8997#line 2655 "parser.yy"
    89988998    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    89998999    break;
     
    90029002
    90039003/* Line 1806 of yacc.c  */
    9004 #line 2658 "parser.yy"
     9004#line 2657 "parser.yy"
    90059005    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    90069006    break;
     
    90099009
    90109010/* Line 1806 of yacc.c  */
    9011 #line 2663 "parser.yy"
     9011#line 2662 "parser.yy"
    90129012    { (yyval.decl) = DeclarationNode::newFunction( nullptr, nullptr, (yyvsp[(3) - (5)].decl), nullptr ); }
    90139013    break;
     
    90169016
    90179017/* Line 1806 of yacc.c  */
    9018 #line 2665 "parser.yy"
     9018#line 2664 "parser.yy"
    90199019    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    90209020    break;
     
    90239023
    90249024/* Line 1806 of yacc.c  */
    9025 #line 2667 "parser.yy"
     9025#line 2666 "parser.yy"
    90269026    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    90279027    break;
     
    90309030
    90319031/* Line 1806 of yacc.c  */
    9032 #line 2673 "parser.yy"
     9032#line 2672 "parser.yy"
    90339033    { (yyval.decl) = DeclarationNode::newArray( 0, 0, false ); }
    90349034    break;
     
    90379037
    90389038/* Line 1806 of yacc.c  */
    9039 #line 2675 "parser.yy"
     9039#line 2674 "parser.yy"
    90409040    { (yyval.decl) = DeclarationNode::newArray( 0, 0, false )->addArray( (yyvsp[(3) - (3)].decl) ); }
    90419041    break;
     
    90449044
    90459045/* Line 1806 of yacc.c  */
    9046 #line 2681 "parser.yy"
     9046#line 2680 "parser.yy"
    90479047    { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(3) - (5)].en), 0, false ); }
    90489048    break;
     
    90519051
    90529052/* Line 1806 of yacc.c  */
    9053 #line 2683 "parser.yy"
     9053#line 2682 "parser.yy"
    90549054    { (yyval.decl) = DeclarationNode::newVarArray( 0 ); }
    90559055    break;
     
    90589058
    90599059/* Line 1806 of yacc.c  */
    9060 #line 2685 "parser.yy"
     9060#line 2684 "parser.yy"
    90619061    { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addArray( DeclarationNode::newArray( (yyvsp[(4) - (6)].en), 0, false ) ); }
    90629062    break;
     
    90659065
    90669066/* Line 1806 of yacc.c  */
    9067 #line 2687 "parser.yy"
     9067#line 2686 "parser.yy"
    90689068    { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addArray( DeclarationNode::newVarArray( 0 ) ); }
    90699069    break;
     
    90729072
    90739073/* Line 1806 of yacc.c  */
    9074 #line 2722 "parser.yy"
     9074#line 2721 "parser.yy"
    90759075    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    90769076    break;
     
    90799079
    90809080/* Line 1806 of yacc.c  */
    9081 #line 2724 "parser.yy"
     9081#line 2723 "parser.yy"
    90829082    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    90839083    break;
     
    90869086
    90879087/* Line 1806 of yacc.c  */
    9088 #line 2729 "parser.yy"
     9088#line 2728 "parser.yy"
    90899089    { (yyval.decl) = DeclarationNode::newPointer( nullptr ); }
    90909090    break;
     
    90939093
    90949094/* Line 1806 of yacc.c  */
    9095 #line 2731 "parser.yy"
     9095#line 2730 "parser.yy"
    90969096    { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); }
    90979097    break;
     
    91009100
    91019101/* Line 1806 of yacc.c  */
    9102 #line 2733 "parser.yy"
     9102#line 2732 "parser.yy"
    91039103    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( nullptr ) ); }
    91049104    break;
     
    91079107
    91089108/* Line 1806 of yacc.c  */
    9109 #line 2735 "parser.yy"
     9109#line 2734 "parser.yy"
    91109110    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    91119111    break;
     
    91149114
    91159115/* Line 1806 of yacc.c  */
    9116 #line 2737 "parser.yy"
     9116#line 2736 "parser.yy"
    91179117    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addQualifiers( (yyvsp[(4) - (4)].decl) ); }
    91189118    break;
     
    91219121
    91229122/* Line 1806 of yacc.c  */
    9123 #line 2743 "parser.yy"
     9123#line 2742 "parser.yy"
    91249124    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    91259125    break;
     
    91289128
    91299129/* Line 1806 of yacc.c  */
    9130 #line 2745 "parser.yy"
     9130#line 2744 "parser.yy"
    91319131    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    91329132    break;
     
    91359135
    91369136/* Line 1806 of yacc.c  */
    9137 #line 2747 "parser.yy"
     9137#line 2746 "parser.yy"
    91389138    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    91399139    break;
     
    91429142
    91439143/* Line 1806 of yacc.c  */
    9144 #line 2752 "parser.yy"
     9144#line 2751 "parser.yy"
    91459145    { (yyval.decl) = DeclarationNode::newFunction( nullptr, nullptr, (yyvsp[(3) - (5)].decl), nullptr ); }
    91469146    break;
     
    91499149
    91509150/* Line 1806 of yacc.c  */
    9151 #line 2754 "parser.yy"
     9151#line 2753 "parser.yy"
    91529152    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    91539153    break;
     
    91569156
    91579157/* Line 1806 of yacc.c  */
    9158 #line 2756 "parser.yy"
     9158#line 2755 "parser.yy"
    91599159    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    91609160    break;
     
    91639163
    91649164/* Line 1806 of yacc.c  */
    9165 #line 2763 "parser.yy"
     9165#line 2762 "parser.yy"
    91669166    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); }
    91679167    break;
     
    91709170
    91719171/* Line 1806 of yacc.c  */
    9172 #line 2774 "parser.yy"
     9172#line 2773 "parser.yy"
    91739173    { (yyval.decl) = DeclarationNode::newArray( 0, 0, false ); }
    91749174    break;
     
    91779177
    91789178/* Line 1806 of yacc.c  */
    9179 #line 2777 "parser.yy"
     9179#line 2776 "parser.yy"
    91809180    { (yyval.decl) = DeclarationNode::newVarArray( (yyvsp[(3) - (6)].decl) ); }
    91819181    break;
     
    91849184
    91859185/* Line 1806 of yacc.c  */
    9186 #line 2779 "parser.yy"
     9186#line 2778 "parser.yy"
    91879187    { (yyval.decl) = DeclarationNode::newArray( 0, (yyvsp[(3) - (5)].decl), false ); }
    91889188    break;
     
    91919191
    91929192/* Line 1806 of yacc.c  */
    9193 #line 2782 "parser.yy"
     9193#line 2781 "parser.yy"
    91949194    { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), false ); }
    91959195    break;
     
    91989198
    91999199/* Line 1806 of yacc.c  */
    9200 #line 2784 "parser.yy"
     9200#line 2783 "parser.yy"
    92019201    { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(4) - (7)].decl), true ); }
    92029202    break;
     
    92059205
    92069206/* Line 1806 of yacc.c  */
    9207 #line 2786 "parser.yy"
     9207#line 2785 "parser.yy"
    92089208    { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(3) - (7)].decl), true ); }
    92099209    break;
     
    92129212
    92139213/* Line 1806 of yacc.c  */
    9214 #line 2801 "parser.yy"
     9214#line 2800 "parser.yy"
    92159215    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    92169216    break;
     
    92199219
    92209220/* Line 1806 of yacc.c  */
    9221 #line 2803 "parser.yy"
     9221#line 2802 "parser.yy"
    92229222    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    92239223    break;
     
    92269226
    92279227/* Line 1806 of yacc.c  */
    9228 #line 2808 "parser.yy"
     9228#line 2807 "parser.yy"
    92299229    { (yyval.decl) = DeclarationNode::newPointer( 0 ); }
    92309230    break;
     
    92339233
    92349234/* Line 1806 of yacc.c  */
    9235 #line 2810 "parser.yy"
     9235#line 2809 "parser.yy"
    92369236    { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); }
    92379237    break;
     
    92409240
    92419241/* Line 1806 of yacc.c  */
    9242 #line 2812 "parser.yy"
     9242#line 2811 "parser.yy"
    92439243    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    92449244    break;
     
    92479247
    92489248/* Line 1806 of yacc.c  */
    9249 #line 2814 "parser.yy"
     9249#line 2813 "parser.yy"
    92509250    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    92519251    break;
     
    92549254
    92559255/* Line 1806 of yacc.c  */
    9256 #line 2816 "parser.yy"
     9256#line 2815 "parser.yy"
    92579257    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addQualifiers( (yyvsp[(4) - (4)].decl) ); }
    92589258    break;
     
    92619261
    92629262/* Line 1806 of yacc.c  */
    9263 #line 2822 "parser.yy"
     9263#line 2821 "parser.yy"
    92649264    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    92659265    break;
     
    92689268
    92699269/* Line 1806 of yacc.c  */
    9270 #line 2824 "parser.yy"
     9270#line 2823 "parser.yy"
    92719271    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    92729272    break;
     
    92759275
    92769276/* Line 1806 of yacc.c  */
    9277 #line 2826 "parser.yy"
     9277#line 2825 "parser.yy"
    92789278    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    92799279    break;
     
    92829282
    92839283/* Line 1806 of yacc.c  */
    9284 #line 2831 "parser.yy"
     9284#line 2830 "parser.yy"
    92859285    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    92869286    break;
     
    92899289
    92909290/* Line 1806 of yacc.c  */
    9291 #line 2833 "parser.yy"
     9291#line 2832 "parser.yy"
    92929292    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    92939293    break;
     
    92969296
    92979297/* Line 1806 of yacc.c  */
    9298 #line 2843 "parser.yy"
     9298#line 2842 "parser.yy"
    92999299    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    93009300    break;
     
    93039303
    93049304/* Line 1806 of yacc.c  */
    9305 #line 2854 "parser.yy"
     9305#line 2853 "parser.yy"
    93069306    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
    93079307    break;
     
    93109310
    93119311/* Line 1806 of yacc.c  */
    9312 #line 2856 "parser.yy"
     9312#line 2855 "parser.yy"
    93139313    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); }
    93149314    break;
     
    93179317
    93189318/* Line 1806 of yacc.c  */
    9319 #line 2858 "parser.yy"
     9319#line 2857 "parser.yy"
    93209320    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
    93219321    break;
     
    93249324
    93259325/* Line 1806 of yacc.c  */
    9326 #line 2860 "parser.yy"
     9326#line 2859 "parser.yy"
    93279327    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); }
    93289328    break;
     
    93319331
    93329332/* Line 1806 of yacc.c  */
    9333 #line 2862 "parser.yy"
     9333#line 2861 "parser.yy"
    93349334    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
    93359335    break;
     
    93389338
    93399339/* Line 1806 of yacc.c  */
    9340 #line 2864 "parser.yy"
     9340#line 2863 "parser.yy"
    93419341    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); }
    93429342    break;
     
    93459345
    93469346/* Line 1806 of yacc.c  */
    9347 #line 2871 "parser.yy"
     9347#line 2870 "parser.yy"
    93489348    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    93499349    break;
     
    93529352
    93539353/* Line 1806 of yacc.c  */
    9354 #line 2873 "parser.yy"
     9354#line 2872 "parser.yy"
    93559355    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }
    93569356    break;
     
    93599359
    93609360/* Line 1806 of yacc.c  */
    9361 #line 2875 "parser.yy"
     9361#line 2874 "parser.yy"
    93629362    { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    93639363    break;
     
    93669366
    93679367/* Line 1806 of yacc.c  */
    9368 #line 2877 "parser.yy"
     9368#line 2876 "parser.yy"
    93699369    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( (yyvsp[(2) - (3)].decl) )->addNewArray( (yyvsp[(1) - (3)].decl) ); }
    93709370    break;
     
    93739373
    93749374/* Line 1806 of yacc.c  */
    9375 #line 2879 "parser.yy"
     9375#line 2878 "parser.yy"
    93769376    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }
    93779377    break;
     
    93809380
    93819381/* Line 1806 of yacc.c  */
    9382 #line 2882 "parser.yy"
     9382#line 2881 "parser.yy"
    93839383    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    93849384    break;
     
    93879387
    93889388/* Line 1806 of yacc.c  */
    9389 #line 2884 "parser.yy"
     9389#line 2883 "parser.yy"
    93909390    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }
    93919391    break;
     
    93949394
    93959395/* Line 1806 of yacc.c  */
    9396 #line 2886 "parser.yy"
     9396#line 2885 "parser.yy"
    93979397    { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    93989398    break;
     
    94019401
    94029402/* Line 1806 of yacc.c  */
    9403 #line 2888 "parser.yy"
     9403#line 2887 "parser.yy"
    94049404    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( (yyvsp[(2) - (3)].decl) )->addNewArray( (yyvsp[(1) - (3)].decl) ); }
    94059405    break;
     
    94089408
    94099409/* Line 1806 of yacc.c  */
    9410 #line 2890 "parser.yy"
     9410#line 2889 "parser.yy"
    94119411    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }
    94129412    break;
     
    94159415
    94169416/* Line 1806 of yacc.c  */
    9417 #line 2895 "parser.yy"
     9417#line 2894 "parser.yy"
    94189418    { (yyval.decl) = DeclarationNode::newVarArray( (yyvsp[(3) - (6)].decl) ); }
    94199419    break;
     
    94229422
    94239423/* Line 1806 of yacc.c  */
    9424 #line 2897 "parser.yy"
     9424#line 2896 "parser.yy"
    94259425    { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), false ); }
    94269426    break;
     
    94299429
    94309430/* Line 1806 of yacc.c  */
    9431 #line 2902 "parser.yy"
     9431#line 2901 "parser.yy"
    94329432    { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), true ); }
    94339433    break;
     
    94369436
    94379437/* Line 1806 of yacc.c  */
    9438 #line 2904 "parser.yy"
     9438#line 2903 "parser.yy"
    94399439    { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(4) - (7)].decl)->addQualifiers( (yyvsp[(3) - (7)].decl) ), true ); }
    94409440    break;
     
    94439443
    94449444/* Line 1806 of yacc.c  */
    9445 #line 2931 "parser.yy"
     9445#line 2930 "parser.yy"
    94469446    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    94479447    break;
     
    94509450
    94519451/* Line 1806 of yacc.c  */
    9452 #line 2942 "parser.yy"
     9452#line 2941 "parser.yy"
    94539453    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
    94549454    break;
     
    94579457
    94589458/* Line 1806 of yacc.c  */
    9459 #line 2944 "parser.yy"
     9459#line 2943 "parser.yy"
    94609460    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); }
    94619461    break;
     
    94649464
    94659465/* Line 1806 of yacc.c  */
    9466 #line 2946 "parser.yy"
     9466#line 2945 "parser.yy"
    94679467    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
    94689468    break;
     
    94719471
    94729472/* Line 1806 of yacc.c  */
    9473 #line 2948 "parser.yy"
     9473#line 2947 "parser.yy"
    94749474    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); }
    94759475    break;
     
    94789478
    94799479/* Line 1806 of yacc.c  */
    9480 #line 2950 "parser.yy"
     9480#line 2949 "parser.yy"
    94819481    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
    94829482    break;
     
    94859485
    94869486/* Line 1806 of yacc.c  */
    9487 #line 2952 "parser.yy"
     9487#line 2951 "parser.yy"
    94889488    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); }
    94899489    break;
     
    94929492
    94939493/* Line 1806 of yacc.c  */
    9494 #line 2959 "parser.yy"
     9494#line 2958 "parser.yy"
    94959495    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( nullptr, nullptr, false ) ); }
    94969496    break;
     
    94999499
    95009500/* Line 1806 of yacc.c  */
    9501 #line 2961 "parser.yy"
     9501#line 2960 "parser.yy"
    95029502    { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( nullptr, nullptr, false ) ); }
    95039503    break;
     
    95069506
    95079507/* Line 1806 of yacc.c  */
    9508 #line 2963 "parser.yy"
     9508#line 2962 "parser.yy"
    95099509    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }
    95109510    break;
     
    95139513
    95149514/* Line 1806 of yacc.c  */
    9515 #line 2965 "parser.yy"
     9515#line 2964 "parser.yy"
    95169516    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( nullptr, nullptr, false ) ); }
    95179517    break;
     
    95209520
    95219521/* Line 1806 of yacc.c  */
    9522 #line 2967 "parser.yy"
     9522#line 2966 "parser.yy"
    95239523    { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( nullptr, nullptr, false ) ); }
    95249524    break;
     
    95279527
    95289528/* Line 1806 of yacc.c  */
    9529 #line 2969 "parser.yy"
     9529#line 2968 "parser.yy"
    95309530    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }
    95319531    break;
     
    95349534
    95359535/* Line 1806 of yacc.c  */
    9536 #line 2974 "parser.yy"
     9536#line 2973 "parser.yy"
    95379537    { (yyval.decl) = DeclarationNode::newTuple( (yyvsp[(3) - (5)].decl) ); }
    95389538    break;
     
    95419541
    95429542/* Line 1806 of yacc.c  */
    9543 #line 2981 "parser.yy"
     9543#line 2980 "parser.yy"
    95449544    { (yyval.decl) = DeclarationNode::newFunction( nullptr, (yyvsp[(1) - (6)].decl), (yyvsp[(4) - (6)].decl), nullptr ); }
    95459545    break;
     
    95489548
    95499549/* Line 1806 of yacc.c  */
    9550 #line 2983 "parser.yy"
     9550#line 2982 "parser.yy"
    95519551    { (yyval.decl) = DeclarationNode::newFunction( nullptr, (yyvsp[(1) - (6)].decl), (yyvsp[(4) - (6)].decl), nullptr ); }
    95529552    break;
     
    95559555
    95569556/* Line 1806 of yacc.c  */
    9557 #line 3007 "parser.yy"
     9557#line 3006 "parser.yy"
    95589558    { (yyval.en) = nullptr; }
    95599559    break;
     
    95629562
    95639563/* Line 1806 of yacc.c  */
    9564 #line 3009 "parser.yy"
     9564#line 3008 "parser.yy"
    95659565    { (yyval.en) = (yyvsp[(2) - (2)].en); }
    95669566    break;
     
    98009800
    98019801/* Line 2067 of yacc.c  */
    9802 #line 3012 "parser.yy"
     9802#line 3011 "parser.yy"
    98039803
    98049804// ----end of grammar----
  • src/Parser/parser.yy

    rf37147b rdd020c0  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Feb 28 09:58:10 2017
    13 // Update Count     : 2208
     12// Last Modified On : Fri Mar  3 21:35:28 2017
     13// Update Count     : 2222
    1414//
    1515
     
    14001400type_qualifier_name:
    14011401        CONST
    1402                 { $$ = DeclarationNode::newQualifier( DeclarationNode::Const ); }
     1402                { $$ = DeclarationNode::newTypeQualifier( DeclarationNode::Const ); }
    14031403        | RESTRICT
    1404                 { $$ = DeclarationNode::newQualifier( DeclarationNode::Restrict ); }
     1404                { $$ = DeclarationNode::newTypeQualifier( DeclarationNode::Restrict ); }
    14051405        | VOLATILE
    1406                 { $$ = DeclarationNode::newQualifier( DeclarationNode::Volatile ); }
     1406                { $$ = DeclarationNode::newTypeQualifier( DeclarationNode::Volatile ); }
    14071407        | LVALUE                                                                                        // CFA
    1408                 { $$ = DeclarationNode::newQualifier( DeclarationNode::Lvalue ); }
     1408                { $$ = DeclarationNode::newTypeQualifier( DeclarationNode::Lvalue ); }
    14091409        | ATOMIC
    1410                 { $$ = DeclarationNode::newQualifier( DeclarationNode::Atomic ); }
     1410                { $$ = DeclarationNode::newTypeQualifier( DeclarationNode::Atomic ); }
    14111411        | FORALL '('
    14121412                {
     
    14481448        | REGISTER
    14491449                { $$ = DeclarationNode::newStorageClass( DeclarationNode::Register ); }
    1450         | INLINE                                                                                        // C99
    1451                 //{ $$ = DeclarationNode::newStorageClass( DeclarationNode::Inline ); }
    1452                 { $$ = new DeclarationNode; $$->isInline = true; }
    1453         | FORTRAN                                                                                       // C99
    1454                 { $$ = DeclarationNode::newStorageClass( DeclarationNode::Fortran ); }
    1455         | NORETURN                                                                                      // C11
    1456                 //{ $$ = DeclarationNode::newStorageClass( DeclarationNode::Noreturn ); }
    1457                 { $$ = new DeclarationNode; $$->isNoreturn = true; }
    14581450        | THREADLOCAL                                                                           // C11
    14591451                { $$ = DeclarationNode::newStorageClass( DeclarationNode::Threadlocal ); }
     1452                // Put function specifiers here to simplify parsing rules, but separate them semantically.
     1453        | INLINE                                                                                        // C99
     1454                { $$ = DeclarationNode::newFuncSpecifier( DeclarationNode::Inline ); }
     1455        | FORTRAN                                                                                       // C99
     1456                { $$ = DeclarationNode::newFuncSpecifier( DeclarationNode::Fortran ); }
     1457        | NORETURN                                                                                      // C11
     1458                { $$ = DeclarationNode::newFuncSpecifier( DeclarationNode::Noreturn ); }
    14601459        ;
    14611460
  • src/SymTab/Autogen.cc

    rf37147b rdd020c0  
    1010// Created On       : Thu Mar 03 15:45:56 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 16 15:02:50 2017
    13 // Update Count     : 13
     12// Last Modified On : Fri Mar  3 22:00:55 2017
     13// Update Count     : 30
    1414//
    1515
     
    163163                DeclarationNode::StorageClass sc = functionNesting > 0 ? DeclarationNode::NoStorageClass : DeclarationNode::Static;
    164164                LinkageSpec::Spec spec = isIntrinsic ? LinkageSpec::Intrinsic : LinkageSpec::AutoGen;
    165                 FunctionDecl * decl = new FunctionDecl( fname, sc, spec, ftype, new CompoundStmt( noLabels ), true, false );
     165                FunctionDecl * decl = new FunctionDecl( fname, sc, spec, ftype, new CompoundStmt( noLabels ),
     166                                                                                                std::list< Attribute * >(), DeclarationNode::FuncSpecifier( DeclarationNode::InlineSpec ) );
    166167                decl->fixUniqueId();
    167168                return decl;
     
    717718                                        TypeDecl * newDecl = new TypeDecl( ty->get_baseType()->get_name(), DeclarationNode::NoStorageClass, nullptr, TypeDecl::Any );
    718719                                        TypeInstType * inst = new TypeInstType( Type::Qualifiers(), newDecl->get_name(), newDecl );
    719                                         newDecl->get_assertions().push_back( new FunctionDecl( "?=?", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, genAssignType( inst ), nullptr, true, false ) );
    720                                         newDecl->get_assertions().push_back( new FunctionDecl( "?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, genDefaultType( inst ), nullptr, true, false ) );
    721                                         newDecl->get_assertions().push_back( new FunctionDecl( "?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, genCopyType( inst ), nullptr, true, false ) );
    722                                         newDecl->get_assertions().push_back( new FunctionDecl( "^?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, genDefaultType( inst ), nullptr, true, false ) );
     720                                        newDecl->get_assertions().push_back( new FunctionDecl( "?=?", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, genAssignType( inst ), nullptr,
     721                                                                                                                                                   std::list< Attribute * >(), DeclarationNode::FuncSpec( DeclarationNode::InlineSpec ) ) );
     722                                        newDecl->get_assertions().push_back( new FunctionDecl( "?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, genDefaultType( inst ), nullptr,
     723                                                                                                                                                   std::list< Attribute * >(), DeclarationNode::FuncSpec( DeclarationNode::InlineSpec ) ) );
     724                                        newDecl->get_assertions().push_back( new FunctionDecl( "?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, genCopyType( inst ), nullptr,
     725                                                                                                                                                   std::list< Attribute * >(), DeclarationNode::FuncSpec( DeclarationNode::InlineSpec ) ) );
     726                                        newDecl->get_assertions().push_back( new FunctionDecl( "^?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, genDefaultType( inst ), nullptr,
     727                                                                                                                                                   std::list< Attribute * >(), DeclarationNode::FuncSpec( DeclarationNode::InlineSpec ) ) );
    723728                                        typeParams.push_back( newDecl );
    724729                                        done.insert( ty->get_baseType() );
  • src/SymTab/Validate.cc

    rf37147b rdd020c0  
    1010// Created On       : Sun May 17 21:50:04 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 23 21:33:55 2017
    13 // Update Count     : 318
     12// Last Modified On : Fri Mar  3 21:02:23 2017
     13// Update Count     : 332
    1414//
    1515
     
    660660                // Note, qualifiers on the typedef are superfluous for the forward declaration.
    661661                if ( StructInstType *aggDecl = dynamic_cast< StructInstType * >( tyDecl->get_base() ) ) {
    662                         return aggDecl->get_baseStruct() ? Mutator::mutate( aggDecl->get_baseStruct() ) : new StructDecl( aggDecl->get_name() );
     662                        return new StructDecl( aggDecl->get_name() );
    663663                } else if ( UnionInstType *aggDecl = dynamic_cast< UnionInstType * >( tyDecl->get_base() ) ) {
    664                         return aggDecl->get_baseUnion() ? Mutator::mutate( aggDecl->get_baseUnion() ) : new UnionDecl( aggDecl->get_name() );
     664                        return new UnionDecl( aggDecl->get_name() );
    665665                } else if ( EnumInstType *enumDecl = dynamic_cast< EnumInstType * >( tyDecl->get_base() ) ) {
    666666                        return new EnumDecl( enumDecl->get_name() );
     
    691691                DeclarationWithType *ret = Mutator::mutate( objDecl );
    692692                typedefNames.endScope();
    693                 // is the type a function?
    694                 if ( FunctionType *funtype = dynamic_cast<FunctionType *>( ret->get_type() ) ) {
     693
     694                if ( FunctionType *funtype = dynamic_cast<FunctionType *>( ret->get_type() ) ) { // function type?
    695695                        // replace the current object declaration with a function declaration
    696                         FunctionDecl * newDecl = new FunctionDecl( ret->get_name(), ret->get_storageClass(), ret->get_linkage(), funtype, 0, ret->get_isInline(), ret->get_isNoreturn(), objDecl->get_attributes() );
     696                        FunctionDecl * newDecl = new FunctionDecl( ret->get_name(), ret->get_storageClass(), ret->get_linkage(), funtype, 0, objDecl->get_attributes(), ret->get_funcSpec() );
    697697                        objDecl->get_attributes().clear();
    698698                        objDecl->set_type( nullptr );
    699699                        delete objDecl;
    700700                        return newDecl;
    701                 } else if ( objDecl->get_isInline() || objDecl->get_isNoreturn() ) {
    702                         throw SemanticError( "invalid inline or _Noreturn specification in declaration of ", objDecl );
    703701                } // if
    704702                return ret;
  • src/SynTree/Declaration.cc

    rf37147b rdd020c0  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb  9 14:28:05 2017
    13 // Update Count     : 16
     12// Last Modified On : Wed Mar  1 20:11:57 2017
     13// Update Count     : 17
    1414//
    1515
     
    2828
    2929Declaration::Declaration( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage )
    30                 : name( name ), storageClass( sc ), linkage( linkage ), isInline( false ), isNoreturn( false ), uniqueId( 0 ) {
     30                : name( name ), storageClass( sc ), linkage( linkage ), uniqueId( 0 ) {
    3131}
    3232
    3333Declaration::Declaration( const Declaration &other )
    34         : name( other.name ), storageClass( other.storageClass ), linkage( other.linkage ), isInline( other.isInline ), isNoreturn( other.isNoreturn ), uniqueId( other.uniqueId ) {
     34        : name( other.name ), storageClass( other.storageClass ), linkage( other.linkage ), uniqueId( other.uniqueId ) {
    3535}
    3636
  • src/SynTree/Declaration.h

    rf37147b rdd020c0  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 16 14:53:35 2017
    13 // Update Count     : 57
     12// Last Modified On : Fri Mar  3 20:59:27 2017
     13// Update Count     : 96
    1414//
    1515
     
    3838        LinkageSpec::Spec get_linkage() const { return linkage; }
    3939        void set_linkage( LinkageSpec::Spec newValue ) { linkage = newValue; }
    40         bool get_isInline() const { return isInline; }
    41         void set_isInline( bool newValue ) { isInline = newValue; }
    42         bool get_isNoreturn() const { return isNoreturn; }
    43         void set_isNoreturn( bool newValue ) { isNoreturn = newValue; }
    4440        UniqueId get_uniqueId() const { return uniqueId; }
    4541        bool get_extension() const { return extension; }
     
    5955        DeclarationNode::StorageClass storageClass;
    6056        LinkageSpec::Spec linkage;
    61         bool isInline, isNoreturn;
    6257        UniqueId uniqueId;
    6358        bool extension = false;
     
    6661class DeclarationWithType : public Declaration {
    6762  public:
    68         DeclarationWithType( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, const std::list< Attribute * > & attributes );
     63        DeclarationWithType( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, const std::list< Attribute * > & attributes, DeclarationNode::FuncSpec fs = DeclarationNode::FuncSpec() );
    6964        DeclarationWithType( const DeclarationWithType &other );
    7065        virtual ~DeclarationWithType();
     
    8378        std::list< Attribute * >& get_attributes() { return attributes; }
    8479        const std::list< Attribute * >& get_attributes() const { return attributes; }
     80
     81        DeclarationNode::FuncSpec get_funcSpec() const { return fs; }
     82        void set_functionSpecifiers( DeclarationNode::FuncSpec newValue ) { fs = newValue; }
    8583
    8684        virtual DeclarationWithType *clone() const = 0;
     
    9795        ConstantExpr *asmName;
    9896        std::list< Attribute * > attributes;
     97        DeclarationNode::FuncSpec fs;
    9998};
    10099
     
    102101        typedef DeclarationWithType Parent;
    103102  public:
    104         ObjectDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, Expression *bitfieldWidth, Type *type, Initializer *init, const std::list< Attribute * > attributes = std::list< Attribute * >(), bool isInline = false, bool isNoreturn = false );
     103        ObjectDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, Expression *bitfieldWidth, Type *type, Initializer *init,
     104                                const std::list< Attribute * > attributes = std::list< Attribute * >(), DeclarationNode::FuncSpec fs = DeclarationNode::FuncSpec() );
    105105        ObjectDecl( const ObjectDecl &other );
    106106        virtual ~ObjectDecl();
     
    129129        typedef DeclarationWithType Parent;
    130130  public:
    131         FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn, const std::list< Attribute * > attributes = std::list< Attribute * >() );
     131        FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements,
     132                                  const std::list< Attribute * > attributes = std::list< Attribute * >(), DeclarationNode::FuncSpec fs = DeclarationNode::FuncSpec() );
    132133        FunctionDecl( const FunctionDecl &other );
    133134        virtual ~FunctionDecl();
  • src/SynTree/DeclarationWithType.cc

    rf37147b rdd020c0  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Dec 13 14:49:43 2016
    13 // Update Count     : 7
     12// Last Modified On : Fri Mar  3 20:59:28 2017
     13// Update Count     : 19
    1414//
    1515
     
    1919#include "Common/utility.h"
    2020
    21 DeclarationWithType::DeclarationWithType( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, const std::list< Attribute * > & attributes )
    22         : Declaration( name, sc, linkage ), asmName( nullptr ), attributes( attributes ) {
     21DeclarationWithType::DeclarationWithType( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, const std::list< Attribute * > & attributes, DeclarationNode::FuncSpec fs )
     22        : Declaration( name, sc, linkage ), asmName( nullptr ), attributes( attributes ), fs( fs ) {
    2323}
    2424
    2525DeclarationWithType::DeclarationWithType( const DeclarationWithType &other )
    26                 : Declaration( other ), mangleName( other.mangleName ), scopeLevel( other.scopeLevel ) {
     26        : Declaration( other ), mangleName( other.mangleName ), scopeLevel( other.scopeLevel ), fs( other.fs ) {
    2727        cloneAll( other.attributes, attributes );
    2828        asmName = maybeClone( other.asmName );
  • src/SynTree/FunctionDecl.cc

    rf37147b rdd020c0  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 16 15:01:52 2017
    13 // Update Count     : 23
     12// Last Modified On : Fri Mar  3 21:29:41 2017
     13// Update Count     : 55
    1414//
    1515
     
    2626extern bool translation_unit_nomain;
    2727
    28 FunctionDecl::FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn, std::list< Attribute * > attributes )
    29                 : Parent( name, sc, linkage, attributes ), type( type ), statements( statements ) {
    30         set_isInline( isInline );
    31         set_isNoreturn( isNoreturn );
    32         // this is a brazen hack to force the function "main" to have Cforall linkage
    33         // because we want to replace the main even if it is inside an extern
     28FunctionDecl::FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements, std::list< Attribute * > attributes, DeclarationNode::FuncSpec fs )
     29                : Parent( name, sc, linkage, attributes, fs ), type( type ), statements( statements ) {
     30        set_functionSpecifiers( fs );
     31
     32        // hack forcing the function "main" to have Cforall linkage to replace main even if it is inside an extern
    3433        if ( name == "main" ) {
    3534                set_linkage( CodeGen::FixMain::mainLinkage() );
     
    6564                os << LinkageSpec::linkageName( get_linkage() ) << " ";
    6665        } // if
    67         if ( get_isInline() ) {
    68                 os << "inline ";
    69         } // if
    70         if ( get_isNoreturn() ) {
    71                 os << "_Noreturn ";
    72         } // if
    7366
    7467        printAll( get_attributes(), os, indent );
    7568
    7669        if ( get_storageClass() != DeclarationNode::NoStorageClass ) {
    77                 os << DeclarationNode::storageName[ get_storageClass() ] << ' ';
     70                os << DeclarationNode::storageClassNames[ get_storageClass() ] << ' ';
    7871        } // if
     72        DeclarationNode::print_FuncSpec( os, get_funcSpec() );
     73
    7974        if ( get_type() ) {
    8075                get_type()->print( os, indent );
     
    9792                os << get_name() << ": ";
    9893        } // if
    99         if ( get_isInline() ) {
    100                 os << "inline ";
    101         } // if
    102         if ( get_isNoreturn() ) {
    103                 os << "_Noreturn ";
    104         } // if
    10594
    10695        // xxx - should printShort print attributes?
    10796
    10897        if ( get_storageClass() != DeclarationNode::NoStorageClass ) {
    109                 os << DeclarationNode::storageName[ get_storageClass() ] << ' ';
     98                os << DeclarationNode::storageClassNames[ get_storageClass() ] << ' ';
    11099        } // if
     100        DeclarationNode::print_FuncSpec( os, get_funcSpec() );
     101
    111102        if ( get_type() ) {
    112103                get_type()->print( os, indent );
  • src/SynTree/NamedTypeDecl.cc

    rf37147b rdd020c0  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jun 13 08:13:55 2015
    13 // Update Count     : 3
     12// Last Modified On : Tue Feb 28 16:13:24 2017
     13// Update Count     : 4
    1414//
    1515
     
    4040        } // if
    4141        if ( get_storageClass() != DeclarationNode::NoStorageClass ) {
    42                 os << DeclarationNode::storageName[ get_storageClass() ] << ' ';
     42                os << DeclarationNode::storageClassNames[ get_storageClass() ] << ' ';
    4343        } // if
    4444        os << typeString();
     
    6464        } // if
    6565        if ( get_storageClass() != DeclarationNode::NoStorageClass ) {
    66                 os << DeclarationNode::storageName[ get_storageClass() ] << ' ';
     66                os << DeclarationNode::storageClassNames[ get_storageClass() ] << ' ';
    6767        } // if
    6868        os << typeString();
  • src/SynTree/ObjectDecl.cc

    rf37147b rdd020c0  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Oct  1 23:05:56 2016
    13 // Update Count     : 32
     12// Last Modified On : Fri Mar  3 20:59:27 2017
     13// Update Count     : 45
    1414//
    1515
     
    2222#include "Statement.h"
    2323
    24 ObjectDecl::ObjectDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, Expression *bitfieldWidth, Type *type, Initializer *init, const std::list< Attribute * > attributes, bool isInline, bool isNoreturn )
    25         : Parent( name, sc, linkage, attributes ), type( type ), init( init ), bitfieldWidth( bitfieldWidth ) {
    26         set_isInline( isInline );
    27         set_isNoreturn( isNoreturn );
     24ObjectDecl::ObjectDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, Expression *bitfieldWidth, Type *type, Initializer *init, const std::list< Attribute * > attributes, DeclarationNode::FuncSpec fs )
     25        : Parent( name, sc, linkage, attributes, fs ), type( type ), init( init ), bitfieldWidth( bitfieldWidth ) {
     26        set_functionSpecifiers( fs );
    2827}
    2928
     
    5049
    5150        if ( get_storageClass() != DeclarationNode::NoStorageClass ) {
    52                 os << DeclarationNode::storageName[ get_storageClass() ] << ' ';
     51                os << DeclarationNode::storageClassNames[ get_storageClass() ] << ' ';
    5352        } // if
    5453
     
    8685
    8786        if ( get_storageClass() != DeclarationNode::NoStorageClass ) {
    88                 os << DeclarationNode::storageName[ get_storageClass() ] << ' ';
     87                os << DeclarationNode::storageClassNames[ get_storageClass() ] << ' ';
    8988        } // if
    9089
  • src/SynTree/Type.h

    rf37147b rdd020c0  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 23 16:38:53 2017
    13 // Update Count     : 34
     12// Last Modified On : Wed Mar  1 09:11:45 2017
     13// Update Count     : 41
    1414//
    1515
     
    2121#include "SynTree.h"
    2222#include "Visitor.h"
    23 #include "Common/utility.h"
    2423
    2524class Type : public BaseSyntaxNode {
     
    213212        bool get_isVarArgs() const { return isVarArgs; }
    214213        void set_isVarArgs( bool newValue ) { isVarArgs = newValue; }
    215 
    216214        bool isTtype() const;
    217215
Note: See TracChangeset for help on using the changeset viewer.