"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "ragel/cdtable.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).

cdtable.cpp  (ragel-6.9):cdtable.cpp  (ragel-6.10)
skipping to change at line 660 skipping to change at line 660
" goto _match;\n" " goto _match;\n"
" }\n" " }\n"
" }\n" " }\n"
" _trans += _klen;\n" " _trans += _klen;\n"
" }\n" " }\n"
"\n"; "\n";
} }
void TabCodeGen::GOTO( ostream &ret, int gotoDest, bool inFinish ) void TabCodeGen::GOTO( ostream &ret, int gotoDest, bool inFinish )
{ {
ret << "{" << vCS() << " = " << gotoDest << "; " << ret << "{";
CTRL_FLOW() << "goto _again;}";
ret << vCS() << " = " << gotoDest << ";";
if ( inFinish && !noEnd )
EOF_CHECK( ret );
ret << CTRL_FLOW() << "goto _again;";
ret << "}";
} }
void TabCodeGen::GOTO_EXPR( ostream &ret, GenInlineItem *ilItem, bool inFinish ) void TabCodeGen::GOTO_EXPR( ostream &ret, GenInlineItem *ilItem, bool inFinish )
{ {
ret << "{" << vCS() << " = ("; ret << "{";
ret << vCS() << " = (";
INLINE_LIST( ret, ilItem->children, 0, inFinish, false ); INLINE_LIST( ret, ilItem->children, 0, inFinish, false );
ret << "); " << CTRL_FLOW() << "goto _again;}"; ret << "); ";
if ( inFinish && !noEnd )
EOF_CHECK( ret );
ret << CTRL_FLOW() << "goto _again;";
ret << "}";
} }
void TabCodeGen::CURS( ostream &ret, bool inFinish ) void TabCodeGen::CURS( ostream &ret, bool inFinish )
{ {
ret << "(_ps)"; ret << "(_ps)";
} }
void TabCodeGen::TARGS( ostream &ret, bool inFinish, int targState ) void TabCodeGen::TARGS( ostream &ret, bool inFinish, int targState )
{ {
ret << "(" << vCS() << ")"; ret << "(" << vCS() << ")";
skipping to change at line 700 skipping to change at line 716
ret << ");"; ret << ");";
} }
void TabCodeGen::CALL( ostream &ret, int callDest, int targState, bool inFinish ) void TabCodeGen::CALL( ostream &ret, int callDest, int targState, bool inFinish )
{ {
if ( prePushExpr != 0 ) { if ( prePushExpr != 0 ) {
ret << "{"; ret << "{";
INLINE_LIST( ret, prePushExpr, 0, false, false ); INLINE_LIST( ret, prePushExpr, 0, false, false );
} }
ret << "{" << STACK() << "[" << TOP() << "++] = " << vCS() << "; " << vCS ret << "{" << STACK() << "[" << TOP() << "++] = " << vCS() << "; " << vCS
() << " = " << () << " = " << callDest << ";";
callDest << "; " << CTRL_FLOW() << "goto _again;}";
if ( inFinish && !noEnd )
EOF_CHECK( ret );
ret << CTRL_FLOW() << "goto _again;";
ret << "}";
if ( prePushExpr != 0 ) if ( prePushExpr != 0 )
ret << "}"; ret << "}";
} }
void TabCodeGen::CALL_EXPR( ostream &ret, GenInlineItem *ilItem, int targState, bool inFinish ) void TabCodeGen::CALL_EXPR( ostream &ret, GenInlineItem *ilItem, int targState, bool inFinish )
{ {
if ( prePushExpr != 0 ) { if ( prePushExpr != 0 ) {
ret << "{"; ret << "{";
INLINE_LIST( ret, prePushExpr, 0, false, false ); INLINE_LIST( ret, prePushExpr, 0, false, false );
} }
ret << "{" << STACK() << "[" << TOP() << "++] = " << vCS() << "; " << vCS ret << "{";
() << " = (";
ret << STACK() << "[" << TOP() << "++] = " << vCS() << "; " << vCS() << "
= (";
INLINE_LIST( ret, ilItem->children, targState, inFinish, false ); INLINE_LIST( ret, ilItem->children, targState, inFinish, false );
ret << "); " << CTRL_FLOW() << "goto _again;}"; ret << ");";
if ( inFinish && !noEnd )
EOF_CHECK( ret );
ret << CTRL_FLOW() << "goto _again;";
ret << "}";
if ( prePushExpr != 0 ) if ( prePushExpr != 0 )
ret << "}"; ret << "}";
} }
void TabCodeGen::RET( ostream &ret, bool inFinish ) void TabCodeGen::RET( ostream &ret, bool inFinish )
{ {
ret << "{" << vCS() << " = " << STACK() << "[--" << ret << "{" << vCS() << " = " << STACK() << "[--" <<
TOP() << "]; "; TOP() << "]; ";
if ( postPopExpr != 0 ) { if ( postPopExpr != 0 ) {
ret << "{"; ret << "{";
INLINE_LIST( ret, postPopExpr, 0, false, false ); INLINE_LIST( ret, postPopExpr, 0, false, false );
ret << "}"; ret << "}";
} }
ret << CTRL_FLOW() << "goto _again;}"; if ( inFinish && !noEnd )
EOF_CHECK( ret );
ret << CTRL_FLOW() << "goto _again;";
ret << "}";
} }
void TabCodeGen::BREAK( ostream &ret, int targState, bool csForced ) void TabCodeGen::BREAK( ostream &ret, int targState, bool csForced )
{ {
outLabelUsed = true; outLabelUsed = true;
ret << "{" << P() << "++; " << CTRL_FLOW() << "goto _out; }"; ret << "{" << P() << "++; " << CTRL_FLOW() << "goto _out; }";
} }
void TabCodeGen::writeData() void TabCodeGen::writeData()
{ {
 End of changes. 7 change blocks. 
11 lines changed or deleted 47 lines changed or added

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