source: src/BasicTypes-gen.cpp @ c309af1

Last change on this file since c309af1 was c309af1, checked in by Peter A. Buhr <pabuhr@…>, 8 weeks ago

update complex float conversion cost

  • Property mode set to 100644
File size: 18.5 KB
Line 
1// Code generation/updating for basic type information.
2//
3// Should be run by make when it is changed to updated some source files.
4
5#include <algorithm>
6#include <queue>
7#include <iostream>
8#include <iomanip>
9#include <fstream>
10#include <utility>
11#include <string>
12using namespace std;
13#include <assert.h>
14#include <string.h>                                                                             // strlen
15#include "config.h"                                                                             // configure info
16
17enum Kind {
18        Bool,
19        Char,
20        SignedChar,
21        UnsignedChar,
22        ShortSignedInt,
23        ShortUnsignedInt,
24        SignedInt,
25        UnsignedInt,
26        LongSignedInt,
27        LongUnsignedInt,
28        LongLongSignedInt,
29        LongLongUnsignedInt,
30        SignedInt128,
31        UnsignedInt128,
32        Float16,
33        Float16Complex,
34        Float32,
35        Float32Complex,
36        Float,
37        FloatComplex,
38        Float32x,
39        Float32xComplex,
40        Float64,
41        Float64Complex,
42        Double,
43        DoubleComplex,
44        Float64x,
45        Float64xComplex,
46        Float80,
47        Float128,
48        Float128Complex,
49        uuFloat128,
50        LongDouble,
51        LongDoubleComplex,
52        Float128x,
53        Float128xComplex,
54        NUMBER_OF_BASIC_TYPES,
55
56        Float32x4,                                                                                      // ARM, gcc-14
57        Float64x2,
58        Svfloat32,
59        Svfloat64,
60        Svbool,
61};
62
63enum NumSort {                                                                                  // floating point types act as both signed and unsigned
64        Signed = 0x1,
65        Unsigned = 0x2,
66        Floating = 0x3
67};
68
69struct Node {
70        Kind basicType;                                                                         // basic type
71        const char * name;                                                                      // basic-type name
72        const char * abbrev;                                                            // internal abbreviation (documentation only)
73        const char * type;                                                                      // actual type name
74        const char * mangled;                                                           // mangled abbreviation
75        NumSort sign;                                                                           // is this a signed integral type?
76        int left, middle, right;                                                        // 3-ary tree, -1 => nullptr
77        int rank;                                                                                       // integral rank (C standard 6.3.1.1.1, extended)
78} graph[NUMBER_OF_BASIC_TYPES] = {
79        { Bool, "Bool", "B", "_Bool", "b", Signed, Char, SignedChar, -1, 0 }, // root
80
81        { Char, "Char", "C", "char", "c", Signed, SignedChar, UnsignedChar, ShortSignedInt, 1 },
82        { SignedChar, "SignedChar", "SC", "signed char", "a", Signed, UnsignedChar, ShortSignedInt, -1, 1 },
83        { UnsignedChar, "UnsignedChar", "UC", "unsigned char", "h", Unsigned, ShortUnsignedInt, ShortSignedInt, -1, 1 },
84
85        { ShortSignedInt, "ShortSignedInt", "SI", "signed short int", "s", Signed, ShortUnsignedInt, SignedInt, -1, 2 },
86        { ShortUnsignedInt, "ShortUnsignedInt", "USI", "unsigned short int", "t", Unsigned, UnsignedInt, SignedInt, -1, 2 },
87
88        { SignedInt, "SignedInt", "I", "signed int", "i", Signed, UnsignedInt, LongSignedInt, -1, 3 },
89        { UnsignedInt, "UnsignedInt", "UI", "unsigned int", "j", Unsigned, LongUnsignedInt, LongSignedInt, -1, 3 },
90
91        { LongSignedInt, "LongSignedInt", "LI", "signed long int", "l", Signed, LongUnsignedInt, LongLongSignedInt, -1, 4 },
92        { LongUnsignedInt, "LongUnsignedInt", "ULI", "unsigned long int", "m", Unsigned, LongLongSignedInt, LongLongUnsignedInt, -1, 4 },
93
94        { LongLongSignedInt, "LongLongSignedInt", "LLI", "signed long long int", "x", Signed, LongLongUnsignedInt, SignedInt128, -1, 5 },
95        { LongLongUnsignedInt, "LongLongUnsignedInt", "ULLI", "unsigned long long int", "y", Unsigned, SignedInt128, UnsignedInt128, -1, 5 },
96
97        { SignedInt128, "SignedInt128", "__ID", "__int128", "n", Signed, UnsignedInt128, Float16, -1, 6 },
98        { UnsignedInt128, "UnsignedInt128", "__UID", "unsigned __int128", "o", Unsigned, Float16, -1, -1, 6 },
99
100        { Float16, "Float16", "_FH", "_Float16", "DF16_", Floating, Float32, Float16Complex, -1, 7 },
101        { Float16Complex, "Float16Complex", "_FHC", "_Float16 _Complex", "CDF16_", Floating, Float32Complex, -1, -1, 7 },
102
103        { Float32, "Float32", "_F", "_Float32", "DF32_", Floating, Float, Float32Complex, -1, 8 },
104        { Float32Complex, "Float32Complex", "_FC", "_Float32 _Complex", "CDF32_", Floating, FloatComplex, -1, -1, 8 },
105        { Float, "Float", "F", "float", "f", Floating, Float32x, FloatComplex, -1, 9 },
106        { FloatComplex, "FloatComplex", "FC", "float _Complex", "Cf", Floating, Float32xComplex, -1, -1, 9 },
107        { Float32x, "Float32x", "_FX", "_Float32x", "DF32x_", Floating, Float64, Float32xComplex, -1, 10 },
108        { Float32xComplex, "Float32xComplex", "_FXC", "_Float32x _Complex", "CDF32x_", Floating, Float64Complex, -1, -1, 10 },
109
110        { Float64, "Float64", "_FD", "_Float64", "DF64_", Floating, Double, Float64Complex, -1, 11 },
111        { Float64Complex, "Float64Complex", "_FDC", "_Float64 _Complex", "CDF64_", Floating, DoubleComplex, -1, -1, 11 },
112        { Double, "Double", "D", "double", "d", Floating, Float64x, DoubleComplex, -1, 12 },
113        { DoubleComplex, "DoubleComplex", "DC", "double _Complex", "Cd", Floating, Float64xComplex, -1, -1, 12 },
114        { Float64x, "Float64x", "_FDX", "_Float64x", "DF64x_", Floating, Float80, Float64xComplex, -1, 13 },
115        { Float64xComplex, "Float64xComplex", "_FDXC", "_Float64x _Complex", "CDF64x_", Floating, Float128Complex, -1, -1, 13 },
116
117        { Float80, "Float80", "_F80", "__float80", "Dq", Floating, Float128, Float64xComplex, -1, 14 },
118        // __float80 _Complex, no complex counterpart
119
120        { Float128, "Float128", "_FLD", "_Float128", "DF128_", Floating, uuFloat128, Float128Complex, -1, 15 },
121        { Float128Complex, "Float128Complex", "_FLDC", "_Float128 _Complex", "CDF128_", Floating, LongDoubleComplex, -1, -1, 15 },
122        { uuFloat128, "uuFloat128", "__FLD", "__float128", "g", Floating, LongDouble, Float128Complex, -1, 16 },
123        // __float128 _Complex, no complex counterpart
124        { LongDouble, "LongDouble", "LD", "long double", "e", Floating, Float128x, LongDoubleComplex, -1, 17 },
125        { LongDoubleComplex, "LongDoubleComplex", "LDC", "long double _Complex", "Ce", Floating, Float128xComplex, -1, -1, 17 },
126
127        // may not be supported
128        { Float128x, "Float128x", "_FLDX", "_Float128x", "DF128x_", Floating, Float128xComplex, -1, -1, 18 },
129        { Float128xComplex, "Float128xComplex", "_FLDXC", "_Float128x _Complex", "CDF128x_", Floating, -1, -1, -1, 18 }
130}; // graph
131
132static int costMatrix[NUMBER_OF_BASIC_TYPES][NUMBER_OF_BASIC_TYPES];
133static int signMatrix[NUMBER_OF_BASIC_TYPES][NUMBER_OF_BASIC_TYPES];
134static Kind commonTypeMatrix[NUMBER_OF_BASIC_TYPES][NUMBER_OF_BASIC_TYPES];
135
136void generateCosts( int row ) {
137        bool seen[NUMBER_OF_BASIC_TYPES] = { false /*, ... */ };
138
139        struct el_cost {
140                int i;
141                int path;
142                int sign;
143
144                el_cost( int i = 0, int p = 0, int s = 0 ) : i(i), path(p), sign(s) {}
145
146                // reverse the sense for use in largest-on-top priority queue
147                bool operator< (const el_cost& o) const {
148                        return path > o.path || (path == o.path && sign > o.sign);
149                }
150        };
151
152        // initialize BFS queue with root of traversal
153        priority_queue< el_cost > q;
154        q.emplace( row, 0, 0 );
155
156        // BFS costs
157        do {
158                // visit cost element
159                int col = q.top().i;
160
161                // skip if already set
162                if ( seen[col] ) {
163                        q.pop();
164                        continue;
165                } // if
166                seen[col] = true;
167
168                // otherwise set min-costs into matrix
169                int cost = q.top().path;
170                int scost = q.top().sign;
171                costMatrix[row][col] = cost;
172                signMatrix[row][col] = scost;
173                q.pop();
174
175                // traverse children
176                int i = graph[col].left;
177                if ( i == -1 ) continue;                                                // leaf
178                q.emplace( i, cost + max(1, graph[i].rank-graph[col].rank), scost + ! (graph[col].sign & graph[i].sign) );
179
180                i = graph[col].middle;
181                if ( i == -1 ) continue;                                                // leaf
182                q.emplace( i, cost + max(1, graph[i].rank-graph[col].rank), scost + !(graph[col].sign & graph[i].sign) );
183
184                i = graph[col].right;
185                if ( i == -1 ) continue;                                                // leaf
186                q.emplace( i, cost + max(1, graph[i].rank-graph[col].rank), scost + !(graph[col].sign & graph[i].sign) );
187        } while ( ! q.empty() );
188} // generateCosts
189
190void generateCommonType( int row, int col ) {                   // row <= col
191        if ( costMatrix[row][col] >= 0 ) {
192                // safe conversion from row => col
193                commonTypeMatrix[row][col] = commonTypeMatrix[col][row] = graph[col].basicType;
194        } else if ( costMatrix[col][row] >= 0 ) {
195                // safe conversion from col => row
196                commonTypeMatrix[row][col] = commonTypeMatrix[col][row] = graph[row].basicType;
197        } else {
198                // need to find least common ancestor
199                // can cheat a bit here, in that there is always a direct ancestor of the later (col) element
200                int i = graph[col].left;
201                if ( i == -1 ) assert("invalid ancestor assumption");
202                if ( costMatrix[row][i] >= 0 ) {
203                        commonTypeMatrix[row][col] = commonTypeMatrix[col][row] = graph[i].basicType;
204                        return;
205                } // if
206
207                i = graph[col].middle;
208                if ( i == -1 ) assert("invalid ancestor assumption");
209                if ( costMatrix[row][i] >= 0 ) {
210                        commonTypeMatrix[row][col] = commonTypeMatrix[col][row] = graph[i].basicType;
211                        return;
212                } // if
213
214                i = graph[col].right;
215                if ( i == -1 ) assert("invalid ancestor assumption");
216                if ( costMatrix[row][i] >= 0 ) {
217                        commonTypeMatrix[row][col] = commonTypeMatrix[col][row] = graph[i].basicType;
218                        return;
219                } // if
220
221                assert("invalid ancestor assumption");
222        } // if
223} // generateCommonType
224
225void resetInput( fstream & file, const char * filename, stringstream & buffer, stringstream & code, string & str ) {
226        file.close();
227        buffer.str( "" );
228        code.str( "" );
229        file.open( filename, fstream::in );
230        if ( file.fail() ) {
231                cout << "Internal error, could not open " << filename << " for input." << endl;
232                abort();
233        } // if
234        buffer << file.rdbuf();
235        str = buffer.str();
236} // resetInput
237
238void output( fstream & file, const char * filename, stringstream & code ) {
239        file.close();
240        file.open( filename, fstream::out );
241        if ( file.fail() ) {
242                cout << "Internal error, could not open " << filename << " for output." << endl;
243                abort();
244        } // if
245        file << code.rdbuf();                                                           // overwrite file
246} // output
247
248void Abort( const char * kind, const char * file ) {
249        cerr << "Internal error, could not find " << kind << " of generated code for " << file << endl;
250} // Abort
251
252int main() {
253        for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) { // initialization
254                for ( int c = 0; c < NUMBER_OF_BASIC_TYPES; c += 1 ) {
255                        costMatrix[r][c] = -1;
256                        signMatrix[r][c] = -1;
257                        commonTypeMatrix[r][c] = NUMBER_OF_BASIC_TYPES;
258                } // for
259        } // for
260        int lastInteger = NUMBER_OF_BASIC_TYPES;
261
262        for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) { // perform breath-first traversal to generate cost graph
263                generateCosts(r);
264        } // for
265
266        for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) { // use cost graph to find nearest-common-ancestor
267                for (int c = r; c < NUMBER_OF_BASIC_TYPES; c += 1 ) {
268                        generateCommonType(r, c);
269                } // for
270        } // for
271
272        // Find the last integer type.
273        // Assumes at least 1, and all come before the floating types.
274        for ( int i = 1 ; i < NUMBER_OF_BASIC_TYPES ; i += 1 ) {
275                if ( Floating == graph[i].sign ) {
276                        lastInteger = (i - 1);
277                        break;
278                }
279        }
280
281        #define STARTMK "// GENERATED START, DO NOT EDIT"
282        #define ENDMK "// GENERATED END"
283        string BYMK( __FILE__ );
284        string::size_type posn = BYMK.find_last_of( "/" );
285        if ( posn != string::npos ) BYMK.erase( 0, posn - 1); // remove directories
286        BYMK = "// GENERATED BY " + BYMK;
287
288        fstream file;
289        stringstream buffer, code;
290        string str;
291        size_t start, end;
292
293        #define TypeH_AST TOP_SRCDIR "src/AST/BasicKind.hpp"
294        resetInput( file, TypeH_AST, buffer, code, str );
295
296        if ( (start = str.find( STARTMK )) == string::npos ) Abort( "start", TypeH_AST );
297        start += sizeof( STARTMK );                                                     // includes newline
298        code << str.substr( 0, start );
299
300        code << BYMK << endl;
301        code << "enum BasicKind {" << endl;
302        for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) {
303                code << "\t" << graph[r].name << "," << endl;
304        } // for
305        code << "\tNUMBER_OF_BASIC_TYPES," << endl;
306        code << "\tMAX_INTEGER_TYPE = " << graph[lastInteger].name << "," << endl;
307        code << "};" << endl;
308
309        if ( (start = str.find( ENDMK, start + 1 )) == string::npos ) Abort( "end", TypeH_AST );
310        code << str.substr( start );
311
312        output( file, TypeH_AST, code );
313        // cout << code.str();
314
315
316        #define TypeC_AST TOP_SRCDIR "src/AST/Type.cpp"
317        resetInput( file, TypeC_AST, buffer, code, str );
318
319        if ( (start = str.find( STARTMK )) == string::npos ) Abort( "start", TypeC_AST );
320        start += sizeof( STARTMK );                                                     // includes newline
321        code << str.substr( 0, start );
322
323        code << BYMK << endl;
324        code << "const char * BasicType::typeNames[] = {" << endl;
325        for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) {
326                code << "\t\"" << graph[r].type << "\"," << endl;
327        } // for
328        code << "};" << endl;
329
330        if ( (start = str.find( ENDMK, start + 1 )) == string::npos ) Abort( "end", TypeC_AST );
331        code << str.substr( start );
332
333        output( file, TypeC_AST, code );
334        // cout << code.str();
335
336
337        #define ConversionCost TOP_SRCDIR "src/ResolvExpr/ConversionCost.cpp"
338        resetInput( file, ConversionCost, buffer, code, str );
339
340        if ( (start = str.find( STARTMK )) == string::npos ) Abort( "start", ConversionCost );
341        start += sizeof( STARTMK );                                                     // includes newline
342        code << str.substr( 0, start );
343
344        code << "\t" << BYMK << endl;
345        code << "\t/* EXTENDED INTEGRAL RANK HIERARCHY (root to leaves)" << endl;
346        for ( int c = 0; c < NUMBER_OF_BASIC_TYPES; c += 1 ) {
347                code << '\t' << left;
348                if ( graph[c].rank != graph[c + 1].rank ) {
349                        code << right << setw(30) << graph[c].type << left;
350                } else if ( graph[c].rank != graph[c + 2].rank ) {
351                        code << string( 10, ' ' ) << setw(25) << graph[c].type << graph[c + 1].type;
352                        c += 1;
353                } else {
354                        code << setw(20) << graph[c].type << setw(20) << graph[c + 1].type << graph[c + 2].type;
355                        c += 2;
356                } // if
357                code << endl;
358        } // for
359        code << right << "\t*/" << endl;
360        code << "\t";                                                                           // indentation for end marker
361
362        if ( (start = str.find( ENDMK, start + 1 )) == string::npos ) Abort( "end", ConversionCost );
363        if ( (end = str.find( STARTMK, start + 1 )) == string::npos ) Abort( "start", ConversionCost );
364        end += sizeof( STARTMK );
365        code << str.substr( start, end - start );
366
367        code << "\t" << BYMK << endl;
368        code << "\tstatic const int costMatrix[ast::BasicKind::NUMBER_OF_BASIC_TYPES][ast::BasicKind::NUMBER_OF_BASIC_TYPES] = { // path length from root to node" << endl
369                 << "\t\t/*           ";
370        for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) { // titles
371                code << setw(5) << graph[r].abbrev;
372        } // for
373        code << " */" << endl;
374        for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) { // costs
375                code << "\t\t/* " << setw(6) << graph[r].abbrev << " */ {";
376                for ( int c = 0; c < NUMBER_OF_BASIC_TYPES; c += 1 ) {
377                        code << setw(4) << costMatrix[r][c] << ",";
378                } // for
379                code << " }," << endl;
380        } // for
381        code << "\t}; // costMatrix" << endl;
382
383        // maximum conversion cost from int
384        code << "\tstatic const int maxIntCost = " << *max_element(costMatrix[SignedInt], costMatrix[SignedInt] + NUMBER_OF_BASIC_TYPES) << ";" << endl;
385        code << "\t";                                                                           // indentation for end marker
386
387        if ( (start = str.find( ENDMK, start + 1 )) == string::npos ) Abort( "end", ConversionCost );
388        if ( (end = str.find( STARTMK, start + 1 )) == string::npos ) Abort( "start", ConversionCost );
389        end += sizeof( STARTMK );
390        code << str.substr( start, end - start );
391
392        code << "\t" << BYMK << endl;
393        code << "\tstatic const int signMatrix[ast::BasicKind::NUMBER_OF_BASIC_TYPES][ast::BasicKind::NUMBER_OF_BASIC_TYPES] = { // number of sign changes in safe conversion" << endl
394                 << "\t\t/*           ";
395        for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) { // titles
396                code << setw(5) << graph[r].abbrev;
397        } // for
398        code << " */" << endl;
399        for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) { // costs
400                code << "\t\t/* " << setw(6) << graph[r].abbrev << " */ {";
401                for ( int c = 0; c < NUMBER_OF_BASIC_TYPES; c += 1 ) {
402                        code << setw(4) << signMatrix[r][c] << ",";
403                } // for
404                code << " }," << endl;
405        } // for
406        code << "\t}; // signMatrix" << endl;
407        code << "\t";                                                                           // indentation for end marker
408
409        if ( (start = str.find( ENDMK, start + 1 )) == string::npos ) Abort( "end", ConversionCost );
410        code << str.substr( start );
411
412        output( file, ConversionCost, code );
413        // cout << code.str();
414
415
416        #define CommonType TOP_SRCDIR "src/ResolvExpr/CommonType.cpp"
417        resetInput( file, CommonType, buffer, code, str );
418
419        if ( (start = str.find( STARTMK )) == string::npos ) Abort( "start", CommonType );
420        start += sizeof( STARTMK );                                                     // includes newline
421        code << str.substr( 0, start );
422
423        enum { PER_ROW = 6 };
424        code << "\t" << BYMK << endl;
425        code << "\t#define BT ast::BasicKind::" << endl;
426        code << "\tstatic const ast::BasicKind commonTypes[BT NUMBER_OF_BASIC_TYPES][BT NUMBER_OF_BASIC_TYPES] = { // nearest common ancestor" << endl
427             << "\t\t/*\t\t ";
428        for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) { // titles
429                code << setw(24) << graph[r].abbrev;
430                if ( (r+1) % PER_ROW == 0 ) {
431                        code << endl << "\t\t\t\t ";
432                } // if
433        } // for
434        code << "*/" << endl;
435        for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) { // costs
436                code << "\t\t\t\t  {\n\t\t/* " << setw(6) << graph[r].abbrev << " */";
437                for ( int c = 0; c < NUMBER_OF_BASIC_TYPES; c += 1 ) {
438                        string s = string{"BT "} + graph[commonTypeMatrix[r][c]].name;
439                        code << setw(23) << s << ",";
440                        if ( (c+1) % PER_ROW == 0 ) {
441                                code << endl << "\t\t\t\t  ";
442                        } // if
443                } // for
444                code << "}," << endl;
445        } // for
446        code << "\t}; // commonTypes" << endl;
447        code << "\t#undef BT" << endl;
448        code << "\t";                                                                           // indentation for end marker
449
450        if ( (start = str.find( ENDMK, start + 1 )) == string::npos ) Abort( "end", CommonType );
451        code << str.substr( start );
452
453        output( file, CommonType, code );
454        // cout << code.str();
455
456
457        #define ManglerCommon TOP_SRCDIR "src/SymTab/ManglerCommon.cpp"
458        resetInput( file, ManglerCommon, buffer, code, str );
459
460        if ( (start = str.find( STARTMK )) == string::npos ) Abort( "start", ManglerCommon );
461        start += sizeof( STARTMK );                                                     // includes newline
462        code << str.substr( 0, start );
463
464        code <<
465                "// GENERATED BY " __FILE__ "\n"
466                "// NOTES ON MANGLING:\n"
467                "// * Itanium spec says that Float80 encodes to \"e\" (like LongDouble), but the distinct lengths cause resolution problems.\n"
468                "// * Float128 is supposed to encode to \"g\", but I wanted it to mangle equal to LongDouble.\n"
469                "// * Mangling for non-standard complex types is by best guess\n"
470                "// * _FloatN is supposed to encode as \"DF\"N\"_\"; modified for same reason as above.\n"
471                "// * unused mangling identifiers:\n"
472                "//   - \"z\" ellipsis\n"
473                "//   - \"Dd\" IEEE 754r 64-bit decimal floating point (borrowed for _Float32x)\n"
474                "//   - \"De\" IEEE 754r 128-bit decimal floating point\n"
475                "//   - \"Df\" IEEE 754r 32-bit decimal floating point\n"
476                "//   - \"Dh\" IEEE 754r 16-bit decimal floating point (borrowed for _Float16)\n"
477                "//   - \"DF\"N\"_\" ISO/IEC TS 18661 N-bit binary floating point (_FloatN)\n"
478                "//   - \"Di\" char32_t\n"
479                "//   - \"Ds\" char16_t\n";
480
481        code << "const std::string basicTypes[ast::BasicKind::NUMBER_OF_BASIC_TYPES] = {" << endl;
482        for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) {
483                code << "\t\"" << graph[r].mangled << "\"," << setw(9 - strlen(graph[r].mangled)) << ' ' << "// " << graph[r].type << endl;
484        } // for
485        code << "}; // basicTypes" << endl;
486
487        if ( (start = str.find( ENDMK, start + 1 )) == string::npos ) Abort( "end", ManglerCommon );
488        code << str.substr( start );
489
490        output( file, ManglerCommon, code );
491        // cout << code.str();
492} // main
493
494// Local Variables: //
495// tab-width: 4 //
496// mode: c++ //
497// compile-command: "g++-8 -Wall -Wextra BasicTypes-gen.cpp" //
498// End: //
Note: See TracBrowser for help on using the repository browser.