bool inFinish, bool csForced )
{
/* Write the preprocessor line info for going into the source file. */
- cdLineDirective( ret, sourceFileName, action->loc.line );
+ cdLineDirective( ret, action->loc.fileName, action->loc.line );
/* Write the block and close it off. */
ret << "\t{";
void FsmCodeGen::CONDITION( ostream &ret, GenAction *condition )
{
ret << "\n";
- cdLineDirective( ret, sourceFileName, condition->loc.line );
+ cdLineDirective( ret, condition->loc.fileName, condition->loc.line );
INLINE_LIST( ret, condition->inlineList, 0, false, false );
}
void CSharpFsmCodeGen::ACTION( ostream &ret, GenAction *action, int targState, bool inFinish )
{
/* Write the preprocessor line info for going into the source file. */
- csharpLineDirective( ret, sourceFileName, action->loc.line );
+ csharpLineDirective( ret, action->loc.fileName, action->loc.line );
/* Write the block and close it off. */
ret << "\t{";
void CSharpFsmCodeGen::CONDITION( ostream &ret, GenAction *condition )
{
ret << "\n";
- csharpLineDirective( ret, sourceFileName, condition->loc.line );
+ csharpLineDirective( ret, condition->loc.fileName, condition->loc.line );
INLINE_LIST( ret, condition->inlineList, 0, false );
}
actionList.append( allActions+a );
}
-void CodeGenData::newAction( int anum, const char *name, int line,
- int col, GenInlineList *inlineList )
+void CodeGenData::newAction( int anum, const char *name,
+ const InputLoc &loc, GenInlineList *inlineList )
{
allActions[anum].actionId = anum;
allActions[anum].name = name;
- allActions[anum].loc.line = line;
- allActions[anum].loc.col = col;
+ allActions[anum].loc = loc;
allActions[anum].inlineList = inlineList;
}
void createMachine();
void initActionList( unsigned long length );
- void newAction( int anum, const char *name, int line, int col, GenInlineList *inlineList );
+ void newAction( int anum, const char *name, const InputLoc &loc, GenInlineList *inlineList );
void initActionTableList( unsigned long length );
void initStateList( unsigned long length );
void setStartState( unsigned long startState );
void JavaTabCodeGen::ACTION( ostream &ret, GenAction *action, int targState, bool inFinish )
{
/* Write the preprocessor line info for going into the source file. */
- javaLineDirective( ret, sourceFileName, action->loc.line );
+ javaLineDirective( ret, action->loc.fileName, action->loc.line );
/* Write the block and close it off. */
ret << "\t{";
void JavaTabCodeGen::CONDITION( ostream &ret, GenAction *condition )
{
ret << "\n";
- javaLineDirective( ret, sourceFileName, condition->loc.line );
+ javaLineDirective( ret, condition->loc.fileName, condition->loc.line );
INLINE_LIST( ret, condition->inlineList, 0, false );
}
InputLoc loc;
loc.line = 1;
loc.col = 1;
- loc.fileName = "<NONE>";
+ loc.fileName = "NONE";
Action *action = new Action( loc, name, inlineList, nextCondId++ );
action->actionRefs.append( rootName );
InputLoc loc;
loc.line = 1;
loc.col = 1;
+ loc.fileName = "NONE";
/* Create the error action. */
InlineList *il6 = new InlineList;
void Scanner::processToken( int type, char *tokdata, int toklen )
{
int *p, *pe, *eof;
-
if ( type < 0 )
p = pe = eof = 0;
void RubyCodeGen::ACTION( ostream &ret, GenAction *action, int targState, bool inFinish )
{
/* Write the preprocessor line info for going into the source file. */
- rubyLineDirective( ret, sourceFileName, action->loc.line );
+ rubyLineDirective( ret, action->loc.fileName, action->loc.line );
/* Write the block and close it off. */
ret << " begin\n";
INLINE_LIST( ret, action->inlineList, targState, inFinish );
ret << " end\n";
- rubyLineDirective( ret, sourceFileName, action->loc.line );
}
void RubyCodeGen::CONDITION( ostream &ret, GenAction *condition )
{
ret << "\n";
- rubyLineDirective( ret, sourceFileName, condition->loc.line );
+ rubyLineDirective( ret, condition->loc.fileName, condition->loc.line );
INLINE_LIST( ret, condition->inlineList, 0, false );
}
GenInlineList *genList = new GenInlineList;
makeGenInlineList( genList, action->inlineList );
- cgd->newAction( curAction++, action->name,
- action->loc.line, action->loc.col, genList );
+ cgd->newAction( curAction++, action->name, action->loc, genList );
}