Ignore:
Timestamp:
Nov 14, 2023, 12:19:09 PM (23 months ago)
Author:
caparson <caparson@…>
Branches:
master
Children:
1ccae59, 89a8bab
Parents:
df8ba61a (diff), 5625427 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/BasicTypes-gen.cc

    rdf8ba61a r8d182b1  
    272272        size_t start, end;
    273273
    274 
    275         #define TypeH TOP_SRCDIR "src/SynTree/Type.h"
    276         resetInput( file, TypeH, buffer, code, str );
    277 
    278         if ( (start = str.find( STARTMK )) == string::npos ) Abort( "start", TypeH );
    279         start += sizeof( STARTMK );                                                     // includes newline
    280         code << str.substr( 0, start );
    281 
    282         code << "\t" << BYMK << endl;
    283         code << "\tenum Kind {" << endl;
    284         for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) {
    285                 code << "\t\t" << graph[r].name << "," << endl;
    286         } // for
    287         code << "\t\tNUMBER_OF_BASIC_TYPES" << endl;
    288         code << "\t} kind;" << endl;
    289         code << "\t";                                                                           // indentation for end marker
    290 
    291         if ( (start = str.find( ENDMK, start + 1 )) == string::npos ) Abort( "end", TypeH );
    292         code << str.substr( start );
    293 
    294         output( file, TypeH, code );
    295         // cout << code.str();
    296 
    297 
    298         #define TypeC TOP_SRCDIR "src/SynTree/Type.cc"
    299         resetInput( file, TypeC, buffer, code, str );
    300 
    301         if ( (start = str.find( STARTMK )) == string::npos ) Abort( "start", TypeC );
    302         start += sizeof( STARTMK );                                                     // includes newline
    303         code << str.substr( 0, start );
    304 
    305         code << BYMK << endl;
    306         code << "const char * BasicType::typeNames[] = {" << endl;
    307         for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) {
    308                 code << "\t\"" << graph[r].type << "\"," << endl;
    309         } // for
    310         code << "};" << endl;
    311 
    312         if ( (start = str.find( ENDMK, start + 1 )) == string::npos ) Abort( "end", TypeC );
    313         code << str.substr( start );
    314 
    315         output( file, TypeC, code );
    316         // cout << code.str();
    317 
    318 
    319         // TEMPORARY DURING CHANGE OVER
    320274        #define TypeH_AST TOP_SRCDIR "src/AST/Type.hpp"
    321275        resetInput( file, TypeH_AST, buffer, code, str );
Note: See TracChangeset for help on using the changeset viewer.