{
for ( InputItemList::Iter ii = inputItems; ii.lte(); ii++ ) {
if ( ii->type == InputItem::Write ) {
- CodeGenMapEl *mapEl = codeGenMap.find( (char*)ii->name.c_str() );
- CodeGenData *cgd = mapEl->value;
+ CodeGenData *cgd = ii->pd->cgd;
::keyOps = &cgd->thisKeyOps;
cgd->writeStatement( ii->loc, ii->writeArgs.length()-1, ii->writeArgs.data );
exportsRootName(0),
nextEpsilonResolvedLink(0),
nextLongestMatchId(1),
- lmRequiresErrorState(false)
+ lmRequiresErrorState(false),
+ cgd(0)
{
/* Initialize the dictionary of graphs. This is our symbol table. The
* initialization needs to be done on construction which happens at the
{
beginProcessing();
- /* Open the definition. */
- CodeGenMapEl *mapEl = inputData.codeGenMap.find( sectionName );
- CodeGenData *cgd = 0;
- if ( mapEl != 0 )
- cgd = mapEl->value;
- else {
- cgd = makeCodeGen( inputData.inputFileName, sectionName,
- *inputData.outStream, inputData.wantComplete );
- inputData.codeGenMap.insert( sectionName, cgd );
- }
+ cgd = makeCodeGen( inputData.inputFileName, sectionName,
+ *inputData.outStream, inputData.wantComplete );
/* Make the generator. */
BackendGen backendGen( sectionName, this, sectionGraph, cgd );
struct ReOrItem;
struct LongestMatch;
struct InputData;
+struct CodeGenData;
typedef DList<LongestMatch> LmList;
KeyOps thisKeyOps;
ExportList exportList;
+
+ CodeGenData *cgd;
};
void afterOpMinimize( FsmAp *fsm, bool lastInSeq = true );
Type type;
std::ostringstream data;
std::string name;
+ ParseData *pd;
Vector<char *> writeArgs;
InputLoc loc;
inputItem->loc.line = line;
inputItem->loc.col = column;
inputItem->name = parser->sectionName;
+ inputItem->pd = parser->pd;
inputItems.append( inputItem );
}
}