"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "ragel/cdcodegen.cpp" between
ragel-6.9.tar.gz and ragel-6.10.tar.gz

About: Ragel compiles executable finite state machines from regular languages (C, C++, Obj-C, C#, D, Java, Go and Ruby).

cdcodegen.cpp  (ragel-6.9):cdcodegen.cpp  (ragel-6.10)
skipping to change at line 358 skipping to change at line 358
ret << key.getVal(); ret << key.getVal();
else else
ret << (unsigned long) key.getVal() << 'u'; ret << (unsigned long) key.getVal() << 'u';
return ret.str(); return ret.str();
} }
else { else {
return KEY( key ); return KEY( key );
} }
} }
void FsmCodeGen::EOF_CHECK( ostream &ret )
{
ret <<
" if ( " << P() << " == " << PE() << " )\n"
" goto _test_eof;\n";
testEofUsed = true;
}
void FsmCodeGen::EXEC( ostream &ret, GenInlineItem *item, int targState, int inF inish ) void FsmCodeGen::EXEC( ostream &ret, GenInlineItem *item, int targState, int inF inish )
{ {
/* The parser gives fexec two children. The double brackets are for D /* The parser gives fexec two children. The double brackets are for D
* code. If the inline list is a single word it will get interpreted as a * code. If the inline list is a single word it will get interpreted as a
* C-style cast by the D compiler. */ * C-style cast by the D compiler. */
ret << "{" << P() << " = (("; ret << "{" << P() << " = ((";
INLINE_LIST( ret, item->children, targState, inFinish, false ); INLINE_LIST( ret, item->children, targState, inFinish, false );
ret << "))-1;}"; ret << "))-1;}";
} }
skipping to change at line 650 skipping to change at line 659
STATIC_VAR( "int", START() ) << " = " << START_STATE_ID() << ";\n "; STATIC_VAR( "int", START() ) << " = " << START_STATE_ID() << ";\n ";
if ( !noFinal ) if ( !noFinal )
STATIC_VAR( "int" , FIRST_FINAL() ) << " = " << FIRST_FINAL_STATE () << ";\n"; STATIC_VAR( "int" , FIRST_FINAL() ) << " = " << FIRST_FINAL_STATE () << ";\n";
if ( !noError ) if ( !noError )
STATIC_VAR( "int", ERROR() ) << " = " << ERROR_STATE() << ";\n"; STATIC_VAR( "int", ERROR() ) << " = " << ERROR_STATE() << ";\n";
out << "\n"; out << "\n";
if ( entryPointNames.length() > 0 ) { if ( !noEntry && entryPointNames.length() > 0 ) {
for ( EntryNameVect::Iter en = entryPointNames; en.lte(); en++ ) { for ( EntryNameVect::Iter en = entryPointNames; en.lte(); en++ ) {
STATIC_VAR( "int", DATA_PREFIX() + "en_" + *en ) << STATIC_VAR( "int", DATA_PREFIX() + "en_" + *en ) <<
" = " << entryPointIds[en.pos()] << ";\n" ; " = " << entryPointIds[en.pos()] << ";\n" ;
} }
out << "\n"; out << "\n";
} }
} }
void FsmCodeGen::writeStart() void FsmCodeGen::writeStart()
{ {
 End of changes. 2 change blocks. 
1 lines changed or deleted 10 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS