pdel->value->token( loc, Parser_tk_eof, 0, 0 );
}
+void InputData::verifyWritesHaveData()
+{
+ if ( !generateXML && !generateDot ) {
+ for ( InputItemList::Iter ii = inputItems; ii.lte(); ii++ ) {
+ if ( ii->type == InputItem::Write ) {
+ if ( ii->pd->cgd == 0 )
+ error( ii->loc ) << "no machine instantiations to write" << endl;
+ }
+ }
+ }
+}
void InputData::writeOutput()
{
- if ( generateXML ) {
+ if ( generateXML )
writeXML( *outStream );
- }
else if ( generateDot )
static_cast<GraphvizDotGen*>(dotGenParser->pd->cgd)->writeDotFile();
else {
ArgsVector includePaths;
+ void verifyWritesHaveData();
+
void writeOutput();
void makeOutputStream();
void openOutput();
/* Make the first input item. */
InputItem *firstInputItem = new InputItem;
firstInputItem->type = InputItem::HostData;
+ firstInputItem->loc.fileName = id.inputFileName;
firstInputItem->loc.line = 1;
firstInputItem->loc.col = 1;
id.inputItems.append( firstInputItem );
if ( gblErrorCount > 0 )
exit(1);
}
-
+
+ id.verifyWritesHaveData();
+ if ( gblErrorCount > 0 )
+ exit(1);
+
/*
* From this point on we should not be reporting any errors.
*/
if ( active() && machineSpec == 0 && machineName == 0 ) {
InputItem *inputItem = new InputItem;
inputItem->type = InputItem::Write;
+ inputItem->loc.fileName = fileName;
inputItem->loc.line = line;
inputItem->loc.col = column;
inputItem->name = parser->sectionName;