Changeset 10cb642


Ignore:
Timestamp:
Aug 6, 2019, 12:43:31 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
f4f9d27
Parents:
c63d48f
git-author:
Peter A. Buhr <pabuhr@…> (08/06/19 12:42:53)
git-committer:
Peter A. Buhr <pabuhr@…> (08/06/19 12:43:31)
Message:

change BasicTypes?-gen to also rewrite SynTree/Type?.h

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/BasicTypes-gen.cc

    rc63d48f r10cb642  
    273273
    274274
    275         #define Type TOP_SRCDIR "src/AST/Type.hpp"
     275        #define Type TOP_SRCDIR "src/SynTree/Type.h"
    276276        resetInput( file, Type, buffer, code, str );
    277277
     
    295295        // cout << code.str();
    296296
    297        
     297
     298        // TEMPORARY DURING CHANGE OVER
     299        #define TypeAST TOP_SRCDIR "src/AST/Type.hpp"
     300        resetInput( file, TypeAST, buffer, code, str );
     301
     302        if ( (start = str.find( STARTMK )) == string::npos ) Abort( "start", TypeAST );
     303        start += sizeof( STARTMK );                                                     // includes newline
     304        code << str.substr( 0, start );
     305
     306        code << "\t" << BYMK << endl;
     307        code << "\tenum Kind {" << endl;
     308        for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) {
     309                code << "\t\t" << graph[r].name << "," << endl;
     310        } // for       
     311        code << "\t\tNUMBER_OF_BASIC_TYPES" << endl;
     312        code << "\t} kind;" << endl;
     313        code << "\t";                                                                           // indentation for end marker
     314
     315        if ( (start = str.find( ENDMK, start + 1 )) == string::npos ) Abort( "end", TypeAST );
     316        code << str.substr( start );
     317
     318        output( file, TypeAST, code );
     319        // cout << code.str();
     320
     321
    298322        #define ConversionCost TOP_SRCDIR "src/ResolvExpr/ConversionCost.cc"
    299323        resetInput( file, ConversionCost, buffer, code, str );
     
    310334                        code << right << setw(30) << graph[c].type << left;
    311335                } else if ( graph[c].rank != graph[c + 2].rank ) {
    312                         code << string( 10, ' ' ) << setw(25) << graph[c].type << setw(25) << graph[c + 1].type;
     336                        code << string( 10, ' ' ) << setw(25) << graph[c].type << graph[c + 1].type;
    313337                        c += 1;
    314338                } else {
    315                         code << setw(20) << graph[c].type << setw(20) << graph[c + 1].type << setw(20) << graph[c + 2].type;
     339                        code << setw(20) << graph[c].type << setw(20) << graph[c + 1].type << graph[c + 2].type;
    316340                        c += 2;
    317341                } // if
  • src/Makefile.am

    rc63d48f r10cb642  
    1111## Created On       : Sun May 31 08:51:46 2015
    1212## Last Modified By : Peter A. Buhr
    13 ## Last Modified On : Fri Feb 15 09:44:09 2019
    14 ## Update Count     : 97
     13## Last Modified On : Mon Aug  5 12:57:46 2019
     14## Update Count     : 98
    1515###############################################################################
    1616
     
    5555$(addprefix $(srcdir)/, ResolvExpr/ConversionCost.cc ResolvExpr/CommonType.cc SymTab/ManglerCommon.cc) : $(srcdir)/SynTree/Type.h
    5656
    57 $(srcdir)/SynTree/Type.h : BasicTypes-gen.cc
     57$(srcdir)/AST/Type.hpp : BasicTypes-gen.cc
    5858        ${AM_V_GEN}${CXXCOMPILE} $< -o BasicTypes-gen -Wall -Wextra
    5959        @./BasicTypes-gen
  • src/Makefile.in

    rc63d48f r10cb642  
    16661666$(addprefix $(srcdir)/, ResolvExpr/ConversionCost.cc ResolvExpr/CommonType.cc SymTab/ManglerCommon.cc) : $(srcdir)/SynTree/Type.h
    16671667
    1668 $(srcdir)/SynTree/Type.h : BasicTypes-gen.cc
     1668$(srcdir)/AST/Type.hpp : BasicTypes-gen.cc
    16691669        ${AM_V_GEN}${CXXCOMPILE} $< -o BasicTypes-gen -Wall -Wextra
    16701670        @./BasicTypes-gen
Note: See TracChangeset for help on using the changeset viewer.