/* Write out referenced actions. */
if ( act->numToStateRefs > 0 ) {
/* Write the case label, the action and the case break. */
- out << "\twhen " << act->actionId << "\n";
+ out << "\twhen " << act->actionId << " then\n";
ACTION( out, act, 0, false );
}
}
/* Write out referenced actions. */
if ( act->numFromStateRefs > 0 ) {
/* Write the case label, the action and the case break. */
- out << "\twhen " << act->actionId << "\n";
+ out << "\twhen " << act->actionId << " then\n";
ACTION( out, act, 0, false );
}
}
/* Write out referenced actions. */
if ( act->numEofRefs > 0 ) {
/* Write the case label, the action and the case break. */
- out << "\twhen " << act->actionId << "\n";
+ out << "\twhen " << act->actionId << " then\n";
ACTION( out, act, 0, true );
}
}
/* Write out referenced actions. */
if ( act->numTransRefs > 0 ) {
/* Write the case label, the action and the case break. */
- out << "\twhen " << act->actionId << "\n";
+ out << "\twhen " << act->actionId << " then\n";
ACTION( out, act, 0, false );
}
}
void RbxGotoCodeGen::GOTO_HEADER( RedStateAp *state )
{
/* Label the state. */
- out << "when " << state->id << "\n";
+ out << "when " << state->id << " then\n";
}
/* Write out the single indicies. */
for ( int j = 0; j < numSingles; j++ ) {
- out << "\t\twhen " << KEY(data[j].lowKey) << "\n";
+ out << "\t\twhen " << KEY(data[j].lowKey) << " then\n";
TRANS_GOTO(data[j].value, 0) << "\n";
}
/* Label the state and bail immediately. */
outLabelUsed = true;
RedStateAp *state = redFsm->errState;
- out << "when " << state->id << "\n";
+ out << "when " << state->id << " then\n";
rbxGoto(out << " ", "_out") << "\n";
}
/* States that are final and have an out action need a case. */
if ( st->eofAction != 0 ) {
/* Write the case label. */
- out << "\t\twhen " << st->id << "\n";
+ out << "\t\twhen " << st->id << " then\n";
/* Write the goto func. */
rbxGoto(out, label("f", st->eofAction->actListId)) << "\n";
for ( InlineList::Iter lma = *item->children; lma.lte(); lma++ ) {
/* Write the case label, the action and the case break. */
- ret << " when " << lma->lmId << ":\n";
+ ret << " when " << lma->lmId << " then\n";
/* Write the block and close it off. */
ret << " begin";
for ( ActionTableMap::Iter redAct = redFsm->actionMap; redAct.lte(); redAct++ ) {
if ( redAct->numToStateRefs > 0 ) {
/* Write the entry label. */
- out << "\twhen " << redAct->actListId+1 << "\n";
+ out << "\twhen " << redAct->actListId+1 << " then\n";
/* Write each action in the list of action items. */
for ( ActionTable::Iter item = redAct->key; item.lte(); item++ )
for ( ActionTableMap::Iter redAct = redFsm->actionMap; redAct.lte(); redAct++ ) {
if ( redAct->numFromStateRefs > 0 ) {
/* Write the entry label. */
- out << "\twhen " << redAct->actListId+1 << "\n";
+ out << "\twhen " << redAct->actListId+1 << " then\n";
/* Write each action in the list of action items. */
for ( ActionTable::Iter item = redAct->key; item.lte(); item++ )
for ( ActionTableMap::Iter redAct = redFsm->actionMap; redAct.lte(); redAct++ ) {
if ( redAct->numEofRefs > 0 ) {
/* Write the entry label. */
- out << "\twhen " << redAct->actListId+1 << "\n";
+ out << "\twhen " << redAct->actListId+1 << " then\n";
/* Write each action in the list of action items. */
for ( ActionTable::Iter item = redAct->key; item.lte(); item++ )
for ( ActionTableMap::Iter redAct = redFsm->actionMap; redAct.lte(); redAct++ ) {
if ( redAct->numTransRefs > 0 ) {
/* Write the entry label. */
- out << "\twhen " << redAct->actListId+1 << "\n";
+ out << "\twhen " << redAct->actListId+1 << " then\n";
/* Write each action in the list of action items. */
for ( ActionTable::Iter item = redAct->key; item.lte(); item++ )
/* Write out referenced actions. */
if ( act->numToStateRefs > 0 ) {
/* Write the case label, the action and the case break */
- out << "\twhen " << act->actionId << "\n";
+ out << "\twhen " << act->actionId << " then\n";
ACTION( out, act, 0, false );
}
}
/* Write out referenced actions. */
if ( act->numFromStateRefs > 0 ) {
/* Write the case label, the action and the case break */
- out << "\twhen " << act->actionId << "\n";
+ out << "\twhen " << act->actionId << " then\n";
ACTION( out, act, 0, false );
}
}
/* Write out referenced actions. */
if ( act->numEofRefs > 0 ) {
/* Write the case label, the action and the case break */
- out << "\twhen " << act->actionId << "\n";
+ out << "\twhen " << act->actionId << " then\n";
ACTION( out, act, 0, true );
}
}
/* Write out referenced actions. */
if ( act->numTransRefs > 0 ) {
/* Write the case label, the action and the case break */
- out << "\twhen " << act->actionId << "\n";
+ out << "\twhen " << act->actionId << " then\n";
ACTION( out, act, 0, false );
}
}
" case _cond \n";
for ( CondSpaceList::Iter csi = condSpaceList; csi.lte(); csi++ ) {
CondSpace *condSpace = csi;
- out << " when " << condSpace->condSpaceId + 1 << "\n";
+ out << " when " << condSpace->condSpaceId + 1 << " then\n";
out << TABS(2) << "_widec = " << "(" <<
KEY(condSpace->baseKey) << " + (" << GET_KEY() <<
" - " << KEY(keyOps->minKey) << "))\n";
for ( ActionTableMap::Iter redAct = redFsm->actionMap; redAct.lte(); redAct++ ) {
if ( redAct->numToStateRefs > 0 ) {
/* Write the entry label. */
- out << "\twhen " << redAct->actListId+1 << "\n";
+ out << "\twhen " << redAct->actListId+1 << " then\n";
/* Write each action in the list of action items. */
for ( ActionTable::Iter item = redAct->key; item.lte(); item++ )
for ( ActionTableMap::Iter redAct = redFsm->actionMap; redAct.lte(); redAct++ ) {
if ( redAct->numFromStateRefs > 0 ) {
/* Write the entry label. */
- out << "\twhen " << redAct->actListId+1 << ":\n";
+ out << "\twhen " << redAct->actListId+1 << " then\n";
/* Write each action in the list of action items. */
for ( ActionTable::Iter item = redAct->key; item.lte(); item++ )
for ( ActionTableMap::Iter redAct = redFsm->actionMap; redAct.lte(); redAct++ ) {
if ( redAct->numEofRefs > 0 ) {
/* Write the entry label. */
- out << "\twhen " << redAct->actListId+1 << ":\n";
+ out << "\twhen " << redAct->actListId+1 << " then\n";
/* Write each action in the list of action items. */
for ( ActionTable::Iter item = redAct->key; item.lte(); item++ )
for ( ActionTableMap::Iter redAct = redFsm->actionMap; redAct.lte(); redAct++ ) {
if ( redAct->numTransRefs > 0 ) {
/* Write the entry label. */
- out << "\twhen " << redAct->actListId+1 << ":\n";
+ out << "\twhen " << redAct->actListId+1 << " then\n";
/* Write each action in the list of action items. */
for ( ActionTable::Iter item = redAct->key; item.lte(); item++ )