Changes in / [aee7e35:7b69174]


Ignore:
Files:
8 deleted
39 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/GenType.cc

    raee7e35 r7b69174  
    4242                virtual void visit( TypeInstType *typeInst );
    4343                virtual void visit( VarArgsType *varArgsType );
    44                 virtual void visit( ZeroType *zeroType );
    45                 virtual void visit( OneType *oneType );
    4644
    4745          private:
     
    202200        }
    203201
    204         void GenType::visit( ZeroType *zeroType ) {
    205                 // ideally these wouldn't hit codegen at all, but should be safe to make them ints
    206                 typeString = "int " + typeString;
    207                 handleQualifiers( zeroType );
    208         }
    209 
    210         void GenType::visit( OneType *oneType ) {
    211                 // ideally these wouldn't hit codegen at all, but should be safe to make them ints
    212                 typeString = "int " + typeString;
    213                 handleQualifiers( oneType );
    214         }
    215 
    216202        void GenType::handleQualifiers( Type *type ) {
    217203                if ( type->get_isConst() ) {
  • src/Common/SemanticError.h

    raee7e35 r7b69174  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Sep 24 15:13:42 2016
    13 // Update Count     : 5
     12// Last Modified On : Mon Jun  8 14:38:53 2015
     13// Update Count     : 4
    1414//
    1515
     
    4646}
    4747
     48
    4849#endif // SEMANTICERROR_H
    4950
  • src/Common/module.mk

    raee7e35 r7b69174  
    1111## Created On       : Mon Jun  1 17:49:17 2015
    1212## Last Modified By : Peter A. Buhr
    13 ## Last Modified On : Tue Sep 27 11:06:38 2016
    14 ## Update Count     : 4
     13## Last Modified On : Thu Aug 18 13:29:04 2016
     14## Update Count     : 2
    1515###############################################################################
    1616
    1717SRC += Common/SemanticError.cc \
    1818       Common/UniqueName.cc \
    19        Common/DebugMalloc.cc \
    2019       Common/Assert.cc
  • src/Common/utility.h

    raee7e35 r7b69174  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Sep 23 11:46:47 2016
    13 // Update Count     : 28
     12// Last Modified On : Wed Jun  8 17:33:59 2016
     13// Update Count     : 22
    1414//
    1515
     
    2525#include <sstream>
    2626#include <string>
    27 #include <cassert>
    2827
    2928template< typename T >
     
    102101                } // if
    103102        } // for
     103}
     104
     105static inline std::string assign_strptr( const std::string *str ) {
     106        if ( str == 0 ) {
     107                return "";
     108        } else {
     109                std::string tmp;
     110                tmp = *str;
     111                delete str;
     112                return tmp;
     113        } // if
    104114}
    105115
     
    131141
    132142template < typename T >
    133 void toString_single( std::ostream & os, const T & value ) {
     143void toString_single ( std::ostream & os, const T & value ) {
    134144        os << value;
    135145}
    136146
    137147template < typename T, typename... Params >
    138 void toString_single( std::ostream & os, const T & value, const Params & ... params ) {
     148void toString_single ( std::ostream & os, const T & value, const Params & ... params ) {
    139149        os << value;
    140150        toString_single( os, params ... );
     
    142152
    143153template < typename ... Params >
    144 std::string toString( const Params & ... params ) {
     154std::string toString ( const Params & ... params ) {
    145155        std::ostringstream os;
    146156        toString_single( os, params... );
  • src/Makefile.am

    raee7e35 r7b69174  
    1111## Created On       : Sun May 31 08:51:46 2015
    1212## Last Modified By : Peter A. Buhr
    13 ## Last Modified On : Sat Sep 24 15:03:52 2016
    14 ## Update Count     : 73
     13## Last Modified On : Sat Aug 20 11:13:12 2016
     14## Update Count     : 71
    1515###############################################################################
    1616
     
    4040cfa_cpplib_PROGRAMS = driver/cfa-cpp
    4141driver_cfa_cpp_SOURCES = ${SRC}
    42 driver_cfa_cpp_LDADD = ${LEXLIB} -ldl                   # yywrap
     42driver_cfa_cpp_LDADD = ${LEXLIB}                        # yywrap
    4343driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -DDEBUG_ALL -rdynamic -I${abs_top_srcdir}/src/include
    4444
  • src/Makefile.in

    raee7e35 r7b69174  
    9898        Common/driver_cfa_cpp-SemanticError.$(OBJEXT) \
    9999        Common/driver_cfa_cpp-UniqueName.$(OBJEXT) \
    100         Common/driver_cfa_cpp-DebugMalloc.$(OBJEXT) \
    101100        Common/driver_cfa_cpp-Assert.$(OBJEXT) \
    102101        ControlStruct/driver_cfa_cpp-LabelGenerator.$(OBJEXT) \
     
    166165        SynTree/driver_cfa_cpp-AttrType.$(OBJEXT) \
    167166        SynTree/driver_cfa_cpp-VarArgsType.$(OBJEXT) \
    168         SynTree/driver_cfa_cpp-ZeroOneType.$(OBJEXT) \
    169167        SynTree/driver_cfa_cpp-Constant.$(OBJEXT) \
    170168        SynTree/driver_cfa_cpp-Expression.$(OBJEXT) \
     
    360358        CodeGen/CodeGenerator.cc CodeGen/GenType.cc \
    361359        CodeGen/FixNames.cc CodeGen/OperatorTable.cc \
    362         Common/SemanticError.cc Common/UniqueName.cc \
    363         Common/DebugMalloc.cc Common/Assert.cc \
     360        Common/SemanticError.cc Common/UniqueName.cc Common/Assert.cc \
    364361        ControlStruct/LabelGenerator.cc ControlStruct/LabelFixer.cc \
    365362        ControlStruct/MLEMutator.cc ControlStruct/Mutate.cc \
     
    393390        SynTree/ReferenceToType.cc SynTree/TupleType.cc \
    394391        SynTree/TypeofType.cc SynTree/AttrType.cc \
    395         SynTree/VarArgsType.cc SynTree/ZeroOneType.cc \
    396         SynTree/Constant.cc SynTree/Expression.cc SynTree/TupleExpr.cc \
     392        SynTree/VarArgsType.cc SynTree/Constant.cc \
     393        SynTree/Expression.cc SynTree/TupleExpr.cc \
    397394        SynTree/CommaExpr.cc SynTree/TypeExpr.cc \
    398395        SynTree/ApplicationExpr.cc SynTree/AddressExpr.cc \
     
    416413cfa_cpplibdir = ${libdir}
    417414driver_cfa_cpp_SOURCES = ${SRC}
    418 driver_cfa_cpp_LDADD = ${LEXLIB} -ldl                   # yywrap
     415driver_cfa_cpp_LDADD = ${LEXLIB}                        # yywrap
    419416driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -DDEBUG_ALL -rdynamic -I${abs_top_srcdir}/src/include
    420417all: $(BUILT_SOURCES)
     
    516513        Common/$(DEPDIR)/$(am__dirstamp)
    517514Common/driver_cfa_cpp-UniqueName.$(OBJEXT): Common/$(am__dirstamp) \
    518         Common/$(DEPDIR)/$(am__dirstamp)
    519 Common/driver_cfa_cpp-DebugMalloc.$(OBJEXT): Common/$(am__dirstamp) \
    520515        Common/$(DEPDIR)/$(am__dirstamp)
    521516Common/driver_cfa_cpp-Assert.$(OBJEXT): Common/$(am__dirstamp) \
     
    720715SynTree/driver_cfa_cpp-VarArgsType.$(OBJEXT): SynTree/$(am__dirstamp) \
    721716        SynTree/$(DEPDIR)/$(am__dirstamp)
    722 SynTree/driver_cfa_cpp-ZeroOneType.$(OBJEXT): SynTree/$(am__dirstamp) \
    723         SynTree/$(DEPDIR)/$(am__dirstamp)
    724717SynTree/driver_cfa_cpp-Constant.$(OBJEXT): SynTree/$(am__dirstamp) \
    725718        SynTree/$(DEPDIR)/$(am__dirstamp)
     
    793786        -rm -f CodeGen/driver_cfa_cpp-OperatorTable.$(OBJEXT)
    794787        -rm -f Common/driver_cfa_cpp-Assert.$(OBJEXT)
    795         -rm -f Common/driver_cfa_cpp-DebugMalloc.$(OBJEXT)
    796788        -rm -f Common/driver_cfa_cpp-SemanticError.$(OBJEXT)
    797789        -rm -f Common/driver_cfa_cpp-UniqueName.$(OBJEXT)
     
    885877        -rm -f SynTree/driver_cfa_cpp-Visitor.$(OBJEXT)
    886878        -rm -f SynTree/driver_cfa_cpp-VoidType.$(OBJEXT)
    887         -rm -f SynTree/driver_cfa_cpp-ZeroOneType.$(OBJEXT)
    888879        -rm -f Tuples/driver_cfa_cpp-NameMatcher.$(OBJEXT)
    889880        -rm -f Tuples/driver_cfa_cpp-TupleAssignment.$(OBJEXT)
     
    900891@AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/driver_cfa_cpp-OperatorTable.Po@am__quote@
    901892@AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-Assert.Po@am__quote@
    902 @AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-DebugMalloc.Po@am__quote@
    903893@AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-SemanticError.Po@am__quote@
    904894@AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-UniqueName.Po@am__quote@
     
    992982@AMDEP_TRUE@@am__include@ @am__quote@SynTree/$(DEPDIR)/driver_cfa_cpp-Visitor.Po@am__quote@
    993983@AMDEP_TRUE@@am__include@ @am__quote@SynTree/$(DEPDIR)/driver_cfa_cpp-VoidType.Po@am__quote@
    994 @AMDEP_TRUE@@am__include@ @am__quote@SynTree/$(DEPDIR)/driver_cfa_cpp-ZeroOneType.Po@am__quote@
    995984@AMDEP_TRUE@@am__include@ @am__quote@Tuples/$(DEPDIR)/driver_cfa_cpp-NameMatcher.Po@am__quote@
    996985@AMDEP_TRUE@@am__include@ @am__quote@Tuples/$(DEPDIR)/driver_cfa_cpp-TupleAssignment.Po@am__quote@
     
    11381127@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Common/driver_cfa_cpp-UniqueName.obj `if test -f 'Common/UniqueName.cc'; then $(CYGPATH_W) 'Common/UniqueName.cc'; else $(CYGPATH_W) '$(srcdir)/Common/UniqueName.cc'; fi`
    11391128
    1140 Common/driver_cfa_cpp-DebugMalloc.o: Common/DebugMalloc.cc
    1141 @am__fastdepCXX_TRUE@   $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Common/driver_cfa_cpp-DebugMalloc.o -MD -MP -MF Common/$(DEPDIR)/driver_cfa_cpp-DebugMalloc.Tpo -c -o Common/driver_cfa_cpp-DebugMalloc.o `test -f 'Common/DebugMalloc.cc' || echo '$(srcdir)/'`Common/DebugMalloc.cc
    1142 @am__fastdepCXX_TRUE@   $(AM_V_at)$(am__mv) Common/$(DEPDIR)/driver_cfa_cpp-DebugMalloc.Tpo Common/$(DEPDIR)/driver_cfa_cpp-DebugMalloc.Po
    1143 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(AM_V_CXX)source='Common/DebugMalloc.cc' object='Common/driver_cfa_cpp-DebugMalloc.o' libtool=no @AMDEPBACKSLASH@
    1144 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1145 @am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Common/driver_cfa_cpp-DebugMalloc.o `test -f 'Common/DebugMalloc.cc' || echo '$(srcdir)/'`Common/DebugMalloc.cc
    1146 
    1147 Common/driver_cfa_cpp-DebugMalloc.obj: Common/DebugMalloc.cc
    1148 @am__fastdepCXX_TRUE@   $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Common/driver_cfa_cpp-DebugMalloc.obj -MD -MP -MF Common/$(DEPDIR)/driver_cfa_cpp-DebugMalloc.Tpo -c -o Common/driver_cfa_cpp-DebugMalloc.obj `if test -f 'Common/DebugMalloc.cc'; then $(CYGPATH_W) 'Common/DebugMalloc.cc'; else $(CYGPATH_W) '$(srcdir)/Common/DebugMalloc.cc'; fi`
    1149 @am__fastdepCXX_TRUE@   $(AM_V_at)$(am__mv) Common/$(DEPDIR)/driver_cfa_cpp-DebugMalloc.Tpo Common/$(DEPDIR)/driver_cfa_cpp-DebugMalloc.Po
    1150 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(AM_V_CXX)source='Common/DebugMalloc.cc' object='Common/driver_cfa_cpp-DebugMalloc.obj' libtool=no @AMDEPBACKSLASH@
    1151 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1152 @am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Common/driver_cfa_cpp-DebugMalloc.obj `if test -f 'Common/DebugMalloc.cc'; then $(CYGPATH_W) 'Common/DebugMalloc.cc'; else $(CYGPATH_W) '$(srcdir)/Common/DebugMalloc.cc'; fi`
    1153 
    11541129Common/driver_cfa_cpp-Assert.o: Common/Assert.cc
    11551130@am__fastdepCXX_TRUE@   $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Common/driver_cfa_cpp-Assert.o -MD -MP -MF Common/$(DEPDIR)/driver_cfa_cpp-Assert.Tpo -c -o Common/driver_cfa_cpp-Assert.o `test -f 'Common/Assert.cc' || echo '$(srcdir)/'`Common/Assert.cc
     
    20892064@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    20902065@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o SynTree/driver_cfa_cpp-VarArgsType.obj `if test -f 'SynTree/VarArgsType.cc'; then $(CYGPATH_W) 'SynTree/VarArgsType.cc'; else $(CYGPATH_W) '$(srcdir)/SynTree/VarArgsType.cc'; fi`
    2091 
    2092 SynTree/driver_cfa_cpp-ZeroOneType.o: SynTree/ZeroOneType.cc
    2093 @am__fastdepCXX_TRUE@   $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT SynTree/driver_cfa_cpp-ZeroOneType.o -MD -MP -MF SynTree/$(DEPDIR)/driver_cfa_cpp-ZeroOneType.Tpo -c -o SynTree/driver_cfa_cpp-ZeroOneType.o `test -f 'SynTree/ZeroOneType.cc' || echo '$(srcdir)/'`SynTree/ZeroOneType.cc
    2094 @am__fastdepCXX_TRUE@   $(AM_V_at)$(am__mv) SynTree/$(DEPDIR)/driver_cfa_cpp-ZeroOneType.Tpo SynTree/$(DEPDIR)/driver_cfa_cpp-ZeroOneType.Po
    2095 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(AM_V_CXX)source='SynTree/ZeroOneType.cc' object='SynTree/driver_cfa_cpp-ZeroOneType.o' libtool=no @AMDEPBACKSLASH@
    2096 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    2097 @am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o SynTree/driver_cfa_cpp-ZeroOneType.o `test -f 'SynTree/ZeroOneType.cc' || echo '$(srcdir)/'`SynTree/ZeroOneType.cc
    2098 
    2099 SynTree/driver_cfa_cpp-ZeroOneType.obj: SynTree/ZeroOneType.cc
    2100 @am__fastdepCXX_TRUE@   $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT SynTree/driver_cfa_cpp-ZeroOneType.obj -MD -MP -MF SynTree/$(DEPDIR)/driver_cfa_cpp-ZeroOneType.Tpo -c -o SynTree/driver_cfa_cpp-ZeroOneType.obj `if test -f 'SynTree/ZeroOneType.cc'; then $(CYGPATH_W) 'SynTree/ZeroOneType.cc'; else $(CYGPATH_W) '$(srcdir)/SynTree/ZeroOneType.cc'; fi`
    2101 @am__fastdepCXX_TRUE@   $(AM_V_at)$(am__mv) SynTree/$(DEPDIR)/driver_cfa_cpp-ZeroOneType.Tpo SynTree/$(DEPDIR)/driver_cfa_cpp-ZeroOneType.Po
    2102 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(AM_V_CXX)source='SynTree/ZeroOneType.cc' object='SynTree/driver_cfa_cpp-ZeroOneType.obj' libtool=no @AMDEPBACKSLASH@
    2103 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    2104 @am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o SynTree/driver_cfa_cpp-ZeroOneType.obj `if test -f 'SynTree/ZeroOneType.cc'; then $(CYGPATH_W) 'SynTree/ZeroOneType.cc'; else $(CYGPATH_W) '$(srcdir)/SynTree/ZeroOneType.cc'; fi`
    21052066
    21062067SynTree/driver_cfa_cpp-Constant.o: SynTree/Constant.cc
  • src/Parser/DeclarationNode.cc

    raee7e35 r7b69174  
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Sep 26 22:18:40 2016
    13 // Update Count     : 640
     12// Last Modified On : Wed Sep 14 23:13:28 2016
     13// Update Count     : 502
    1414//
    1515
     
    3131
    3232// These must remain in the same order as the corresponding DeclarationNode enumerations.
    33 const char * DeclarationNode::storageName[] = { "extern", "static", "auto", "register", "inline", "fortran", "_Noreturn", "_Thread_local", "NoStorageClass" };
    34 const char * DeclarationNode::qualifierName[] = { "const", "restrict", "volatile", "lvalue", "_Atomic", "NoQualifier" };
    35 const char * DeclarationNode::basicTypeName[] = { "void", "_Bool", "char", "int", "float", "double", "long double", "NoBasicType" };
    36 const char * DeclarationNode::complexTypeName[] = { "_Complex", "_Imaginary", "NoComplexType" };
    37 const char * DeclarationNode::signednessName[] = { "signed", "unsigned", "NoSignedness" };
    38 const char * DeclarationNode::lengthName[] = { "short", "long", "long long", "NoLength" };
    39 const char * DeclarationNode::aggregateName[] = { "struct", "union", "context" };
    40 const char * DeclarationNode::typeClassName[] = { "otype", "dtype", "ftype" };
    41 const char * DeclarationNode::builtinTypeName[] = { "__builtin_va_list" };
     33const char *DeclarationNode::storageName[] = { "extern", "static", "auto", "register", "inline", "fortran", "_Noreturn", "_Thread_local", "NoStorageClass" };
     34const char *DeclarationNode::qualifierName[] = { "const", "restrict", "volatile", "lvalue", "_Atomic", "NoQualifier" };
     35const char *DeclarationNode::basicTypeName[] = { "void", "_Bool", "char", "int", "float", "double", "long double", "NoBasicType" };
     36const char *DeclarationNode::complexTypeName[] = { "_Complex", "_Imaginary", "NoComplexType" };
     37const char *DeclarationNode::signednessName[] = { "signed", "unsigned", "NoSignedness" };
     38const char *DeclarationNode::lengthName[] = { "short", "long", "long long", "NoLength" };
     39const char *DeclarationNode::aggregateName[] = { "struct", "union", "context" };
     40const char *DeclarationNode::typeClassName[] = { "otype", "dtype", "ftype" };
     41const char *DeclarationNode::builtinTypeName[] = { "__builtin_va_list" };
    4242
    4343UniqueName DeclarationNode::anonymous( "__anonymous" );
     
    4646
    4747DeclarationNode::DeclarationNode() :
    48                 type( nullptr ),
     48                type( 0 ),
    4949                storageClass( NoStorageClass ),
    5050                isInline( false ),
    5151                isNoreturn( false ),
    52                 bitfieldWidth( nullptr ),
    53                 initializer( nullptr ),
     52                bitfieldWidth( 0 ),
     53                initializer( 0 ),
    5454                hasEllipsis( false ),
    5555                linkage( ::linkage ),
    5656                extension( false ) {
    57 
    58         variable.name = nullptr;
    5957        variable.tyClass = DeclarationNode::Otype;
    6058        variable.assertions = nullptr;
    6159
    62         attr.name = nullptr;
    6360        attr.expr = nullptr;
    6461        attr.type = nullptr;
     
    6663
    6764DeclarationNode::~DeclarationNode() {
    68         delete attr.name;
    6965        delete attr.expr;
    7066        delete attr.type;
    71 
    72         delete variable.name;
    73         delete variable.assertions;
    74 
    7567        delete type;
    7668        delete bitfieldWidth;
     
    7870}
    7971
    80 DeclarationNode * DeclarationNode::clone() const {
    81         DeclarationNode * newnode = new DeclarationNode;
     72DeclarationNode *DeclarationNode::clone() const {
     73        DeclarationNode *newnode = new DeclarationNode;
    8274        newnode->type = maybeClone( type );
    83         newnode->name = name ? new string( *name ) : nullptr;
     75        newnode->name = name;
    8476        newnode->storageClass = storageClass;
    8577        newnode->isInline = isInline;
     
    9183        newnode->linkage = linkage;
    9284
    93         newnode->variable.name = variable.name ? new string( *variable.name ) : nullptr;
     85        newnode->variable.assertions = maybeClone( variable.assertions );
     86        newnode->variable.name = variable.name;
    9487        newnode->variable.tyClass = variable.tyClass;
    95         newnode->variable.assertions = maybeClone( variable.assertions );
    96 
    97         newnode->attr.name = attr.name ? new string( *attr.name ) : nullptr;
     88
    9889        newnode->attr.expr = maybeClone( attr.expr );
    9990        newnode->attr.type = maybeClone( attr.type );
     
    10798void DeclarationNode::print( std::ostream &os, int indent ) const {
    10899        os << string( indent, ' ' );
    109         if ( name ) {
    110                 os << *name << ": ";
     100        if ( name == "" ) {
     101                os << "unnamed: ";
    111102        } else {
    112                 os << "unnamed: ";
     103                os << name << ": ";
    113104        } // if
    114105
     
    131122        } // if
    132123
    133         if ( initializer ) {
     124        if ( initializer != 0 ) {
    134125                os << endl << string( indent + 2, ' ' ) << "with initializer ";
    135126                initializer->printOneLine( os );
     
    148139}
    149140
    150 DeclarationNode * DeclarationNode::newFunction( string * name, DeclarationNode * ret, DeclarationNode * param, StatementNode * body, bool newStyle ) {
    151         DeclarationNode * newnode = new DeclarationNode;
    152         newnode->name = name;
     141DeclarationNode *DeclarationNode::newFunction( std::string *name, DeclarationNode *ret, DeclarationNode *param, StatementNode *body, bool newStyle ) {
     142        DeclarationNode *newnode = new DeclarationNode;
     143        newnode->name = assign_strptr( name );
     144
    153145        newnode->type = new TypeData( TypeData::Function );
    154146        newnode->type->function.params = param;
    155147        newnode->type->function.newStyle = newStyle;
    156148        newnode->type->function.body = body;
    157         // ignore unnamed routine declarations: void p( int (*)(int) );
    158         if ( newnode->name ) {
    159                 typedefTable.addToEnclosingScope( *newnode->name, TypedefTable::ID );
    160         } // if
     149        typedefTable.addToEnclosingScope( newnode->name, TypedefTable::ID );
    161150
    162151        if ( body ) {
     
    166155        if ( ret ) {
    167156                newnode->type->base = ret->type;
    168                 ret->type = nullptr;
     157                ret->type = 0;
    169158                delete ret;
    170159        } // if
     
    174163
    175164DeclarationNode * DeclarationNode::newQualifier( Qualifier q ) {
    176         DeclarationNode * newnode = new DeclarationNode;
     165        DeclarationNode *newnode = new DeclarationNode;
    177166        newnode->type = new TypeData();
    178167        newnode->type->qualifiers[ q ] = 1;
     
    180169} // DeclarationNode::newQualifier
    181170
    182 DeclarationNode * DeclarationNode::newForall( DeclarationNode * forall ) {
    183         DeclarationNode * newnode = new DeclarationNode;
     171DeclarationNode * DeclarationNode::newForall( DeclarationNode *forall ) {
     172        DeclarationNode *newnode = new DeclarationNode;
    184173        newnode->type = new TypeData( TypeData::Unknown );
    185174        newnode->type->forall = forall;
     
    188177
    189178DeclarationNode * DeclarationNode::newStorageClass( DeclarationNode::StorageClass sc ) {
    190         DeclarationNode * newnode = new DeclarationNode;
     179        DeclarationNode *newnode = new DeclarationNode;
     180        //switch (sc) {
     181        //      case Inline: newnode->isInline = true; break;
     182        //      case Noreturn: newnode->isNoreturn = true; break;
     183        //      default: newnode->storageClass = sc; break;
     184        //}
    191185        newnode->storageClass = sc;
    192186        return newnode;
     
    194188
    195189DeclarationNode * DeclarationNode::newBasicType( BasicType bt ) {
    196         DeclarationNode * newnode = new DeclarationNode;
     190        DeclarationNode *newnode = new DeclarationNode;
    197191        newnode->type = new TypeData( TypeData::Basic );
    198192        newnode->type->basictype = bt;
     
    201195
    202196DeclarationNode * DeclarationNode::newComplexType( ComplexType ct ) {
    203         DeclarationNode * newnode = new DeclarationNode;
     197        DeclarationNode *newnode = new DeclarationNode;
    204198        newnode->type = new TypeData( TypeData::Basic );
    205199        newnode->type->complextype = ct;
     
    208202
    209203DeclarationNode * DeclarationNode::newSignedNess( Signedness sn ) {
    210         DeclarationNode * newnode = new DeclarationNode;
     204        DeclarationNode *newnode = new DeclarationNode;
    211205        newnode->type = new TypeData( TypeData::Basic );
    212206        newnode->type->signedness = sn;
     
    215209
    216210DeclarationNode * DeclarationNode::newLength( Length lnth ) {
    217         DeclarationNode * newnode = new DeclarationNode;
     211        DeclarationNode *newnode = new DeclarationNode;
    218212        newnode->type = new TypeData( TypeData::Basic );
    219213        newnode->type->length = lnth;
     
    221215} // DeclarationNode::newLength
    222216
    223 DeclarationNode * DeclarationNode::newFromTypedef( string * name ) {
    224         DeclarationNode * newnode = new DeclarationNode;
     217DeclarationNode * DeclarationNode::newFromTypedef( std::string *name ) {
     218        DeclarationNode *newnode = new DeclarationNode;
    225219        newnode->type = new TypeData( TypeData::SymbolicInst );
    226         newnode->type->symbolic.name = name;
     220        newnode->type->symbolic.name = assign_strptr( name );
    227221        newnode->type->symbolic.isTypedef = true;
    228         newnode->type->symbolic.params = nullptr;
     222        newnode->type->symbolic.params = 0;
    229223        return newnode;
    230224} // DeclarationNode::newFromTypedef
    231225
    232 DeclarationNode * DeclarationNode::newAggregate( Aggregate kind, const string * name, ExpressionNode * actuals, DeclarationNode * fields, bool body ) {
    233         DeclarationNode * newnode = new DeclarationNode;
     226DeclarationNode * DeclarationNode::newAggregate( Aggregate kind, const std::string *name, ExpressionNode *actuals, DeclarationNode *fields, bool body ) {
     227        DeclarationNode *newnode = new DeclarationNode;
    234228        newnode->type = new TypeData( TypeData::Aggregate );
    235229        newnode->type->aggregate.kind = kind;
    236         if ( name ) {
    237                 newnode->type->aggregate.name = name;
    238         } else {                                                                                        // anonymous aggregate ?
    239                 newnode->type->aggregate.name = new string( anonymous.newName() );
     230        newnode->type->aggregate.name = assign_strptr( name );
     231        if ( newnode->type->aggregate.name == "" ) {            // anonymous aggregate ?
     232                newnode->type->aggregate.name = anonymous.newName();
    240233        } // if
    241234        newnode->type->aggregate.actuals = actuals;
     
    245238} // DeclarationNode::newAggregate
    246239
    247 DeclarationNode * DeclarationNode::newEnum( string * name, DeclarationNode * constants ) {
    248         DeclarationNode * newnode = new DeclarationNode;
     240DeclarationNode *DeclarationNode::newEnum( std::string *name, DeclarationNode *constants ) {
     241        DeclarationNode *newnode = new DeclarationNode;
     242        newnode->name = assign_strptr( name );
    249243        newnode->type = new TypeData( TypeData::Enum );
    250         if ( name ) {
    251                 newnode->type->enumeration.name = name;
    252         } else {                                                                                        // anonymous aggregate ?
    253                 newnode->type->enumeration.name = new string( anonymous.newName() );
     244        newnode->type->enumeration.name = newnode->name;
     245        if ( newnode->type->enumeration.name == "" ) {          // anonymous enumeration ?
     246                newnode->type->enumeration.name = DeclarationNode::anonymous.newName();
    254247        } // if
    255248        newnode->type->enumeration.constants = constants;
     
    257250} // DeclarationNode::newEnum
    258251
    259 DeclarationNode * DeclarationNode::newEnumConstant( string * name, ExpressionNode * constant ) {
    260         DeclarationNode * newnode = new DeclarationNode;
    261         newnode->name = name;
     252DeclarationNode *DeclarationNode::newEnumConstant( std::string *name, ExpressionNode *constant ) {
     253        DeclarationNode *newnode = new DeclarationNode;
     254        newnode->name = assign_strptr( name );
    262255        newnode->enumeratorValue.reset( constant );
    263         typedefTable.addToEnclosingScope( *newnode->name, TypedefTable::ID );
     256        typedefTable.addToEnclosingScope( newnode->name, TypedefTable::ID );
    264257        return newnode;
    265258} // DeclarationNode::newEnumConstant
    266259
    267 DeclarationNode * DeclarationNode::newName( string * name ) {
    268         DeclarationNode * newnode = new DeclarationNode;
    269         newnode->name = name;
     260DeclarationNode *DeclarationNode::newName( std::string *name ) {
     261        DeclarationNode *newnode = new DeclarationNode;
     262        newnode->name = assign_strptr( name );
    270263        return newnode;
    271264} // DeclarationNode::newName
    272265
    273 DeclarationNode * DeclarationNode::newFromTypeGen( string * name, ExpressionNode * params ) {
    274         DeclarationNode * newnode = new DeclarationNode;
     266DeclarationNode *DeclarationNode::newFromTypeGen( std::string *name, ExpressionNode *params ) {
     267        DeclarationNode *newnode = new DeclarationNode;
    275268        newnode->type = new TypeData( TypeData::SymbolicInst );
    276         newnode->type->symbolic.name = name;
     269        newnode->type->symbolic.name = assign_strptr( name );
    277270        newnode->type->symbolic.isTypedef = false;
    278271        newnode->type->symbolic.actuals = params;
     
    280273} // DeclarationNode::newFromTypeGen
    281274
    282 DeclarationNode * DeclarationNode::newTypeParam( TypeClass tc, string * name ) {
    283         DeclarationNode * newnode = new DeclarationNode;
    284         newnode->type = nullptr;
     275DeclarationNode *DeclarationNode::newTypeParam( TypeClass tc, std::string *name ) {
     276        DeclarationNode *newnode = new DeclarationNode;
     277        newnode->name = assign_strptr( name );
     278        newnode->type = new TypeData( TypeData::Variable );
    285279        newnode->variable.tyClass = tc;
    286         newnode->variable.name = name;
     280        newnode->variable.name = newnode->name;
    287281        return newnode;
    288282} // DeclarationNode::newTypeParam
    289283
    290 DeclarationNode * DeclarationNode::newTrait( const string * name, DeclarationNode * params, DeclarationNode * asserts ) {
    291         DeclarationNode * newnode = new DeclarationNode;
     284DeclarationNode *DeclarationNode::newTrait( std::string *name, DeclarationNode *params, DeclarationNode *asserts ) {
     285        DeclarationNode *newnode = new DeclarationNode;
    292286        newnode->type = new TypeData( TypeData::Aggregate );
    293         newnode->type->aggregate.name = name;
    294287        newnode->type->aggregate.kind = Trait;
    295288        newnode->type->aggregate.params = params;
    296289        newnode->type->aggregate.fields = asserts;
     290        newnode->type->aggregate.name = assign_strptr( name );
    297291        return newnode;
    298292} // DeclarationNode::newTrait
    299293
    300 DeclarationNode * DeclarationNode::newTraitUse( const string * name, ExpressionNode * params ) {
    301         DeclarationNode * newnode = new DeclarationNode;
     294DeclarationNode *DeclarationNode::newTraitUse( std::string *name, ExpressionNode *params ) {
     295        DeclarationNode *newnode = new DeclarationNode;
    302296        newnode->type = new TypeData( TypeData::AggregateInst );
    303297        newnode->type->aggInst.aggregate = new TypeData( TypeData::Aggregate );
    304298        newnode->type->aggInst.aggregate->aggregate.kind = Trait;
    305         newnode->type->aggInst.aggregate->aggregate.name = name;
     299        newnode->type->aggInst.aggregate->aggregate.name = assign_strptr( name );
    306300        newnode->type->aggInst.params = params;
    307301        return newnode;
    308302} // DeclarationNode::newTraitUse
    309303
    310 DeclarationNode * DeclarationNode::newTypeDecl( string * name, DeclarationNode * typeParams ) {
    311         DeclarationNode * newnode = new DeclarationNode;
     304DeclarationNode *DeclarationNode::newTypeDecl( std::string *name, DeclarationNode *typeParams ) {
     305        DeclarationNode *newnode = new DeclarationNode;
     306        newnode->name = assign_strptr( name );
    312307        newnode->type = new TypeData( TypeData::Symbolic );
    313308        newnode->type->symbolic.isTypedef = false;
    314309        newnode->type->symbolic.params = typeParams;
    315         newnode->type->symbolic.name = name;
     310        newnode->type->symbolic.name = newnode->name;
    316311        return newnode;
    317312} // DeclarationNode::newTypeDecl
    318313
    319 DeclarationNode * DeclarationNode::newPointer( DeclarationNode * qualifiers ) {
    320         DeclarationNode * newnode = new DeclarationNode;
     314DeclarationNode *DeclarationNode::newPointer( DeclarationNode *qualifiers ) {
     315        DeclarationNode *newnode = new DeclarationNode;
    321316        newnode->type = new TypeData( TypeData::Pointer );
    322317        return newnode->addQualifiers( qualifiers );
    323318} // DeclarationNode::newPointer
    324319
    325 DeclarationNode * DeclarationNode::newArray( ExpressionNode * size, DeclarationNode * qualifiers, bool isStatic ) {
    326         DeclarationNode * newnode = new DeclarationNode;
     320DeclarationNode *DeclarationNode::newArray( ExpressionNode *size, DeclarationNode *qualifiers, bool isStatic ) {
     321        DeclarationNode *newnode = new DeclarationNode;
    327322        newnode->type = new TypeData( TypeData::Array );
    328323        newnode->type->array.dimension = size;
    329324        newnode->type->array.isStatic = isStatic;
    330         if ( newnode->type->array.dimension == nullptr || newnode->type->array.dimension->isExpressionType<ConstantExpr * >() ) {
     325        if ( newnode->type->array.dimension == 0 || newnode->type->array.dimension->isExpressionType<ConstantExpr *>() ) {
    331326                newnode->type->array.isVarLen = false;
    332327        } else {
     
    336331} // DeclarationNode::newArray
    337332
    338 DeclarationNode * DeclarationNode::newVarArray( DeclarationNode * qualifiers ) {
    339         DeclarationNode * newnode = new DeclarationNode;
     333DeclarationNode *DeclarationNode::newVarArray( DeclarationNode *qualifiers ) {
     334        DeclarationNode *newnode = new DeclarationNode;
    340335        newnode->type = new TypeData( TypeData::Array );
    341         newnode->type->array.dimension = nullptr;
     336        newnode->type->array.dimension = 0;
    342337        newnode->type->array.isStatic = false;
    343338        newnode->type->array.isVarLen = true;
     
    345340}
    346341
    347 DeclarationNode * DeclarationNode::newBitfield( ExpressionNode * size ) {
    348         DeclarationNode * newnode = new DeclarationNode;
     342DeclarationNode *DeclarationNode::newBitfield( ExpressionNode *size ) {
     343        DeclarationNode *newnode = new DeclarationNode;
    349344        newnode->bitfieldWidth = size;
    350345        return newnode;
    351346}
    352347
    353 DeclarationNode * DeclarationNode::newTuple( DeclarationNode * members ) {
    354         DeclarationNode * newnode = new DeclarationNode;
     348DeclarationNode *DeclarationNode::newTuple( DeclarationNode *members ) {
     349        DeclarationNode *newnode = new DeclarationNode;
    355350        newnode->type = new TypeData( TypeData::Tuple );
    356351        newnode->type->tuple = members;
     
    358353}
    359354
    360 DeclarationNode * DeclarationNode::newTypeof( ExpressionNode * expr ) {
    361         DeclarationNode * newnode = new DeclarationNode;
     355DeclarationNode *DeclarationNode::newTypeof( ExpressionNode *expr ) {
     356        DeclarationNode *newnode = new DeclarationNode;
    362357        newnode->type = new TypeData( TypeData::Typeof );
    363358        newnode->type->typeexpr = expr;
     
    366361
    367362DeclarationNode * DeclarationNode::newBuiltinType( BuiltinType bt ) {
    368         DeclarationNode * newnode = new DeclarationNode;
     363        DeclarationNode *newnode = new DeclarationNode;
    369364        newnode->type = new TypeData( TypeData::Builtin );
    370365        newnode->builtin = bt;
     
    372367} // DeclarationNode::newBuiltinType
    373368
    374 DeclarationNode * DeclarationNode::newAttr( string * name, ExpressionNode * expr ) {
    375         DeclarationNode * newnode = new DeclarationNode;
    376         newnode->type = nullptr;
    377         newnode->attr.name = name;
     369DeclarationNode *DeclarationNode::newAttr( std::string *name, ExpressionNode *expr ) {
     370        DeclarationNode *newnode = new DeclarationNode;
     371        newnode->type = new TypeData( TypeData::Attr );
     372        newnode->attr.name = assign_strptr( name );
    378373        newnode->attr.expr = expr;
    379374        return newnode;
    380375}
    381376
    382 DeclarationNode * DeclarationNode::newAttr( string * name, DeclarationNode * type ) {
    383         DeclarationNode * newnode = new DeclarationNode;
    384         newnode->type = nullptr;
    385         newnode->attr.name = name;
     377DeclarationNode *DeclarationNode::newAttr( std::string *name, DeclarationNode *type ) {
     378        DeclarationNode *newnode = new DeclarationNode;
     379        newnode->type = new TypeData( TypeData::Attr );
     380        newnode->attr.name = assign_strptr( name );
    386381        newnode->attr.type = type;
    387382        return newnode;
     
    394389} // appendError
    395390
    396 void DeclarationNode::checkQualifiers( const TypeData * src, const TypeData * dst ) {
     391void DeclarationNode::checkQualifiers( const TypeData *src, const TypeData *dst ) {
    397392        TypeData::Qualifiers qsrc = src->qualifiers, qdst = dst->qualifiers; // optimization
    398393
     
    406401} // DeclarationNode::checkQualifiers
    407402
    408 void DeclarationNode::checkStorageClasses( DeclarationNode * q ) {
     403void DeclarationNode::checkStorageClasses( DeclarationNode *q ) {
    409404        if ( storageClass != NoStorageClass && q->storageClass != NoStorageClass ) {
    410405                if ( storageClass == q->storageClass ) {                // duplicate qualifier
     
    418413} // DeclarationNode::copyStorageClasses
    419414
    420 DeclarationNode * DeclarationNode::copyStorageClasses( DeclarationNode * q ) {
     415DeclarationNode *DeclarationNode::copyStorageClasses( DeclarationNode *q ) {
    421416        isInline = isInline || q->isInline;
    422417        isNoreturn = isNoreturn || q->isNoreturn;
     
    429424} // DeclarationNode::copyStorageClasses
    430425
    431 static void addQualifiersToType( TypeData *&src, TypeData * dst ) {
     426static void addQualifiersToType( TypeData *&src, TypeData *dst ) {
    432427        if ( src->forall && dst->kind == TypeData::Function ) {
    433428                if ( dst->forall ) {
     
    436431                        dst->forall = src->forall;
    437432                } // if
    438                 src->forall = nullptr;
     433                src->forall = 0;
    439434        } // if
    440435        if ( dst->base ) {
     
    442437        } else if ( dst->kind == TypeData::Function ) {
    443438                dst->base = src;
    444                 src = nullptr;
     439                src = 0;
    445440        } else {
    446441                dst->qualifiers |= src->qualifiers;
     
    448443} // addQualifiersToType
    449444
    450 DeclarationNode * DeclarationNode::addQualifiers( DeclarationNode * q ) {
    451         if ( ! q ) { delete q; return this; }
     445DeclarationNode *DeclarationNode::addQualifiers( DeclarationNode *q ) {
     446        if ( ! q ) return this;
    452447
    453448        checkStorageClasses( q );
    454449        copyStorageClasses( q );
    455450
    456         if ( ! q->type ) {
    457                 delete q;
    458                 return this;
    459         } // if
     451        if ( ! q->type ) { delete q; return this; }
    460452
    461453        if ( ! type ) {
    462                 type = q->type;                                                                 // reuse this structure
    463                 q->type = nullptr;
    464                 delete q;
     454//              type = new TypeData;
     455                type = q->type;
    465456                return this;
    466457        } // if
     
    476467                                type->aggregate.params = q->type->forall;
    477468                                // change implicit typedef from TYPEDEFname to TYPEGENname
    478                                 typedefTable.changeKind( *type->aggregate.name, TypedefTable::TG );
     469                                typedefTable.changeKind( type->aggregate.name, TypedefTable::TG );
    479470                        } else {
    480471                                type->forall = q->type->forall;
    481472                        } // if
    482473                } // if
    483                 q->type->forall = nullptr;
     474                q->type->forall = 0;
    484475        } // if
    485476        delete q;
     
    494485                        dst->forall = src->forall;
    495486                } // if
    496                 src->forall = nullptr;
     487                src->forall = 0;
    497488        } // if
    498489        if ( dst->base ) {
     
    503494                        src->qualifiers |= dst->qualifiers;
    504495                        dst = src;
    505                         src = nullptr;
     496                        src = 0;
    506497                        break;
    507498                  case TypeData::Basic:
     
    513504                                        dst->basictype = src->basictype;
    514505                                } else if ( src->basictype != DeclarationNode::NoBasicType )
    515                                         throw SemanticError( string( "conflicting type specifier " ) + DeclarationNode::basicTypeName[ src->basictype ] + " in type: ", src );
     506                                        throw SemanticError( std::string( "conflicting type specifier " ) + DeclarationNode::basicTypeName[ src->basictype ] + " in type: ", src );
    516507
    517508                                if ( dst->complextype == DeclarationNode::NoComplexType ) {
    518509                                        dst->complextype = src->complextype;
    519510                                } else if ( src->complextype != DeclarationNode::NoComplexType )
    520                                         throw SemanticError( string( "conflicting type specifier " ) + DeclarationNode::complexTypeName[ src->complextype ] + " in type: ", src );
     511                                        throw SemanticError( std::string( "conflicting type specifier " ) + DeclarationNode::complexTypeName[ src->complextype ] + " in type: ", src );
    521512
    522513                                if ( dst->signedness == DeclarationNode::NoSignedness ) {
    523514                                        dst->signedness = src->signedness;
    524515                                } else if ( src->signedness != DeclarationNode::NoSignedness )
    525                                         throw SemanticError( string( "conflicting type specifier " ) + DeclarationNode::signednessName[ src->signedness ] + " in type: ", src );
     516                                        throw SemanticError( std::string( "conflicting type specifier " ) + DeclarationNode::signednessName[ src->signedness ] + " in type: ", src );
    526517
    527518                                if ( dst->length == DeclarationNode::NoLength ) {
     
    530521                                        dst->length = DeclarationNode::LongLong;
    531522                                } else if ( src->length != DeclarationNode::NoLength )
    532                                         throw SemanticError( string( "conflicting type specifier " ) + DeclarationNode::lengthName[ src->length ] + " in type: ", src );
     523                                        throw SemanticError( std::string( "conflicting type specifier " ) + DeclarationNode::lengthName[ src->length ] + " in type: ", src );
    533524                        } // if
    534525                        break;
     
    543534                                } // if
    544535                                dst->base->qualifiers |= src->qualifiers;
    545                                 src = nullptr;
     536                                src = 0;
    546537                                break;
    547538                          default:
     
    551542                                        dst->forall = src->forall;
    552543                                } // if
    553                                 src->forall = nullptr;
     544                                src->forall = 0;
    554545                                dst->base = src;
    555                                 src = nullptr;
     546                                src = 0;
    556547                        } // switch
    557548                } // switch
     
    559550}
    560551
    561 DeclarationNode * DeclarationNode::addType( DeclarationNode * o ) {
     552DeclarationNode *DeclarationNode::addType( DeclarationNode *o ) {
    562553        if ( o ) {
    563554                checkStorageClasses( o );
     
    575566                                        type = o->type;
    576567                                } // if
    577                                 o->type = nullptr;
     568                                o->type = 0;
    578569                        } else {
    579570                                addTypeToType( o->type, type );
     
    593584}
    594585
    595 DeclarationNode * DeclarationNode::addTypedef() {
    596         TypeData * newtype = new TypeData( TypeData::Symbolic );
    597         newtype->symbolic.params = nullptr;
     586DeclarationNode *DeclarationNode::addTypedef() {
     587        TypeData *newtype = new TypeData( TypeData::Symbolic );
     588        newtype->symbolic.params = 0;
    598589        newtype->symbolic.isTypedef = true;
    599         newtype->symbolic.name = name ? new string( *name ) : nullptr;
     590        newtype->symbolic.name = name;
    600591        newtype->base = type;
    601592        type = newtype;
     
    603594}
    604595
    605 DeclarationNode * DeclarationNode::addAssertions( DeclarationNode * assertions ) {
    606         if ( variable.name ) {
    607                 if ( variable.assertions ) {
    608                         variable.assertions->appendList( assertions );
    609                 } else {
    610                         variable.assertions = assertions;
    611                 } // if
    612                 return this;
    613         } // if
    614 
     596DeclarationNode *DeclarationNode::addAssertions( DeclarationNode *assertions ) {
    615597        assert( type );
    616598        switch ( type->kind ) {
     
    622604                } // if
    623605                break;
    624           // case TypeData::Variable:
    625           //    if ( variable.assertions ) {
    626           //            variable.assertions->appendList( assertions );
    627           //    } else {
    628           //            variable.assertions = assertions;
    629           //    } // if
    630           //    break;
     606          case TypeData::Variable:
     607                if ( variable.assertions ) {
     608                        variable.assertions->appendList( assertions );
     609                } else {
     610                        variable.assertions = assertions;
     611                } // if
     612                break;
    631613          default:
    632614                assert( false );
     
    636618}
    637619
    638 DeclarationNode * DeclarationNode::addName( string * newname ) {
    639         assert( ! name );
    640         name = newname;
    641         return this;
    642 }
    643 
    644 DeclarationNode * DeclarationNode::addBitfield( ExpressionNode * size ) {
     620DeclarationNode *DeclarationNode::addName( std::string *newname ) {
     621        name = assign_strptr( newname );
     622        return this;
     623}
     624
     625DeclarationNode *DeclarationNode::addBitfield( ExpressionNode *size ) {
    645626        bitfieldWidth = size;
    646627        return this;
    647628}
    648629
    649 DeclarationNode * DeclarationNode::addVarArgs() {
     630DeclarationNode *DeclarationNode::addVarArgs() {
    650631        assert( type );
    651632        hasEllipsis = true;
     
    653634}
    654635
    655 DeclarationNode * DeclarationNode::addFunctionBody( StatementNode * body ) {
     636DeclarationNode *DeclarationNode::addFunctionBody( StatementNode *body ) {
    656637        assert( type );
    657638        assert( type->kind == TypeData::Function );
    658         assert( ! type->function.body );
     639        assert( type->function.body == 0 );
    659640        type->function.body = body;
    660641        type->function.hasBody = true;
     
    662643}
    663644
    664 DeclarationNode * DeclarationNode::addOldDeclList( DeclarationNode * list ) {
     645DeclarationNode *DeclarationNode::addOldDeclList( DeclarationNode *list ) {
    665646        assert( type );
    666647        assert( type->kind == TypeData::Function );
    667         assert( ! type->function.oldDeclList );
     648        assert( type->function.oldDeclList == 0 );
    668649        type->function.oldDeclList = list;
    669650        return this;
    670651}
    671652
    672 static void setBase( TypeData *&type, TypeData * newType ) {
     653static void setBase( TypeData *&type, TypeData *newType ) {
    673654        if ( type ) {
    674                 TypeData * prevBase = type;
    675                 TypeData * curBase = type->base;
    676                 while ( curBase != nullptr ) {
     655                TypeData *prevBase = type;
     656                TypeData *curBase = type->base;
     657                while ( curBase != 0 ) {
    677658                        prevBase = curBase;
    678659                        curBase = curBase->base;
     
    684665}
    685666
    686 DeclarationNode * DeclarationNode::addPointer( DeclarationNode * p ) {
     667DeclarationNode *DeclarationNode::addPointer( DeclarationNode *p ) {
    687668        if ( p ) {
    688669                assert( p->type->kind == TypeData::Pointer );
    689670                setBase( type, p->type );
    690                 p->type = nullptr;
     671                p->type = 0;
    691672                delete p;
    692673        } // if
     
    694675}
    695676
    696 DeclarationNode * DeclarationNode::addArray( DeclarationNode * a ) {
     677DeclarationNode *DeclarationNode::addArray( DeclarationNode *a ) {
    697678        if ( a ) {
    698679                assert( a->type->kind == TypeData::Array );
    699680                setBase( type, a->type );
    700                 a->type = nullptr;
     681                a->type = 0;
    701682                delete a;
    702683        } // if
     
    704685}
    705686
    706 DeclarationNode * DeclarationNode::addNewPointer( DeclarationNode * p ) {
     687DeclarationNode *DeclarationNode::addNewPointer( DeclarationNode *p ) {
    707688        if ( p ) {
    708689                assert( p->type->kind == TypeData::Pointer );
     
    722703                                p->type->base = type;
    723704                        } // switch
    724                         type = nullptr;
     705                        type = 0;
    725706                } // if
    726707                delete this;
     
    731712}
    732713
    733 static TypeData * findLast( TypeData * a ) {
     714static TypeData *findLast( TypeData *a ) {
    734715        assert( a );
    735         TypeData * cur = a;
     716        TypeData *cur = a;
    736717        while ( cur->base ) {
    737718                cur = cur->base;
     
    740721}
    741722
    742 DeclarationNode * DeclarationNode::addNewArray( DeclarationNode * a ) {
     723DeclarationNode *DeclarationNode::addNewArray( DeclarationNode *a ) {
    743724        if ( a ) {
    744725                assert( a->type->kind == TypeData::Array );
    745                 TypeData * lastArray = findLast( a->type );
     726                TypeData *lastArray = findLast( a->type );
    746727                if ( type ) {
    747728                        switch ( type->kind ) {
     
    758739                                lastArray->base = type;
    759740                        } // switch
    760                         type = nullptr;
     741                        type = 0;
    761742                } // if
    762743                delete this;
     
    767748}
    768749
    769 DeclarationNode * DeclarationNode::addParamList( DeclarationNode * params ) {
    770         TypeData * ftype = new TypeData( TypeData::Function );
     750DeclarationNode *DeclarationNode::addParamList( DeclarationNode *params ) {
     751        TypeData *ftype = new TypeData( TypeData::Function );
    771752        ftype->function.params = params;
    772753        setBase( type, ftype );
     
    774755}
    775756
    776 static TypeData * addIdListToType( TypeData * type, DeclarationNode * ids ) {
     757static TypeData *addIdListToType( TypeData *type, DeclarationNode *ids ) {
    777758        if ( type ) {
    778759                if ( type->kind != TypeData::Function ) {
     
    783764                return type;
    784765        } else {
    785                 TypeData * newtype = new TypeData( TypeData::Function );
     766                TypeData *newtype = new TypeData( TypeData::Function );
    786767                newtype->function.idList = ids;
    787768                return newtype;
    788769        } // if
    789 } // addIdListToType
    790 
    791 DeclarationNode * DeclarationNode::addIdList( DeclarationNode * ids ) {
     770}
     771
     772DeclarationNode *DeclarationNode::addIdList( DeclarationNode *ids ) {
    792773        type = addIdListToType( type, ids );
    793774        return this;
    794775}
    795776
    796 DeclarationNode * DeclarationNode::addInitializer( InitializerNode * init ) {
     777DeclarationNode *DeclarationNode::addInitializer( InitializerNode *init ) {
     778        //assert
    797779        initializer = init;
    798780        return this;
    799781}
    800782
    801 DeclarationNode * DeclarationNode::cloneType( string * newName ) {
    802         DeclarationNode * newnode = new DeclarationNode;
     783DeclarationNode *DeclarationNode::cloneBaseType( string *newName ) {
     784        DeclarationNode *newnode = new DeclarationNode;
     785        TypeData *srcType = type;
     786        while ( srcType->base ) {
     787                srcType = srcType->base;
     788        } // while
     789        newnode->type = maybeClone( srcType );
     790        if ( newnode->type->kind == TypeData::AggregateInst ) {
     791                // don't duplicate members
     792                if ( newnode->type->aggInst.aggregate->kind == TypeData::Enum ) {
     793                        delete newnode->type->aggInst.aggregate->enumeration.constants;
     794                        newnode->type->aggInst.aggregate->enumeration.constants = 0;
     795                } else {
     796                        assert( newnode->type->aggInst.aggregate->kind == TypeData::Aggregate );
     797                        delete newnode->type->aggInst.aggregate->aggregate.fields;
     798                        newnode->type->aggInst.aggregate->aggregate.fields = 0;
     799                } // if
     800        } // if
     801        newnode->type->forall = maybeClone( type->forall );
     802        assert( storageClass == NoStorageClass );
     803        newnode->copyStorageClasses( this );
     804        newnode->name = assign_strptr( newName );
     805        return newnode;
     806}
     807
     808DeclarationNode *DeclarationNode::cloneBaseType( DeclarationNode *o ) {
     809        if ( o ) {
     810                o->copyStorageClasses( this );
     811                if ( type ) {
     812                        TypeData *srcType = type;
     813                        while ( srcType->base ) {
     814                                srcType = srcType->base;
     815                        } // while
     816                        TypeData *newType = srcType->clone();
     817                        if ( newType->kind == TypeData::AggregateInst ) {
     818                                // don't duplicate members
     819                                if ( newType->aggInst.aggregate->kind == TypeData::Enum ) {
     820                                        delete newType->aggInst.aggregate->enumeration.constants;
     821                                        newType->aggInst.aggregate->enumeration.constants = 0;
     822                                } else {
     823                                        assert( newType->aggInst.aggregate->kind == TypeData::Aggregate );
     824                                        delete newType->aggInst.aggregate->aggregate.fields;
     825                                        newType->aggInst.aggregate->aggregate.fields = 0;
     826                                } // if
     827                        } // if
     828                        newType->forall = maybeClone( type->forall );
     829                        if ( ! o->type ) {
     830                                o->type = newType;
     831                        } else {
     832                                addTypeToType( newType, o->type );
     833                                delete newType;
     834                        } // if
     835                } // if
     836        } // if
     837        return o;
     838}
     839
     840DeclarationNode *DeclarationNode::cloneType( string *newName ) {
     841        DeclarationNode *newnode = new DeclarationNode;
    803842        newnode->type = maybeClone( type );
    804843        assert( storageClass == NoStorageClass );
    805844        newnode->copyStorageClasses( this );
    806         assert( newName );
    807         newnode->name = newName;
    808         return newnode;
    809 }
    810 
    811 DeclarationNode * DeclarationNode::cloneBaseType( DeclarationNode * o ) {
    812         if ( ! o ) return nullptr;
    813 
    814         o->copyStorageClasses( this );
     845        newnode->name = assign_strptr( newName );
     846        return newnode;
     847}
     848
     849DeclarationNode *DeclarationNode::cloneType( DeclarationNode *o ) {
     850        if ( o ) {
     851                assert( storageClass == NoStorageClass );
     852                o->copyStorageClasses( this );
     853                if ( type ) {
     854                        TypeData *newType = type->clone();
     855                        if ( ! o->type ) {
     856                                o->type = newType;
     857                        } else {
     858                                addTypeToType( newType, o->type );
     859                                delete newType;
     860                        } // if
     861                } // if
     862        } // if
     863        delete o;
     864        return o;
     865}
     866
     867DeclarationNode *DeclarationNode::extractAggregate() const {
    815868        if ( type ) {
    816                 TypeData * srcType = type;
    817 
    818                 while ( srcType->base ) {
    819                         srcType = srcType->base;
    820                 } // while
    821 
    822                 TypeData * newType = srcType->clone();
    823                 if ( newType->kind == TypeData::AggregateInst ) {
    824                         // don't duplicate members
    825                         if ( newType->aggInst.aggregate->kind == TypeData::Enum ) {
    826                                 delete newType->aggInst.aggregate->enumeration.constants;
    827                                 newType->aggInst.aggregate->enumeration.constants = nullptr;
    828                         } else {
    829                                 assert( newType->aggInst.aggregate->kind == TypeData::Aggregate );
    830                                 delete newType->aggInst.aggregate->aggregate.fields;
    831                                 newType->aggInst.aggregate->aggregate.fields = nullptr;
    832                         } // if
    833                 } // if
    834 
    835                 newType->forall = maybeClone( type->forall );
    836                 if ( ! o->type ) {
    837                         o->type = newType;
    838                 } else {
    839                         addTypeToType( newType, o->type );
    840                         delete newType;
    841                 } // if
    842         } // if
    843         return o;
    844 }
    845 
    846 DeclarationNode * DeclarationNode::extractAggregate() const {
    847         if ( type ) {
    848                 TypeData * ret = typeextractAggregate( type );
     869                TypeData *ret = typeextractAggregate( type );
    849870                if ( ret ) {
    850                         DeclarationNode * newnode = new DeclarationNode;
     871                        DeclarationNode *newnode = new DeclarationNode;
    851872                        newnode->type = ret;
    852873                        return newnode;
    853874                } // if
    854875        } // if
    855         return nullptr;
    856 }
    857 
    858 void buildList( const DeclarationNode * firstNode, std::list< Declaration * > &outputList ) {
     876        return 0;
     877}
     878
     879void buildList( const DeclarationNode *firstNode, std::list< Declaration * > &outputList ) {
    859880        SemanticError errors;
    860881        std::back_insert_iterator< std::list< Declaration * > > out( outputList );
    861         const DeclarationNode * cur = firstNode;
    862 
     882        const DeclarationNode *cur = firstNode;
    863883        while ( cur ) {
    864884                try {
    865                         if ( DeclarationNode * extr = cur->extractAggregate() ) {
     885                        if ( DeclarationNode *extr = cur->extractAggregate() ) {
    866886                                // handle the case where a structure declaration is contained within an object or type declaration
    867                                 Declaration * decl = extr->build();
     887                                Declaration *decl = extr->build();
    868888                                if ( decl ) {
    869                                         * out++ = decl;
     889                                        *out++ = decl;
    870890                                } // if
    871891                                delete extr;
    872892                        } // if
    873 
    874                         Declaration * decl = cur->build();
     893                        Declaration *decl = cur->build();
    875894                        if ( decl ) {
    876                                 * out++ = decl;
     895                                *out++ = decl;
    877896                        } // if
    878897                } catch( SemanticError &e ) {
     
    881900                cur = dynamic_cast< DeclarationNode * >( cur->get_next() );
    882901        } // while
    883 
    884902        if ( ! errors.isEmpty() ) {
    885903                throw errors;
    886904        } // if
    887 } // buildList
    888 
    889 void buildList( const DeclarationNode * firstNode, std::list< DeclarationWithType * > &outputList ) {
     905}
     906
     907void buildList( const DeclarationNode *firstNode, std::list< DeclarationWithType * > &outputList ) {
    890908        SemanticError errors;
    891909        std::back_insert_iterator< std::list< DeclarationWithType * > > out( outputList );
    892         const DeclarationNode * cur = firstNode;
     910        const DeclarationNode *cur = firstNode;
    893911        while ( cur ) {
    894912                try {
    895                         Declaration * decl = cur->build();
     913                        Declaration *decl = cur->build();
    896914                        if ( decl ) {
    897                                 if ( DeclarationWithType * dwt = dynamic_cast< DeclarationWithType * >( decl ) ) {
    898                                         * out++ = dwt;
    899                                 } else if ( StructDecl * agg = dynamic_cast< StructDecl * >( decl ) ) {
    900                                         StructInstType * inst = new StructInstType( Type::Qualifiers(), agg->get_name() );
    901                                         * out++ = new ObjectDecl( "", DeclarationNode::NoStorageClass, linkage, nullptr, inst, nullptr );
     915                                if ( DeclarationWithType *dwt = dynamic_cast< DeclarationWithType * >( decl ) ) {
     916                                        *out++ = dwt;
     917                                } else if ( StructDecl *agg = dynamic_cast< StructDecl * >( decl ) ) {
     918                                        StructInstType *inst = new StructInstType( Type::Qualifiers(), agg->get_name() );
     919                                        *out++ = new ObjectDecl( "", DeclarationNode::NoStorageClass, linkage, 0, inst, 0 );
    902920                                        delete agg;
    903                                 } else if ( UnionDecl * agg = dynamic_cast< UnionDecl * >( decl ) ) {
    904                                         UnionInstType * inst = new UnionInstType( Type::Qualifiers(), agg->get_name() );
    905                                         * out++ = new ObjectDecl( "", DeclarationNode::NoStorageClass, linkage, nullptr, inst, nullptr );
     921                                } else if ( UnionDecl *agg = dynamic_cast< UnionDecl * >( decl ) ) {
     922                                        UnionInstType *inst = new UnionInstType( Type::Qualifiers(), agg->get_name() );
     923                                        *out++ = new ObjectDecl( "", DeclarationNode::NoStorageClass, linkage, 0, inst, 0 );
    906924                                } // if
    907925                        } // if
     
    914932                throw errors;
    915933        } // if
    916 } // buildList
    917 
    918 void buildTypeList( const DeclarationNode * firstNode, std::list< Type * > &outputList ) {
     934}
     935
     936void buildTypeList( const DeclarationNode *firstNode, std::list< Type * > &outputList ) {
    919937        SemanticError errors;
    920938        std::back_insert_iterator< std::list< Type * > > out( outputList );
    921         const DeclarationNode * cur = firstNode;
    922 
     939        const DeclarationNode *cur = firstNode;
    923940        while ( cur ) {
    924941                try {
    925                         * out++ = cur->buildType();
     942                        *out++ = cur->buildType();
    926943                } catch( SemanticError &e ) {
    927944                        errors.append( e );
     
    929946                cur = dynamic_cast< DeclarationNode * >( cur->get_next() );
    930947        } // while
    931 
    932948        if ( ! errors.isEmpty() ) {
    933949                throw errors;
    934950        } // if
    935 } // buildTypeList
    936 
    937 Declaration * DeclarationNode::build() const {
     951}
     952
     953Declaration *DeclarationNode::build() const {
    938954        if ( ! error.empty() ) throw SemanticError( error + " in declaration of ", this );
    939 
    940         if ( variable.name ) {
    941                 static const TypeDecl::Kind kindMap[] = { TypeDecl::Any, TypeDecl::Ftype, TypeDecl::Dtype };
    942                 TypeDecl * ret = new TypeDecl( *variable.name, DeclarationNode::NoStorageClass, nullptr, kindMap[ variable.tyClass ] );
    943                 buildList( variable.assertions, ret->get_assertions() );
    944                 return ret;
    945         } // if
    946 
    947955        if ( type ) {
    948                 return buildDecl( type, name ? *name : string( "" ), storageClass, maybeBuild< Expression >( bitfieldWidth ), isInline, isNoreturn, linkage, maybeBuild< Initializer >(initializer) )->set_extension( extension );
    949         } // if
    950 
     956                if ( type->kind == TypeData::Variable ) {
     957                        static const TypeDecl::Kind kindMap[] = { TypeDecl::Any, TypeDecl::Ftype, TypeDecl::Dtype };
     958                        TypeDecl * ret = new TypeDecl( variable.name, DeclarationNode::NoStorageClass, 0, kindMap[ variable.tyClass ] );
     959                        buildList( variable.assertions, ret->get_assertions() );
     960                        return ret;
     961                } else {
     962                        return buildDecl( type, name, storageClass, maybeBuild< Expression >( bitfieldWidth ), isInline, isNoreturn, linkage, maybeBuild< Initializer >(initializer) )->set_extension( extension );
     963                } // if
     964        } // if
    951965        if ( ! isInline && ! isNoreturn ) {
    952                 assertf( name, "ObjectDecl are assumed to have names\n" );
    953                 return (new ObjectDecl( *name, storageClass, linkage, maybeBuild< Expression >( bitfieldWidth ), nullptr, maybeBuild< Initializer >( initializer ) ))->set_extension( extension );
    954         } // if
    955 
     966                return (new ObjectDecl( name, storageClass, linkage, maybeBuild< Expression >( bitfieldWidth ), 0, maybeBuild< Initializer >( initializer ) ))->set_extension( extension );
     967        } // if
    956968        throw SemanticError( "invalid function specifier ", this );
    957969}
    958970
    959 Type * DeclarationNode::buildType() const {
     971Type *DeclarationNode::buildType() const {
    960972        assert( type );
    961 
    962         if ( attr.name ) {
    963                 AttrType * ret;
    964                 if ( attr.expr ) {
    965                         ret = new AttrType( buildQualifiers( type ), *attr.name, attr.expr->build() );
    966                 } else {
    967                         assert( attr.type );
    968                         ret = new AttrType( buildQualifiers( type ), *attr.name, attr.type->buildType() );
    969                 } // if
    970                 return ret;
    971         } // if
    972973
    973974        switch ( type->kind ) {
    974975          case TypeData::Enum:
    975                 return new EnumInstType( buildQualifiers( type ), *type->enumeration.name );
     976                return new EnumInstType( buildQualifiers( type ), type->enumeration.name );
    976977          case TypeData::Aggregate: {
    977                   ReferenceToType * ret;
     978                  ReferenceToType *ret;
    978979                  switch ( type->aggregate.kind ) {
    979980                        case DeclarationNode::Struct:
    980                           ret = new StructInstType( buildQualifiers( type ), *type->aggregate.name );
     981                          ret = new StructInstType( buildQualifiers( type ), type->aggregate.name );
    981982                          break;
    982983                        case DeclarationNode::Union:
    983                           ret = new UnionInstType( buildQualifiers( type ), *type->aggregate.name );
     984                          ret = new UnionInstType( buildQualifiers( type ), type->aggregate.name );
    984985                          break;
    985986                        case DeclarationNode::Trait:
    986                           ret = new TraitInstType( buildQualifiers( type ), *type->aggregate.name );
     987                          ret = new TraitInstType( buildQualifiers( type ), type->aggregate.name );
    987988                          break;
    988989                        default:
     
    993994          }
    994995          case TypeData::Symbolic: {
    995                   TypeInstType * ret = new TypeInstType( buildQualifiers( type ), *type->symbolic.name, false );
     996                  TypeInstType *ret = new TypeInstType( buildQualifiers( type ), type->symbolic.name, false );
    996997                  buildList( type->symbolic.actuals, ret->get_parameters() );
     998                  return ret;
     999          }
     1000          case TypeData::Attr: {
     1001                  assert( type->kind == TypeData::Attr );
     1002                  // assert( type->attr );
     1003                  AttrType * ret;
     1004                  if ( attr.expr ) {
     1005                          ret = new AttrType( buildQualifiers( type ), attr.name, attr.expr->build() );
     1006                  } else {
     1007                          assert( attr.type );
     1008                          ret = new AttrType( buildQualifiers( type ), attr.name, attr.type->buildType() );
     1009                  } // if
    9971010                  return ret;
    9981011          }
  • src/Parser/ExpressionNode.cc

    raee7e35 r7b69174  
    1010// Created On       : Sat May 16 13:17:07 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Sep 16 16:27:44 2016
    13 // Update Count     : 508
     12// Last Modified On : Thu Aug 25 21:39:40 2016
     13// Update Count     : 503
    1414//
    1515
     
    3131
    3232using namespace std;
     33
     34ExpressionNode::ExpressionNode( const ExpressionNode &other ) : ParseNode( other.get_name() ), extension( other.extension ) {}
    3335
    3436//##############################################################################
  • src/Parser/ParseNode.h

    raee7e35 r7b69174  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Sep 24 11:12:04 2016
    13 // Update Count     : 633
     12// Last Modified On : Mon Sep 12 08:00:05 2016
     13// Update Count     : 603
    1414//
    1515
     
    4141  public:
    4242        ParseNode() {};
    43         virtual ~ParseNode() { delete next; delete name; };
     43        ParseNode( const std::string * name ) : name( * name ) { assert( false ); delete name; }
     44        ParseNode( const std::string &name ) : name( name ) { assert( false ); }
     45        virtual ~ParseNode() { delete next; };
    4446        virtual ParseNode * clone() const = 0;
    4547
    4648        ParseNode * get_next() const { return next; }
    4749        ParseNode * set_next( ParseNode * newlink ) { next = newlink; return this; }
    48 
    4950        ParseNode * get_last() {
    5051                ParseNode * current;
    51                 for ( current = this; current->get_next() != nullptr; current = current->get_next() );
     52                for ( current = this; current->get_next() != 0; current = current->get_next() );
    5253                return current;
    5354        }
    5455        ParseNode * set_last( ParseNode * newlast ) {
    55                 if ( newlast != nullptr ) get_last()->set_next( newlast );
     56                if ( newlast != 0 ) get_last()->set_next( newlast );
    5657                return this;
    5758        }
     59
     60        const std::string &get_name() const { return name; }
     61        void set_name( const std::string &newValue ) { name = newValue; }
    5862
    5963        virtual void print( std::ostream &os, int indent = 0 ) const {}
    6064        virtual void printList( std::ostream &os, int indent = 0 ) const {}
    61 
     65  private:
    6266        static int indent_by;
    6367
    6468        ParseNode * next = nullptr;
    65         std::string * name = nullptr;
     69        std::string name;
    6670}; // ParseNode
    6771
     
    7074class InitializerNode : public ParseNode {
    7175  public:
    72         InitializerNode( ExpressionNode *, bool aggrp = false,  ExpressionNode * des = nullptr );
    73         InitializerNode( InitializerNode *, bool aggrp = false, ExpressionNode * des = nullptr );
     76        InitializerNode( ExpressionNode *, bool aggrp = false,  ExpressionNode * des = 0 );
     77        InitializerNode( InitializerNode *, bool aggrp = false, ExpressionNode * des = 0 );
    7478        ~InitializerNode();
    7579        virtual InitializerNode * clone() const { assert( false ); return nullptr; }
     
    102106  public:
    103107        ExpressionNode( Expression * expr = nullptr ) : expr( expr ) {}
     108        ExpressionNode( Expression * expr, const std::string * name ) : ParseNode( name ), expr( expr ) {}
    104109        ExpressionNode( const ExpressionNode &other );
    105110        virtual ~ExpressionNode() {}
     
    178183Expression * build_attrexpr( NameExpr * var, ExpressionNode * expr_node );
    179184Expression * build_attrtype( NameExpr * var, DeclarationNode * decl_node );
    180 Expression * build_tuple( ExpressionNode * expr_node = nullptr );
     185Expression * build_tuple( ExpressionNode * expr_node = 0 );
    181186Expression * build_func( ExpressionNode * function, ExpressionNode * expr_node );
    182187Expression * build_range( ExpressionNode * low, ExpressionNode * high );
     
    214219        static DeclarationNode * newFunction( std::string * name, DeclarationNode * ret, DeclarationNode * param, StatementNode * body, bool newStyle = false );
    215220        static DeclarationNode * newQualifier( Qualifier );
    216         static DeclarationNode * newForall( DeclarationNode * );
     221        static DeclarationNode * newForall( DeclarationNode *);
    217222        static DeclarationNode * newStorageClass( StorageClass );
    218223        static DeclarationNode * newBasicType( BasicType );
     
    221226        static DeclarationNode * newLength( Length lnth );
    222227        static DeclarationNode * newBuiltinType( BuiltinType );
    223         static DeclarationNode * newFromTypedef( std::string * );
     228        static DeclarationNode * newFromTypedef( std::string *);
    224229        static DeclarationNode * newAggregate( Aggregate kind, const std::string * name, ExpressionNode * actuals, DeclarationNode * fields, bool body );
    225230        static DeclarationNode * newEnum( std::string * name, DeclarationNode * constants );
    226231        static DeclarationNode * newEnumConstant( std::string * name, ExpressionNode * constant );
    227         static DeclarationNode * newName( std::string * );
     232        static DeclarationNode * newName( std::string *);
    228233        static DeclarationNode * newFromTypeGen( std::string *, ExpressionNode * params );
    229         static DeclarationNode * newTypeParam( TypeClass, std::string * );
    230         static DeclarationNode * newTrait( const std::string * name, DeclarationNode * params, DeclarationNode * asserts );
    231         static DeclarationNode * newTraitUse( const std::string * name, ExpressionNode * params );
     234        static DeclarationNode * newTypeParam( TypeClass, std::string *);
     235        static DeclarationNode * newTrait( std::string * name, DeclarationNode * params, DeclarationNode * asserts );
     236        static DeclarationNode * newTraitUse( std::string * name, ExpressionNode * params );
    232237        static DeclarationNode * newTypeDecl( std::string * name, DeclarationNode * typeParams );
    233238        static DeclarationNode * newPointer( DeclarationNode * qualifiers );
     
    244249        DeclarationNode * clone() const;
    245250
    246         DeclarationNode * addQualifiers( DeclarationNode * );
     251        DeclarationNode * addQualifiers( DeclarationNode *);
    247252        void checkQualifiers( const TypeData *, const TypeData * );
    248         void checkStorageClasses( DeclarationNode * );
    249         DeclarationNode * copyStorageClasses( DeclarationNode * );
    250         DeclarationNode * addType( DeclarationNode * );
     253        void checkStorageClasses( DeclarationNode *q );
     254        DeclarationNode * copyStorageClasses( DeclarationNode *);
     255        DeclarationNode * addType( DeclarationNode *);
    251256        DeclarationNode * addTypedef();
    252         DeclarationNode * addAssertions( DeclarationNode * );
    253         DeclarationNode * addName( std::string * );
     257        DeclarationNode * addAssertions( DeclarationNode *);
     258        DeclarationNode * addName( std::string *);
    254259        DeclarationNode * addBitfield( ExpressionNode * size );
    255260        DeclarationNode * addVarArgs();
     
    265270
    266271        DeclarationNode * cloneType( std::string * newName );
     272        DeclarationNode * cloneType( DeclarationNode * existing );
     273        DeclarationNode * cloneType( int ) { return cloneType( ( std::string *)0 ); }
     274        DeclarationNode * cloneBaseType( std::string * newName );
    267275        DeclarationNode * cloneBaseType( DeclarationNode * newdecl );
    268276
     
    278286
    279287        bool get_hasEllipsis() const;
     288        const std::string &get_name() const { return name; }
    280289        LinkageSpec::Spec get_linkage() const { return linkage; }
    281290        DeclarationNode * extractAggregate() const;
     
    286295        DeclarationNode * set_extension( bool exten ) { extension = exten; return this; }
    287296  public:
     297        // StorageClass buildStorageClass() const;
     298        // bool buildFuncSpecifier( StorageClass key ) const;
     299
    288300        struct Variable_t {
    289                 const std::string * name;
    290301                DeclarationNode::TypeClass tyClass;
     302                std::string name;
    291303                DeclarationNode * assertions;
    292304        };
     
    294306
    295307        struct Attr_t {
    296                 const std::string * name;
     308                std::string name;
    297309                ExpressionNode * expr;
    298310                DeclarationNode * type;
     
    303315
    304316        TypeData * type;
     317        std::string name;
    305318        StorageClass storageClass;
    306319        bool isInline, isNoreturn;
     
    318331
    319332Type * buildType( TypeData * type );
     333//Type::Qualifiers buildQualifiers( const TypeData::Qualifiers & qualifiers );
    320334
    321335static inline Type * maybeMoveBuildType( const DeclarationNode * orig ) {
     
    379393Statement * build_finally( StatementNode * stmt );
    380394Statement * build_compound( StatementNode * first );
    381 Statement * build_asmstmt( bool voltile, ConstantExpr * instruction, ExpressionNode * output = nullptr, ExpressionNode * input = nullptr, ExpressionNode * clobber = nullptr, LabelNode * gotolabels = nullptr );
     395Statement * build_asmstmt( bool voltile, ConstantExpr * instruction, ExpressionNode * output = 0, ExpressionNode * input = 0, ExpressionNode * clobber = 0, LabelNode * gotolabels = 0 );
    382396
    383397//##############################################################################
  • src/Parser/TypeData.cc

    raee7e35 r7b69174  
    1010// Created On       : Sat May 16 15:12:51 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Sep 24 11:14:26 2016
    13 // Update Count     : 415
     12// Last Modified On : Mon Sep 12 21:11:22 2016
     13// Update Count     : 377
    1414//
    1515
     
    2424#include "SynTree/Statement.h"
    2525#include "SynTree/Initializer.h"
    26 using namespace std;
    27 
    28 TypeData::TypeData( Kind k ) : kind( k ), base( nullptr ), forall( nullptr ) {
     26
     27TypeData::TypeData( Kind k ) : kind( k ), base( 0 ), forall( 0 ) {
    2928        switch ( kind ) {
    3029          case Unknown:
     
    3837          case Array:
    3938                // array = new Array_t;
    40                 array.dimension = nullptr;
     39                array.dimension = 0;
    4140                array.isVarLen = false;
    4241                array.isStatic = false;
     
    4443          case Function:
    4544                // function = new Function_t;
    46                 function.params = nullptr;
    47                 function.idList = nullptr;
    48                 function.oldDeclList = nullptr;
    49                 function.body = nullptr;
     45                function.params = 0;
     46                function.idList = 0;
     47                function.oldDeclList = 0;
     48                function.body = 0;
    5049                function.hasBody = false;
    5150                function.newStyle = false;
     
    5352          case Aggregate:
    5453                // aggregate = new Aggregate_t;
    55                 aggregate.name = nullptr;
    56                 aggregate.params = nullptr;
    57                 aggregate.actuals = nullptr;
    58                 aggregate.fields = nullptr;
     54                aggregate.params = 0;
     55                aggregate.actuals = 0;
     56                aggregate.fields = 0;
    5957                break;
    6058          case AggregateInst:
    6159                // aggInst = new AggInst_t;
    62                 aggInst.aggregate = nullptr;
    63                 aggInst.params = nullptr;
     60                aggInst.aggregate = 0;
     61                aggInst.params = 0;
    6462                break;
    6563          case Enum:
    6664                // enumeration = new Enumeration_t;
    67                 enumeration.name = nullptr;
    68                 enumeration.constants = nullptr;
     65                enumeration.constants = 0;
    6966                break;
    7067          case Symbolic:
    7168          case SymbolicInst:
    7269                // symbolic = new Symbolic_t;
    73                 symbolic.name = nullptr;
    74                 symbolic.params = nullptr;
    75                 symbolic.actuals = nullptr;
    76                 symbolic.assertions = nullptr;
     70                symbolic.params = 0;
     71                symbolic.actuals = 0;
     72                symbolic.assertions = 0;
     73                break;
     74          case Variable:
     75                // variable = new Variable_t;
     76                // variable.tyClass = DeclarationNode::Type;
     77                // variable.assertions = 0;
    7778                break;
    7879          case Tuple:
     
    8384                // typeexpr = new Typeof_t;
    8485                typeexpr = nullptr;
     86                break;
     87          case Attr:
     88                // attr = new Attr_t;
     89                // attr.expr = nullptr;
     90                // attr.type = nullptr;
    8591                break;
    8692          case Builtin:
     
    115121                break;
    116122          case Aggregate:
    117                 delete aggregate.name;
    118123                delete aggregate.params;
    119124                delete aggregate.actuals;
     
    127132                break;
    128133          case Enum:
    129                 delete enumeration.name;
    130134                delete enumeration.constants;
    131135                // delete enumeration;
     
    133137          case Symbolic:
    134138          case SymbolicInst:
    135                 delete symbolic.name;
    136139                delete symbolic.params;
    137140                delete symbolic.actuals;
     
    139142                // delete symbolic;
    140143                break;
     144          case Variable:
     145                // delete variable.assertions;
     146                // delete variable;
     147                break;
    141148          case Tuple:
    142149                // delete tuple->members;
     
    146153                // delete typeexpr->expr;
    147154                delete typeexpr;
     155                break;
     156          case Attr:
     157                // delete attr.expr;
     158                // delete attr.type;
     159                // delete attr;
    148160                break;
    149161          case Builtin:
     
    185197                break;
    186198          case Aggregate:
    187                 newtype->aggregate.name = aggregate.name ? new string( *aggregate.name ) : nullptr;
    188199                newtype->aggregate.params = maybeClone( aggregate.params );
    189200                newtype->aggregate.actuals = maybeClone( aggregate.actuals );
    190201                newtype->aggregate.fields = maybeClone( aggregate.fields );
     202                newtype->aggregate.name = aggregate.name;
    191203                newtype->aggregate.kind = aggregate.kind;
    192204                newtype->aggregate.body = aggregate.body;
     
    197209                break;
    198210          case Enum:
    199                 newtype->enumeration.name = enumeration.name ? new string( *enumeration.name ) : nullptr;
     211                newtype->enumeration.name = enumeration.name;
    200212                newtype->enumeration.constants = maybeClone( enumeration.constants );
    201213                break;
    202214          case Symbolic:
    203215          case SymbolicInst:
    204                 newtype->symbolic.name = symbolic.name ? new string( *symbolic.name ) : nullptr;
    205216                newtype->symbolic.params = maybeClone( symbolic.params );
    206217                newtype->symbolic.actuals = maybeClone( symbolic.actuals );
    207218                newtype->symbolic.assertions = maybeClone( symbolic.assertions );
    208219                newtype->symbolic.isTypedef = symbolic.isTypedef;
     220                newtype->symbolic.name = symbolic.name;
     221                break;
     222          case Variable:
     223                assert( false );
     224                // newtype->variable.assertions = maybeClone( variable.assertions );
     225                // newtype->variable.name = variable.name;
     226                // newtype->variable.tyClass = variable.tyClass;
    209227                break;
    210228          case Tuple:
     
    213231          case Typeof:
    214232                newtype->typeexpr = maybeClone( typeexpr );
     233                break;
     234          case Attr:
     235                assert( false );
     236                // newtype->attr.expr = maybeClone( attr.expr );
     237                // newtype->attr.type = maybeClone( attr.type );
    215238                break;
    216239          case Builtin:
     
    222245} // TypeData::clone
    223246
    224 void TypeData::print( ostream &os, int indent ) const {
     247void TypeData::print( std::ostream &os, int indent ) const {
     248        using std::endl;
     249        using std::string;
     250
    225251        for ( int i = 0; i < DeclarationNode::NoQualifier; i += 1 ) {
    226252                if ( qualifiers[i] ) os << DeclarationNode::qualifierName[ i ] << ' ';
     
    300326                break;
    301327          case Aggregate:
    302                 os << DeclarationNode::aggregateName[ aggregate.kind ] << ' ' << *aggregate.name << endl;
     328                os << DeclarationNode::aggregateName[ aggregate.kind ] << ' ' << aggregate.name << endl;
    303329                if ( aggregate.params ) {
    304330                        os << string( indent + 2, ' ' ) << "with type parameters " << endl;
     
    337363                break;
    338364          case SymbolicInst:
    339                 os << "instance of type " << *symbolic.name;
     365                os << "instance of type " << symbolic.name;
    340366                if ( symbolic.actuals ) {
    341367                        os << " with parameters" << endl;
     
    363389                } // if
    364390                break;
     391          case Variable:
     392                // os << DeclarationNode::typeClassName[ variable.tyClass ] << " variable ";
     393                // if ( variable.assertions ) {
     394                //      os << endl << string( indent + 2, ' ' ) << "with assertions" << endl;
     395                //      variable.assertions->printList( os, indent + 4 );
     396                //      os << string( indent + 2, ' ' );
     397                // } // if
     398                break;
    365399          case Tuple:
    366400                os << "tuple ";
     
    376410                } // if
    377411                break;
     412          case Attr:
     413                // os << "attribute type decl " << attr.name << " applied to ";
     414                // if ( attr.expr ) {
     415                //      attr.expr->print( os, indent + 2 );
     416                // } // if
     417                // if ( attr.type ) {
     418                //      attr.type->print( os, indent + 2 );
     419                // } // if
     420                break;
    378421          case Builtin:
    379422                os << "gcc builtin type";
     
    385428} // TypeData::print
    386429
    387 void buildForall( const DeclarationNode * firstNode, list< TypeDecl* > &outputList ) {
     430void buildForall( const DeclarationNode * firstNode, std::list< TypeDecl* > &outputList ) {
    388431        buildList( firstNode, outputList );
    389         for ( list< TypeDecl* >::iterator i = outputList.begin(); i != outputList.end(); ++i ) {
     432        for ( std::list< TypeDecl* >::iterator i = outputList.begin(); i != outputList.end(); ++i ) {
    390433                if ( (*i)->get_kind() == TypeDecl::Any ) {
    391434                        // add assertion parameters to `type' tyvars in reverse order
    392435                        // add dtor:  void ^?{}(T *)
    393436                        FunctionType * dtorType = new FunctionType( Type::Qualifiers(), false );
    394                         dtorType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, nullptr, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ) ), nullptr ) );
    395                         (*i)->get_assertions().push_front( new FunctionDecl( "^?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, dtorType, nullptr, false, false ) );
     437                        dtorType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ) ), 0 ) );
     438                        (*i)->get_assertions().push_front( new FunctionDecl( "^?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, dtorType, 0, false, false ) );
    396439
    397440                        // add copy ctor:  void ?{}(T *, T)
    398441                        FunctionType * copyCtorType = new FunctionType( Type::Qualifiers(), false );
    399                         copyCtorType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, nullptr, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ) ), nullptr ) );
    400                         copyCtorType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, nullptr, new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ), nullptr ) );
    401                         (*i)->get_assertions().push_front( new FunctionDecl( "?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, copyCtorType, nullptr, false, false ) );
     442                        copyCtorType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ) ), 0 ) );
     443                        copyCtorType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ), 0 ) );
     444                        (*i)->get_assertions().push_front( new FunctionDecl( "?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, copyCtorType, 0, false, false ) );
    402445
    403446                        // add default ctor:  void ?{}(T *)
    404447                        FunctionType * ctorType = new FunctionType( Type::Qualifiers(), false );
    405                         ctorType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, nullptr, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ) ), nullptr ) );
    406                         (*i)->get_assertions().push_front( new FunctionDecl( "?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, ctorType, nullptr, false, false ) );
     448                        ctorType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ) ), 0 ) );
     449                        (*i)->get_assertions().push_front( new FunctionDecl( "?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, ctorType, 0, false, false ) );
    407450
    408451                        // add assignment operator:  T * ?=?(T *, T)
    409452                        FunctionType * assignType = new FunctionType( Type::Qualifiers(), false );
    410                         assignType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, nullptr, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ) ), nullptr ) );
    411                         assignType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, nullptr, new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ), nullptr ) );
    412                         assignType->get_returnVals().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, nullptr, new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ), nullptr ) );
    413                         (*i)->get_assertions().push_front( new FunctionDecl( "?=?", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, assignType, nullptr, false, false ) );
     453                        assignType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ) ), 0 ) );
     454                        assignType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ), 0 ) );
     455                        assignType->get_returnVals().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ), 0 ) );
     456                        (*i)->get_assertions().push_front( new FunctionDecl( "?=?", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, assignType, 0, false, false ) );
    414457                } // if
    415458        } // for
     
    443486          case TypeData::Builtin:
    444487                return new VarArgsType( buildQualifiers( td ) );
     488          case TypeData::Attr:
     489                assert( false );
     490                return buildAttr( td );
    445491          case TypeData::Symbolic:
    446492          case TypeData::Enum:
    447493          case TypeData::Aggregate:
     494          case TypeData::Variable:
    448495                assert( false );
    449496        } // switch
    450         return nullptr;
     497        return 0;
    451498} // typebuild
    452499
    453500TypeData * typeextractAggregate( const TypeData * td, bool toplevel ) {
    454         TypeData * ret = nullptr;
     501        TypeData * ret = 0;
    455502
    456503        switch ( td->kind ) {
     
    502549          case DeclarationNode::Bool:
    503550                if ( td->signedness != DeclarationNode::NoSignedness ) {
    504                         throw SemanticError( string( "invalid type specifier " ) + DeclarationNode::signednessName[ td->signedness ] + " in type: ", td );
     551                        throw SemanticError( std::string( "invalid type specifier " ) + DeclarationNode::signednessName[ td->signedness ] + " in type: ", td );
    505552                } // if
    506553                if ( td->length != DeclarationNode::NoLength ) {
    507                         throw SemanticError( string( "invalid type specifier " ) + DeclarationNode::lengthName[ td->length ] + " in type: ", td );
     554                        throw SemanticError( std::string( "invalid type specifier " ) + DeclarationNode::lengthName[ td->length ] + " in type: ", td );
    508555                } // if
    509556
     
    518565
    519566                if ( td->length != DeclarationNode::NoLength ) {
    520                         throw SemanticError( string( "invalid type specifier " ) + DeclarationNode::lengthName[ td->length ] + " in type: ", td );
     567                        throw SemanticError( std::string( "invalid type specifier " ) + DeclarationNode::lengthName[ td->length ] + " in type: ", td );
    521568                } // if
    522569
     
    548595          FloatingPoint: ;
    549596                if ( td->signedness != DeclarationNode::NoSignedness ) {
    550                         throw SemanticError( string( "invalid type specifier " ) + DeclarationNode::signednessName[ td->signedness ] + " in type: ", td );
     597                        throw SemanticError( std::string( "invalid type specifier " ) + DeclarationNode::signednessName[ td->signedness ] + " in type: ", td );
    551598                } // if
    552599                if ( td->length == DeclarationNode::Short || td->length == DeclarationNode::LongLong ) {
    553                         throw SemanticError( string( "invalid type specifier " ) + DeclarationNode::lengthName[ td->length ] + " in type: ", td );
     600                        throw SemanticError( std::string( "invalid type specifier " ) + DeclarationNode::lengthName[ td->length ] + " in type: ", td );
    554601                } // if
    555602                if ( td->basictype == DeclarationNode::Float && td->length == DeclarationNode::Long ) {
     
    608655        switch ( td->aggregate.kind ) {
    609656          case DeclarationNode::Struct:
    610                 at = new StructDecl( *td->aggregate.name );
     657                at = new StructDecl( td->aggregate.name );
    611658                buildForall( td->aggregate.params, at->get_parameters() );
    612659                break;
    613660          case DeclarationNode::Union:
    614                 at = new UnionDecl( *td->aggregate.name );
     661                at = new UnionDecl( td->aggregate.name );
    615662                buildForall( td->aggregate.params, at->get_parameters() );
    616663                break;
    617664          case DeclarationNode::Trait:
    618                 at = new TraitDecl( *td->aggregate.name );
     665                at = new TraitDecl( td->aggregate.name );
    619666                buildList( td->aggregate.params, at->get_parameters() );
    620667                break;
     
    634681        ReferenceToType * ret;
    635682        if ( td->aggInst.aggregate->kind == TypeData::Enum ) {
    636                 ret = new EnumInstType( buildQualifiers( td ), *td->aggInst.aggregate->enumeration.name );
     683                ret = new EnumInstType( buildQualifiers( td ), td->aggInst.aggregate->enumeration.name );
    637684        } else {
    638685                assert( td->aggInst.aggregate->kind == TypeData::Aggregate );
    639686                switch ( td->aggInst.aggregate->aggregate.kind ) {
    640687                  case DeclarationNode::Struct:
    641                         assert( td->aggInst.aggregate->aggregate.name );
    642                         ret = new StructInstType( buildQualifiers( td ), *td->aggInst.aggregate->aggregate.name );
     688                        ret = new StructInstType( buildQualifiers( td ), td->aggInst.aggregate->aggregate.name );
    643689                        break;
    644690                  case DeclarationNode::Union:
    645                         ret = new UnionInstType( buildQualifiers( td ), *td->aggInst.aggregate->aggregate.name );
     691                        ret = new UnionInstType( buildQualifiers( td ), td->aggInst.aggregate->aggregate.name );
    646692                        break;
    647693                  case DeclarationNode::Trait:
    648                         ret = new TraitInstType( buildQualifiers( td ), *td->aggInst.aggregate->aggregate.name );
     694                        ret = new TraitInstType( buildQualifiers( td ), td->aggInst.aggregate->aggregate.name );
    649695                        break;
    650696                  default:
     
    657703} // buildAggInst
    658704
    659 NamedTypeDecl * buildSymbolic( const TypeData * td, const string & name, DeclarationNode::StorageClass sc ) {
     705NamedTypeDecl * buildSymbolic( const TypeData * td, const std::string & name, DeclarationNode::StorageClass sc ) {
    660706        assert( td->kind == TypeData::Symbolic );
    661707        NamedTypeDecl * ret;
     
    671717} // buildSymbolic
    672718
     719TypeDecl * buildVariable( const TypeData * td ) {
     720        assert( false );
     721        return nullptr;
     722        // assert( td->kind == TypeData::Variable );
     723        // static const TypeDecl::Kind kindMap[] = { TypeDecl::Any, TypeDecl::Ftype, TypeDecl::Dtype };
     724
     725        // TypeDecl * ret = new TypeDecl( td->variable.name, DeclarationNode::NoStorageClass, 0, kindMap[ td->variable.tyClass ] );
     726        // buildList( td->variable.assertions, ret->get_assertions() );
     727        // return ret;
     728} // buildSymbolic
     729
    673730EnumDecl * buildEnum( const TypeData * td ) {
    674731        assert( td->kind == TypeData::Enum );
    675         EnumDecl * ret = new EnumDecl( *td->enumeration.name );
     732        EnumDecl * ret = new EnumDecl( td->enumeration.name );
    676733        buildList( td->enumeration.constants, ret->get_members() );
    677         list< Declaration * >::iterator members = ret->get_members().begin();
     734        std::list< Declaration * >::iterator members = ret->get_members().begin();
    678735        for ( const DeclarationNode * cur = td->enumeration. constants; cur != nullptr; cur = dynamic_cast< DeclarationNode * >( cur->get_next() ), ++members ) {
    679736                if ( cur->has_enumeratorValue() ) {
    680737                        ObjectDecl * member = dynamic_cast< ObjectDecl * >(* members);
    681                         member->set_init( new SingleInit( maybeMoveBuild< Expression >( cur->consume_enumeratorValue() ), list< Expression * >() ) );
     738                        member->set_init( new SingleInit( maybeMoveBuild< Expression >( cur->consume_enumeratorValue() ), std::list< Expression * >() ) );
    682739                } // if
    683740        } // for
     
    687744TypeInstType * buildSymbolicInst( const TypeData * td ) {
    688745        assert( td->kind == TypeData::SymbolicInst );
    689         TypeInstType * ret = new TypeInstType( buildQualifiers( td ), *td->symbolic.name, false );
     746        TypeInstType * ret = new TypeInstType( buildQualifiers( td ), td->symbolic.name, false );
    690747        buildList( td->symbolic.actuals, ret->get_parameters() );
    691748        buildForall( td->forall, ret->get_forall() );
     
    708765} // buildTypeof
    709766
    710 Declaration * buildDecl( const TypeData * td, const string &name, DeclarationNode::StorageClass sc, Expression * bitfieldWidth, bool isInline, bool isNoreturn, LinkageSpec::Spec linkage, Initializer * init ) {
     767AttrType * buildAttr( const TypeData * td ) {
     768        assert( false );
     769        return nullptr;
     770        // assert( td->kind == TypeData::Attr );
     771        // // assert( td->attr );
     772        // AttrType * ret;
     773        // if ( td->attr.expr ) {
     774        //      ret = new AttrType( buildQualifiers( td ), td->attr.name, td->attr.expr->build() );
     775        // } else {
     776        //      assert( td->attr.type );
     777        //      ret = new AttrType( buildQualifiers( td ), td->attr.name, td->attr.type->buildType() );
     778        // } // if
     779        // return ret;
     780} // buildAttr
     781
     782Declaration * buildDecl( const TypeData * td, std::string name, DeclarationNode::StorageClass sc, Expression * bitfieldWidth, bool isInline, bool isNoreturn, LinkageSpec::Spec linkage, Initializer * init ) {
    711783        if ( td->kind == TypeData::Function ) {
    712784                FunctionDecl * decl;
     
    718790                                decl = new FunctionDecl( name, sc, linkage, buildFunction( td ), body, isInline, isNoreturn );
    719791                        } else {
    720                                 // list< Label > ls;
    721                                 decl = new FunctionDecl( name, sc, linkage, buildFunction( td ), new CompoundStmt( list< Label >() ), isInline, isNoreturn );
     792                                // std::list< Label > ls;
     793                                decl = new FunctionDecl( name, sc, linkage, buildFunction( td ), new CompoundStmt( std::list< Label >() ), isInline, isNoreturn );
    722794                        } // if
    723795                } else {
    724                         decl = new FunctionDecl( name, sc, linkage, buildFunction( td ), nullptr, isInline, isNoreturn );
    725                 } // if
    726                 for ( DeclarationNode * cur = td->function.idList; cur != nullptr; cur = dynamic_cast< DeclarationNode* >( cur->get_next() ) ) {
    727                         if ( cur->name ) {
    728                                 decl->get_oldIdents().insert( decl->get_oldIdents().end(), *cur->name );
     796                        decl = new FunctionDecl( name, sc, linkage, buildFunction( td ), 0, isInline, isNoreturn );
     797                } // if
     798                for ( DeclarationNode * cur = td->function.idList; cur != 0; cur = dynamic_cast< DeclarationNode* >( cur->get_next() ) ) {
     799                        if ( cur->get_name() != "" ) {
     800                                decl->get_oldIdents().insert( decl->get_oldIdents().end(), cur->get_name() );
    729801                        } // if
    730802                } // for
     
    737809        } else if ( td->kind == TypeData::Symbolic ) {
    738810                return buildSymbolic( td, name, sc );
     811        } else if ( td->kind == TypeData::Variable ) {
     812                assert( false );
     813                return buildVariable( td );
    739814        } else {
    740                 return new ObjectDecl( name, sc, linkage, bitfieldWidth, typebuild( td ), init, list< Attribute * >(), isInline, isNoreturn );
     815                return new ObjectDecl( name, sc, linkage, bitfieldWidth, typebuild( td ), init, std::list< Attribute * >(), isInline, isNoreturn );
    741816        } // if
    742         return nullptr;
     817        return 0;
    743818} // buildDecl
    744819
     
    756831                        break;
    757832                  default:
    758                         ft->get_returnVals().push_back( dynamic_cast< DeclarationWithType* >( buildDecl( td->base,  "", DeclarationNode::NoStorageClass, nullptr, false, false, LinkageSpec::Cforall ) ) );
     833                        ft->get_returnVals().push_back( dynamic_cast< DeclarationWithType* >( buildDecl( td->base,  "", DeclarationNode::NoStorageClass, 0, false, false, LinkageSpec::Cforall ) ) );
    759834                } // switch
    760835        } else {
    761                 ft->get_returnVals().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, nullptr, new BasicType( Type::Qualifiers(), BasicType::SignedInt ), nullptr ) );
     836                ft->get_returnVals().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new BasicType( Type::Qualifiers(), BasicType::SignedInt ), 0 ) );
    762837        } // if
    763838        return ft;
  • src/Parser/TypeData.h

    raee7e35 r7b69174  
    1010// Created On       : Sat May 16 15:18:36 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Sep 24 11:10:38 2016
    13 // Update Count     : 141
     12// Last Modified On : Mon Sep 12 17:15:49 2016
     13// Update Count     : 129
    1414//
    1515
     
    2424struct TypeData {
    2525        enum Kind { Unknown, Basic, Pointer, Array, Function, Aggregate, AggregateInst,
    26                                 Enum, EnumConstant, Symbolic, SymbolicInst, Tuple, Typeof, Builtin };
     26                                Enum, EnumConstant, Symbolic, SymbolicInst, Variable, Tuple, Typeof, Builtin, Attr };
    2727
    2828        struct Aggregate_t {
    2929                DeclarationNode::Aggregate kind;
    30                 const std::string * name;
     30                std::string name;
    3131                DeclarationNode * params;
    32                 ExpressionNode * actuals;                                               // holds actual parameters later applied to AggInst
     32                ExpressionNode  * actuals;                                              // holds actual parameters later applied to AggInst
    3333                DeclarationNode * fields;
    3434                bool body;
     
    4747
    4848        struct Enumeration_t {
    49                 const std::string * name;
     49                std::string name;
    5050                DeclarationNode * constants;
    5151        };
     
    6161
    6262        struct Symbolic_t {
    63                 const std::string * name;
     63                std::string name;
    6464                bool isTypedef;                                                                 // false => TYPEGENname, true => TYPEDEFname
    6565                DeclarationNode * params;
     
    8888                DeclarationNode * tuple;
    8989                ExpressionNode * typeexpr;
     90                // Attr_t attr;
    9091                // DeclarationNode::BuiltinType builtin;
    9192
     
    110111TupleType * buildTuple( const TypeData * );
    111112TypeofType * buildTypeof( const TypeData * );
    112 Declaration * buildDecl( const TypeData *, const std::string &, DeclarationNode::StorageClass, Expression *, bool isInline, bool isNoreturn, LinkageSpec::Spec, Initializer * init = nullptr );
     113AttrType * buildAttr( const TypeData * );
     114Declaration * buildDecl( const TypeData *, std::string, DeclarationNode::StorageClass, Expression *, bool isInline, bool isNoreturn, LinkageSpec::Spec, Initializer * init = 0 );
    113115FunctionType * buildFunction( const TypeData * );
    114116
  • src/Parser/parser.cc

    raee7e35 r7b69174  
    8282#include "TypeData.h"
    8383#include "LinkageSpec.h"
    84 using namespace std;
    8584
    8685extern DeclarationNode * parseTree;
     
    8887extern TypedefTable typedefTable;
    8988
    90 stack< LinkageSpec::Spec > linkageStack;
    91 
    92 void appendStr( string *to, string *from ) {
     89std::stack< LinkageSpec::Spec > linkageStack;
     90
     91void appendStr( std::string *to, std::string *from ) {
    9392        // "abc" "def" "ghi" => "abcdefghi", remove new text from quotes and insert before last quote in old string.
    9493        to->insert( to->length() - 1, from->substr( 1, from->length() - 2 ) );
     
    9796
    9897/* Line 268 of yacc.c  */
    99 #line 100 "Parser/parser.cc"
     98#line 99 "Parser/parser.cc"
    10099
    101100/* Enabling traces.  */
     
    348347
    349348/* Line 293 of yacc.c  */
    350 #line 116 "parser.yy"
     349#line 115 "parser.yy"
    351350
    352351        Token tok;
     
    368367
    369368/* Line 293 of yacc.c  */
    370 #line 371 "Parser/parser.cc"
     369#line 370 "Parser/parser.cc"
    371370} YYSTYPE;
    372371# define YYSTYPE_IS_TRIVIAL 1
     
    380379
    381380/* Line 343 of yacc.c  */
    382 #line 383 "Parser/parser.cc"
     381#line 382 "Parser/parser.cc"
    383382
    384383#ifdef short
     
    10221021static const yytype_uint16 yyrline[] =
    10231022{
    1024        0,   301,   301,   305,   312,   313,   314,   318,   319,   320,
    1025      324,   325,   329,   330,   334,   335,   339,   343,   344,   355,
    1026      357,   359,   361,   366,   367,   373,   377,   379,   380,   382,
    1027      383,   385,   387,   389,   398,   399,   405,   406,   410,   411,
    1028      415,   419,   421,   423,   425,   430,   433,   435,   437,   442,
    1029      455,   457,   459,   461,   463,   465,   467,   469,   471,   473,
    1030      475,   482,   483,   489,   490,   491,   492,   496,   497,   499,
    1031      504,   505,   507,   509,   514,   515,   517,   522,   523,   525,
    1032      530,   531,   533,   535,   537,   542,   543,   545,   550,   551,
    1033      556,   557,   562,   563,   568,   569,   574,   575,   580,   581,
    1034      584,   586,   591,   596,   597,   599,   605,   606,   610,   611,
    1035      612,   613,   614,   615,   616,   617,   618,   619,   620,   621,
    1036      627,   629,   631,   633,   638,   639,   644,   645,   651,   652,
    1037      658,   659,   660,   661,   662,   663,   664,   665,   666,   676,
    1038      683,   685,   695,   696,   701,   703,   709,   711,   715,   716,
    1039      721,   726,   729,   731,   733,   743,   745,   756,   757,   759,
    1040      763,   765,   769,   770,   775,   776,   780,   785,   786,   790,
    1041      792,   798,   799,   803,   805,   807,   809,   815,   816,   820,
    1042      822,   827,   829,   831,   836,   838,   843,   845,   849,   852,
    1043      856,   859,   863,   865,   867,   869,   874,   876,   878,   883,
    1044      885,   887,   889,   891,   896,   898,   900,   902,   907,   919,
    1045      920,   925,   927,   932,   936,   938,   940,   942,   944,   950,
    1046      951,   957,   958,   962,   963,   968,   970,   976,   977,   979,
    1047      984,   989,   999,  1001,  1005,  1006,  1011,  1013,  1017,  1018,
    1048     1022,  1024,  1028,  1029,  1033,  1034,  1038,  1039,  1054,  1055,
    1049     1056,  1057,  1058,  1062,  1067,  1074,  1084,  1089,  1094,  1102,
    1050     1107,  1112,  1117,  1122,  1130,  1152,  1157,  1164,  1166,  1173,
    1051     1178,  1183,  1194,  1199,  1204,  1209,  1214,  1223,  1228,  1236,
    1052     1237,  1238,  1239,  1245,  1250,  1258,  1259,  1260,  1261,  1265,
    1053     1266,  1267,  1268,  1273,  1274,  1283,  1284,  1289,  1290,  1295,
    1054     1297,  1299,  1301,  1303,  1306,  1305,  1317,  1318,  1320,  1330,
    1055     1331,  1336,  1338,  1340,  1342,  1344,  1347,  1349,  1352,  1357,
    1056     1359,  1361,  1363,  1365,  1367,  1369,  1371,  1373,  1375,  1377,
    1057     1379,  1381,  1387,  1388,  1390,  1392,  1394,  1399,  1400,  1406,
    1058     1407,  1409,  1411,  1416,  1418,  1420,  1422,  1427,  1428,  1430,
    1059     1432,  1437,  1438,  1440,  1445,  1446,  1448,  1450,  1455,  1457,
    1060     1459,  1464,  1465,  1469,  1471,  1477,  1476,  1480,  1482,  1487,
    1061     1489,  1495,  1496,  1501,  1502,  1504,  1505,  1514,  1515,  1517,
    1062     1519,  1524,  1526,  1532,  1533,  1535,  1538,  1541,  1546,  1547,
    1063     1552,  1557,  1561,  1563,  1569,  1568,  1575,  1577,  1583,  1584,
    1064     1592,  1593,  1597,  1598,  1599,  1601,  1603,  1610,  1611,  1613,
    1065     1615,  1620,  1621,  1627,  1628,  1632,  1633,  1638,  1639,  1640,
    1066     1642,  1650,  1651,  1653,  1656,  1658,  1662,  1663,  1664,  1666,
    1067     1668,  1672,  1677,  1685,  1686,  1695,  1697,  1702,  1703,  1704,
    1068     1708,  1709,  1710,  1714,  1715,  1716,  1720,  1721,  1722,  1727,
    1069     1728,  1729,  1730,  1736,  1737,  1739,  1744,  1745,  1750,  1751,
    1070     1752,  1753,  1754,  1769,  1770,  1775,  1776,  1782,  1784,  1787,
    1071     1789,  1791,  1814,  1815,  1817,  1819,  1824,  1825,  1827,  1832,
    1072     1837,  1838,  1844,  1843,  1847,  1851,  1853,  1855,  1861,  1862,
    1073     1867,  1872,  1874,  1879,  1881,  1882,  1884,  1889,  1891,  1893,
    1074     1898,  1900,  1905,  1910,  1918,  1924,  1923,  1937,  1938,  1943,
    1075     1944,  1948,  1953,  1958,  1966,  1971,  1982,  1983,  1988,  1989,
    1076     1995,  1996,  2000,  2001,  2002,  2005,  2004,  2015,  2024,  2030,
    1077     2036,  2045,  2051,  2057,  2063,  2069,  2077,  2083,  2091,  2097,
    1078     2106,  2107,  2108,  2112,  2116,  2118,  2123,  2124,  2128,  2129,
    1079     2134,  2140,  2141,  2144,  2146,  2147,  2151,  2152,  2153,  2154,
    1080     2188,  2190,  2191,  2193,  2198,  2203,  2208,  2210,  2212,  2217,
    1081     2219,  2221,  2223,  2228,  2230,  2239,  2241,  2242,  2247,  2249,
    1082     2251,  2256,  2258,  2260,  2265,  2267,  2269,  2278,  2279,  2280,
    1083     2284,  2286,  2288,  2293,  2295,  2297,  2302,  2304,  2306,  2321,
    1084     2323,  2324,  2326,  2331,  2332,  2337,  2339,  2341,  2346,  2348,
    1085     2350,  2352,  2357,  2359,  2361,  2371,  2373,  2374,  2376,  2381,
    1086     2383,  2385,  2390,  2392,  2394,  2396,  2401,  2403,  2405,  2436,
    1087     2438,  2439,  2441,  2446,  2451,  2459,  2461,  2463,  2468,  2470,
    1088     2475,  2477,  2491,  2492,  2494,  2499,  2501,  2503,  2505,  2507,
    1089     2512,  2513,  2515,  2517,  2522,  2524,  2526,  2532,  2534,  2536,
    1090     2540,  2542,  2544,  2546,  2560,  2561,  2563,  2568,  2570,  2572,
    1091     2574,  2576,  2581,  2582,  2584,  2586,  2591,  2593,  2595,  2601,
    1092     2602,  2604,  2613,  2616,  2618,  2621,  2623,  2625,  2638,  2639,
    1093     2641,  2646,  2648,  2650,  2652,  2654,  2659,  2660,  2662,  2664,
    1094     2669,  2671,  2679,  2680,  2681,  2686,  2687,  2691,  2693,  2695,
    1095     2697,  2699,  2701,  2708,  2710,  2712,  2714,  2716,  2718,  2720,
    1096     2722,  2724,  2726,  2731,  2733,  2735,  2740,  2766,  2767,  2769,
    1097     2773,  2774,  2778,  2780,  2782,  2784,  2786,  2788,  2795,  2797,
    1098     2799,  2801,  2803,  2805,  2810,  2815,  2817,  2819,  2837,  2839,
    1099     2844,  2845
     1023       0,   300,   300,   304,   311,   312,   313,   317,   318,   319,
     1024     323,   324,   328,   329,   333,   334,   338,   342,   343,   354,
     1025     356,   358,   360,   365,   366,   372,   376,   378,   379,   381,
     1026     382,   384,   386,   388,   397,   398,   404,   405,   409,   410,
     1027     414,   418,   420,   422,   424,   429,   432,   434,   436,   441,
     1028     454,   456,   458,   460,   462,   464,   466,   468,   470,   472,
     1029     474,   481,   482,   488,   489,   490,   491,   495,   496,   498,
     1030     503,   504,   506,   508,   513,   514,   516,   521,   522,   524,
     1031     529,   530,   532,   534,   536,   541,   542,   544,   549,   550,
     1032     555,   556,   561,   562,   567,   568,   573,   574,   579,   580,
     1033     583,   585,   590,   595,   596,   598,   604,   605,   609,   610,
     1034     611,   612,   613,   614,   615,   616,   617,   618,   619,   620,
     1035     626,   628,   630,   632,   637,   638,   643,   644,   650,   651,
     1036     657,   658,   659,   660,   661,   662,   663,   664,   665,   675,
     1037     682,   684,   694,   695,   700,   702,   708,   710,   714,   715,
     1038     720,   725,   728,   730,   732,   742,   744,   755,   756,   758,
     1039     762,   764,   768,   769,   774,   775,   779,   784,   785,   789,
     1040     791,   797,   798,   802,   804,   806,   808,   814,   815,   819,
     1041     821,   826,   828,   830,   835,   837,   842,   844,   848,   851,
     1042     855,   858,   862,   864,   866,   868,   873,   875,   877,   882,
     1043     884,   886,   888,   890,   895,   897,   899,   901,   906,   918,
     1044     919,   924,   926,   931,   935,   937,   939,   941,   943,   949,
     1045     950,   956,   957,   961,   962,   967,   969,   975,   976,   978,
     1046     983,   988,   998,  1000,  1004,  1005,  1010,  1012,  1016,  1017,
     1047    1021,  1023,  1027,  1028,  1032,  1033,  1037,  1038,  1053,  1054,
     1048    1055,  1056,  1057,  1061,  1066,  1073,  1083,  1088,  1093,  1101,
     1049    1106,  1111,  1116,  1121,  1129,  1151,  1156,  1163,  1165,  1172,
     1050    1177,  1182,  1193,  1198,  1203,  1208,  1213,  1222,  1227,  1235,
     1051    1236,  1237,  1238,  1244,  1249,  1257,  1258,  1259,  1260,  1264,
     1052    1265,  1266,  1267,  1272,  1273,  1282,  1283,  1288,  1289,  1294,
     1053    1296,  1298,  1300,  1302,  1305,  1304,  1316,  1317,  1319,  1329,
     1054    1330,  1335,  1337,  1339,  1341,  1343,  1346,  1348,  1351,  1356,
     1055    1358,  1360,  1362,  1364,  1366,  1368,  1370,  1372,  1374,  1376,
     1056    1378,  1380,  1386,  1387,  1389,  1391,  1393,  1398,  1399,  1405,
     1057    1406,  1408,  1410,  1415,  1417,  1419,  1421,  1426,  1427,  1429,
     1058    1431,  1436,  1437,  1439,  1444,  1445,  1447,  1449,  1454,  1456,
     1059    1458,  1463,  1464,  1468,  1470,  1476,  1475,  1479,  1481,  1486,
     1060    1488,  1494,  1495,  1500,  1501,  1503,  1504,  1513,  1514,  1516,
     1061    1518,  1523,  1525,  1531,  1532,  1534,  1537,  1540,  1545,  1546,
     1062    1551,  1556,  1560,  1562,  1568,  1567,  1574,  1576,  1582,  1583,
     1063    1591,  1592,  1596,  1597,  1598,  1600,  1602,  1609,  1610,  1612,
     1064    1614,  1619,  1620,  1626,  1627,  1631,  1632,  1637,  1638,  1639,
     1065    1641,  1649,  1650,  1652,  1655,  1657,  1661,  1662,  1663,  1665,
     1066    1667,  1671,  1676,  1684,  1685,  1694,  1696,  1701,  1702,  1703,
     1067    1707,  1708,  1709,  1713,  1714,  1715,  1719,  1720,  1721,  1726,
     1068    1727,  1728,  1729,  1735,  1736,  1738,  1743,  1744,  1749,  1750,
     1069    1751,  1752,  1753,  1768,  1769,  1774,  1775,  1781,  1783,  1786,
     1070    1788,  1790,  1813,  1814,  1816,  1818,  1823,  1824,  1826,  1831,
     1071    1836,  1837,  1843,  1842,  1846,  1850,  1852,  1854,  1860,  1861,
     1072    1866,  1871,  1873,  1878,  1880,  1881,  1883,  1888,  1890,  1892,
     1073    1897,  1899,  1904,  1909,  1917,  1923,  1922,  1936,  1937,  1942,
     1074    1943,  1947,  1952,  1957,  1965,  1970,  1981,  1982,  1987,  1988,
     1075    1994,  1995,  1999,  2000,  2001,  2004,  2003,  2014,  2023,  2029,
     1076    2035,  2044,  2050,  2056,  2062,  2068,  2076,  2082,  2090,  2096,
     1077    2105,  2106,  2107,  2111,  2115,  2117,  2122,  2123,  2127,  2128,
     1078    2133,  2139,  2140,  2143,  2145,  2146,  2150,  2151,  2152,  2153,
     1079    2187,  2189,  2190,  2192,  2197,  2202,  2207,  2209,  2211,  2216,
     1080    2218,  2220,  2222,  2227,  2229,  2238,  2240,  2241,  2246,  2248,
     1081    2250,  2255,  2257,  2259,  2264,  2266,  2268,  2277,  2278,  2279,
     1082    2283,  2285,  2287,  2292,  2294,  2296,  2301,  2303,  2305,  2320,
     1083    2322,  2323,  2325,  2330,  2331,  2336,  2338,  2340,  2345,  2347,
     1084    2349,  2351,  2356,  2358,  2360,  2370,  2372,  2373,  2375,  2380,
     1085    2382,  2384,  2389,  2391,  2393,  2395,  2400,  2402,  2404,  2435,
     1086    2437,  2438,  2440,  2445,  2450,  2458,  2460,  2462,  2467,  2469,
     1087    2474,  2476,  2490,  2491,  2493,  2498,  2500,  2502,  2504,  2506,
     1088    2511,  2512,  2514,  2516,  2521,  2523,  2525,  2531,  2533,  2535,
     1089    2539,  2541,  2543,  2545,  2559,  2560,  2562,  2567,  2569,  2571,
     1090    2573,  2575,  2580,  2581,  2583,  2585,  2590,  2592,  2594,  2600,
     1091    2601,  2603,  2612,  2615,  2617,  2620,  2622,  2624,  2637,  2638,
     1092    2640,  2645,  2647,  2649,  2651,  2653,  2658,  2659,  2661,  2663,
     1093    2668,  2670,  2678,  2679,  2680,  2685,  2686,  2690,  2692,  2694,
     1094    2696,  2698,  2700,  2707,  2709,  2711,  2713,  2715,  2717,  2719,
     1095    2721,  2723,  2725,  2730,  2732,  2734,  2739,  2765,  2766,  2768,
     1096    2772,  2773,  2777,  2779,  2781,  2783,  2785,  2787,  2794,  2796,
     1097    2798,  2800,  2802,  2804,  2809,  2814,  2816,  2818,  2836,  2838,
     1098    2843,  2844
    11001099};
    11011100#endif
     
    49724971
    49734972/* Line 1806 of yacc.c  */
    4974 #line 301 "parser.yy"
     4973#line 300 "parser.yy"
    49754974    { typedefTable.enterScope(); }
    49764975    break;
     
    49794978
    49804979/* Line 1806 of yacc.c  */
    4981 #line 305 "parser.yy"
     4980#line 304 "parser.yy"
    49824981    { typedefTable.leaveScope(); }
    49834982    break;
     
    49864985
    49874986/* Line 1806 of yacc.c  */
     4987#line 311 "parser.yy"
     4988    { (yyval.en) = new ExpressionNode( build_constantInteger( *(yyvsp[(1) - (1)].tok) ) ); }
     4989    break;
     4990
     4991  case 5:
     4992
     4993/* Line 1806 of yacc.c  */
    49884994#line 312 "parser.yy"
    4989     { (yyval.en) = new ExpressionNode( build_constantInteger( *(yyvsp[(1) - (1)].tok) ) ); }
    4990     break;
    4991 
    4992   case 5:
     4995    { (yyval.en) = new ExpressionNode( build_constantFloat( *(yyvsp[(1) - (1)].tok) ) ); }
     4996    break;
     4997
     4998  case 6:
    49934999
    49945000/* Line 1806 of yacc.c  */
    49955001#line 313 "parser.yy"
    4996     { (yyval.en) = new ExpressionNode( build_constantFloat( *(yyvsp[(1) - (1)].tok) ) ); }
    4997     break;
    4998 
    4999   case 6:
    5000 
    5001 /* Line 1806 of yacc.c  */
    5002 #line 314 "parser.yy"
    50035002    { (yyval.en) = new ExpressionNode( build_constantChar( *(yyvsp[(1) - (1)].tok) ) ); }
    50045003    break;
     
    50075006
    50085007/* Line 1806 of yacc.c  */
    5009 #line 339 "parser.yy"
     5008#line 338 "parser.yy"
    50105009    { (yyval.constant) = build_constantStr( *(yyvsp[(1) - (1)].str) ); }
    50115010    break;
     
    50145013
    50155014/* Line 1806 of yacc.c  */
    5016 #line 343 "parser.yy"
     5015#line 342 "parser.yy"
    50175016    { (yyval.str) = (yyvsp[(1) - (1)].tok); }
    50185017    break;
     
    50215020
    50225021/* Line 1806 of yacc.c  */
    5023 #line 345 "parser.yy"
     5022#line 344 "parser.yy"
    50245023    {
    50255024                        appendStr( (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].tok) );                                            // append 2nd juxtaposed string to 1st
     
    50325031
    50335032/* Line 1806 of yacc.c  */
    5034 #line 356 "parser.yy"
     5033#line 355 "parser.yy"
    50355034    { (yyval.en) = new ExpressionNode( build_varref( (yyvsp[(1) - (1)].tok) ) ); }
    50365035    break;
     
    50395038
    50405039/* Line 1806 of yacc.c  */
    5041 #line 358 "parser.yy"
     5040#line 357 "parser.yy"
    50425041    { (yyval.en) = new ExpressionNode( build_varref( (yyvsp[(1) - (1)].tok) ) ); }
    50435042    break;
     
    50465045
    50475046/* Line 1806 of yacc.c  */
    5048 #line 360 "parser.yy"
     5047#line 359 "parser.yy"
    50495048    { (yyval.en) = (yyvsp[(2) - (3)].en); }
    50505049    break;
     
    50535052
    50545053/* Line 1806 of yacc.c  */
    5055 #line 362 "parser.yy"
     5054#line 361 "parser.yy"
    50565055    { (yyval.en) = new ExpressionNode( build_valexpr( (yyvsp[(2) - (3)].sn) ) ); }
    50575056    break;
     
    50605059
    50615060/* Line 1806 of yacc.c  */
    5062 #line 372 "parser.yy"
     5061#line 371 "parser.yy"
    50635062    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::Index, (yyvsp[(1) - (6)].en), (yyvsp[(4) - (6)].en) ) ); }
    50645063    break;
     
    50675066
    50685067/* Line 1806 of yacc.c  */
    5069 #line 374 "parser.yy"
     5068#line 373 "parser.yy"
    50705069    { (yyval.en) = new ExpressionNode( build_func( (yyvsp[(1) - (4)].en), (yyvsp[(3) - (4)].en) ) ); }
    50715070    break;
     
    50745073
    50755074/* Line 1806 of yacc.c  */
    5076 #line 378 "parser.yy"
     5075#line 377 "parser.yy"
    50775076    { (yyval.en) = new ExpressionNode( build_fieldSel( (yyvsp[(1) - (3)].en), build_varref( (yyvsp[(3) - (3)].tok) ) ) ); }
    50785077    break;
     
    50815080
    50825081/* Line 1806 of yacc.c  */
    5083 #line 381 "parser.yy"
     5082#line 380 "parser.yy"
    50845083    { (yyval.en) = new ExpressionNode( build_pfieldSel( (yyvsp[(1) - (3)].en), build_varref( (yyvsp[(3) - (3)].tok) ) ) ); }
    50855084    break;
     
    50885087
    50895088/* Line 1806 of yacc.c  */
    5090 #line 384 "parser.yy"
     5089#line 383 "parser.yy"
    50915090    { (yyval.en) = new ExpressionNode( build_unary_ptr( OperKinds::IncrPost, (yyvsp[(1) - (2)].en) ) ); }
    50925091    break;
     
    50955094
    50965095/* Line 1806 of yacc.c  */
    5097 #line 386 "parser.yy"
     5096#line 385 "parser.yy"
    50985097    { (yyval.en) = new ExpressionNode( build_unary_ptr( OperKinds::DecrPost, (yyvsp[(1) - (2)].en) ) ); }
    50995098    break;
     
    51025101
    51035102/* Line 1806 of yacc.c  */
    5104 #line 388 "parser.yy"
     5103#line 387 "parser.yy"
    51055104    { (yyval.en) = new ExpressionNode( build_compoundLiteral( (yyvsp[(2) - (7)].decl), new InitializerNode( (yyvsp[(5) - (7)].in), true ) ) ); }
    51065105    break;
     
    51095108
    51105109/* Line 1806 of yacc.c  */
    5111 #line 390 "parser.yy"
     5110#line 389 "parser.yy"
    51125111    {
    51135112                        Token fn;
    5114                         fn.str = new std::string( "?{}" );                      // location undefined - use location of '{'?
     5113                        fn.str = new std::string( "?{}" ); // location undefined - use location of '{'?
    51155114                        (yyval.en) = new ExpressionNode( new ConstructorExpr( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( (yyvsp[(1) - (4)].en) )->set_last( (yyvsp[(3) - (4)].en) ) ) ) );
    51165115                }
     
    51205119
    51215120/* Line 1806 of yacc.c  */
    5122 #line 400 "parser.yy"
     5121#line 399 "parser.yy"
    51235122    { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (3)].en)->set_last( (yyvsp[(3) - (3)].en) )); }
    51245123    break;
     
    51275126
    51285127/* Line 1806 of yacc.c  */
    5129 #line 405 "parser.yy"
     5128#line 404 "parser.yy"
    51305129    { (yyval.en) = 0; }
    51315130    break;
     
    51345133
    51355134/* Line 1806 of yacc.c  */
    5136 #line 411 "parser.yy"
     5135#line 410 "parser.yy"
    51375136    { (yyval.en) = (ExpressionNode *)(yyvsp[(1) - (3)].en)->set_last( (yyvsp[(3) - (3)].en) ); }
    51385137    break;
     
    51415140
    51425141/* Line 1806 of yacc.c  */
    5143 #line 416 "parser.yy"
     5142#line 415 "parser.yy"
    51445143    { (yyval.en) = new ExpressionNode( build_varref( (yyvsp[(1) - (1)].tok) ) ); }
    51455144    break;
     
    51485147
    51495148/* Line 1806 of yacc.c  */
    5150 #line 420 "parser.yy"
     5149#line 419 "parser.yy"
    51515150    { (yyval.en) = new ExpressionNode( build_fieldSel( (yyvsp[(3) - (3)].en), build_varref( (yyvsp[(1) - (3)].tok) ) ) ); }
    51525151    break;
     
    51555154
    51565155/* Line 1806 of yacc.c  */
    5157 #line 422 "parser.yy"
     5156#line 421 "parser.yy"
    51585157    { (yyval.en) = new ExpressionNode( build_fieldSel( (yyvsp[(5) - (7)].en), build_varref( (yyvsp[(1) - (7)].tok) ) ) ); }
    51595158    break;
     
    51625161
    51635162/* Line 1806 of yacc.c  */
    5164 #line 424 "parser.yy"
     5163#line 423 "parser.yy"
    51655164    { (yyval.en) = new ExpressionNode( build_pfieldSel( (yyvsp[(3) - (3)].en), build_varref( (yyvsp[(1) - (3)].tok) ) ) ); }
    51665165    break;
     
    51695168
    51705169/* Line 1806 of yacc.c  */
    5171 #line 426 "parser.yy"
     5170#line 425 "parser.yy"
    51725171    { (yyval.en) = new ExpressionNode( build_pfieldSel( (yyvsp[(5) - (7)].en), build_varref( (yyvsp[(1) - (7)].tok) ) ) ); }
    51735172    break;
     
    51765175
    51775176/* Line 1806 of yacc.c  */
    5178 #line 434 "parser.yy"
     5177#line 433 "parser.yy"
    51795178    { (yyval.en) = (yyvsp[(1) - (1)].en); }
    51805179    break;
     
    51835182
    51845183/* Line 1806 of yacc.c  */
    5185 #line 436 "parser.yy"
     5184#line 435 "parser.yy"
    51865185    { (yyval.en) = new ExpressionNode( (yyvsp[(1) - (1)].constant) ); }
    51875186    break;
     
    51905189
    51915190/* Line 1806 of yacc.c  */
    5192 #line 438 "parser.yy"
     5191#line 437 "parser.yy"
    51935192    { (yyval.en) = (yyvsp[(2) - (2)].en)->set_extension( true ); }
    51945193    break;
     
    51975196
    51985197/* Line 1806 of yacc.c  */
    5199 #line 443 "parser.yy"
     5198#line 442 "parser.yy"
    52005199    {
    52015200                        switch ( (yyvsp[(1) - (2)].op) ) {
     
    52155214
    52165215/* Line 1806 of yacc.c  */
    5217 #line 456 "parser.yy"
     5216#line 455 "parser.yy"
    52185217    { (yyval.en) = new ExpressionNode( build_unary_val( (yyvsp[(1) - (2)].op), (yyvsp[(2) - (2)].en) ) ); }
    52195218    break;
     
    52225221
    52235222/* Line 1806 of yacc.c  */
    5224 #line 458 "parser.yy"
     5223#line 457 "parser.yy"
    52255224    { (yyval.en) = new ExpressionNode( build_unary_ptr( OperKinds::Incr, (yyvsp[(2) - (2)].en) ) ); }
    52265225    break;
     
    52295228
    52305229/* Line 1806 of yacc.c  */
    5231 #line 460 "parser.yy"
     5230#line 459 "parser.yy"
    52325231    { (yyval.en) = new ExpressionNode( build_unary_ptr( OperKinds::Decr, (yyvsp[(2) - (2)].en) ) ); }
    52335232    break;
     
    52365235
    52375236/* Line 1806 of yacc.c  */
    5238 #line 462 "parser.yy"
     5237#line 461 "parser.yy"
    52395238    { (yyval.en) = new ExpressionNode( build_sizeOfexpr( (yyvsp[(2) - (2)].en) ) ); }
    52405239    break;
     
    52435242
    52445243/* Line 1806 of yacc.c  */
    5245 #line 464 "parser.yy"
     5244#line 463 "parser.yy"
    52465245    { (yyval.en) = new ExpressionNode( build_sizeOftype( (yyvsp[(3) - (4)].decl) ) ); }
    52475246    break;
     
    52505249
    52515250/* Line 1806 of yacc.c  */
    5252 #line 466 "parser.yy"
     5251#line 465 "parser.yy"
    52535252    { (yyval.en) = new ExpressionNode( build_alignOfexpr( (yyvsp[(2) - (2)].en) ) ); }
    52545253    break;
     
    52575256
    52585257/* Line 1806 of yacc.c  */
    5259 #line 468 "parser.yy"
     5258#line 467 "parser.yy"
    52605259    { (yyval.en) = new ExpressionNode( build_alignOftype( (yyvsp[(3) - (4)].decl) ) ); }
    52615260    break;
     
    52645263
    52655264/* Line 1806 of yacc.c  */
    5266 #line 470 "parser.yy"
     5265#line 469 "parser.yy"
    52675266    { (yyval.en) = new ExpressionNode( build_offsetOf( (yyvsp[(3) - (6)].decl), build_varref( (yyvsp[(5) - (6)].tok) ) ) ); }
    52685267    break;
     
    52715270
    52725271/* Line 1806 of yacc.c  */
    5273 #line 472 "parser.yy"
     5272#line 471 "parser.yy"
    52745273    { (yyval.en) = new ExpressionNode( build_attrexpr( build_varref( (yyvsp[(1) - (1)].tok) ), nullptr ) ); }
    52755274    break;
     
    52785277
    52795278/* Line 1806 of yacc.c  */
    5280 #line 474 "parser.yy"
     5279#line 473 "parser.yy"
    52815280    { (yyval.en) = new ExpressionNode( build_attrexpr( build_varref( (yyvsp[(1) - (4)].tok) ), (yyvsp[(3) - (4)].en) ) ); }
    52825281    break;
     
    52855284
    52865285/* Line 1806 of yacc.c  */
    5287 #line 476 "parser.yy"
     5286#line 475 "parser.yy"
    52885287    { (yyval.en) = new ExpressionNode( build_attrtype( build_varref( (yyvsp[(1) - (4)].tok) ), (yyvsp[(3) - (4)].decl) ) ); }
    52895288    break;
     
    52925291
    52935292/* Line 1806 of yacc.c  */
     5293#line 481 "parser.yy"
     5294    { (yyval.op) = OperKinds::PointTo; }
     5295    break;
     5296
     5297  case 62:
     5298
     5299/* Line 1806 of yacc.c  */
    52945300#line 482 "parser.yy"
    5295     { (yyval.op) = OperKinds::PointTo; }
    5296     break;
    5297 
    5298   case 62:
    5299 
    5300 /* Line 1806 of yacc.c  */
    5301 #line 483 "parser.yy"
    53025301    { (yyval.op) = OperKinds::AddressOf; }
    53035302    break;
     
    53065305
    53075306/* Line 1806 of yacc.c  */
     5307#line 488 "parser.yy"
     5308    { (yyval.op) = OperKinds::UnPlus; }
     5309    break;
     5310
     5311  case 64:
     5312
     5313/* Line 1806 of yacc.c  */
    53085314#line 489 "parser.yy"
    5309     { (yyval.op) = OperKinds::UnPlus; }
    5310     break;
    5311 
    5312   case 64:
     5315    { (yyval.op) = OperKinds::UnMinus; }
     5316    break;
     5317
     5318  case 65:
    53135319
    53145320/* Line 1806 of yacc.c  */
    53155321#line 490 "parser.yy"
    5316     { (yyval.op) = OperKinds::UnMinus; }
    5317     break;
    5318 
    5319   case 65:
     5322    { (yyval.op) = OperKinds::Neg; }
     5323    break;
     5324
     5325  case 66:
    53205326
    53215327/* Line 1806 of yacc.c  */
    53225328#line 491 "parser.yy"
    5323     { (yyval.op) = OperKinds::Neg; }
    5324     break;
    5325 
    5326   case 66:
    5327 
    5328 /* Line 1806 of yacc.c  */
    5329 #line 492 "parser.yy"
    53305329    { (yyval.op) = OperKinds::BitNeg; }
    53315330    break;
     
    53345333
    53355334/* Line 1806 of yacc.c  */
    5336 #line 498 "parser.yy"
     5335#line 497 "parser.yy"
    53375336    { (yyval.en) = new ExpressionNode( build_cast( (yyvsp[(2) - (4)].decl), (yyvsp[(4) - (4)].en) ) ); }
    53385337    break;
     
    53415340
    53425341/* Line 1806 of yacc.c  */
    5343 #line 500 "parser.yy"
     5342#line 499 "parser.yy"
    53445343    { (yyval.en) = new ExpressionNode( build_cast( (yyvsp[(2) - (4)].decl), (yyvsp[(4) - (4)].en) ) ); }
    53455344    break;
     
    53485347
    53495348/* Line 1806 of yacc.c  */
    5350 #line 506 "parser.yy"
     5349#line 505 "parser.yy"
    53515350    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::Mul, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    53525351    break;
     
    53555354
    53565355/* Line 1806 of yacc.c  */
    5357 #line 508 "parser.yy"
     5356#line 507 "parser.yy"
    53585357    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::Div, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    53595358    break;
     
    53625361
    53635362/* Line 1806 of yacc.c  */
    5364 #line 510 "parser.yy"
     5363#line 509 "parser.yy"
    53655364    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::Mod, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    53665365    break;
     
    53695368
    53705369/* Line 1806 of yacc.c  */
    5371 #line 516 "parser.yy"
     5370#line 515 "parser.yy"
    53725371    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::Plus, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    53735372    break;
     
    53765375
    53775376/* Line 1806 of yacc.c  */
    5378 #line 518 "parser.yy"
     5377#line 517 "parser.yy"
    53795378    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::Minus, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    53805379    break;
     
    53835382
    53845383/* Line 1806 of yacc.c  */
    5385 #line 524 "parser.yy"
     5384#line 523 "parser.yy"
    53865385    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::LShift, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    53875386    break;
     
    53905389
    53915390/* Line 1806 of yacc.c  */
    5392 #line 526 "parser.yy"
     5391#line 525 "parser.yy"
    53935392    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::RShift, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    53945393    break;
     
    53975396
    53985397/* Line 1806 of yacc.c  */
    5399 #line 532 "parser.yy"
     5398#line 531 "parser.yy"
    54005399    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::LThan, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    54015400    break;
     
    54045403
    54055404/* Line 1806 of yacc.c  */
    5406 #line 534 "parser.yy"
     5405#line 533 "parser.yy"
    54075406    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::GThan, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    54085407    break;
     
    54115410
    54125411/* Line 1806 of yacc.c  */
    5413 #line 536 "parser.yy"
     5412#line 535 "parser.yy"
    54145413    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::LEThan, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    54155414    break;
     
    54185417
    54195418/* Line 1806 of yacc.c  */
    5420 #line 538 "parser.yy"
     5419#line 537 "parser.yy"
    54215420    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::GEThan, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    54225421    break;
     
    54255424
    54265425/* Line 1806 of yacc.c  */
    5427 #line 544 "parser.yy"
     5426#line 543 "parser.yy"
    54285427    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::Eq, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    54295428    break;
     
    54325431
    54335432/* Line 1806 of yacc.c  */
    5434 #line 546 "parser.yy"
     5433#line 545 "parser.yy"
    54355434    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::Neq, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    54365435    break;
     
    54395438
    54405439/* Line 1806 of yacc.c  */
    5441 #line 552 "parser.yy"
     5440#line 551 "parser.yy"
    54425441    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::BitAnd, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    54435442    break;
     
    54465445
    54475446/* Line 1806 of yacc.c  */
    5448 #line 558 "parser.yy"
     5447#line 557 "parser.yy"
    54495448    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::Xor, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    54505449    break;
     
    54535452
    54545453/* Line 1806 of yacc.c  */
    5455 #line 564 "parser.yy"
     5454#line 563 "parser.yy"
    54565455    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::BitOr, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    54575456    break;
     
    54605459
    54615460/* Line 1806 of yacc.c  */
    5462 #line 570 "parser.yy"
     5461#line 569 "parser.yy"
    54635462    { (yyval.en) = new ExpressionNode( build_and_or( (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en), true ) ); }
    54645463    break;
     
    54675466
    54685467/* Line 1806 of yacc.c  */
    5469 #line 576 "parser.yy"
     5468#line 575 "parser.yy"
    54705469    { (yyval.en) = new ExpressionNode( build_and_or( (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en), false ) ); }
    54715470    break;
     
    54745473
    54755474/* Line 1806 of yacc.c  */
    5476 #line 582 "parser.yy"
     5475#line 581 "parser.yy"
    54775476    { (yyval.en) = new ExpressionNode( build_cond( (yyvsp[(1) - (5)].en), (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].en) ) ); }
    54785477    break;
     
    54815480
    54825481/* Line 1806 of yacc.c  */
    5483 #line 585 "parser.yy"
     5482#line 584 "parser.yy"
    54845483    { (yyval.en) = new ExpressionNode( build_cond( (yyvsp[(1) - (4)].en), (yyvsp[(1) - (4)].en), (yyvsp[(4) - (4)].en) ) ); }
    54855484    break;
     
    54885487
    54895488/* Line 1806 of yacc.c  */
    5490 #line 587 "parser.yy"
     5489#line 586 "parser.yy"
    54915490    { (yyval.en) = new ExpressionNode( build_cond( (yyvsp[(1) - (5)].en), (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].en) ) ); }
    54925491    break;
     
    54955494
    54965495/* Line 1806 of yacc.c  */
    5497 #line 598 "parser.yy"
     5496#line 597 "parser.yy"
    54985497    { (yyval.en) = new ExpressionNode( build_binary_ptr( (yyvsp[(2) - (3)].op), (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    54995498    break;
     
    55025501
    55035502/* Line 1806 of yacc.c  */
    5504 #line 600 "parser.yy"
     5503#line 599 "parser.yy"
    55055504    { (yyval.en) = ( (yyvsp[(2) - (2)].en) == 0 ) ? (yyvsp[(1) - (2)].en) : new ExpressionNode( build_binary_ptr( OperKinds::Assign, (yyvsp[(1) - (2)].en), (yyvsp[(2) - (2)].en) ) ); }
    55065505    break;
     
    55095508
    55105509/* Line 1806 of yacc.c  */
    5511 #line 605 "parser.yy"
     5510#line 604 "parser.yy"
    55125511    { (yyval.en) = nullptr; }
    55135512    break;
     
    55165515
    55175516/* Line 1806 of yacc.c  */
     5517#line 609 "parser.yy"
     5518    { (yyval.op) = OperKinds::Assign; }
     5519    break;
     5520
     5521  case 109:
     5522
     5523/* Line 1806 of yacc.c  */
    55185524#line 610 "parser.yy"
    5519     { (yyval.op) = OperKinds::Assign; }
    5520     break;
    5521 
    5522   case 109:
     5525    { (yyval.op) = OperKinds::AtAssn; }
     5526    break;
     5527
     5528  case 110:
    55235529
    55245530/* Line 1806 of yacc.c  */
    55255531#line 611 "parser.yy"
    5526     { (yyval.op) = OperKinds::AtAssn; }
    5527     break;
    5528 
    5529   case 110:
     5532    { (yyval.op) = OperKinds::MulAssn; }
     5533    break;
     5534
     5535  case 111:
    55305536
    55315537/* Line 1806 of yacc.c  */
    55325538#line 612 "parser.yy"
    5533     { (yyval.op) = OperKinds::MulAssn; }
    5534     break;
    5535 
    5536   case 111:
     5539    { (yyval.op) = OperKinds::DivAssn; }
     5540    break;
     5541
     5542  case 112:
    55375543
    55385544/* Line 1806 of yacc.c  */
    55395545#line 613 "parser.yy"
    5540     { (yyval.op) = OperKinds::DivAssn; }
    5541     break;
    5542 
    5543   case 112:
     5546    { (yyval.op) = OperKinds::ModAssn; }
     5547    break;
     5548
     5549  case 113:
    55445550
    55455551/* Line 1806 of yacc.c  */
    55465552#line 614 "parser.yy"
    5547     { (yyval.op) = OperKinds::ModAssn; }
    5548     break;
    5549 
    5550   case 113:
     5553    { (yyval.op) = OperKinds::PlusAssn; }
     5554    break;
     5555
     5556  case 114:
    55515557
    55525558/* Line 1806 of yacc.c  */
    55535559#line 615 "parser.yy"
    5554     { (yyval.op) = OperKinds::PlusAssn; }
    5555     break;
    5556 
    5557   case 114:
     5560    { (yyval.op) = OperKinds::MinusAssn; }
     5561    break;
     5562
     5563  case 115:
    55585564
    55595565/* Line 1806 of yacc.c  */
    55605566#line 616 "parser.yy"
    5561     { (yyval.op) = OperKinds::MinusAssn; }
    5562     break;
    5563 
    5564   case 115:
     5567    { (yyval.op) = OperKinds::LSAssn; }
     5568    break;
     5569
     5570  case 116:
    55655571
    55665572/* Line 1806 of yacc.c  */
    55675573#line 617 "parser.yy"
    5568     { (yyval.op) = OperKinds::LSAssn; }
    5569     break;
    5570 
    5571   case 116:
     5574    { (yyval.op) = OperKinds::RSAssn; }
     5575    break;
     5576
     5577  case 117:
    55725578
    55735579/* Line 1806 of yacc.c  */
    55745580#line 618 "parser.yy"
    5575     { (yyval.op) = OperKinds::RSAssn; }
    5576     break;
    5577 
    5578   case 117:
     5581    { (yyval.op) = OperKinds::AndAssn; }
     5582    break;
     5583
     5584  case 118:
    55795585
    55805586/* Line 1806 of yacc.c  */
    55815587#line 619 "parser.yy"
    5582     { (yyval.op) = OperKinds::AndAssn; }
    5583     break;
    5584 
    5585   case 118:
     5588    { (yyval.op) = OperKinds::ERAssn; }
     5589    break;
     5590
     5591  case 119:
    55865592
    55875593/* Line 1806 of yacc.c  */
    55885594#line 620 "parser.yy"
    5589     { (yyval.op) = OperKinds::ERAssn; }
    5590     break;
    5591 
    5592   case 119:
    5593 
    5594 /* Line 1806 of yacc.c  */
    5595 #line 621 "parser.yy"
    55965595    { (yyval.op) = OperKinds::OrAssn; }
    55975596    break;
     
    56005599
    56015600/* Line 1806 of yacc.c  */
    5602 #line 628 "parser.yy"
     5601#line 627 "parser.yy"
    56035602    { (yyval.en) = new ExpressionNode( build_tuple() ); }
    56045603    break;
     
    56075606
    56085607/* Line 1806 of yacc.c  */
    5609 #line 630 "parser.yy"
     5608#line 629 "parser.yy"
    56105609    { (yyval.en) = new ExpressionNode( build_tuple( (yyvsp[(3) - (5)].en) ) ); }
    56115610    break;
     
    56145613
    56155614/* Line 1806 of yacc.c  */
    5616 #line 632 "parser.yy"
     5615#line 631 "parser.yy"
    56175616    { (yyval.en) = new ExpressionNode( build_tuple( (ExpressionNode *)(new ExpressionNode( nullptr ) )->set_last( (yyvsp[(4) - (6)].en) ) ) ); }
    56185617    break;
     
    56215620
    56225621/* Line 1806 of yacc.c  */
    5623 #line 634 "parser.yy"
     5622#line 633 "parser.yy"
    56245623    { (yyval.en) = new ExpressionNode( build_tuple( (ExpressionNode *)(yyvsp[(3) - (7)].en)->set_last( (yyvsp[(5) - (7)].en) ) ) ); }
    56255624    break;
     
    56285627
    56295628/* Line 1806 of yacc.c  */
    5630 #line 640 "parser.yy"
     5629#line 639 "parser.yy"
    56315630    { (yyval.en) = (ExpressionNode *)(yyvsp[(1) - (3)].en)->set_last( (yyvsp[(3) - (3)].en) ); }
    56325631    break;
     
    56355634
    56365635/* Line 1806 of yacc.c  */
    5637 #line 646 "parser.yy"
     5636#line 645 "parser.yy"
    56385637    { (yyval.en) = new ExpressionNode( build_comma( (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    56395638    break;
     
    56425641
    56435642/* Line 1806 of yacc.c  */
    5644 #line 651 "parser.yy"
     5643#line 650 "parser.yy"
    56455644    { (yyval.en) = 0; }
    56465645    break;
     
    56495648
    56505649/* Line 1806 of yacc.c  */
    5651 #line 660 "parser.yy"
     5650#line 659 "parser.yy"
    56525651    { (yyval.sn) = (yyvsp[(1) - (1)].sn); }
    56535652    break;
     
    56565655
    56575656/* Line 1806 of yacc.c  */
    5658 #line 667 "parser.yy"
     5657#line 666 "parser.yy"
    56595658    {
    56605659                        Token fn;
    5661                         fn.str = new string( "^?{}" );                          // location undefined
     5660                        fn.str = new std::string( "^?{}" ); // location undefined
    56625661                        (yyval.sn) = new StatementNode( build_expr( new ExpressionNode( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( (yyvsp[(2) - (6)].en) )->set_last( (yyvsp[(4) - (6)].en) ) ) ) ) );
    56635662                }
     
    56675666
    56685667/* Line 1806 of yacc.c  */
    5669 #line 677 "parser.yy"
     5668#line 676 "parser.yy"
    56705669    {
    56715670                        (yyval.sn) = (yyvsp[(4) - (4)].sn)->add_label( (yyvsp[(1) - (4)].tok) );
     
    56765675
    56775676/* Line 1806 of yacc.c  */
    5678 #line 684 "parser.yy"
     5677#line 683 "parser.yy"
    56795678    { (yyval.sn) = new StatementNode( build_compound( (StatementNode *)0 ) ); }
    56805679    break;
     
    56835682
    56845683/* Line 1806 of yacc.c  */
    5685 #line 691 "parser.yy"
     5684#line 690 "parser.yy"
    56865685    { (yyval.sn) = new StatementNode( build_compound( (yyvsp[(5) - (7)].sn) ) ); }
    56875686    break;
     
    56905689
    56915690/* Line 1806 of yacc.c  */
    5692 #line 697 "parser.yy"
     5691#line 696 "parser.yy"
    56935692    { if ( (yyvsp[(1) - (3)].sn) != 0 ) { (yyvsp[(1) - (3)].sn)->set_last( (yyvsp[(3) - (3)].sn) ); (yyval.sn) = (yyvsp[(1) - (3)].sn); } }
    56945693    break;
     
    56975696
    56985697/* Line 1806 of yacc.c  */
    5699 #line 702 "parser.yy"
     5698#line 701 "parser.yy"
    57005699    { (yyval.sn) = new StatementNode( (yyvsp[(1) - (1)].decl) ); }
    57015700    break;
     
    57045703
    57055704/* Line 1806 of yacc.c  */
    5706 #line 704 "parser.yy"
     5705#line 703 "parser.yy"
    57075706    {   // mark all fields in list
    57085707                        for ( DeclarationNode *iter = (yyvsp[(2) - (2)].decl); iter != nullptr; iter = (DeclarationNode *)iter->get_next() )
     
    57155714
    57165715/* Line 1806 of yacc.c  */
    5717 #line 710 "parser.yy"
     5716#line 709 "parser.yy"
    57185717    { (yyval.sn) = new StatementNode( (yyvsp[(1) - (1)].decl) ); }
    57195718    break;
     
    57225721
    57235722/* Line 1806 of yacc.c  */
    5724 #line 717 "parser.yy"
     5723#line 716 "parser.yy"
    57255724    { if ( (yyvsp[(1) - (2)].sn) != 0 ) { (yyvsp[(1) - (2)].sn)->set_last( (yyvsp[(2) - (2)].sn) ); (yyval.sn) = (yyvsp[(1) - (2)].sn); } }
    57265725    break;
     
    57295728
    57305729/* Line 1806 of yacc.c  */
    5731 #line 722 "parser.yy"
     5730#line 721 "parser.yy"
    57325731    { (yyval.sn) = new StatementNode( build_expr( (yyvsp[(1) - (2)].en) ) ); }
    57335732    break;
     
    57365735
    57375736/* Line 1806 of yacc.c  */
    5738 #line 728 "parser.yy"
     5737#line 727 "parser.yy"
    57395738    { (yyval.sn) = new StatementNode( build_if( (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].sn), nullptr ) ); }
    57405739    break;
     
    57435742
    57445743/* Line 1806 of yacc.c  */
    5745 #line 730 "parser.yy"
     5744#line 729 "parser.yy"
    57465745    { (yyval.sn) = new StatementNode( build_if( (yyvsp[(3) - (7)].en), (yyvsp[(5) - (7)].sn), (yyvsp[(7) - (7)].sn) ) ); }
    57475746    break;
     
    57505749
    57515750/* Line 1806 of yacc.c  */
    5752 #line 732 "parser.yy"
     5751#line 731 "parser.yy"
    57535752    { (yyval.sn) = new StatementNode( build_switch( (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].sn) ) ); }
    57545753    break;
     
    57575756
    57585757/* Line 1806 of yacc.c  */
    5759 #line 734 "parser.yy"
     5758#line 733 "parser.yy"
    57605759    {
    57615760                        StatementNode *sw = new StatementNode( build_switch( (yyvsp[(3) - (9)].en), (yyvsp[(8) - (9)].sn) ) );
     
    57725771
    57735772/* Line 1806 of yacc.c  */
    5774 #line 744 "parser.yy"
     5773#line 743 "parser.yy"
    57755774    { (yyval.sn) = new StatementNode( build_switch( (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].sn) ) ); }
    57765775    break;
     
    57795778
    57805779/* Line 1806 of yacc.c  */
    5781 #line 746 "parser.yy"
     5780#line 745 "parser.yy"
    57825781    {
    57835782                        StatementNode *sw = new StatementNode( build_switch( (yyvsp[(3) - (9)].en), (yyvsp[(8) - (9)].sn) ) );
     
    57895788
    57905789/* Line 1806 of yacc.c  */
    5791 #line 756 "parser.yy"
     5790#line 755 "parser.yy"
    57925791    { (yyval.en) = (yyvsp[(1) - (1)].en); }
    57935792    break;
     
    57965795
    57975796/* Line 1806 of yacc.c  */
    5798 #line 758 "parser.yy"
     5797#line 757 "parser.yy"
    57995798    { (yyval.en) = new ExpressionNode( build_range( (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    58005799    break;
     
    58035802
    58045803/* Line 1806 of yacc.c  */
    5805 #line 763 "parser.yy"
     5804#line 762 "parser.yy"
    58065805    { (yyval.sn) = new StatementNode( build_case( (yyvsp[(1) - (1)].en) ) ); }
    58075806    break;
     
    58105809
    58115810/* Line 1806 of yacc.c  */
    5812 #line 765 "parser.yy"
     5811#line 764 "parser.yy"
    58135812    { (yyval.sn) = (StatementNode *)((yyvsp[(1) - (3)].sn)->set_last( new StatementNode( build_case( (yyvsp[(3) - (3)].en) ) ) ) ); }
    58145813    break;
     
    58175816
    58185817/* Line 1806 of yacc.c  */
     5818#line 768 "parser.yy"
     5819    { (yyval.sn) = (yyvsp[(2) - (3)].sn); }
     5820    break;
     5821
     5822  case 163:
     5823
     5824/* Line 1806 of yacc.c  */
    58195825#line 769 "parser.yy"
    5820     { (yyval.sn) = (yyvsp[(2) - (3)].sn); }
    5821     break;
    5822 
    5823   case 163:
    5824 
    5825 /* Line 1806 of yacc.c  */
    5826 #line 770 "parser.yy"
    58275826    { (yyval.sn) = new StatementNode( build_default() ); }
    58285827    break;
     
    58315830
    58325831/* Line 1806 of yacc.c  */
    5833 #line 776 "parser.yy"
     5832#line 775 "parser.yy"
    58345833    { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (2)].sn)->set_last( (yyvsp[(2) - (2)].sn) )); }
    58355834    break;
     
    58385837
    58395838/* Line 1806 of yacc.c  */
    5840 #line 780 "parser.yy"
     5839#line 779 "parser.yy"
    58415840    { (yyval.sn) = (yyvsp[(1) - (2)].sn)->append_last_case( new StatementNode( build_compound( (yyvsp[(2) - (2)].sn) ) ) ); }
    58425841    break;
     
    58455844
    58465845/* Line 1806 of yacc.c  */
    5847 #line 785 "parser.yy"
     5846#line 784 "parser.yy"
    58485847    { (yyval.sn) = 0; }
    58495848    break;
     
    58525851
    58535852/* Line 1806 of yacc.c  */
    5854 #line 791 "parser.yy"
     5853#line 790 "parser.yy"
    58555854    { (yyval.sn) = (yyvsp[(1) - (2)].sn)->append_last_case( new StatementNode( build_compound( (yyvsp[(2) - (2)].sn) ) ) ); }
    58565855    break;
     
    58595858
    58605859/* Line 1806 of yacc.c  */
    5861 #line 793 "parser.yy"
     5860#line 792 "parser.yy"
    58625861    { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (3)].sn)->set_last( (yyvsp[(2) - (3)].sn)->append_last_case( new StatementNode( build_compound( (yyvsp[(3) - (3)].sn) ) ) ) ) ); }
    58635862    break;
     
    58665865
    58675866/* Line 1806 of yacc.c  */
    5868 #line 798 "parser.yy"
     5867#line 797 "parser.yy"
    58695868    { (yyval.sn) = 0; }
    58705869    break;
     
    58735872
    58745873/* Line 1806 of yacc.c  */
    5875 #line 804 "parser.yy"
     5874#line 803 "parser.yy"
    58765875    { (yyval.sn) = (yyvsp[(1) - (2)].sn)->append_last_case( (yyvsp[(2) - (2)].sn) ); }
    58775876    break;
     
    58805879
    58815880/* Line 1806 of yacc.c  */
    5882 #line 806 "parser.yy"
     5881#line 805 "parser.yy"
    58835882    { (yyval.sn) = (yyvsp[(1) - (3)].sn)->append_last_case( new StatementNode( build_compound( (StatementNode *)(yyvsp[(2) - (3)].sn)->set_last( (yyvsp[(3) - (3)].sn) ) ) ) ); }
    58845883    break;
     
    58875886
    58885887/* Line 1806 of yacc.c  */
    5889 #line 808 "parser.yy"
     5888#line 807 "parser.yy"
    58905889    { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (3)].sn)->set_last( (yyvsp[(2) - (3)].sn)->append_last_case( (yyvsp[(3) - (3)].sn) ))); }
    58915890    break;
     
    58945893
    58955894/* Line 1806 of yacc.c  */
    5896 #line 810 "parser.yy"
     5895#line 809 "parser.yy"
    58975896    { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (4)].sn)->set_last( (yyvsp[(2) - (4)].sn)->append_last_case( new StatementNode( build_compound( (StatementNode *)(yyvsp[(3) - (4)].sn)->set_last( (yyvsp[(4) - (4)].sn) ) ) ) ) ) ); }
    58985897    break;
     
    59015900
    59025901/* Line 1806 of yacc.c  */
    5903 #line 815 "parser.yy"
     5902#line 814 "parser.yy"
    59045903    { (yyval.sn) = new StatementNode( build_branch( BranchStmt::Break ) ); }
    59055904    break;
     
    59085907
    59095908/* Line 1806 of yacc.c  */
    5910 #line 821 "parser.yy"
     5909#line 820 "parser.yy"
    59115910    { (yyval.sn) = 0; }
    59125911    break;
     
    59155914
    59165915/* Line 1806 of yacc.c  */
    5917 #line 823 "parser.yy"
     5916#line 822 "parser.yy"
    59185917    { (yyval.sn) = 0; }
    59195918    break;
     
    59225921
    59235922/* Line 1806 of yacc.c  */
    5924 #line 828 "parser.yy"
     5923#line 827 "parser.yy"
    59255924    { (yyval.sn) = new StatementNode( build_while( (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].sn) ) ); }
    59265925    break;
     
    59295928
    59305929/* Line 1806 of yacc.c  */
    5931 #line 830 "parser.yy"
     5930#line 829 "parser.yy"
    59325931    { (yyval.sn) = new StatementNode( build_while( (yyvsp[(5) - (7)].en), (yyvsp[(2) - (7)].sn), true ) ); }
    59335932    break;
     
    59365935
    59375936/* Line 1806 of yacc.c  */
    5938 #line 832 "parser.yy"
     5937#line 831 "parser.yy"
    59395938    { (yyval.sn) = new StatementNode( build_for( (yyvsp[(4) - (6)].fctl), (yyvsp[(6) - (6)].sn) ) ); }
    59405939    break;
     
    59435942
    59445943/* Line 1806 of yacc.c  */
    5945 #line 837 "parser.yy"
     5944#line 836 "parser.yy"
    59465945    { (yyval.fctl) = new ForCtl( (yyvsp[(1) - (6)].en), (yyvsp[(4) - (6)].en), (yyvsp[(6) - (6)].en) ); }
    59475946    break;
     
    59505949
    59515950/* Line 1806 of yacc.c  */
    5952 #line 839 "parser.yy"
     5951#line 838 "parser.yy"
    59535952    { (yyval.fctl) = new ForCtl( (yyvsp[(1) - (4)].decl), (yyvsp[(2) - (4)].en), (yyvsp[(4) - (4)].en) ); }
    59545953    break;
     
    59575956
    59585957/* Line 1806 of yacc.c  */
    5959 #line 844 "parser.yy"
     5958#line 843 "parser.yy"
    59605959    { (yyval.sn) = new StatementNode( build_branch( (yyvsp[(2) - (3)].tok), BranchStmt::Goto ) ); }
    59615960    break;
     
    59645963
    59655964/* Line 1806 of yacc.c  */
    5966 #line 848 "parser.yy"
     5965#line 847 "parser.yy"
    59675966    { (yyval.sn) = new StatementNode( build_computedgoto( (yyvsp[(3) - (4)].en) ) ); }
    59685967    break;
     
    59715970
    59725971/* Line 1806 of yacc.c  */
    5973 #line 851 "parser.yy"
     5972#line 850 "parser.yy"
    59745973    { (yyval.sn) = new StatementNode( build_branch( BranchStmt::Continue ) ); }
    59755974    break;
     
    59785977
    59795978/* Line 1806 of yacc.c  */
    5980 #line 855 "parser.yy"
     5979#line 854 "parser.yy"
    59815980    { (yyval.sn) = new StatementNode( build_branch( (yyvsp[(2) - (3)].tok), BranchStmt::Continue ) ); }
    59825981    break;
     
    59855984
    59865985/* Line 1806 of yacc.c  */
    5987 #line 858 "parser.yy"
     5986#line 857 "parser.yy"
    59885987    { (yyval.sn) = new StatementNode( build_branch( BranchStmt::Break ) ); }
    59895988    break;
     
    59925991
    59935992/* Line 1806 of yacc.c  */
    5994 #line 862 "parser.yy"
     5993#line 861 "parser.yy"
    59955994    { (yyval.sn) = new StatementNode( build_branch( (yyvsp[(2) - (3)].tok), BranchStmt::Break ) ); }
    59965995    break;
     
    59995998
    60005999/* Line 1806 of yacc.c  */
    6001 #line 864 "parser.yy"
     6000#line 863 "parser.yy"
    60026001    { (yyval.sn) = new StatementNode( build_return( (yyvsp[(2) - (3)].en) ) ); }
    60036002    break;
     
    60066005
    60076006/* Line 1806 of yacc.c  */
    6008 #line 866 "parser.yy"
     6007#line 865 "parser.yy"
    60096008    { (yyval.sn) = new StatementNode( build_throw( (yyvsp[(2) - (3)].en) ) ); }
    60106009    break;
     
    60136012
    60146013/* Line 1806 of yacc.c  */
    6015 #line 868 "parser.yy"
     6014#line 867 "parser.yy"
    60166015    { (yyval.sn) = new StatementNode( build_throw( (yyvsp[(2) - (3)].en) ) ); }
    60176016    break;
     
    60206019
    60216020/* Line 1806 of yacc.c  */
    6022 #line 870 "parser.yy"
     6021#line 869 "parser.yy"
    60236022    { (yyval.sn) = new StatementNode( build_throw( (yyvsp[(2) - (5)].en) ) ); }
    60246023    break;
     
    60276026
    60286027/* Line 1806 of yacc.c  */
    6029 #line 875 "parser.yy"
     6028#line 874 "parser.yy"
    60306029    { (yyval.sn) = new StatementNode( build_try( (yyvsp[(2) - (3)].sn), (yyvsp[(3) - (3)].sn), 0 ) ); }
    60316030    break;
     
    60346033
    60356034/* Line 1806 of yacc.c  */
    6036 #line 877 "parser.yy"
     6035#line 876 "parser.yy"
    60376036    { (yyval.sn) = new StatementNode( build_try( (yyvsp[(2) - (3)].sn), 0, (yyvsp[(3) - (3)].sn) ) ); }
    60386037    break;
     
    60416040
    60426041/* Line 1806 of yacc.c  */
    6043 #line 879 "parser.yy"
     6042#line 878 "parser.yy"
    60446043    { (yyval.sn) = new StatementNode( build_try( (yyvsp[(2) - (4)].sn), (yyvsp[(3) - (4)].sn), (yyvsp[(4) - (4)].sn) ) ); }
    60456044    break;
     
    60486047
    60496048/* Line 1806 of yacc.c  */
    6050 #line 886 "parser.yy"
     6049#line 885 "parser.yy"
    60516050    { (yyval.sn) = new StatementNode( build_catch( 0, (yyvsp[(5) - (5)].sn), true ) ); }
    60526051    break;
     
    60556054
    60566055/* Line 1806 of yacc.c  */
    6057 #line 888 "parser.yy"
     6056#line 887 "parser.yy"
    60586057    { (yyval.sn) = (StatementNode *)(yyvsp[(1) - (6)].sn)->set_last( new StatementNode( build_catch( 0, (yyvsp[(6) - (6)].sn), true ) ) ); }
    60596058    break;
     
    60626061
    60636062/* Line 1806 of yacc.c  */
    6064 #line 890 "parser.yy"
     6063#line 889 "parser.yy"
    60656064    { (yyval.sn) = new StatementNode( build_catch( 0, (yyvsp[(5) - (5)].sn), true ) ); }
    60666065    break;
     
    60696068
    60706069/* Line 1806 of yacc.c  */
    6071 #line 892 "parser.yy"
     6070#line 891 "parser.yy"
    60726071    { (yyval.sn) = (StatementNode *)(yyvsp[(1) - (6)].sn)->set_last( new StatementNode( build_catch( 0, (yyvsp[(6) - (6)].sn), true ) ) ); }
    60736072    break;
     
    60766075
    60776076/* Line 1806 of yacc.c  */
    6078 #line 897 "parser.yy"
     6077#line 896 "parser.yy"
    60796078    { (yyval.sn) = new StatementNode( build_catch( (yyvsp[(5) - (9)].decl), (yyvsp[(8) - (9)].sn) ) ); }
    60806079    break;
     
    60836082
    60846083/* Line 1806 of yacc.c  */
    6085 #line 899 "parser.yy"
     6084#line 898 "parser.yy"
    60866085    { (yyval.sn) = (StatementNode *)(yyvsp[(1) - (10)].sn)->set_last( new StatementNode( build_catch( (yyvsp[(6) - (10)].decl), (yyvsp[(9) - (10)].sn) ) ) ); }
    60876086    break;
     
    60906089
    60916090/* Line 1806 of yacc.c  */
    6092 #line 901 "parser.yy"
     6091#line 900 "parser.yy"
    60936092    { (yyval.sn) = new StatementNode( build_catch( (yyvsp[(5) - (9)].decl), (yyvsp[(8) - (9)].sn) ) ); }
    60946093    break;
     
    60976096
    60986097/* Line 1806 of yacc.c  */
    6099 #line 903 "parser.yy"
     6098#line 902 "parser.yy"
    61006099    { (yyval.sn) = (StatementNode *)(yyvsp[(1) - (10)].sn)->set_last( new StatementNode( build_catch( (yyvsp[(6) - (10)].decl), (yyvsp[(9) - (10)].sn) ) ) ); }
    61016100    break;
     
    61046103
    61056104/* Line 1806 of yacc.c  */
    6106 #line 908 "parser.yy"
     6105#line 907 "parser.yy"
    61076106    {
    61086107                        (yyval.sn) = new StatementNode( build_finally( (yyvsp[(2) - (2)].sn) ) );
     
    61136112
    61146113/* Line 1806 of yacc.c  */
    6115 #line 921 "parser.yy"
     6114#line 920 "parser.yy"
    61166115    {
    61176116                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    61236122
    61246123/* Line 1806 of yacc.c  */
    6125 #line 926 "parser.yy"
     6124#line 925 "parser.yy"
    61266125    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); }
    61276126    break;
     
    61306129
    61316130/* Line 1806 of yacc.c  */
    6132 #line 928 "parser.yy"
     6131#line 927 "parser.yy"
    61336132    {
    61346133                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    61406139
    61416140/* Line 1806 of yacc.c  */
    6142 #line 937 "parser.yy"
     6141#line 936 "parser.yy"
    61436142    { (yyval.sn) = new StatementNode( build_asmstmt( (yyvsp[(2) - (6)].flag), (yyvsp[(4) - (6)].constant), 0 ) ); }
    61446143    break;
     
    61476146
    61486147/* Line 1806 of yacc.c  */
    6149 #line 939 "parser.yy"
     6148#line 938 "parser.yy"
    61506149    { (yyval.sn) = new StatementNode( build_asmstmt( (yyvsp[(2) - (8)].flag), (yyvsp[(4) - (8)].constant), (yyvsp[(6) - (8)].en) ) ); }
    61516150    break;
     
    61546153
    61556154/* Line 1806 of yacc.c  */
    6156 #line 941 "parser.yy"
     6155#line 940 "parser.yy"
    61576156    { (yyval.sn) = new StatementNode( build_asmstmt( (yyvsp[(2) - (10)].flag), (yyvsp[(4) - (10)].constant), (yyvsp[(6) - (10)].en), (yyvsp[(8) - (10)].en) ) ); }
    61586157    break;
     
    61616160
    61626161/* Line 1806 of yacc.c  */
    6163 #line 943 "parser.yy"
     6162#line 942 "parser.yy"
    61646163    { (yyval.sn) = new StatementNode( build_asmstmt( (yyvsp[(2) - (12)].flag), (yyvsp[(4) - (12)].constant), (yyvsp[(6) - (12)].en), (yyvsp[(8) - (12)].en), (yyvsp[(10) - (12)].en) ) ); }
    61656164    break;
     
    61686167
    61696168/* Line 1806 of yacc.c  */
    6170 #line 945 "parser.yy"
     6169#line 944 "parser.yy"
    61716170    { (yyval.sn) = new StatementNode( build_asmstmt( (yyvsp[(2) - (14)].flag), (yyvsp[(5) - (14)].constant), 0, (yyvsp[(8) - (14)].en), (yyvsp[(10) - (14)].en), (yyvsp[(12) - (14)].label) ) ); }
    61726171    break;
     
    61756174
    61766175/* Line 1806 of yacc.c  */
    6177 #line 950 "parser.yy"
     6176#line 949 "parser.yy"
    61786177    { (yyval.flag) = false; }
    61796178    break;
     
    61826181
    61836182/* Line 1806 of yacc.c  */
    6184 #line 952 "parser.yy"
     6183#line 951 "parser.yy"
    61856184    { (yyval.flag) = true; }
    61866185    break;
     
    61896188
    61906189/* Line 1806 of yacc.c  */
    6191 #line 957 "parser.yy"
     6190#line 956 "parser.yy"
    61926191    { (yyval.en) = 0; }
    61936192    break;
     
    61966195
    61976196/* Line 1806 of yacc.c  */
    6198 #line 964 "parser.yy"
     6197#line 963 "parser.yy"
    61996198    { (yyval.en) = (ExpressionNode *)(yyvsp[(1) - (3)].en)->set_last( (yyvsp[(3) - (3)].en) ); }
    62006199    break;
     
    62036202
    62046203/* Line 1806 of yacc.c  */
    6205 #line 969 "parser.yy"
     6204#line 968 "parser.yy"
    62066205    { (yyval.en) = new ExpressionNode( build_asmexpr( 0, (yyvsp[(1) - (4)].constant), (yyvsp[(3) - (4)].en) ) ); }
    62076206    break;
     
    62106209
    62116210/* Line 1806 of yacc.c  */
    6212 #line 971 "parser.yy"
     6211#line 970 "parser.yy"
    62136212    { (yyval.en) = new ExpressionNode( build_asmexpr( (yyvsp[(2) - (7)].en), (yyvsp[(4) - (7)].constant), (yyvsp[(6) - (7)].en) ) ); }
    62146213    break;
     
    62176216
    62186217/* Line 1806 of yacc.c  */
    6219 #line 976 "parser.yy"
     6218#line 975 "parser.yy"
    62206219    { (yyval.en) = 0; }
    62216220    break;
     
    62246223
    62256224/* Line 1806 of yacc.c  */
    6226 #line 978 "parser.yy"
     6225#line 977 "parser.yy"
    62276226    { (yyval.en) = new ExpressionNode( (yyvsp[(1) - (1)].constant) ); }
    62286227    break;
     
    62316230
    62326231/* Line 1806 of yacc.c  */
    6233 #line 980 "parser.yy"
     6232#line 979 "parser.yy"
    62346233    { (yyval.en) = (ExpressionNode *)(yyvsp[(1) - (3)].en)->set_last( new ExpressionNode( (yyvsp[(3) - (3)].constant) ) ); }
    62356234    break;
     
    62386237
    62396238/* Line 1806 of yacc.c  */
    6240 #line 985 "parser.yy"
     6239#line 984 "parser.yy"
    62416240    {
    62426241                        (yyval.label) = new LabelNode(); (yyval.label)->labels.push_back( *(yyvsp[(1) - (1)].tok) );
     
    62486247
    62496248/* Line 1806 of yacc.c  */
    6250 #line 990 "parser.yy"
     6249#line 989 "parser.yy"
    62516250    {
    62526251                        (yyval.label) = (yyvsp[(1) - (3)].label); (yyvsp[(1) - (3)].label)->labels.push_back( *(yyvsp[(3) - (3)].tok) );
     
    62586257
    62596258/* Line 1806 of yacc.c  */
    6260 #line 1000 "parser.yy"
     6259#line 999 "parser.yy"
    62616260    { (yyval.decl) = 0; }
    62626261    break;
     
    62656264
    62666265/* Line 1806 of yacc.c  */
    6267 #line 1007 "parser.yy"
     6266#line 1006 "parser.yy"
    62686267    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ); }
    62696268    break;
     
    62726271
    62736272/* Line 1806 of yacc.c  */
    6274 #line 1012 "parser.yy"
     6273#line 1011 "parser.yy"
    62756274    { (yyval.decl) = 0; }
    62766275    break;
     
    62796278
    62806279/* Line 1806 of yacc.c  */
    6281 #line 1019 "parser.yy"
     6280#line 1018 "parser.yy"
    62826281    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ); }
    62836282    break;
    62846283
    62856284  case 244:
     6285
     6286/* Line 1806 of yacc.c  */
     6287#line 1032 "parser.yy"
     6288    {}
     6289    break;
     6290
     6291  case 245:
    62866292
    62876293/* Line 1806 of yacc.c  */
     
    62906296    break;
    62916297
    6292   case 245:
    6293 
    6294 /* Line 1806 of yacc.c  */
    6295 #line 1034 "parser.yy"
    6296     {}
    6297     break;
    6298 
    62996298  case 253:
    63006299
    63016300/* Line 1806 of yacc.c  */
    6302 #line 1063 "parser.yy"
     6301#line 1062 "parser.yy"
    63036302    {
    63046303                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    63106309
    63116310/* Line 1806 of yacc.c  */
    6312 #line 1070 "parser.yy"
     6311#line 1069 "parser.yy"
    63136312    {
    63146313                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    63206319
    63216320/* Line 1806 of yacc.c  */
    6322 #line 1075 "parser.yy"
     6321#line 1074 "parser.yy"
    63236322    {
    63246323                        typedefTable.addToEnclosingScope( *(yyvsp[(5) - (6)].tok), TypedefTable::ID );
     
    63306329
    63316330/* Line 1806 of yacc.c  */
    6332 #line 1085 "parser.yy"
     6331#line 1084 "parser.yy"
    63336332    {
    63346333                        typedefTable.setNextIdentifier( *(yyvsp[(2) - (3)].tok) );
     
    63406339
    63416340/* Line 1806 of yacc.c  */
    6342 #line 1090 "parser.yy"
     6341#line 1089 "parser.yy"
    63436342    {
    63446343                        typedefTable.setNextIdentifier( *(yyvsp[(2) - (3)].tok) );
     
    63506349
    63516350/* Line 1806 of yacc.c  */
    6352 #line 1095 "parser.yy"
     6351#line 1094 "parser.yy"
    63536352    {
    63546353                        typedefTable.setNextIdentifier( *(yyvsp[(3) - (4)].tok) );
     
    63606359
    63616360/* Line 1806 of yacc.c  */
    6362 #line 1103 "parser.yy"
     6361#line 1102 "parser.yy"
    63636362    {
    63646363                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    63706369
    63716370/* Line 1806 of yacc.c  */
    6372 #line 1108 "parser.yy"
     6371#line 1107 "parser.yy"
    63736372    {
    63746373                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    63806379
    63816380/* Line 1806 of yacc.c  */
    6382 #line 1113 "parser.yy"
     6381#line 1112 "parser.yy"
    63836382    {
    63846383                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    63906389
    63916390/* Line 1806 of yacc.c  */
    6392 #line 1118 "parser.yy"
     6391#line 1117 "parser.yy"
    63936392    {
    63946393                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    64006399
    64016400/* Line 1806 of yacc.c  */
    6402 #line 1123 "parser.yy"
     6401#line 1122 "parser.yy"
    64036402    {
    64046403                        typedefTable.addToEnclosingScope( *(yyvsp[(5) - (5)].tok), TypedefTable::ID );
     
    64106409
    64116410/* Line 1806 of yacc.c  */
    6412 #line 1131 "parser.yy"
     6411#line 1130 "parser.yy"
    64136412    {
    64146413                        (yyval.decl) = DeclarationNode::newFunction( (yyvsp[(3) - (8)].tok), DeclarationNode::newTuple( 0 ), (yyvsp[(6) - (8)].decl), 0, true );
     
    64196418
    64206419/* Line 1806 of yacc.c  */
    6421 #line 1154 "parser.yy"
     6420#line 1153 "parser.yy"
    64226421    {
    64236422                        (yyval.decl) = DeclarationNode::newFunction( (yyvsp[(2) - (7)].tok), (yyvsp[(1) - (7)].decl), (yyvsp[(5) - (7)].decl), 0, true );
     
    64286427
    64296428/* Line 1806 of yacc.c  */
    6430 #line 1158 "parser.yy"
     6429#line 1157 "parser.yy"
    64316430    {
    64326431                        (yyval.decl) = DeclarationNode::newFunction( (yyvsp[(2) - (7)].tok), (yyvsp[(1) - (7)].decl), (yyvsp[(5) - (7)].decl), 0, true );
     
    64376436
    64386437/* Line 1806 of yacc.c  */
    6439 #line 1165 "parser.yy"
     6438#line 1164 "parser.yy"
    64406439    { (yyval.decl) = DeclarationNode::newTuple( (yyvsp[(3) - (5)].decl) ); }
    64416440    break;
     
    64446443
    64456444/* Line 1806 of yacc.c  */
    6446 #line 1169 "parser.yy"
     6445#line 1168 "parser.yy"
    64476446    { (yyval.decl) = DeclarationNode::newTuple( (yyvsp[(3) - (9)].decl)->appendList( (yyvsp[(7) - (9)].decl) ) ); }
    64486447    break;
     
    64516450
    64526451/* Line 1806 of yacc.c  */
    6453 #line 1174 "parser.yy"
     6452#line 1173 "parser.yy"
    64546453    {
    64556454                        typedefTable.addToEnclosingScope( TypedefTable::TD );
     
    64616460
    64626461/* Line 1806 of yacc.c  */
    6463 #line 1179 "parser.yy"
     6462#line 1178 "parser.yy"
    64646463    {
    64656464                        typedefTable.addToEnclosingScope( TypedefTable::TD );
     
    64716470
    64726471/* Line 1806 of yacc.c  */
    6473 #line 1184 "parser.yy"
     6472#line 1183 "parser.yy"
    64746473    {
    64756474                        typedefTable.addToEnclosingScope( *(yyvsp[(5) - (5)].tok), TypedefTable::TD );
     
    64816480
    64826481/* Line 1806 of yacc.c  */
    6483 #line 1195 "parser.yy"
     6482#line 1194 "parser.yy"
    64846483    {
    64856484                        typedefTable.addToEnclosingScope( TypedefTable::TD );
     
    64916490
    64926491/* Line 1806 of yacc.c  */
    6493 #line 1200 "parser.yy"
     6492#line 1199 "parser.yy"
    64946493    {
    64956494                        typedefTable.addToEnclosingScope( TypedefTable::TD );
     
    65016500
    65026501/* Line 1806 of yacc.c  */
    6503 #line 1205 "parser.yy"
     6502#line 1204 "parser.yy"
    65046503    {
    65056504                        typedefTable.addToEnclosingScope( TypedefTable::TD );
     
    65116510
    65126511/* Line 1806 of yacc.c  */
    6513 #line 1210 "parser.yy"
     6512#line 1209 "parser.yy"
    65146513    {
    65156514                        typedefTable.addToEnclosingScope( TypedefTable::TD );
     
    65216520
    65226521/* Line 1806 of yacc.c  */
    6523 #line 1215 "parser.yy"
     6522#line 1214 "parser.yy"
    65246523    {
    65256524                        typedefTable.addToEnclosingScope( TypedefTable::TD );
     
    65316530
    65326531/* Line 1806 of yacc.c  */
    6533 #line 1224 "parser.yy"
     6532#line 1223 "parser.yy"
    65346533    {
    65356534                        typedefTable.addToEnclosingScope( *(yyvsp[(2) - (4)].tok), TypedefTable::TD );
     
    65416540
    65426541/* Line 1806 of yacc.c  */
    6543 #line 1229 "parser.yy"
     6542#line 1228 "parser.yy"
    65446543    {
    65456544                        typedefTable.addToEnclosingScope( *(yyvsp[(5) - (7)].tok), TypedefTable::TD );
     
    65516550
    65526551/* Line 1806 of yacc.c  */
    6553 #line 1246 "parser.yy"
     6552#line 1245 "parser.yy"
    65546553    {
    65556554                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    65616560
    65626561/* Line 1806 of yacc.c  */
    6563 #line 1251 "parser.yy"
     6562#line 1250 "parser.yy"
    65646563    {
    65656564                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    65716570
    65726571/* Line 1806 of yacc.c  */
    6573 #line 1273 "parser.yy"
     6572#line 1272 "parser.yy"
    65746573    { (yyval.decl) = 0; }
    65756574    break;
     
    65786577
    65796578/* Line 1806 of yacc.c  */
    6580 #line 1285 "parser.yy"
     6579#line 1284 "parser.yy"
    65816580    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    65826581    break;
     
    65856584
    65866585/* Line 1806 of yacc.c  */
    6587 #line 1296 "parser.yy"
     6586#line 1295 "parser.yy"
    65886587    { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Const ); }
    65896588    break;
     
    65926591
    65936592/* Line 1806 of yacc.c  */
    6594 #line 1298 "parser.yy"
     6593#line 1297 "parser.yy"
    65956594    { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Restrict ); }
    65966595    break;
     
    65996598
    66006599/* Line 1806 of yacc.c  */
    6601 #line 1300 "parser.yy"
     6600#line 1299 "parser.yy"
    66026601    { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Volatile ); }
    66036602    break;
     
    66066605
    66076606/* Line 1806 of yacc.c  */
    6608 #line 1302 "parser.yy"
     6607#line 1301 "parser.yy"
    66096608    { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Lvalue ); }
    66106609    break;
     
    66136612
    66146613/* Line 1806 of yacc.c  */
    6615 #line 1304 "parser.yy"
     6614#line 1303 "parser.yy"
    66166615    { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Atomic ); }
    66176616    break;
     
    66206619
    66216620/* Line 1806 of yacc.c  */
    6622 #line 1306 "parser.yy"
     6621#line 1305 "parser.yy"
    66236622    {
    66246623                        typedefTable.enterScope();
     
    66296628
    66306629/* Line 1806 of yacc.c  */
    6631 #line 1310 "parser.yy"
     6630#line 1309 "parser.yy"
    66326631    {
    66336632                        typedefTable.leaveScope();
     
    66396638
    66406639/* Line 1806 of yacc.c  */
    6641 #line 1319 "parser.yy"
     6640#line 1318 "parser.yy"
    66426641    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    66436642    break;
     
    66466645
    66476646/* Line 1806 of yacc.c  */
    6648 #line 1321 "parser.yy"
     6647#line 1320 "parser.yy"
    66496648    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); }
    66506649    break;
     
    66536652
    66546653/* Line 1806 of yacc.c  */
    6655 #line 1332 "parser.yy"
     6654#line 1331 "parser.yy"
    66566655    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    66576656    break;
     
    66606659
    66616660/* Line 1806 of yacc.c  */
    6662 #line 1337 "parser.yy"
     6661#line 1336 "parser.yy"
    66636662    { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Extern ); }
    66646663    break;
     
    66676666
    66686667/* Line 1806 of yacc.c  */
    6669 #line 1339 "parser.yy"
     6668#line 1338 "parser.yy"
    66706669    { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Static ); }
    66716670    break;
     
    66746673
    66756674/* Line 1806 of yacc.c  */
    6676 #line 1341 "parser.yy"
     6675#line 1340 "parser.yy"
    66776676    { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Auto ); }
    66786677    break;
     
    66816680
    66826681/* Line 1806 of yacc.c  */
    6683 #line 1343 "parser.yy"
     6682#line 1342 "parser.yy"
    66846683    { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Register ); }
    66856684    break;
     
    66886687
    66896688/* Line 1806 of yacc.c  */
    6690 #line 1346 "parser.yy"
     6689#line 1345 "parser.yy"
    66916690    { (yyval.decl) = new DeclarationNode; (yyval.decl)->isInline = true; }
    66926691    break;
     
    66956694
    66966695/* Line 1806 of yacc.c  */
    6697 #line 1348 "parser.yy"
     6696#line 1347 "parser.yy"
    66986697    { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Fortran ); }
    66996698    break;
     
    67026701
    67036702/* Line 1806 of yacc.c  */
    6704 #line 1351 "parser.yy"
     6703#line 1350 "parser.yy"
    67056704    { (yyval.decl) = new DeclarationNode; (yyval.decl)->isNoreturn = true; }
    67066705    break;
     
    67096708
    67106709/* Line 1806 of yacc.c  */
    6711 #line 1353 "parser.yy"
     6710#line 1352 "parser.yy"
    67126711    { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Threadlocal ); }
    67136712    break;
     
    67166715
    67176716/* Line 1806 of yacc.c  */
    6718 #line 1358 "parser.yy"
     6717#line 1357 "parser.yy"
    67196718    { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Char ); }
    67206719    break;
     
    67236722
    67246723/* Line 1806 of yacc.c  */
    6725 #line 1360 "parser.yy"
     6724#line 1359 "parser.yy"
    67266725    { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Double ); }
    67276726    break;
     
    67306729
    67316730/* Line 1806 of yacc.c  */
    6732 #line 1362 "parser.yy"
     6731#line 1361 "parser.yy"
    67336732    { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Float ); }
    67346733    break;
     
    67376736
    67386737/* Line 1806 of yacc.c  */
    6739 #line 1364 "parser.yy"
     6738#line 1363 "parser.yy"
    67406739    { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Int ); }
    67416740    break;
     
    67446743
    67456744/* Line 1806 of yacc.c  */
    6746 #line 1366 "parser.yy"
     6745#line 1365 "parser.yy"
    67476746    { (yyval.decl) = DeclarationNode::newLength( DeclarationNode::Long ); }
    67486747    break;
     
    67516750
    67526751/* Line 1806 of yacc.c  */
    6753 #line 1368 "parser.yy"
     6752#line 1367 "parser.yy"
    67546753    { (yyval.decl) = DeclarationNode::newLength( DeclarationNode::Short ); }
    67556754    break;
     
    67586757
    67596758/* Line 1806 of yacc.c  */
    6760 #line 1370 "parser.yy"
     6759#line 1369 "parser.yy"
    67616760    { (yyval.decl) = DeclarationNode::newSignedNess( DeclarationNode::Signed ); }
    67626761    break;
     
    67656764
    67666765/* Line 1806 of yacc.c  */
    6767 #line 1372 "parser.yy"
     6766#line 1371 "parser.yy"
    67686767    { (yyval.decl) = DeclarationNode::newSignedNess( DeclarationNode::Unsigned ); }
    67696768    break;
     
    67726771
    67736772/* Line 1806 of yacc.c  */
    6774 #line 1374 "parser.yy"
     6773#line 1373 "parser.yy"
    67756774    { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Void ); }
    67766775    break;
     
    67796778
    67806779/* Line 1806 of yacc.c  */
    6781 #line 1376 "parser.yy"
     6780#line 1375 "parser.yy"
    67826781    { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Bool ); }
    67836782    break;
     
    67866785
    67876786/* Line 1806 of yacc.c  */
    6788 #line 1378 "parser.yy"
     6787#line 1377 "parser.yy"
    67896788    { (yyval.decl) = DeclarationNode::newComplexType( DeclarationNode::Complex ); }
    67906789    break;
     
    67936792
    67946793/* Line 1806 of yacc.c  */
    6795 #line 1380 "parser.yy"
     6794#line 1379 "parser.yy"
    67966795    { (yyval.decl) = DeclarationNode::newComplexType( DeclarationNode::Imaginary ); }
    67976796    break;
     
    68006799
    68016800/* Line 1806 of yacc.c  */
    6802 #line 1382 "parser.yy"
     6801#line 1381 "parser.yy"
    68036802    { (yyval.decl) = DeclarationNode::newBuiltinType( DeclarationNode::Valist ); }
    68046803    break;
     
    68076806
    68086807/* Line 1806 of yacc.c  */
    6809 #line 1389 "parser.yy"
     6808#line 1388 "parser.yy"
    68106809    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    68116810    break;
     
    68146813
    68156814/* Line 1806 of yacc.c  */
    6816 #line 1391 "parser.yy"
     6815#line 1390 "parser.yy"
    68176816    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    68186817    break;
     
    68216820
    68226821/* Line 1806 of yacc.c  */
    6823 #line 1393 "parser.yy"
     6822#line 1392 "parser.yy"
    68246823    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); }
    68256824    break;
     
    68286827
    68296828/* Line 1806 of yacc.c  */
    6830 #line 1395 "parser.yy"
     6829#line 1394 "parser.yy"
    68316830    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addType( (yyvsp[(1) - (3)].decl) ); }
    68326831    break;
     
    68356834
    68366835/* Line 1806 of yacc.c  */
    6837 #line 1401 "parser.yy"
     6836#line 1400 "parser.yy"
    68386837    { (yyval.decl) = (yyvsp[(2) - (3)].decl)->addQualifiers( (yyvsp[(1) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); }
    68396838    break;
     
    68426841
    68436842/* Line 1806 of yacc.c  */
    6844 #line 1408 "parser.yy"
     6843#line 1407 "parser.yy"
    68456844    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    68466845    break;
     
    68496848
    68506849/* Line 1806 of yacc.c  */
    6851 #line 1410 "parser.yy"
     6850#line 1409 "parser.yy"
    68526851    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    68536852    break;
     
    68566855
    68576856/* Line 1806 of yacc.c  */
    6858 #line 1412 "parser.yy"
     6857#line 1411 "parser.yy"
    68596858    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addType( (yyvsp[(2) - (2)].decl) ); }
    68606859    break;
     
    68636862
    68646863/* Line 1806 of yacc.c  */
    6865 #line 1417 "parser.yy"
     6864#line 1416 "parser.yy"
    68666865    { (yyval.decl) = (yyvsp[(3) - (4)].decl); }
    68676866    break;
     
    68706869
    68716870/* Line 1806 of yacc.c  */
    6872 #line 1419 "parser.yy"
     6871#line 1418 "parser.yy"
    68736872    { (yyval.decl) = DeclarationNode::newTypeof( (yyvsp[(3) - (4)].en) ); }
    68746873    break;
     
    68776876
    68786877/* Line 1806 of yacc.c  */
    6879 #line 1421 "parser.yy"
     6878#line 1420 "parser.yy"
    68806879    { (yyval.decl) = DeclarationNode::newAttr( (yyvsp[(1) - (4)].tok), (yyvsp[(3) - (4)].decl) ); }
    68816880    break;
     
    68846883
    68856884/* Line 1806 of yacc.c  */
    6886 #line 1423 "parser.yy"
     6885#line 1422 "parser.yy"
    68876886    { (yyval.decl) = DeclarationNode::newAttr( (yyvsp[(1) - (4)].tok), (yyvsp[(3) - (4)].en) ); }
    68886887    break;
     
    68916890
    68926891/* Line 1806 of yacc.c  */
    6893 #line 1429 "parser.yy"
     6892#line 1428 "parser.yy"
    68946893    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    68956894    break;
     
    68986897
    68996898/* Line 1806 of yacc.c  */
    6900 #line 1431 "parser.yy"
     6899#line 1430 "parser.yy"
    69016900    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    69026901    break;
     
    69056904
    69066905/* Line 1806 of yacc.c  */
    6907 #line 1433 "parser.yy"
     6906#line 1432 "parser.yy"
    69086907    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); }
    69096908    break;
     
    69126911
    69136912/* Line 1806 of yacc.c  */
    6914 #line 1439 "parser.yy"
     6913#line 1438 "parser.yy"
    69156914    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    69166915    break;
     
    69196918
    69206919/* Line 1806 of yacc.c  */
    6921 #line 1441 "parser.yy"
     6920#line 1440 "parser.yy"
    69226921    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    69236922    break;
     
    69266925
    69276926/* Line 1806 of yacc.c  */
    6928 #line 1447 "parser.yy"
     6927#line 1446 "parser.yy"
    69296928    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    69306929    break;
     
    69336932
    69346933/* Line 1806 of yacc.c  */
    6935 #line 1449 "parser.yy"
     6934#line 1448 "parser.yy"
    69366935    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    69376936    break;
     
    69406939
    69416940/* Line 1806 of yacc.c  */
    6942 #line 1451 "parser.yy"
     6941#line 1450 "parser.yy"
    69436942    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); }
    69446943    break;
     
    69476946
    69486947/* Line 1806 of yacc.c  */
    6949 #line 1456 "parser.yy"
     6948#line 1455 "parser.yy"
    69506949    { (yyval.decl) = DeclarationNode::newFromTypedef( (yyvsp[(1) - (1)].tok) ); }
    69516950    break;
     
    69546953
    69556954/* Line 1806 of yacc.c  */
    6956 #line 1458 "parser.yy"
     6955#line 1457 "parser.yy"
    69576956    { (yyval.decl) = DeclarationNode::newFromTypedef( (yyvsp[(2) - (2)].tok) )->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    69586957    break;
     
    69616960
    69626961/* Line 1806 of yacc.c  */
    6963 #line 1460 "parser.yy"
     6962#line 1459 "parser.yy"
    69646963    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    69656964    break;
     
    69686967
    69696968/* Line 1806 of yacc.c  */
    6970 #line 1470 "parser.yy"
    6971     { (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (4)].aggKey), nullptr, nullptr, (yyvsp[(3) - (4)].decl), true ); }
     6969#line 1469 "parser.yy"
     6970    { (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (4)].aggKey), 0, 0, (yyvsp[(3) - (4)].decl), true ); }
    69726971    break;
    69736972
     
    69756974
    69766975/* Line 1806 of yacc.c  */
    6977 #line 1472 "parser.yy"
     6976#line 1471 "parser.yy"
    69786977    {
    69796978                        typedefTable.makeTypedef( *(yyvsp[(2) - (2)].tok) );
    6980                         (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (2)].aggKey), (yyvsp[(2) - (2)].tok), nullptr, nullptr, false );
     6979                        (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (2)].aggKey), (yyvsp[(2) - (2)].tok), 0, 0, false );
    69816980                }
    69826981    break;
     
    69856984
    69866985/* Line 1806 of yacc.c  */
    6987 #line 1477 "parser.yy"
     6986#line 1476 "parser.yy"
    69886987    { typedefTable.makeTypedef( *(yyvsp[(2) - (2)].tok) ); }
    69896988    break;
     
    69926991
    69936992/* Line 1806 of yacc.c  */
    6994 #line 1479 "parser.yy"
    6995     { (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (6)].aggKey), (yyvsp[(2) - (6)].tok), nullptr, (yyvsp[(5) - (6)].decl), true ); }
     6993#line 1478 "parser.yy"
     6994    { (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (6)].aggKey), (yyvsp[(2) - (6)].tok), 0, (yyvsp[(5) - (6)].decl), true ); }
    69966995    break;
    69976996
     
    69996998
    70006999/* Line 1806 of yacc.c  */
    7001 #line 1481 "parser.yy"
    7002     { (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (7)].aggKey), nullptr, (yyvsp[(3) - (7)].en), (yyvsp[(6) - (7)].decl), false ); }
     7000#line 1480 "parser.yy"
     7001    { (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (7)].aggKey), 0, (yyvsp[(3) - (7)].en), (yyvsp[(6) - (7)].decl), false ); }
    70037002    break;
    70047003
     
    70067005
    70077006/* Line 1806 of yacc.c  */
    7008 #line 1483 "parser.yy"
     7007#line 1482 "parser.yy"
    70097008    { (yyval.decl) = (yyvsp[(2) - (2)].decl); }
    70107009    break;
     
    70137012
    70147013/* Line 1806 of yacc.c  */
    7015 #line 1488 "parser.yy"
     7014#line 1487 "parser.yy"
    70167015    { (yyval.aggKey) = DeclarationNode::Struct; }
    70177016    break;
     
    70207019
    70217020/* Line 1806 of yacc.c  */
    7022 #line 1490 "parser.yy"
     7021#line 1489 "parser.yy"
    70237022    { (yyval.aggKey) = DeclarationNode::Union; }
    70247023    break;
     
    70277026
    70287027/* Line 1806 of yacc.c  */
    7029 #line 1495 "parser.yy"
     7028#line 1494 "parser.yy"
    70307029    { (yyval.decl) = 0; }
    70317030    break;
     
    70347033
    70357034/* Line 1806 of yacc.c  */
    7036 #line 1497 "parser.yy"
     7035#line 1496 "parser.yy"
    70377036    { (yyval.decl) = (yyvsp[(1) - (2)].decl) != 0 ? (yyvsp[(1) - (2)].decl)->appendList( (yyvsp[(2) - (2)].decl) ) : (yyvsp[(2) - (2)].decl); }
    70387037    break;
     
    70417040
    70427041/* Line 1806 of yacc.c  */
    7043 #line 1503 "parser.yy"
     7042#line 1502 "parser.yy"
    70447043    { (yyval.decl) = (yyvsp[(2) - (3)].decl)->set_extension( true ); }
    70457044    break;
     
    70487047
    70497048/* Line 1806 of yacc.c  */
    7050 #line 1506 "parser.yy"
     7049#line 1505 "parser.yy"
    70517050    {   // mark all fields in list
    70527051                        for ( DeclarationNode *iter = (yyvsp[(2) - (3)].decl); iter != nullptr; iter = (DeclarationNode *)iter->get_next() )
     
    70597058
    70607059/* Line 1806 of yacc.c  */
    7061 #line 1516 "parser.yy"
     7060#line 1515 "parser.yy"
    70627061    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addName( (yyvsp[(2) - (2)].tok) ); }
    70637062    break;
     
    70667065
    70677066/* Line 1806 of yacc.c  */
    7068 #line 1518 "parser.yy"
     7067#line 1517 "parser.yy"
    70697068    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(1) - (3)].decl)->cloneType( (yyvsp[(3) - (3)].tok) ) ); }
    70707069    break;
     
    70737072
    70747073/* Line 1806 of yacc.c  */
    7075 #line 1520 "parser.yy"
     7074#line 1519 "parser.yy"
    70767075    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->appendList( (yyvsp[(1) - (2)].decl)->cloneType( 0 ) ); }
    70777076    break;
     
    70807079
    70817080/* Line 1806 of yacc.c  */
    7082 #line 1525 "parser.yy"
     7081#line 1524 "parser.yy"
    70837082    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); }
    70847083    break;
     
    70877086
    70887087/* Line 1806 of yacc.c  */
    7089 #line 1527 "parser.yy"
     7088#line 1526 "parser.yy"
    70907089    { (yyval.decl) = (yyvsp[(1) - (4)].decl)->appendList( (yyvsp[(1) - (4)].decl)->cloneBaseType( (yyvsp[(4) - (4)].decl) ) ); }
    70917090    break;
     
    70947093
    70957094/* Line 1806 of yacc.c  */
    7096 #line 1532 "parser.yy"
     7095#line 1531 "parser.yy"
    70977096    { (yyval.decl) = DeclarationNode::newName( 0 ); /* XXX */ }
    70987097    break;
     
    71017100
    71027101/* Line 1806 of yacc.c  */
    7103 #line 1534 "parser.yy"
     7102#line 1533 "parser.yy"
    71047103    { (yyval.decl) = DeclarationNode::newBitfield( (yyvsp[(1) - (1)].en) ); }
    71057104    break;
     
    71087107
    71097108/* Line 1806 of yacc.c  */
    7110 #line 1537 "parser.yy"
     7109#line 1536 "parser.yy"
    71117110    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addBitfield( (yyvsp[(2) - (2)].en) ); }
    71127111    break;
     
    71157114
    71167115/* Line 1806 of yacc.c  */
    7117 #line 1540 "parser.yy"
     7116#line 1539 "parser.yy"
    71187117    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addBitfield( (yyvsp[(2) - (2)].en) ); }
    71197118    break;
     
    71227121
    71237122/* Line 1806 of yacc.c  */
    7124 #line 1546 "parser.yy"
     7123#line 1545 "parser.yy"
    71257124    { (yyval.en) = 0; }
    71267125    break;
     
    71297128
    71307129/* Line 1806 of yacc.c  */
    7131 #line 1548 "parser.yy"
     7130#line 1547 "parser.yy"
    71327131    { (yyval.en) = (yyvsp[(1) - (1)].en); }
    71337132    break;
     
    71367135
    71377136/* Line 1806 of yacc.c  */
    7138 #line 1553 "parser.yy"
     7137#line 1552 "parser.yy"
    71397138    { (yyval.en) = (yyvsp[(2) - (2)].en); }
    71407139    break;
     
    71437142
    71447143/* Line 1806 of yacc.c  */
    7145 #line 1562 "parser.yy"
    7146     { (yyval.decl) = DeclarationNode::newEnum( nullptr, (yyvsp[(3) - (5)].decl) ); }
     7144#line 1561 "parser.yy"
     7145    { (yyval.decl) = DeclarationNode::newEnum( 0, (yyvsp[(3) - (5)].decl) ); }
    71477146    break;
    71487147
     
    71507149
    71517150/* Line 1806 of yacc.c  */
    7152 #line 1564 "parser.yy"
     7151#line 1563 "parser.yy"
    71537152    {
    71547153                        typedefTable.makeTypedef( *(yyvsp[(2) - (2)].tok) );
     
    71607159
    71617160/* Line 1806 of yacc.c  */
    7162 #line 1569 "parser.yy"
     7161#line 1568 "parser.yy"
    71637162    { typedefTable.makeTypedef( *(yyvsp[(2) - (2)].tok) ); }
    71647163    break;
     
    71677166
    71687167/* Line 1806 of yacc.c  */
    7169 #line 1571 "parser.yy"
     7168#line 1570 "parser.yy"
    71707169    { (yyval.decl) = DeclarationNode::newEnum( (yyvsp[(2) - (7)].tok), (yyvsp[(5) - (7)].decl) ); }
    71717170    break;
     
    71747173
    71757174/* Line 1806 of yacc.c  */
    7176 #line 1576 "parser.yy"
     7175#line 1575 "parser.yy"
    71777176    { (yyval.decl) = DeclarationNode::newEnumConstant( (yyvsp[(1) - (2)].tok), (yyvsp[(2) - (2)].en) ); }
    71787177    break;
     
    71817180
    71827181/* Line 1806 of yacc.c  */
    7183 #line 1578 "parser.yy"
     7182#line 1577 "parser.yy"
    71847183    { (yyval.decl) = (yyvsp[(1) - (4)].decl)->appendList( DeclarationNode::newEnumConstant( (yyvsp[(3) - (4)].tok), (yyvsp[(4) - (4)].en) ) ); }
    71857184    break;
     
    71887187
    71897188/* Line 1806 of yacc.c  */
    7190 #line 1583 "parser.yy"
     7189#line 1582 "parser.yy"
    71917190    { (yyval.en) = 0; }
    71927191    break;
     
    71957194
    71967195/* Line 1806 of yacc.c  */
    7197 #line 1585 "parser.yy"
     7196#line 1584 "parser.yy"
    71987197    { (yyval.en) = (yyvsp[(2) - (2)].en); }
    71997198    break;
     
    72027201
    72037202/* Line 1806 of yacc.c  */
    7204 #line 1592 "parser.yy"
     7203#line 1591 "parser.yy"
    72057204    { (yyval.decl) = 0; }
    72067205    break;
     
    72097208
    72107209/* Line 1806 of yacc.c  */
    7211 #line 1600 "parser.yy"
     7210#line 1599 "parser.yy"
    72127211    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); }
    72137212    break;
     
    72167215
    72177216/* Line 1806 of yacc.c  */
    7218 #line 1602 "parser.yy"
     7217#line 1601 "parser.yy"
    72197218    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->addVarArgs(); }
    72207219    break;
     
    72237222
    72247223/* Line 1806 of yacc.c  */
    7225 #line 1604 "parser.yy"
     7224#line 1603 "parser.yy"
    72267225    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->addVarArgs(); }
    72277226    break;
     
    72307229
    72317230/* Line 1806 of yacc.c  */
    7232 #line 1612 "parser.yy"
     7231#line 1611 "parser.yy"
    72337232    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); }
    72347233    break;
     
    72377236
    72387237/* Line 1806 of yacc.c  */
    7239 #line 1614 "parser.yy"
     7238#line 1613 "parser.yy"
    72407239    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); }
    72417240    break;
     
    72447243
    72457244/* Line 1806 of yacc.c  */
    7246 #line 1616 "parser.yy"
     7245#line 1615 "parser.yy"
    72477246    { (yyval.decl) = (yyvsp[(1) - (9)].decl)->appendList( (yyvsp[(5) - (9)].decl) )->appendList( (yyvsp[(9) - (9)].decl) ); }
    72487247    break;
     
    72517250
    72527251/* Line 1806 of yacc.c  */
    7253 #line 1622 "parser.yy"
     7252#line 1621 "parser.yy"
    72547253    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); }
    72557254    break;
     
    72587257
    72597258/* Line 1806 of yacc.c  */
    7260 #line 1627 "parser.yy"
     7259#line 1626 "parser.yy"
    72617260    { (yyval.decl) = 0; }
    72627261    break;
     
    72657264
    72667265/* Line 1806 of yacc.c  */
    7267 #line 1634 "parser.yy"
     7266#line 1633 "parser.yy"
    72687267    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->addVarArgs(); }
    72697268    break;
     
    72727271
    72737272/* Line 1806 of yacc.c  */
    7274 #line 1641 "parser.yy"
     7273#line 1640 "parser.yy"
    72757274    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); }
    72767275    break;
     
    72797278
    72807279/* Line 1806 of yacc.c  */
    7281 #line 1643 "parser.yy"
     7280#line 1642 "parser.yy"
    72827281    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); }
    72837282    break;
     
    72867285
    72877286/* Line 1806 of yacc.c  */
    7288 #line 1652 "parser.yy"
     7287#line 1651 "parser.yy"
    72897288    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addName( (yyvsp[(2) - (3)].tok) ); }
    72907289    break;
     
    72937292
    72947293/* Line 1806 of yacc.c  */
    7295 #line 1655 "parser.yy"
     7294#line 1654 "parser.yy"
    72967295    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addName( (yyvsp[(2) - (3)].tok) ); }
    72977296    break;
     
    73007299
    73017300/* Line 1806 of yacc.c  */
    7302 #line 1657 "parser.yy"
     7301#line 1656 "parser.yy"
    73037302    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addName( (yyvsp[(3) - (4)].tok) )->addQualifiers( (yyvsp[(1) - (4)].decl) ); }
    73047303    break;
     
    73077306
    73087307/* Line 1806 of yacc.c  */
    7309 #line 1667 "parser.yy"
     7308#line 1666 "parser.yy"
    73107309    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    73117310    break;
     
    73147313
    73157314/* Line 1806 of yacc.c  */
    7316 #line 1673 "parser.yy"
     7315#line 1672 "parser.yy"
    73177316    {
    73187317                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    73247323
    73257324/* Line 1806 of yacc.c  */
    7326 #line 1678 "parser.yy"
     7325#line 1677 "parser.yy"
    73277326    {
    73287327                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    73347333
    73357334/* Line 1806 of yacc.c  */
    7336 #line 1687 "parser.yy"
     7335#line 1686 "parser.yy"
    73377336    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); }
    73387337    break;
     
    73417340
    73427341/* Line 1806 of yacc.c  */
    7343 #line 1696 "parser.yy"
     7342#line 1695 "parser.yy"
    73447343    { (yyval.decl) = DeclarationNode::newName( (yyvsp[(1) - (1)].tok) ); }
    73457344    break;
     
    73487347
    73497348/* Line 1806 of yacc.c  */
    7350 #line 1698 "parser.yy"
     7349#line 1697 "parser.yy"
    73517350    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( DeclarationNode::newName( (yyvsp[(3) - (3)].tok) ) ); }
    73527351    break;
     
    73557354
    73567355/* Line 1806 of yacc.c  */
    7357 #line 1723 "parser.yy"
     7356#line 1722 "parser.yy"
    73587357    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); }
    73597358    break;
     
    73627361
    73637362/* Line 1806 of yacc.c  */
    7364 #line 1731 "parser.yy"
     7363#line 1730 "parser.yy"
    73657364    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); }
    73667365    break;
     
    73697368
    73707369/* Line 1806 of yacc.c  */
    7371 #line 1736 "parser.yy"
     7370#line 1735 "parser.yy"
    73727371    { (yyval.in) = 0; }
    73737372    break;
     
    73767375
    73777376/* Line 1806 of yacc.c  */
    7378 #line 1738 "parser.yy"
     7377#line 1737 "parser.yy"
    73797378    { (yyval.in) = (yyvsp[(2) - (2)].in); }
    73807379    break;
     
    73837382
    73847383/* Line 1806 of yacc.c  */
    7385 #line 1740 "parser.yy"
     7384#line 1739 "parser.yy"
    73867385    { (yyval.in) = (yyvsp[(2) - (2)].in)->set_maybeConstructed( false ); }
    73877386    break;
     
    73907389
    73917390/* Line 1806 of yacc.c  */
     7391#line 1743 "parser.yy"
     7392    { (yyval.in) = new InitializerNode( (yyvsp[(1) - (1)].en) ); }
     7393    break;
     7394
     7395  case 457:
     7396
     7397/* Line 1806 of yacc.c  */
    73927398#line 1744 "parser.yy"
    7393     { (yyval.in) = new InitializerNode( (yyvsp[(1) - (1)].en) ); }
    7394     break;
    7395 
    7396   case 457:
    7397 
    7398 /* Line 1806 of yacc.c  */
    7399 #line 1745 "parser.yy"
    74007399    { (yyval.in) = new InitializerNode( (yyvsp[(2) - (4)].in), true ); }
    74017400    break;
     
    74047403
    74057404/* Line 1806 of yacc.c  */
    7406 #line 1750 "parser.yy"
     7405#line 1749 "parser.yy"
    74077406    { (yyval.in) = 0; }
    74087407    break;
     
    74117410
    74127411/* Line 1806 of yacc.c  */
     7412#line 1751 "parser.yy"
     7413    { (yyval.in) = (yyvsp[(2) - (2)].in)->set_designators( (yyvsp[(1) - (2)].en) ); }
     7414    break;
     7415
     7416  case 461:
     7417
     7418/* Line 1806 of yacc.c  */
    74137419#line 1752 "parser.yy"
    7414     { (yyval.in) = (yyvsp[(2) - (2)].in)->set_designators( (yyvsp[(1) - (2)].en) ); }
    7415     break;
    7416 
    7417   case 461:
    7418 
    7419 /* Line 1806 of yacc.c  */
    7420 #line 1753 "parser.yy"
    74217420    { (yyval.in) = (InitializerNode *)( (yyvsp[(1) - (3)].in)->set_last( (yyvsp[(3) - (3)].in) ) ); }
    74227421    break;
     
    74257424
    74267425/* Line 1806 of yacc.c  */
    7427 #line 1755 "parser.yy"
     7426#line 1754 "parser.yy"
    74287427    { (yyval.in) = (InitializerNode *)( (yyvsp[(1) - (4)].in)->set_last( (yyvsp[(4) - (4)].in)->set_designators( (yyvsp[(3) - (4)].en) ) ) ); }
    74297428    break;
     
    74327431
    74337432/* Line 1806 of yacc.c  */
    7434 #line 1771 "parser.yy"
     7433#line 1770 "parser.yy"
    74357434    { (yyval.en) = new ExpressionNode( build_varref( (yyvsp[(1) - (2)].tok) ) ); }
    74367435    break;
     
    74397438
    74407439/* Line 1806 of yacc.c  */
    7441 #line 1777 "parser.yy"
     7440#line 1776 "parser.yy"
    74427441    { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (2)].en)->set_last( (yyvsp[(2) - (2)].en) ) ); }
    74437442    break;
     
    74467445
    74477446/* Line 1806 of yacc.c  */
    7448 #line 1783 "parser.yy"
     7447#line 1782 "parser.yy"
    74497448    { (yyval.en) = new ExpressionNode( build_varref( (yyvsp[(2) - (2)].tok) ) ); }
    74507449    break;
     
    74537452
    74547453/* Line 1806 of yacc.c  */
    7455 #line 1786 "parser.yy"
     7454#line 1785 "parser.yy"
    74567455    { (yyval.en) = (yyvsp[(3) - (5)].en); }
    74577456    break;
     
    74607459
    74617460/* Line 1806 of yacc.c  */
    7462 #line 1788 "parser.yy"
     7461#line 1787 "parser.yy"
    74637462    { (yyval.en) = (yyvsp[(3) - (5)].en); }
    74647463    break;
     
    74677466
    74687467/* Line 1806 of yacc.c  */
    7469 #line 1790 "parser.yy"
     7468#line 1789 "parser.yy"
    74707469    { (yyval.en) = new ExpressionNode( build_range( (yyvsp[(3) - (7)].en), (yyvsp[(5) - (7)].en) ) ); }
    74717470    break;
     
    74747473
    74757474/* Line 1806 of yacc.c  */
    7476 #line 1792 "parser.yy"
     7475#line 1791 "parser.yy"
    74777476    { (yyval.en) = (yyvsp[(4) - (6)].en); }
    74787477    break;
     
    74817480
    74827481/* Line 1806 of yacc.c  */
    7483 #line 1816 "parser.yy"
     7482#line 1815 "parser.yy"
    74847483    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    74857484    break;
     
    74887487
    74897488/* Line 1806 of yacc.c  */
    7490 #line 1818 "parser.yy"
     7489#line 1817 "parser.yy"
    74917490    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    74927491    break;
     
    74957494
    74967495/* Line 1806 of yacc.c  */
    7497 #line 1820 "parser.yy"
     7496#line 1819 "parser.yy"
    74987497    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); }
    74997498    break;
     
    75027501
    75037502/* Line 1806 of yacc.c  */
    7504 #line 1826 "parser.yy"
     7503#line 1825 "parser.yy"
    75057504    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    75067505    break;
     
    75097508
    75107509/* Line 1806 of yacc.c  */
    7511 #line 1828 "parser.yy"
     7510#line 1827 "parser.yy"
    75127511    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    75137512    break;
     
    75167515
    75177516/* Line 1806 of yacc.c  */
    7518 #line 1833 "parser.yy"
     7517#line 1832 "parser.yy"
    75197518    { (yyval.decl) = DeclarationNode::newFromTypeGen( (yyvsp[(1) - (4)].tok), (yyvsp[(3) - (4)].en) ); }
    75207519    break;
     
    75237522
    75247523/* Line 1806 of yacc.c  */
    7525 #line 1839 "parser.yy"
     7524#line 1838 "parser.yy"
    75267525    { (yyval.decl) = (yyvsp[(1) - (4)].decl)->appendList( (yyvsp[(3) - (4)].decl) ); }
    75277526    break;
     
    75307529
    75317530/* Line 1806 of yacc.c  */
    7532 #line 1844 "parser.yy"
     7531#line 1843 "parser.yy"
    75337532    { typedefTable.addToEnclosingScope( *(yyvsp[(2) - (2)].tok), TypedefTable::TD ); }
    75347533    break;
     
    75377536
    75387537/* Line 1806 of yacc.c  */
    7539 #line 1846 "parser.yy"
     7538#line 1845 "parser.yy"
    75407539    { (yyval.decl) = DeclarationNode::newTypeParam( (yyvsp[(1) - (4)].tclass), (yyvsp[(2) - (4)].tok) )->addAssertions( (yyvsp[(4) - (4)].decl) ); }
    75417540    break;
     
    75447543
    75457544/* Line 1806 of yacc.c  */
    7546 #line 1852 "parser.yy"
     7545#line 1851 "parser.yy"
    75477546    { (yyval.tclass) = DeclarationNode::Otype; }
    75487547    break;
     
    75517550
    75527551/* Line 1806 of yacc.c  */
    7553 #line 1854 "parser.yy"
     7552#line 1853 "parser.yy"
    75547553    { (yyval.tclass) = DeclarationNode::Ftype; }
    75557554    break;
     
    75587557
    75597558/* Line 1806 of yacc.c  */
    7560 #line 1856 "parser.yy"
     7559#line 1855 "parser.yy"
    75617560    { (yyval.tclass) = DeclarationNode::Dtype; }
    75627561    break;
     
    75657564
    75667565/* Line 1806 of yacc.c  */
    7567 #line 1861 "parser.yy"
     7566#line 1860 "parser.yy"
    75687567    { (yyval.decl) = 0; }
    75697568    break;
     
    75727571
    75737572/* Line 1806 of yacc.c  */
    7574 #line 1863 "parser.yy"
     7573#line 1862 "parser.yy"
    75757574    { (yyval.decl) = (yyvsp[(1) - (2)].decl) != 0 ? (yyvsp[(1) - (2)].decl)->appendList( (yyvsp[(2) - (2)].decl) ) : (yyvsp[(2) - (2)].decl); }
    75767575    break;
     
    75797578
    75807579/* Line 1806 of yacc.c  */
    7581 #line 1868 "parser.yy"
     7580#line 1867 "parser.yy"
    75827581    {
    75837582                        typedefTable.openTrait( *(yyvsp[(2) - (5)].tok) );
     
    75897588
    75907589/* Line 1806 of yacc.c  */
    7591 #line 1873 "parser.yy"
     7590#line 1872 "parser.yy"
    75927591    { (yyval.decl) = (yyvsp[(4) - (5)].decl); }
    75937592    break;
     
    75967595
    75977596/* Line 1806 of yacc.c  */
    7598 #line 1875 "parser.yy"
     7597#line 1874 "parser.yy"
    75997598    { (yyval.decl) = 0; }
    76007599    break;
     
    76037602
    76047603/* Line 1806 of yacc.c  */
    7605 #line 1880 "parser.yy"
     7604#line 1879 "parser.yy"
    76067605    { (yyval.en) = new ExpressionNode( build_typevalue( (yyvsp[(1) - (1)].decl) ) ); }
    76077606    break;
     
    76107609
    76117610/* Line 1806 of yacc.c  */
    7612 #line 1883 "parser.yy"
     7611#line 1882 "parser.yy"
    76137612    { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (3)].en)->set_last( new ExpressionNode( build_typevalue( (yyvsp[(3) - (3)].decl) ) ) ) ); }
    76147613    break;
     
    76177616
    76187617/* Line 1806 of yacc.c  */
    7619 #line 1885 "parser.yy"
     7618#line 1884 "parser.yy"
    76207619    { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (3)].en)->set_last( (yyvsp[(3) - (3)].en) )); }
    76217620    break;
     
    76247623
    76257624/* Line 1806 of yacc.c  */
    7626 #line 1890 "parser.yy"
     7625#line 1889 "parser.yy"
    76277626    { (yyval.decl) = (yyvsp[(2) - (2)].decl); }
    76287627    break;
     
    76317630
    76327631/* Line 1806 of yacc.c  */
    7633 #line 1892 "parser.yy"
     7632#line 1891 "parser.yy"
    76347633    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addQualifiers( (yyvsp[(1) - (3)].decl) ); }
    76357634    break;
     
    76387637
    76397638/* Line 1806 of yacc.c  */
    7640 #line 1894 "parser.yy"
     7639#line 1893 "parser.yy"
    76417640    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl)->copyStorageClasses( (yyvsp[(1) - (3)].decl) ) ); }
    76427641    break;
     
    76457644
    76467645/* Line 1806 of yacc.c  */
    7647 #line 1899 "parser.yy"
     7646#line 1898 "parser.yy"
    76487647    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addAssertions( (yyvsp[(2) - (2)].decl) ); }
    76497648    break;
     
    76527651
    76537652/* Line 1806 of yacc.c  */
    7654 #line 1901 "parser.yy"
     7653#line 1900 "parser.yy"
    76557654    { (yyval.decl) = (yyvsp[(1) - (4)].decl)->addAssertions( (yyvsp[(2) - (4)].decl) )->addType( (yyvsp[(4) - (4)].decl) ); }
    76567655    break;
     
    76597658
    76607659/* Line 1806 of yacc.c  */
    7661 #line 1906 "parser.yy"
     7660#line 1905 "parser.yy"
    76627661    {
    76637662                        typedefTable.addToEnclosingScope( *(yyvsp[(1) - (1)].tok), TypedefTable::TD );
     
    76697668
    76707669/* Line 1806 of yacc.c  */
    7671 #line 1911 "parser.yy"
     7670#line 1910 "parser.yy"
    76727671    {
    76737672                        typedefTable.addToEnclosingScope( *(yyvsp[(1) - (6)].tok), TypedefTable::TG );
     
    76797678
    76807679/* Line 1806 of yacc.c  */
    7681 #line 1919 "parser.yy"
     7680#line 1918 "parser.yy"
    76827681    {
    76837682                        typedefTable.addToEnclosingScope( *(yyvsp[(2) - (9)].tok), TypedefTable::ID );
     
    76897688
    76907689/* Line 1806 of yacc.c  */
    7691 #line 1924 "parser.yy"
     7690#line 1923 "parser.yy"
    76927691    {
    76937692                        typedefTable.enterTrait( *(yyvsp[(2) - (8)].tok) );
     
    76997698
    77007699/* Line 1806 of yacc.c  */
    7701 #line 1929 "parser.yy"
     7700#line 1928 "parser.yy"
    77027701    {
    77037702                        typedefTable.leaveTrait();
     
    77107709
    77117710/* Line 1806 of yacc.c  */
    7712 #line 1939 "parser.yy"
     7711#line 1938 "parser.yy"
    77137712    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ); }
    77147713    break;
     
    77177716
    77187717/* Line 1806 of yacc.c  */
    7719 #line 1949 "parser.yy"
     7718#line 1948 "parser.yy"
    77207719    {
    77217720                        typedefTable.addToEnclosingScope2( TypedefTable::ID );
     
    77277726
    77287727/* Line 1806 of yacc.c  */
    7729 #line 1954 "parser.yy"
     7728#line 1953 "parser.yy"
    77307729    {
    77317730                        typedefTable.addToEnclosingScope2( TypedefTable::ID );
     
    77377736
    77387737/* Line 1806 of yacc.c  */
    7739 #line 1959 "parser.yy"
     7738#line 1958 "parser.yy"
    77407739    {
    77417740                        typedefTable.addToEnclosingScope2( *(yyvsp[(5) - (5)].tok), TypedefTable::ID );
     
    77477746
    77487747/* Line 1806 of yacc.c  */
    7749 #line 1967 "parser.yy"
     7748#line 1966 "parser.yy"
    77507749    {
    77517750                        typedefTable.addToEnclosingScope2( TypedefTable::ID );
     
    77577756
    77587757/* Line 1806 of yacc.c  */
    7759 #line 1972 "parser.yy"
     7758#line 1971 "parser.yy"
    77607759    {
    77617760                        typedefTable.addToEnclosingScope2( TypedefTable::ID );
     
    77677766
    77687767/* Line 1806 of yacc.c  */
    7769 #line 1982 "parser.yy"
     7768#line 1981 "parser.yy"
    77707769    {}
    77717770    break;
     
    77747773
    77757774/* Line 1806 of yacc.c  */
    7776 #line 1984 "parser.yy"
     7775#line 1983 "parser.yy"
    77777776    { parseTree = parseTree != nullptr ? parseTree->appendList( (yyvsp[(1) - (1)].decl) ) : (yyvsp[(1) - (1)].decl);    }
    77787777    break;
     
    77817780
    77827781/* Line 1806 of yacc.c  */
    7783 #line 1990 "parser.yy"
     7782#line 1989 "parser.yy"
    77847783    { (yyval.decl) = (yyvsp[(1) - (3)].decl) != nullptr ? (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ) : (yyvsp[(3) - (3)].decl); }
    77857784    break;
     
    77887787
    77897788/* Line 1806 of yacc.c  */
    7790 #line 1995 "parser.yy"
     7789#line 1994 "parser.yy"
    77917790    { (yyval.decl) = 0; }
    77927791    break;
     
    77957794
    77967795/* Line 1806 of yacc.c  */
    7797 #line 2003 "parser.yy"
     7796#line 2002 "parser.yy"
    77987797    {}
    77997798    break;
     
    78027801
    78037802/* Line 1806 of yacc.c  */
    7804 #line 2005 "parser.yy"
     7803#line 2004 "parser.yy"
    78057804    {
    78067805                        linkageStack.push( linkage );                           // handle nested extern "C"/"Cforall"
     
    78127811
    78137812/* Line 1806 of yacc.c  */
    7814 #line 2010 "parser.yy"
     7813#line 2009 "parser.yy"
    78157814    {
    78167815                        linkage = linkageStack.top();
     
    78237822
    78247823/* Line 1806 of yacc.c  */
    7825 #line 2016 "parser.yy"
     7824#line 2015 "parser.yy"
    78267825    {   // mark all fields in list
    78277826                        for ( DeclarationNode *iter = (yyvsp[(2) - (2)].decl); iter != nullptr; iter = (DeclarationNode *)iter->get_next() )
     
    78347833
    78357834/* Line 1806 of yacc.c  */
    7836 #line 2031 "parser.yy"
     7835#line 2030 "parser.yy"
    78377836    {
    78387837                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    78457844
    78467845/* Line 1806 of yacc.c  */
    7847 #line 2037 "parser.yy"
     7846#line 2036 "parser.yy"
    78487847    {
    78497848                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    78567855
    78577856/* Line 1806 of yacc.c  */
    7858 #line 2046 "parser.yy"
     7857#line 2045 "parser.yy"
    78597858    {
    78607859                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    78677866
    78687867/* Line 1806 of yacc.c  */
    7869 #line 2052 "parser.yy"
     7868#line 2051 "parser.yy"
    78707869    {
    78717870                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    78787877
    78797878/* Line 1806 of yacc.c  */
    7880 #line 2058 "parser.yy"
     7879#line 2057 "parser.yy"
    78817880    {
    78827881                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    78897888
    78907889/* Line 1806 of yacc.c  */
    7891 #line 2064 "parser.yy"
     7890#line 2063 "parser.yy"
    78927891    {
    78937892                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    79007899
    79017900/* Line 1806 of yacc.c  */
    7902 #line 2070 "parser.yy"
     7901#line 2069 "parser.yy"
    79037902    {
    79047903                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    79117910
    79127911/* Line 1806 of yacc.c  */
    7913 #line 2078 "parser.yy"
     7912#line 2077 "parser.yy"
    79147913    {
    79157914                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    79227921
    79237922/* Line 1806 of yacc.c  */
    7924 #line 2084 "parser.yy"
     7923#line 2083 "parser.yy"
    79257924    {
    79267925                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    79337932
    79347933/* Line 1806 of yacc.c  */
    7935 #line 2092 "parser.yy"
     7934#line 2091 "parser.yy"
    79367935    {
    79377936                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    79447943
    79457944/* Line 1806 of yacc.c  */
    7946 #line 2098 "parser.yy"
     7945#line 2097 "parser.yy"
    79477946    {
    79487947                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    79557954
    79567955/* Line 1806 of yacc.c  */
    7957 #line 2113 "parser.yy"
     7956#line 2112 "parser.yy"
    79587957    { (yyval.en) = new ExpressionNode( build_range( (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    79597958    break;
     
    79627961
    79637962/* Line 1806 of yacc.c  */
    7964 #line 2118 "parser.yy"
     7963#line 2117 "parser.yy"
    79657964    { delete (yyvsp[(3) - (5)].str); }
    79667965    break;
     
    79697968
    79707969/* Line 1806 of yacc.c  */
    7971 #line 2123 "parser.yy"
     7970#line 2122 "parser.yy"
    79727971    { (yyval.decl) = 0; }
    79737972    break;
     
    79767975
    79777976/* Line 1806 of yacc.c  */
    7978 #line 2130 "parser.yy"
     7977#line 2129 "parser.yy"
    79797978    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    79807979    break;
     
    79837982
    79847983/* Line 1806 of yacc.c  */
    7985 #line 2136 "parser.yy"
     7984#line 2135 "parser.yy"
    79867985    { (yyval.decl) = 0; }
    79877986    break;
     
    79907989
    79917990/* Line 1806 of yacc.c  */
    7992 #line 2147 "parser.yy"
     7991#line 2146 "parser.yy"
    79937992    { delete (yyvsp[(3) - (4)].en); }
    79947993    break;
     
    79977996
    79987997/* Line 1806 of yacc.c  */
     7998#line 2150 "parser.yy"
     7999    { delete (yyvsp[(1) - (1)].tok); }
     8000    break;
     8001
     8002  case 557:
     8003
     8004/* Line 1806 of yacc.c  */
    79998005#line 2151 "parser.yy"
    8000     { delete (yyvsp[(1) - (1)].tok); }
    8001     break;
    8002 
    8003   case 557:
     8006    { delete (yyvsp[(1) - (1)].decl); }
     8007    break;
     8008
     8009  case 558:
    80048010
    80058011/* Line 1806 of yacc.c  */
     
    80088014    break;
    80098015
    8010   case 558:
     8016  case 559:
    80118017
    80128018/* Line 1806 of yacc.c  */
     
    80158021    break;
    80168022
    8017   case 559:
    8018 
    8019 /* Line 1806 of yacc.c  */
    8020 #line 2154 "parser.yy"
    8021     { delete (yyvsp[(1) - (1)].decl); }
    8022     break;
    8023 
    80248023  case 560:
    80258024
    80268025/* Line 1806 of yacc.c  */
    8027 #line 2189 "parser.yy"
     8026#line 2188 "parser.yy"
    80288027    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    80298028    break;
     
    80328031
    80338032/* Line 1806 of yacc.c  */
    8034 #line 2192 "parser.yy"
     8033#line 2191 "parser.yy"
    80358034    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    80368035    break;
     
    80398038
    80408039/* Line 1806 of yacc.c  */
    8041 #line 2194 "parser.yy"
     8040#line 2193 "parser.yy"
    80428041    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    80438042    break;
     
    80468045
    80478046/* Line 1806 of yacc.c  */
    8048 #line 2199 "parser.yy"
     8047#line 2198 "parser.yy"
    80498048    {
    80508049                        typedefTable.setNextIdentifier( *(yyvsp[(1) - (1)].tok) );
     
    80568055
    80578056/* Line 1806 of yacc.c  */
    8058 #line 2204 "parser.yy"
     8057#line 2203 "parser.yy"
    80598058    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    80608059    break;
     
    80638062
    80648063/* Line 1806 of yacc.c  */
    8065 #line 2209 "parser.yy"
     8064#line 2208 "parser.yy"
    80668065    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    80678066    break;
     
    80708069
    80718070/* Line 1806 of yacc.c  */
    8072 #line 2211 "parser.yy"
     8071#line 2210 "parser.yy"
    80738072    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    80748073    break;
     
    80778076
    80788077/* Line 1806 of yacc.c  */
    8079 #line 2213 "parser.yy"
     8078#line 2212 "parser.yy"
    80808079    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    80818080    break;
     
    80848083
    80858084/* Line 1806 of yacc.c  */
    8086 #line 2218 "parser.yy"
     8085#line 2217 "parser.yy"
    80878086    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); }
    80888087    break;
     
    80918090
    80928091/* Line 1806 of yacc.c  */
    8093 #line 2220 "parser.yy"
     8092#line 2219 "parser.yy"
    80948093    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    80958094    break;
     
    80988097
    80998098/* Line 1806 of yacc.c  */
    8100 #line 2222 "parser.yy"
     8099#line 2221 "parser.yy"
    81018100    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    81028101    break;
     
    81058104
    81068105/* Line 1806 of yacc.c  */
    8107 #line 2224 "parser.yy"
     8106#line 2223 "parser.yy"
    81088107    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    81098108    break;
     
    81128111
    81138112/* Line 1806 of yacc.c  */
    8114 #line 2229 "parser.yy"
     8113#line 2228 "parser.yy"
    81158114    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    81168115    break;
     
    81198118
    81208119/* Line 1806 of yacc.c  */
    8121 #line 2231 "parser.yy"
     8120#line 2230 "parser.yy"
    81228121    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    81238122    break;
     
    81268125
    81278126/* Line 1806 of yacc.c  */
    8128 #line 2240 "parser.yy"
     8127#line 2239 "parser.yy"
    81298128    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    81308129    break;
     
    81338132
    81348133/* Line 1806 of yacc.c  */
    8135 #line 2243 "parser.yy"
     8134#line 2242 "parser.yy"
    81368135    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    81378136    break;
     
    81408139
    81418140/* Line 1806 of yacc.c  */
    8142 #line 2248 "parser.yy"
     8141#line 2247 "parser.yy"
    81438142    { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); }
    81448143    break;
     
    81478146
    81488147/* Line 1806 of yacc.c  */
    8149 #line 2250 "parser.yy"
     8148#line 2249 "parser.yy"
    81508149    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    81518150    break;
     
    81548153
    81558154/* Line 1806 of yacc.c  */
    8156 #line 2252 "parser.yy"
     8155#line 2251 "parser.yy"
    81578156    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    81588157    break;
     
    81618160
    81628161/* Line 1806 of yacc.c  */
    8163 #line 2257 "parser.yy"
     8162#line 2256 "parser.yy"
    81648163    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    81658164    break;
     
    81688167
    81698168/* Line 1806 of yacc.c  */
    8170 #line 2259 "parser.yy"
     8169#line 2258 "parser.yy"
    81718170    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    81728171    break;
     
    81758174
    81768175/* Line 1806 of yacc.c  */
    8177 #line 2261 "parser.yy"
     8176#line 2260 "parser.yy"
    81788177    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    81798178    break;
     
    81828181
    81838182/* Line 1806 of yacc.c  */
    8184 #line 2266 "parser.yy"
     8183#line 2265 "parser.yy"
    81858184    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    81868185    break;
     
    81898188
    81908189/* Line 1806 of yacc.c  */
    8191 #line 2268 "parser.yy"
     8190#line 2267 "parser.yy"
    81928191    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    81938192    break;
     
    81968195
    81978196/* Line 1806 of yacc.c  */
    8198 #line 2270 "parser.yy"
     8197#line 2269 "parser.yy"
    81998198    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    82008199    break;
     
    82038202
    82048203/* Line 1806 of yacc.c  */
    8205 #line 2285 "parser.yy"
     8204#line 2284 "parser.yy"
    82068205    { (yyval.decl) = (yyvsp[(1) - (4)].decl)->addIdList( (yyvsp[(3) - (4)].decl) ); }
    82078206    break;
     
    82108209
    82118210/* Line 1806 of yacc.c  */
    8212 #line 2287 "parser.yy"
     8211#line 2286 "parser.yy"
    82138212    { (yyval.decl) = (yyvsp[(2) - (6)].decl)->addIdList( (yyvsp[(5) - (6)].decl) ); }
    82148213    break;
     
    82178216
    82188217/* Line 1806 of yacc.c  */
    8219 #line 2289 "parser.yy"
     8218#line 2288 "parser.yy"
    82208219    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    82218220    break;
     
    82248223
    82258224/* Line 1806 of yacc.c  */
    8226 #line 2294 "parser.yy"
     8225#line 2293 "parser.yy"
    82278226    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    82288227    break;
     
    82318230
    82328231/* Line 1806 of yacc.c  */
    8233 #line 2296 "parser.yy"
     8232#line 2295 "parser.yy"
    82348233    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    82358234    break;
     
    82388237
    82398238/* Line 1806 of yacc.c  */
    8240 #line 2298 "parser.yy"
     8239#line 2297 "parser.yy"
    82418240    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    82428241    break;
     
    82458244
    82468245/* Line 1806 of yacc.c  */
    8247 #line 2303 "parser.yy"
     8246#line 2302 "parser.yy"
    82488247    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    82498248    break;
     
    82528251
    82538252/* Line 1806 of yacc.c  */
    8254 #line 2305 "parser.yy"
     8253#line 2304 "parser.yy"
    82558254    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    82568255    break;
     
    82598258
    82608259/* Line 1806 of yacc.c  */
    8261 #line 2307 "parser.yy"
     8260#line 2306 "parser.yy"
    82628261    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    82638262    break;
     
    82668265
    82678266/* Line 1806 of yacc.c  */
    8268 #line 2322 "parser.yy"
     8267#line 2321 "parser.yy"
    82698268    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    82708269    break;
     
    82738272
    82748273/* Line 1806 of yacc.c  */
    8275 #line 2325 "parser.yy"
     8274#line 2324 "parser.yy"
    82768275    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    82778276    break;
     
    82808279
    82818280/* Line 1806 of yacc.c  */
    8282 #line 2327 "parser.yy"
     8281#line 2326 "parser.yy"
    82838282    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    82848283    break;
     
    82878286
    82888287/* Line 1806 of yacc.c  */
    8289 #line 2333 "parser.yy"
     8288#line 2332 "parser.yy"
    82908289    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    82918290    break;
     
    82948293
    82958294/* Line 1806 of yacc.c  */
    8296 #line 2338 "parser.yy"
     8295#line 2337 "parser.yy"
    82978296    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    82988297    break;
     
    83018300
    83028301/* Line 1806 of yacc.c  */
    8303 #line 2340 "parser.yy"
     8302#line 2339 "parser.yy"
    83048303    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    83058304    break;
     
    83088307
    83098308/* Line 1806 of yacc.c  */
    8310 #line 2342 "parser.yy"
     8309#line 2341 "parser.yy"
    83118310    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    83128311    break;
     
    83158314
    83168315/* Line 1806 of yacc.c  */
    8317 #line 2347 "parser.yy"
     8316#line 2346 "parser.yy"
    83188317    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); }
    83198318    break;
     
    83228321
    83238322/* Line 1806 of yacc.c  */
    8324 #line 2349 "parser.yy"
     8323#line 2348 "parser.yy"
    83258324    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    83268325    break;
     
    83298328
    83308329/* Line 1806 of yacc.c  */
    8331 #line 2351 "parser.yy"
     8330#line 2350 "parser.yy"
    83328331    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    83338332    break;
     
    83368335
    83378336/* Line 1806 of yacc.c  */
    8338 #line 2353 "parser.yy"
     8337#line 2352 "parser.yy"
    83398338    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    83408339    break;
     
    83438342
    83448343/* Line 1806 of yacc.c  */
    8345 #line 2358 "parser.yy"
     8344#line 2357 "parser.yy"
    83468345    { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); }
    83478346    break;
     
    83508349
    83518350/* Line 1806 of yacc.c  */
    8352 #line 2360 "parser.yy"
     8351#line 2359 "parser.yy"
    83538352    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    83548353    break;
     
    83578356
    83588357/* Line 1806 of yacc.c  */
    8359 #line 2362 "parser.yy"
     8358#line 2361 "parser.yy"
    83608359    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    83618360    break;
     
    83648363
    83658364/* Line 1806 of yacc.c  */
    8366 #line 2372 "parser.yy"
     8365#line 2371 "parser.yy"
    83678366    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    83688367    break;
     
    83718370
    83728371/* Line 1806 of yacc.c  */
    8373 #line 2375 "parser.yy"
     8372#line 2374 "parser.yy"
    83748373    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    83758374    break;
     
    83788377
    83798378/* Line 1806 of yacc.c  */
    8380 #line 2377 "parser.yy"
     8379#line 2376 "parser.yy"
    83818380    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    83828381    break;
     
    83858384
    83868385/* Line 1806 of yacc.c  */
    8387 #line 2382 "parser.yy"
     8386#line 2381 "parser.yy"
    83888387    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    83898388    break;
     
    83928391
    83938392/* Line 1806 of yacc.c  */
    8394 #line 2384 "parser.yy"
     8393#line 2383 "parser.yy"
    83958394    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    83968395    break;
     
    83998398
    84008399/* Line 1806 of yacc.c  */
    8401 #line 2386 "parser.yy"
     8400#line 2385 "parser.yy"
    84028401    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    84038402    break;
     
    84068405
    84078406/* Line 1806 of yacc.c  */
    8408 #line 2391 "parser.yy"
     8407#line 2390 "parser.yy"
    84098408    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); }
    84108409    break;
     
    84138412
    84148413/* Line 1806 of yacc.c  */
    8415 #line 2393 "parser.yy"
     8414#line 2392 "parser.yy"
    84168415    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    84178416    break;
     
    84208419
    84218420/* Line 1806 of yacc.c  */
    8422 #line 2395 "parser.yy"
     8421#line 2394 "parser.yy"
    84238422    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    84248423    break;
     
    84278426
    84288427/* Line 1806 of yacc.c  */
    8429 #line 2397 "parser.yy"
     8428#line 2396 "parser.yy"
    84308429    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    84318430    break;
     
    84348433
    84358434/* Line 1806 of yacc.c  */
    8436 #line 2402 "parser.yy"
     8435#line 2401 "parser.yy"
    84378436    { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); }
    84388437    break;
     
    84418440
    84428441/* Line 1806 of yacc.c  */
    8443 #line 2404 "parser.yy"
     8442#line 2403 "parser.yy"
    84448443    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    84458444    break;
     
    84488447
    84498448/* Line 1806 of yacc.c  */
    8450 #line 2406 "parser.yy"
     8449#line 2405 "parser.yy"
    84518450    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    84528451    break;
     
    84558454
    84568455/* Line 1806 of yacc.c  */
    8457 #line 2437 "parser.yy"
     8456#line 2436 "parser.yy"
    84588457    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    84598458    break;
     
    84628461
    84638462/* Line 1806 of yacc.c  */
    8464 #line 2440 "parser.yy"
     8463#line 2439 "parser.yy"
    84658464    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    84668465    break;
     
    84698468
    84708469/* Line 1806 of yacc.c  */
    8471 #line 2442 "parser.yy"
     8470#line 2441 "parser.yy"
    84728471    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    84738472    break;
     
    84768475
    84778476/* Line 1806 of yacc.c  */
    8478 #line 2447 "parser.yy"
     8477#line 2446 "parser.yy"
    84798478    {
    84808479                        typedefTable.setNextIdentifier( *(yyvsp[(1) - (1)].tok) );
     
    84868485
    84878486/* Line 1806 of yacc.c  */
    8488 #line 2452 "parser.yy"
     8487#line 2451 "parser.yy"
    84898488    {
    84908489                        typedefTable.setNextIdentifier( *(yyvsp[(1) - (1)].tok) );
     
    84968495
    84978496/* Line 1806 of yacc.c  */
    8498 #line 2460 "parser.yy"
     8497#line 2459 "parser.yy"
    84998498    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    85008499    break;
     
    85038502
    85048503/* Line 1806 of yacc.c  */
    8505 #line 2462 "parser.yy"
     8504#line 2461 "parser.yy"
    85068505    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    85078506    break;
     
    85108509
    85118510/* Line 1806 of yacc.c  */
    8512 #line 2464 "parser.yy"
     8511#line 2463 "parser.yy"
    85138512    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    85148513    break;
     
    85178516
    85188517/* Line 1806 of yacc.c  */
    8519 #line 2469 "parser.yy"
     8518#line 2468 "parser.yy"
    85208519    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); }
    85218520    break;
     
    85248523
    85258524/* Line 1806 of yacc.c  */
    8526 #line 2471 "parser.yy"
     8525#line 2470 "parser.yy"
    85278526    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    85288527    break;
     
    85318530
    85328531/* Line 1806 of yacc.c  */
    8533 #line 2476 "parser.yy"
     8532#line 2475 "parser.yy"
    85348533    { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); }
    85358534    break;
     
    85388537
    85398538/* Line 1806 of yacc.c  */
    8540 #line 2478 "parser.yy"
     8539#line 2477 "parser.yy"
    85418540    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    85428541    break;
     
    85458544
    85468545/* Line 1806 of yacc.c  */
    8547 #line 2493 "parser.yy"
     8546#line 2492 "parser.yy"
    85488547    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    85498548    break;
     
    85528551
    85538552/* Line 1806 of yacc.c  */
    8554 #line 2495 "parser.yy"
     8553#line 2494 "parser.yy"
    85558554    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    85568555    break;
     
    85598558
    85608559/* Line 1806 of yacc.c  */
    8561 #line 2500 "parser.yy"
     8560#line 2499 "parser.yy"
    85628561    { (yyval.decl) = DeclarationNode::newPointer( 0 ); }
    85638562    break;
     
    85668565
    85678566/* Line 1806 of yacc.c  */
    8568 #line 2502 "parser.yy"
     8567#line 2501 "parser.yy"
    85698568    { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); }
    85708569    break;
     
    85738572
    85748573/* Line 1806 of yacc.c  */
    8575 #line 2504 "parser.yy"
     8574#line 2503 "parser.yy"
    85768575    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    85778576    break;
     
    85808579
    85818580/* Line 1806 of yacc.c  */
    8582 #line 2506 "parser.yy"
     8581#line 2505 "parser.yy"
    85838582    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    85848583    break;
     
    85878586
    85888587/* Line 1806 of yacc.c  */
    8589 #line 2508 "parser.yy"
     8588#line 2507 "parser.yy"
    85908589    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    85918590    break;
     
    85948593
    85958594/* Line 1806 of yacc.c  */
    8596 #line 2514 "parser.yy"
     8595#line 2513 "parser.yy"
    85978596    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    85988597    break;
     
    86018600
    86028601/* Line 1806 of yacc.c  */
    8603 #line 2516 "parser.yy"
     8602#line 2515 "parser.yy"
    86048603    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    86058604    break;
     
    86088607
    86098608/* Line 1806 of yacc.c  */
    8610 #line 2518 "parser.yy"
     8609#line 2517 "parser.yy"
    86118610    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    86128611    break;
     
    86158614
    86168615/* Line 1806 of yacc.c  */
    8617 #line 2523 "parser.yy"
    8618     { (yyval.decl) = DeclarationNode::newFunction( nullptr, nullptr, (yyvsp[(3) - (5)].decl), nullptr ); }
     8616#line 2522 "parser.yy"
     8617    { (yyval.decl) = DeclarationNode::newFunction( 0, 0, (yyvsp[(3) - (5)].decl), 0 ); }
    86198618    break;
    86208619
     
    86228621
    86238622/* Line 1806 of yacc.c  */
    8624 #line 2525 "parser.yy"
     8623#line 2524 "parser.yy"
    86258624    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    86268625    break;
     
    86298628
    86308629/* Line 1806 of yacc.c  */
    8631 #line 2527 "parser.yy"
     8630#line 2526 "parser.yy"
    86328631    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    86338632    break;
     
    86368635
    86378636/* Line 1806 of yacc.c  */
    8638 #line 2533 "parser.yy"
     8637#line 2532 "parser.yy"
    86398638    { (yyval.decl) = DeclarationNode::newArray( 0, 0, false ); }
    86408639    break;
     
    86438642
    86448643/* Line 1806 of yacc.c  */
    8645 #line 2535 "parser.yy"
     8644#line 2534 "parser.yy"
    86468645    { (yyval.decl) = DeclarationNode::newArray( 0, 0, false )->addArray( (yyvsp[(3) - (3)].decl) ); }
    86478646    break;
     
    86508649
    86518650/* Line 1806 of yacc.c  */
    8652 #line 2541 "parser.yy"
     8651#line 2540 "parser.yy"
    86538652    { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(3) - (5)].en), 0, false ); }
    86548653    break;
     
    86578656
    86588657/* Line 1806 of yacc.c  */
    8659 #line 2543 "parser.yy"
     8658#line 2542 "parser.yy"
    86608659    { (yyval.decl) = DeclarationNode::newVarArray( 0 ); }
    86618660    break;
     
    86648663
    86658664/* Line 1806 of yacc.c  */
    8666 #line 2545 "parser.yy"
     8665#line 2544 "parser.yy"
    86678666    { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addArray( DeclarationNode::newArray( (yyvsp[(4) - (6)].en), 0, false ) ); }
    86688667    break;
     
    86718670
    86728671/* Line 1806 of yacc.c  */
    8673 #line 2547 "parser.yy"
     8672#line 2546 "parser.yy"
    86748673    { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addArray( DeclarationNode::newVarArray( 0 ) ); }
    86758674    break;
     
    86788677
    86798678/* Line 1806 of yacc.c  */
    8680 #line 2562 "parser.yy"
     8679#line 2561 "parser.yy"
    86818680    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    86828681    break;
     
    86858684
    86868685/* Line 1806 of yacc.c  */
    8687 #line 2564 "parser.yy"
     8686#line 2563 "parser.yy"
    86888687    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    86898688    break;
     
    86928691
    86938692/* Line 1806 of yacc.c  */
    8694 #line 2569 "parser.yy"
     8693#line 2568 "parser.yy"
    86958694    { (yyval.decl) = DeclarationNode::newPointer( 0 ); }
    86968695    break;
     
    86998698
    87008699/* Line 1806 of yacc.c  */
    8701 #line 2571 "parser.yy"
     8700#line 2570 "parser.yy"
    87028701    { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); }
    87038702    break;
     
    87068705
    87078706/* Line 1806 of yacc.c  */
    8708 #line 2573 "parser.yy"
     8707#line 2572 "parser.yy"
    87098708    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    87108709    break;
     
    87138712
    87148713/* Line 1806 of yacc.c  */
    8715 #line 2575 "parser.yy"
     8714#line 2574 "parser.yy"
    87168715    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    87178716    break;
     
    87208719
    87218720/* Line 1806 of yacc.c  */
    8722 #line 2577 "parser.yy"
     8721#line 2576 "parser.yy"
    87238722    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    87248723    break;
     
    87278726
    87288727/* Line 1806 of yacc.c  */
    8729 #line 2583 "parser.yy"
     8728#line 2582 "parser.yy"
    87308729    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    87318730    break;
     
    87348733
    87358734/* Line 1806 of yacc.c  */
    8736 #line 2585 "parser.yy"
     8735#line 2584 "parser.yy"
    87378736    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    87388737    break;
     
    87418740
    87428741/* Line 1806 of yacc.c  */
    8743 #line 2587 "parser.yy"
     8742#line 2586 "parser.yy"
    87448743    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    87458744    break;
     
    87488747
    87498748/* Line 1806 of yacc.c  */
    8750 #line 2592 "parser.yy"
    8751     { (yyval.decl) = DeclarationNode::newFunction( nullptr, nullptr, (yyvsp[(3) - (5)].decl), nullptr ); }
     8749#line 2591 "parser.yy"
     8750    { (yyval.decl) = DeclarationNode::newFunction( 0, 0, (yyvsp[(3) - (5)].decl), 0 ); }
    87528751    break;
    87538752
     
    87558754
    87568755/* Line 1806 of yacc.c  */
    8757 #line 2594 "parser.yy"
     8756#line 2593 "parser.yy"
    87588757    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    87598758    break;
     
    87628761
    87638762/* Line 1806 of yacc.c  */
    8764 #line 2596 "parser.yy"
     8763#line 2595 "parser.yy"
    87658764    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    87668765    break;
     
    87698768
    87708769/* Line 1806 of yacc.c  */
    8771 #line 2603 "parser.yy"
     8770#line 2602 "parser.yy"
    87728771    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); }
    87738772    break;
     
    87768775
    87778776/* Line 1806 of yacc.c  */
    8778 #line 2614 "parser.yy"
     8777#line 2613 "parser.yy"
    87798778    { (yyval.decl) = DeclarationNode::newArray( 0, 0, false ); }
    87808779    break;
     
    87838782
    87848783/* Line 1806 of yacc.c  */
    8785 #line 2617 "parser.yy"
     8784#line 2616 "parser.yy"
    87868785    { (yyval.decl) = DeclarationNode::newVarArray( (yyvsp[(3) - (6)].decl) ); }
    87878786    break;
     
    87908789
    87918790/* Line 1806 of yacc.c  */
    8792 #line 2619 "parser.yy"
     8791#line 2618 "parser.yy"
    87938792    { (yyval.decl) = DeclarationNode::newArray( 0, (yyvsp[(3) - (5)].decl), false ); }
    87948793    break;
     
    87978796
    87988797/* Line 1806 of yacc.c  */
    8799 #line 2622 "parser.yy"
     8798#line 2621 "parser.yy"
    88008799    { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), false ); }
    88018800    break;
     
    88048803
    88058804/* Line 1806 of yacc.c  */
    8806 #line 2624 "parser.yy"
     8805#line 2623 "parser.yy"
    88078806    { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(4) - (7)].decl), true ); }
    88088807    break;
     
    88118810
    88128811/* Line 1806 of yacc.c  */
    8813 #line 2626 "parser.yy"
     8812#line 2625 "parser.yy"
    88148813    { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(3) - (7)].decl), true ); }
    88158814    break;
     
    88188817
    88198818/* Line 1806 of yacc.c  */
    8820 #line 2640 "parser.yy"
     8819#line 2639 "parser.yy"
    88218820    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    88228821    break;
     
    88258824
    88268825/* Line 1806 of yacc.c  */
    8827 #line 2642 "parser.yy"
     8826#line 2641 "parser.yy"
    88288827    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    88298828    break;
     
    88328831
    88338832/* Line 1806 of yacc.c  */
    8834 #line 2647 "parser.yy"
     8833#line 2646 "parser.yy"
    88358834    { (yyval.decl) = DeclarationNode::newPointer( 0 ); }
    88368835    break;
     
    88398838
    88408839/* Line 1806 of yacc.c  */
    8841 #line 2649 "parser.yy"
     8840#line 2648 "parser.yy"
    88428841    { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); }
    88438842    break;
     
    88468845
    88478846/* Line 1806 of yacc.c  */
    8848 #line 2651 "parser.yy"
     8847#line 2650 "parser.yy"
    88498848    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    88508849    break;
     
    88538852
    88548853/* Line 1806 of yacc.c  */
    8855 #line 2653 "parser.yy"
     8854#line 2652 "parser.yy"
    88568855    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    88578856    break;
     
    88608859
    88618860/* Line 1806 of yacc.c  */
    8862 #line 2655 "parser.yy"
     8861#line 2654 "parser.yy"
    88638862    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    88648863    break;
     
    88678866
    88688867/* Line 1806 of yacc.c  */
    8869 #line 2661 "parser.yy"
     8868#line 2660 "parser.yy"
    88708869    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    88718870    break;
     
    88748873
    88758874/* Line 1806 of yacc.c  */
    8876 #line 2663 "parser.yy"
     8875#line 2662 "parser.yy"
    88778876    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    88788877    break;
     
    88818880
    88828881/* Line 1806 of yacc.c  */
    8883 #line 2665 "parser.yy"
     8882#line 2664 "parser.yy"
    88848883    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    88858884    break;
     
    88888887
    88898888/* Line 1806 of yacc.c  */
    8890 #line 2670 "parser.yy"
     8889#line 2669 "parser.yy"
    88918890    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    88928891    break;
     
    88958894
    88968895/* Line 1806 of yacc.c  */
    8897 #line 2672 "parser.yy"
     8896#line 2671 "parser.yy"
    88988897    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    88998898    break;
     
    89028901
    89038902/* Line 1806 of yacc.c  */
    8904 #line 2682 "parser.yy"
     8903#line 2681 "parser.yy"
    89058904    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    89068905    break;
     
    89098908
    89108909/* Line 1806 of yacc.c  */
    8911 #line 2692 "parser.yy"
     8910#line 2691 "parser.yy"
    89128911    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
    89138912    break;
     
    89168915
    89178916/* Line 1806 of yacc.c  */
    8918 #line 2694 "parser.yy"
     8917#line 2693 "parser.yy"
    89198918    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); }
    89208919    break;
     
    89238922
    89248923/* Line 1806 of yacc.c  */
    8925 #line 2696 "parser.yy"
     8924#line 2695 "parser.yy"
    89268925    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
    89278926    break;
     
    89308929
    89318930/* Line 1806 of yacc.c  */
    8932 #line 2698 "parser.yy"
     8931#line 2697 "parser.yy"
    89338932    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); }
    89348933    break;
     
    89378936
    89388937/* Line 1806 of yacc.c  */
    8939 #line 2700 "parser.yy"
     8938#line 2699 "parser.yy"
    89408939    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
    89418940    break;
     
    89448943
    89458944/* Line 1806 of yacc.c  */
    8946 #line 2702 "parser.yy"
     8945#line 2701 "parser.yy"
    89478946    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); }
    89488947    break;
     
    89518950
    89528951/* Line 1806 of yacc.c  */
    8953 #line 2709 "parser.yy"
     8952#line 2708 "parser.yy"
    89548953    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    89558954    break;
     
    89588957
    89598958/* Line 1806 of yacc.c  */
    8960 #line 2711 "parser.yy"
     8959#line 2710 "parser.yy"
    89618960    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }
    89628961    break;
     
    89658964
    89668965/* Line 1806 of yacc.c  */
    8967 #line 2713 "parser.yy"
     8966#line 2712 "parser.yy"
    89688967    { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    89698968    break;
     
    89728971
    89738972/* Line 1806 of yacc.c  */
    8974 #line 2715 "parser.yy"
     8973#line 2714 "parser.yy"
    89758974    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( (yyvsp[(2) - (3)].decl) )->addNewArray( (yyvsp[(1) - (3)].decl) ); }
    89768975    break;
     
    89798978
    89808979/* Line 1806 of yacc.c  */
    8981 #line 2717 "parser.yy"
     8980#line 2716 "parser.yy"
    89828981    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }
    89838982    break;
     
    89868985
    89878986/* Line 1806 of yacc.c  */
    8988 #line 2719 "parser.yy"
     8987#line 2718 "parser.yy"
    89898988    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    89908989    break;
     
    89938992
    89948993/* Line 1806 of yacc.c  */
    8995 #line 2721 "parser.yy"
     8994#line 2720 "parser.yy"
    89968995    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }
    89978996    break;
     
    90008999
    90019000/* Line 1806 of yacc.c  */
    9002 #line 2723 "parser.yy"
     9001#line 2722 "parser.yy"
    90039002    { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    90049003    break;
     
    90079006
    90089007/* Line 1806 of yacc.c  */
    9009 #line 2725 "parser.yy"
     9008#line 2724 "parser.yy"
    90109009    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( (yyvsp[(2) - (3)].decl) )->addNewArray( (yyvsp[(1) - (3)].decl) ); }
    90119010    break;
     
    90149013
    90159014/* Line 1806 of yacc.c  */
    9016 #line 2727 "parser.yy"
     9015#line 2726 "parser.yy"
    90179016    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }
    90189017    break;
     
    90219020
    90229021/* Line 1806 of yacc.c  */
    9023 #line 2732 "parser.yy"
     9022#line 2731 "parser.yy"
    90249023    { (yyval.decl) = DeclarationNode::newVarArray( (yyvsp[(3) - (6)].decl) ); }
    90259024    break;
     
    90289027
    90299028/* Line 1806 of yacc.c  */
    9030 #line 2734 "parser.yy"
     9029#line 2733 "parser.yy"
    90319030    { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), false ); }
    90329031    break;
     
    90359034
    90369035/* Line 1806 of yacc.c  */
    9037 #line 2739 "parser.yy"
     9036#line 2738 "parser.yy"
    90389037    { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), true ); }
    90399038    break;
     
    90429041
    90439042/* Line 1806 of yacc.c  */
    9044 #line 2741 "parser.yy"
     9043#line 2740 "parser.yy"
    90459044    { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(4) - (7)].decl)->addQualifiers( (yyvsp[(3) - (7)].decl) ), true ); }
    90469045    break;
     
    90499048
    90509049/* Line 1806 of yacc.c  */
    9051 #line 2768 "parser.yy"
     9050#line 2767 "parser.yy"
    90529051    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    90539052    break;
     
    90569055
    90579056/* Line 1806 of yacc.c  */
    9058 #line 2779 "parser.yy"
     9057#line 2778 "parser.yy"
    90599058    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
    90609059    break;
     
    90639062
    90649063/* Line 1806 of yacc.c  */
    9065 #line 2781 "parser.yy"
     9064#line 2780 "parser.yy"
    90669065    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); }
    90679066    break;
     
    90709069
    90719070/* Line 1806 of yacc.c  */
    9072 #line 2783 "parser.yy"
     9071#line 2782 "parser.yy"
    90739072    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
    90749073    break;
     
    90779076
    90789077/* Line 1806 of yacc.c  */
    9079 #line 2785 "parser.yy"
     9078#line 2784 "parser.yy"
    90809079    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); }
    90819080    break;
     
    90849083
    90859084/* Line 1806 of yacc.c  */
    9086 #line 2787 "parser.yy"
     9085#line 2786 "parser.yy"
    90879086    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
    90889087    break;
     
    90919090
    90929091/* Line 1806 of yacc.c  */
    9093 #line 2789 "parser.yy"
     9092#line 2788 "parser.yy"
    90949093    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); }
    90959094    break;
     
    90989097
    90999098/* Line 1806 of yacc.c  */
    9100 #line 2796 "parser.yy"
    9101     { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( nullptr, nullptr, false ) ); }
     9099#line 2795 "parser.yy"
     9100    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    91029101    break;
    91039102
     
    91059104
    91069105/* Line 1806 of yacc.c  */
    9107 #line 2798 "parser.yy"
    9108     { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( nullptr, nullptr, false ) ); }
     9106#line 2797 "parser.yy"
     9107    { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    91099108    break;
    91109109
     
    91129111
    91139112/* Line 1806 of yacc.c  */
    9114 #line 2800 "parser.yy"
     9113#line 2799 "parser.yy"
    91159114    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }
    91169115    break;
     
    91199118
    91209119/* Line 1806 of yacc.c  */
    9121 #line 2802 "parser.yy"
    9122     { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( nullptr, nullptr, false ) ); }
     9120#line 2801 "parser.yy"
     9121    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    91239122    break;
    91249123
     
    91269125
    91279126/* Line 1806 of yacc.c  */
    9128 #line 2804 "parser.yy"
    9129     { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( nullptr, nullptr, false ) ); }
     9127#line 2803 "parser.yy"
     9128    { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    91309129    break;
    91319130
     
    91339132
    91349133/* Line 1806 of yacc.c  */
    9135 #line 2806 "parser.yy"
     9134#line 2805 "parser.yy"
    91369135    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }
    91379136    break;
     
    91409139
    91419140/* Line 1806 of yacc.c  */
    9142 #line 2811 "parser.yy"
     9141#line 2810 "parser.yy"
    91439142    { (yyval.decl) = DeclarationNode::newTuple( (yyvsp[(3) - (5)].decl) ); }
    91449143    break;
     
    91479146
    91489147/* Line 1806 of yacc.c  */
    9149 #line 2816 "parser.yy"
    9150     { (yyval.decl) = DeclarationNode::newFunction( nullptr, DeclarationNode::newTuple( nullptr ), (yyvsp[(4) - (5)].decl), nullptr ); }
     9148#line 2815 "parser.yy"
     9149    { (yyval.decl) = DeclarationNode::newFunction( 0, DeclarationNode::newTuple( 0 ), (yyvsp[(4) - (5)].decl), 0 ); }
    91519150    break;
    91529151
     
    91549153
    91559154/* Line 1806 of yacc.c  */
    9156 #line 2818 "parser.yy"
    9157     { (yyval.decl) = DeclarationNode::newFunction( nullptr, (yyvsp[(1) - (6)].decl), (yyvsp[(4) - (6)].decl), nullptr ); }
     9155#line 2817 "parser.yy"
     9156    { (yyval.decl) = DeclarationNode::newFunction( 0, (yyvsp[(1) - (6)].decl), (yyvsp[(4) - (6)].decl), 0 ); }
    91589157    break;
    91599158
     
    91619160
    91629161/* Line 1806 of yacc.c  */
    9163 #line 2820 "parser.yy"
    9164     { (yyval.decl) = DeclarationNode::newFunction( nullptr, (yyvsp[(1) - (6)].decl), (yyvsp[(4) - (6)].decl), nullptr ); }
     9162#line 2819 "parser.yy"
     9163    { (yyval.decl) = DeclarationNode::newFunction( 0, (yyvsp[(1) - (6)].decl), (yyvsp[(4) - (6)].decl), 0 ); }
    91659164    break;
    91669165
     
    91689167
    91699168/* Line 1806 of yacc.c  */
    9170 #line 2844 "parser.yy"
     9169#line 2843 "parser.yy"
    91719170    { (yyval.en) = 0; }
    91729171    break;
     
    91759174
    91769175/* Line 1806 of yacc.c  */
    9177 #line 2846 "parser.yy"
     9176#line 2845 "parser.yy"
    91789177    { (yyval.en) = (yyvsp[(2) - (2)].en); }
    91799178    break;
     
    91829181
    91839182/* Line 1806 of yacc.c  */
    9184 #line 9185 "Parser/parser.cc"
     9183#line 9184 "Parser/parser.cc"
    91859184      default: break;
    91869185    }
     
    94139412
    94149413/* Line 2067 of yacc.c  */
    9415 #line 2849 "parser.yy"
     9414#line 2848 "parser.yy"
    94169415
    94179416// ----end of grammar----
     
    94209419
    94219420void yyerror( const char * ) {
    9422         cout << "Error ";
     9421        std::cout << "Error ";
    94239422        if ( yyfilename ) {
    9424                 cout << "in file " << yyfilename << " ";
     9423                std::cout << "in file " << yyfilename << " ";
    94259424        } // if
    9426         cout << "at line " << yylineno << " reading token \"" << (yytext[0] == '\0' ? "EOF" : yytext) << "\"" << endl;
     9425        std::cout << "at line " << yylineno << " reading token \"" << (yytext[0] == '\0' ? "EOF" : yytext) << "\"" << std::endl;
    94279426}
    94289427
  • src/Parser/parser.h

    raee7e35 r7b69174  
    262262
    263263/* Line 2068 of yacc.c  */
    264 #line 116 "parser.yy"
     264#line 115 "parser.yy"
    265265
    266266        Token tok;
  • src/Parser/parser.yy

    raee7e35 r7b69174  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Sep 24 12:16:53 2016
    13 // Update Count     : 1992
     12// Last Modified On : Mon Sep 12 17:29:45 2016
     13// Update Count     : 1969
    1414//
    1515
     
    5454#include "TypeData.h"
    5555#include "LinkageSpec.h"
    56 using namespace std;
    5756
    5857extern DeclarationNode * parseTree;
     
    6059extern TypedefTable typedefTable;
    6160
    62 stack< LinkageSpec::Spec > linkageStack;
    63 
    64 void appendStr( string *to, string *from ) {
     61std::stack< LinkageSpec::Spec > linkageStack;
     62
     63void appendStr( std::string *to, std::string *from ) {
    6564        // "abc" "def" "ghi" => "abcdefghi", remove new text from quotes and insert before last quote in old string.
    6665        to->insert( to->length() - 1, from->substr( 1, from->length() - 2 ) );
     
    360359                { $$ = $2; }
    361360        | '(' compound_statement ')'                                            // GCC, lambda expression
    362                 { $$ = new ExpressionNode( build_valexpr( $2 ) ); }
     361        { $$ = new ExpressionNode( build_valexpr( $2 ) ); }
    363362        ;
    364363
     
    390389                {
    391390                        Token fn;
    392                         fn.str = new std::string( "?{}" );                      // location undefined - use location of '{'?
     391                        fn.str = new std::string( "?{}" ); // location undefined - use location of '{'?
    393392                        $$ = new ExpressionNode( new ConstructorExpr( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( $1 )->set_last( $3 ) ) ) );
    394393                }
     
    667666                {
    668667                        Token fn;
    669                         fn.str = new string( "^?{}" );                          // location undefined
     668                        fn.str = new std::string( "^?{}" ); // location undefined
    670669                        $$ = new StatementNode( build_expr( new ExpressionNode( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( $2 )->set_last( $4 ) ) ) ) );
    671670                }
     
    897896                { $$ = new StatementNode( build_catch( $5, $8 ) ); }
    898897        | handler_clause CATCH '(' push push exception_declaration pop ')' compound_statement pop
    899                 { $$ = (StatementNode *)$1->set_last( new StatementNode( build_catch( $6, $9 ) ) ); }
     898        { $$ = (StatementNode *)$1->set_last( new StatementNode( build_catch( $6, $9 ) ) ); }
    900899        | CATCHRESUME '(' push push exception_declaration pop ')' compound_statement pop
    901900                { $$ = new StatementNode( build_catch( $5, $8 ) ); }
     
    969968                { $$ = new ExpressionNode( build_asmexpr( 0, $1, $3 ) ); }
    970969        | '[' constant_expression ']' string_literal '(' constant_expression ')'
    971                 { $$ = new ExpressionNode( build_asmexpr( $2, $4, $6 ) ); }
     970        { $$ = new ExpressionNode( build_asmexpr( $2, $4, $6 ) ); }
    972971        ;
    973972
     
    14681467aggregate_name:
    14691468        aggregate_key '{' field_declaration_list '}'
    1470                 { $$ = DeclarationNode::newAggregate( $1, nullptr, nullptr, $3, true ); }
     1469                { $$ = DeclarationNode::newAggregate( $1, 0, 0, $3, true ); }
    14711470        | aggregate_key no_attr_identifier_or_type_name
    14721471                {
    14731472                        typedefTable.makeTypedef( *$2 );
    1474                         $$ = DeclarationNode::newAggregate( $1, $2, nullptr, nullptr, false );
     1473                        $$ = DeclarationNode::newAggregate( $1, $2, 0, 0, false );
    14751474                }
    14761475        | aggregate_key no_attr_identifier_or_type_name
    14771476                { typedefTable.makeTypedef( *$2 ); }
    14781477                '{' field_declaration_list '}'
    1479                 { $$ = DeclarationNode::newAggregate( $1, $2, nullptr, $5, true ); }
     1478                { $$ = DeclarationNode::newAggregate( $1, $2, 0, $5, true ); }
    14801479        | aggregate_key '(' type_name_list ')' '{' field_declaration_list '}' // CFA
    1481                 { $$ = DeclarationNode::newAggregate( $1, nullptr, $3, $6, false ); }
     1480                { $$ = DeclarationNode::newAggregate( $1, 0, $3, $6, false ); }
    14821481        | aggregate_key typegen_name                                            // CFA, S/R conflict
    14831482                { $$ = $2; }
     
    15601559enum_name:
    15611560        enum_key '{' enumerator_list comma_opt '}'
    1562                 { $$ = DeclarationNode::newEnum( nullptr, $3 ); }
     1561                { $$ = DeclarationNode::newEnum( 0, $3 ); }
    15631562        | enum_key no_attr_identifier_or_type_name
    15641563                {
     
    25212520abstract_function:
    25222521        '(' push parameter_type_list_opt pop ')'                        // empty parameter list OBSOLESCENT (see 3)
    2523                 { $$ = DeclarationNode::newFunction( nullptr, nullptr, $3, nullptr ); }
     2522                { $$ = DeclarationNode::newFunction( 0, 0, $3, 0 ); }
    25242523        | '(' abstract_ptr ')' '(' push parameter_type_list_opt pop ')' // empty parameter list OBSOLESCENT (see 3)
    25252524                { $$ = $2->addParamList( $6 ); }
     
    25902589abstract_parameter_function:
    25912590        '(' push parameter_type_list_opt pop ')'                        // empty parameter list OBSOLESCENT (see 3)
    2592                 { $$ = DeclarationNode::newFunction( nullptr, nullptr, $3, nullptr ); }
     2591                { $$ = DeclarationNode::newFunction( 0, 0, $3, 0 ); }
    25932592        | '(' abstract_parameter_ptr ')' '(' push parameter_type_list_opt pop ')' // empty parameter list OBSOLESCENT (see 3)
    25942593                { $$ = $2->addParamList( $6 ); }
     
    27942793                // empty (void) function return type.
    27952794        '[' ']' type_specifier
    2796                 { $$ = $3->addNewArray( DeclarationNode::newArray( nullptr, nullptr, false ) ); }
     2795                { $$ = $3->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    27972796        | '[' ']' multi_array_dimension type_specifier
    2798                 { $$ = $4->addNewArray( $3 )->addNewArray( DeclarationNode::newArray( nullptr, nullptr, false ) ); }
     2797                { $$ = $4->addNewArray( $3 )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    27992798        | multi_array_dimension type_specifier
    28002799                { $$ = $2->addNewArray( $1 ); }
    28012800        | '[' ']' new_abstract_ptr
    2802                 { $$ = $3->addNewArray( DeclarationNode::newArray( nullptr, nullptr, false ) ); }
     2801                { $$ = $3->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    28032802        | '[' ']' multi_array_dimension new_abstract_ptr
    2804                 { $$ = $4->addNewArray( $3 )->addNewArray( DeclarationNode::newArray( nullptr, nullptr, false ) ); }
     2803                { $$ = $4->addNewArray( $3 )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    28052804        | multi_array_dimension new_abstract_ptr
    28062805                { $$ = $2->addNewArray( $1 ); }
     
    28142813new_abstract_function:                                                                  // CFA
    28152814        '[' ']' '(' new_parameter_type_list_opt ')'
    2816                 { $$ = DeclarationNode::newFunction( nullptr, DeclarationNode::newTuple( nullptr ), $4, nullptr ); }
     2815                { $$ = DeclarationNode::newFunction( 0, DeclarationNode::newTuple( 0 ), $4, 0 ); }
    28172816        | new_abstract_tuple '(' push new_parameter_type_list_opt pop ')'
    2818                 { $$ = DeclarationNode::newFunction( nullptr, $1, $4, nullptr ); }
     2817                { $$ = DeclarationNode::newFunction( 0, $1, $4, 0 ); }
    28192818        | new_function_return '(' push new_parameter_type_list_opt pop ')'
    2820                 { $$ = DeclarationNode::newFunction( nullptr, $1, $4, nullptr ); }
     2819                { $$ = DeclarationNode::newFunction( 0, $1, $4, 0 ); }
    28212820        ;
    28222821
     
    28532852
    28542853void yyerror( const char * ) {
    2855         cout << "Error ";
     2854        std::cout << "Error ";
    28562855        if ( yyfilename ) {
    2857                 cout << "in file " << yyfilename << " ";
     2856                std::cout << "in file " << yyfilename << " ";
    28582857        } // if
    2859         cout << "at line " << yylineno << " reading token \"" << (yytext[0] == '\0' ? "EOF" : yytext) << "\"" << endl;
     2858        std::cout << "at line " << yylineno << " reading token \"" << (yytext[0] == '\0' ? "EOF" : yytext) << "\"" << std::endl;
    28602859}
    28612860
  • src/ResolvExpr/AdjustExprType.cc

    raee7e35 r7b69174  
    3737                virtual Type* mutate( TupleType *tupleType );
    3838                virtual Type* mutate( VarArgsType *varArgsType );
    39                 virtual Type* mutate( ZeroType *zeroType );
    40                 virtual Type* mutate( OneType *oneType );
    4139
    4240                const TypeEnvironment &env;
     
    119117                return varArgsType;
    120118        }
    121 
    122         Type *AdjustExprType::mutate( ZeroType *zeroType ) {
    123                 return zeroType;
    124         }
    125 
    126         Type *AdjustExprType::mutate( OneType *oneType ) {
    127                 return oneType;
    128         }
    129119} // namespace ResolvExpr
    130120
  • src/ResolvExpr/CommonType.cc

    raee7e35 r7b69174  
    3939                virtual void visit( TupleType *tupleType );
    4040                virtual void visit( VarArgsType *varArgsType );
    41                 virtual void visit( ZeroType *zeroType );
    42                 virtual void visit( OneType *oneType );
    4341
    4442                template< typename RefType > void handleRefType( RefType *inst, Type *other );
     
    136134                                result = new BasicType( basicType->get_qualifiers() + otherBasic->get_qualifiers(), newType );
    137135                        } // if
    138                 } else if ( dynamic_cast< EnumInstType * > ( type2 ) || dynamic_cast< ZeroType* >( type2 ) || dynamic_cast< OneType* >( type2 ) ) {
    139                         // use signed int in lieu of the enum/zero/one type
     136                } else if ( EnumInstType *enumInstType = dynamic_cast< EnumInstType * > ( type2 ) ) {
     137                        // use signed int in lieu of the enum type
    140138                        BasicType::Kind newType = combinedType[ basicType->get_kind() ][ BasicType::SignedInt ];
    141                         if ( ( ( newType == basicType->get_kind() && basicType->get_qualifiers() >= type2->get_qualifiers() ) || widenFirst ) && ( ( newType != basicType->get_kind() && basicType->get_qualifiers() <= type2->get_qualifiers() ) || widenSecond ) ) {
    142                                 result = new BasicType( basicType->get_qualifiers() + type2->get_qualifiers(), newType );
     139                        if ( ( ( newType == basicType->get_kind() && basicType->get_qualifiers() >= enumInstType->get_qualifiers() ) || widenFirst ) && ( ( newType != basicType->get_kind() && basicType->get_qualifiers() <= enumInstType->get_qualifiers() ) || widenSecond ) ) {
     140                                result = new BasicType( basicType->get_qualifiers() + enumInstType->get_qualifiers(), newType );
    143141                        } // if
    144142                } // if
     
    173171                                otherPointer->get_base()->get_qualifiers() = tq2;
    174172                        } // if
    175                 } else if ( widenSecond && dynamic_cast< ZeroType* >( type2 ) ) {
    176                         result = pointerType->clone();
    177                         result->get_qualifiers() += type2->get_qualifiers();
    178173                } // if
    179174        }
     
    195190
    196191        void CommonType::visit( EnumInstType *enumInstType ) {
    197                 if ( dynamic_cast< BasicType * >( type2 ) || dynamic_cast< ZeroType* >( type2 ) || dynamic_cast< OneType* >( type2 ) ) {
     192                if ( dynamic_cast< BasicType * >( type2 ) ) {
    198193                        // reuse BasicType, EnumInstType code by swapping type2 with enumInstType
    199194                        Type * temp = type2;
     
    235230        void CommonType::visit( VarArgsType *varArgsType ) {
    236231        }
    237 
    238         void CommonType::visit( ZeroType *zeroType ) {
    239                 if ( widenFirst ) {
    240                         if ( dynamic_cast< BasicType* >( type2 ) || dynamic_cast< PointerType* >( type2 ) || dynamic_cast< EnumInstType* >( type2 ) ) {
    241                                 if ( widenSecond || zeroType->get_qualifiers() <= type2->get_qualifiers() ) {
    242                                         result = type2->clone();
    243                                         result->get_qualifiers() += zeroType->get_qualifiers();
    244                                 }
    245                         }
    246                 }
    247         }
    248 
    249         void CommonType::visit( OneType *oneType ) {
    250                 if ( widenFirst ) {
    251                         if ( dynamic_cast< BasicType* >( type2 ) || dynamic_cast< EnumInstType* >( type2 ) ) {
    252                                 if ( widenSecond || oneType->get_qualifiers() <= type2->get_qualifiers() ) {
    253                                         result = type2->clone();
    254                                         result->get_qualifiers() += oneType->get_qualifiers();
    255                                 }
    256                         }
    257                 }
    258         }
    259232} // namespace ResolvExpr
    260233
  • src/ResolvExpr/ConversionCost.cc

    raee7e35 r7b69174  
    160160                        // xxx - not positive this is correct, but appears to allow casting int => enum
    161161                        cost = Cost( 1, 0, 0 );
    162                 } else if ( dynamic_cast< ZeroType* >( dest ) != nullptr || dynamic_cast< OneType* >( dest ) != nullptr ) {
    163                         cost = Cost( 1, 0, 0 );
    164                 } // if
     162    } // if
    165163        }
    166164
     
    177175                                } // if
    178176                        } // if
    179                 } else if ( dynamic_cast< ZeroType* >( dest ) != nullptr || dynamic_cast< OneType* >( dest ) != nullptr ) {
    180                         cost = Cost( 1, 0, 0 );
    181177                } // if
    182178        }
     
    260256                }
    261257        }
    262 
    263         void ConversionCost::visit(ZeroType *zeroType) {
    264                 if ( dynamic_cast< ZeroType* >( dest ) ) {
    265                         cost = Cost::zero;
    266                 } else if ( BasicType *destAsBasic = dynamic_cast< BasicType* >( dest ) ) {
    267                         // copied from visit(BasicType*) for signed int, but +1 for safe conversions
    268                         int tableResult = costMatrix[ BasicType::SignedInt ][ destAsBasic->get_kind() ];
    269                         if ( tableResult == -1 ) {
    270                                 cost = Cost( 1, 0, 0 );
    271                         } else {
    272                                 cost = Cost( 0, 0, tableResult + 1 );
    273                         }
    274                 } else if ( dynamic_cast< PointerType* >( dest ) ) {
    275                         cost = Cost( 0, 0, 1 );
    276                 }
    277         }
    278 
    279         void ConversionCost::visit(OneType *oneType) {
    280                 if ( dynamic_cast< OneType* >( dest ) ) {
    281                         cost = Cost::zero;
    282                 } else if ( BasicType *destAsBasic = dynamic_cast< BasicType* >( dest ) ) {
    283                         // copied from visit(BasicType*) for signed int, but +1 for safe conversions
    284                         int tableResult = costMatrix[ BasicType::SignedInt ][ destAsBasic->get_kind() ];
    285                         if ( tableResult == -1 ) {
    286                                 cost = Cost( 1, 0, 0 );
    287                         } else {
    288                                 cost = Cost( 0, 0, tableResult + 1 );
    289                         }
    290                 }
    291         }
    292258} // namespace ResolvExpr
    293259
  • src/ResolvExpr/ConversionCost.h

    raee7e35 r7b69174  
    4141                virtual void visit(TupleType *tupleType);
    4242                virtual void visit(VarArgsType *varArgsType);
    43                 virtual void visit(ZeroType *zeroType);
    44                 virtual void visit(OneType *oneType);
    4543          protected:
    4644                Type *dest;
  • src/ResolvExpr/PtrsAssignable.cc

    raee7e35 r7b69174  
    3939                virtual void visit( TupleType *tupleType );
    4040                virtual void visit( VarArgsType *varArgsType );
    41                 virtual void visit( ZeroType *zeroType );
    42                 virtual void visit( OneType *oneType );
    4341          private:
    4442                Type *dest;
     
    143141        void PtrsAssignable::visit( VarArgsType *varArgsType ) {
    144142        }
    145 
    146         void PtrsAssignable::visit( ZeroType *zeroType ) {
    147         }
    148        
    149         void PtrsAssignable::visit( OneType *oneType ) {
    150         }
    151        
    152143} // namespace ResolvExpr
    153144
  • src/ResolvExpr/PtrsCastable.cc

    raee7e35 r7b69174  
    4040                virtual void visit(TupleType *tupleType);
    4141                virtual void visit(VarArgsType *varArgsType);
    42                 virtual void visit(ZeroType *zeroType);
    43                 virtual void visit(OneType *oneType);
    4442          private:
    4543                Type *dest;
     
    146144                result = objectCast( dest, env, indexer );
    147145        }
    148 
    149         void PtrsCastable::visit(ZeroType *zeroType) {
    150                 result = objectCast( dest, env, indexer );
    151         }
    152 
    153         void PtrsCastable::visit(OneType *oneType) {
    154                 result = objectCast( dest, env, indexer );
    155         }
    156146} // namespace ResolvExpr
    157147
  • src/ResolvExpr/RenameVars.cc

    raee7e35 r7b69174  
    110110        }
    111111
    112         void RenameVars::visit( ZeroType *zeroType ) {
    113                 typeBefore( zeroType );
    114                 typeAfter( zeroType );
    115         }
    116 
    117         void RenameVars::visit( OneType *oneType ) {
    118                 typeBefore( oneType );
    119                 typeAfter( oneType );
    120         }
    121 
    122112        void RenameVars::typeBefore( Type *type ) {
    123113                if ( ! type->get_forall().empty() ) {
  • src/ResolvExpr/RenameVars.h

    raee7e35 r7b69174  
    4444                virtual void visit( TupleType *tupleType );
    4545                virtual void visit( VarArgsType *varArgsType );
    46                 virtual void visit( ZeroType *zeroType );
    47                 virtual void visit( OneType *oneType );
    4846
    4947                void typeBefore( Type *type );
  • src/ResolvExpr/Resolver.cc

    raee7e35 r7b69174  
    133133                        } else if ( BasicType *bt = dynamic_cast< BasicType * >( type ) ) {
    134134                                return bt->isInteger();
    135                         } else if ( dynamic_cast< ZeroType* >( type ) != nullptr || dynamic_cast< OneType* >( type ) != nullptr ) {
    136                                 return true;
    137135                        } else {
    138136                                return false;
     
    461459                        }
    462460                } else {
    463                         assert( dynamic_cast< BasicType * >( initContext ) || dynamic_cast< PointerType * >( initContext )
    464                                 || dynamic_cast< ZeroType * >( initContext ) || dynamic_cast< OneType * >( initContext ) );
     461                        assert( dynamic_cast< BasicType * >( initContext ) || dynamic_cast< PointerType * >( initContext ) );
    465462                        // basic types are handled here
    466463                        Visitor::visit( listInit );
  • src/ResolvExpr/Unify.cc

    raee7e35 r7b69174  
    6060                virtual void visit(TupleType *tupleType);
    6161                virtual void visit(VarArgsType *varArgsType);
    62                 virtual void visit(ZeroType *zeroType);
    63                 virtual void visit(OneType *oneType);
    6462
    6563                template< typename RefType > void handleRefType( RefType *inst, Type *other );
     
    590588        }
    591589
    592         void Unify::visit(ZeroType *zeroType) {
    593                 result = dynamic_cast< ZeroType* >( type2 );
    594         }
    595 
    596         void Unify::visit(OneType *oneType) {
    597                 result = dynamic_cast< OneType* >( type2 );
    598         }
    599 
    600590} // namespace ResolvExpr
    601591
  • src/SymTab/FixFunction.cc

    raee7e35 r7b69174  
    7777                return varArgsType;
    7878        }
    79 
    80         Type * FixFunction::mutate(ZeroType *zeroType) {
    81                 return zeroType;
    82         }
    83 
    84         Type * FixFunction::mutate(OneType *oneType) {
    85                 return oneType;
    86         }
    8779} // namespace SymTab
    8880
  • src/SymTab/FixFunction.h

    raee7e35 r7b69174  
    4242                virtual Type* mutate(TupleType *tupleType);
    4343                virtual Type* mutate(VarArgsType *varArgsType);
    44                 virtual Type* mutate(ZeroType *zeroType);
    45                 virtual Type* mutate(OneType *oneType);
    4644 
    4745                bool isVoid;
  • src/SymTab/ImplementationType.cc

    raee7e35 r7b69174  
    4141                virtual void visit(TupleType *tupleType);
    4242                virtual void visit(VarArgsType *varArgsType);
    43                 virtual void visit(ZeroType *zeroType);
    44                 virtual void visit(OneType *oneType);
    4543
    4644                Type *result;                   // synthesized
     
    122120        void ImplementationType::visit(VarArgsType *varArgsType) {
    123121        }
    124 
    125         void ImplementationType::visit(ZeroType *zeroType) {
    126         }
    127 
    128         void ImplementationType::visit(OneType *oneType) {
    129         }
    130122} // namespace SymTab
    131123
  • src/SymTab/Mangler.cc

    raee7e35 r7b69174  
    229229                printQualifiers( varArgsType );
    230230                mangleName << "VARGS";
    231         }
    232 
    233         void Mangler::visit( ZeroType *zeroType ) {
    234                 mangleName << "Z";
    235         }
    236 
    237         void Mangler::visit( OneType *oneType ) {
    238                 mangleName << "O";
    239231        }
    240232
  • src/SymTab/Mangler.h

    raee7e35 r7b69174  
    4646                virtual void visit( TupleType *tupleType );
    4747                virtual void visit( VarArgsType *varArgsType );
    48                 virtual void visit( ZeroType *zeroType );
    49                 virtual void visit( OneType *oneType );
    5048 
    5149                std::string get_mangleName() { return mangleName.str(); }
  • src/SymTab/TypeEquality.cc

    raee7e35 r7b69174  
    4242                virtual void visit( TypeInstType *typeInst );
    4343                virtual void visit( VarArgsType *varArgsType );
    44                 virtual void visit( ZeroType *zeroType );
    45                 virtual void visit( OneType *oneType );
    4644
    4745                void handleQualifiers( Type * t );
     
    201199                }
    202200        }
    203 
    204         void TypeEquality::visit( ZeroType *zeroType ) {
    205                 handleQualifiers( zeroType );
    206                 if ( ! dynamic_cast< ZeroType * >( other ) ) {
    207                         result = false;
    208                 }
    209         }
    210 
    211         void TypeEquality::visit( OneType *oneType ) {
    212                 handleQualifiers( oneType );
    213                 if ( ! dynamic_cast< OneType * >( other ) ) {
    214                         result = false;
    215                 }
    216         }
    217201} // namespace SymTab
  • src/SynTree/Mutator.cc

    raee7e35 r7b69174  
    453453}
    454454
    455 Type *Mutator::mutate( ZeroType *zeroType ) {
    456         mutateAll( zeroType->get_forall(), *this );
    457         return zeroType;
    458 }
    459 
    460 Type *Mutator::mutate( OneType *oneType ) {
    461         mutateAll( oneType->get_forall(), *this );
    462         return oneType;
    463 }
    464 
    465455Initializer *Mutator::mutate( SingleInit *singleInit ) {
    466456        singleInit->set_value( singleInit->get_value()->acceptMutator( *this ) );
  • src/SynTree/Mutator.h

    raee7e35 r7b69174  
    9595        virtual Type* mutate( AttrType *attrType );
    9696        virtual Type* mutate( VarArgsType *varArgsType );
    97         virtual Type* mutate( ZeroType *zeroType );
    98         virtual Type* mutate( OneType *oneType );
    9997
    10098        virtual Initializer* mutate( SingleInit *singleInit );
  • src/SynTree/SynTree.h

    raee7e35 r7b69174  
    102102class AttrType;
    103103class VarArgsType;
    104 class ZeroType;
    105 class OneType;
    106104
    107105class Initializer;
  • src/SynTree/Type.h

    raee7e35 r7b69174  
    418418};
    419419
    420 /// Represents a zero constant
    421 class ZeroType : public Type {
    422   public:
    423         ZeroType();
    424         ZeroType( Type::Qualifiers tq );
    425 
    426         virtual ZeroType *clone() const { return new ZeroType( *this ); }
    427         virtual void accept( Visitor &v ) { v.visit( this ); }
    428         virtual Type *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    429         virtual void print( std::ostream &os, int indent = 0 ) const;
    430 };
    431 
    432 /// Represents a one constant
    433 class OneType : public Type {
    434   public:
    435         OneType();
    436         OneType( Type::Qualifiers tq );
    437 
    438         virtual OneType *clone() const { return new OneType( *this ); }
    439         virtual void accept( Visitor &v ) { v.visit( this ); }
    440         virtual Type *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    441         virtual void print( std::ostream &os, int indent = 0 ) const;
    442 };
    443 
    444420inline Type::Qualifiers &Type::Qualifiers::operator+=( const Type::Qualifiers &other ) {
    445421        isConst |= other.isConst;
  • src/SynTree/TypeSubstitution.cc

    raee7e35 r7b69174  
    179179}
    180180
    181 Type * TypeSubstitution::mutate( VoidType *voidType ) {
    182         return handleType( voidType );
     181Type * TypeSubstitution::mutate( VoidType *basicType ) {
     182        return handleType( basicType );
    183183}
    184184
     
    221221Type * TypeSubstitution::mutate( VarArgsType *varArgsType ) {
    222222        return handleType( varArgsType );
    223 }
    224 
    225 Type * TypeSubstitution::mutate( ZeroType *zeroType ) {
    226         return handleType( zeroType );
    227 }
    228 
    229 Type * TypeSubstitution::mutate( OneType *oneType ) {
    230         return handleType( oneType );
    231223}
    232224
  • src/SynTree/TypeSubstitution.h

    raee7e35 r7b69174  
    7676        virtual Type* mutate(TupleType *tupleType);
    7777        virtual Type* mutate(VarArgsType *varArgsType);
    78         virtual Type* mutate(ZeroType *zeroType);
    79         virtual Type* mutate(OneType *oneType);
    8078
    8179        // TODO: worry about traversing into a forall-qualified function type or type decl with assertions
  • src/SynTree/Visitor.cc

    raee7e35 r7b69174  
    383383}
    384384
    385 void Visitor::visit( ZeroType *zeroType ) {
    386         acceptAll( zeroType->get_forall(), *this );
    387 }
    388 
    389 void Visitor::visit( OneType *oneType ) {
    390         acceptAll( oneType->get_forall(), *this );
    391 }
    392 
    393385void Visitor::visit( SingleInit *singleInit ) {
    394386        singleInit->get_value()->accept( *this );
  • src/SynTree/Visitor.h

    raee7e35 r7b69174  
    9595        virtual void visit( AttrType *attrType );
    9696        virtual void visit( VarArgsType *varArgsType );
    97         virtual void visit( ZeroType *zeroType );
    98         virtual void visit( OneType *oneType );
    9997
    10098        virtual void visit( SingleInit *singleInit );
  • src/SynTree/module.mk

    raee7e35 r7b69174  
    2626       SynTree/AttrType.cc \
    2727       SynTree/VarArgsType.cc \
    28        SynTree/ZeroOneType.cc \
    2928       SynTree/Constant.cc \
    3029       SynTree/Expression.cc \
Note: See TracChangeset for help on using the changeset viewer.