diff options
author | orivej <orivej@yandex-team.ru> | 2022-02-10 16:44:49 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:49 +0300 |
commit | 718c552901d703c502ccbefdfc3c9028d608b947 (patch) | |
tree | 46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /contrib/tools/ragel6/cdflat.cpp | |
parent | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff) | |
download | ydb-718c552901d703c502ccbefdfc3c9028d608b947.tar.gz |
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/tools/ragel6/cdflat.cpp')
-rw-r--r-- | contrib/tools/ragel6/cdflat.cpp | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/contrib/tools/ragel6/cdflat.cpp b/contrib/tools/ragel6/cdflat.cpp index b28a95a660..450b621d8b 100644 --- a/contrib/tools/ragel6/cdflat.cpp +++ b/contrib/tools/ragel6/cdflat.cpp @@ -454,32 +454,32 @@ void FlatCodeGen::LOCATE_TRANS() void FlatCodeGen::GOTO( ostream &ret, int gotoDest, bool inFinish ) { - ret << "{"; - - ret << vCS() << " = " << gotoDest << ";"; - - if ( inFinish && !noEnd ) - EOF_CHECK( ret ); - - ret << CTRL_FLOW() << "goto _again;"; - - ret << "}"; + ret << "{"; + + ret << vCS() << " = " << gotoDest << ";"; + + if ( inFinish && !noEnd ) + EOF_CHECK( ret ); + + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; } void FlatCodeGen::GOTO_EXPR( ostream &ret, GenInlineItem *ilItem, bool inFinish ) { - ret << "{"; - - ret << vCS() << " = ("; + ret << "{"; + + ret << vCS() << " = ("; INLINE_LIST( ret, ilItem->children, 0, inFinish, false ); - ret << "); "; - - if ( inFinish && !noEnd ) - EOF_CHECK( ret ); - - ret << CTRL_FLOW() << "goto _again;"; - - ret << "}"; + ret << "); "; + + if ( inFinish && !noEnd ) + EOF_CHECK( ret ); + + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; } void FlatCodeGen::CURS( ostream &ret, bool inFinish ) @@ -511,17 +511,17 @@ void FlatCodeGen::CALL( ostream &ret, int callDest, int targState, bool inFinish INLINE_LIST( ret, prePushExpr, 0, false, false ); } - ret << "{"; - - ret << STACK() << "[" << TOP() << "++] = " << vCS() << "; " << vCS() << " = " << callDest << ";"; - - if ( inFinish && !noEnd ) - EOF_CHECK( ret ); - - ret << CTRL_FLOW() << "goto _again;"; - - ret << "}"; + ret << "{"; + ret << STACK() << "[" << TOP() << "++] = " << vCS() << "; " << vCS() << " = " << callDest << ";"; + + if ( inFinish && !noEnd ) + EOF_CHECK( ret ); + + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; + if ( prePushExpr != 0 ) ret << "}"; } @@ -536,14 +536,14 @@ void FlatCodeGen::CALL_EXPR( ostream &ret, GenInlineItem *ilItem, int targState, ret << "{" << STACK() << "[" << TOP() << "++] = " << vCS() << "; " << vCS() << " = ("; INLINE_LIST( ret, ilItem->children, targState, inFinish, false ); - ret << ");"; - - if ( inFinish && !noEnd ) - EOF_CHECK( ret ); - - ret << CTRL_FLOW() << "goto _again;"; - ret << "}"; - + ret << ");"; + + if ( inFinish && !noEnd ) + EOF_CHECK( ret ); + + ret << CTRL_FLOW() << "goto _again;"; + ret << "}"; + if ( prePushExpr != 0 ) ret << "}"; } @@ -559,12 +559,12 @@ void FlatCodeGen::RET( ostream &ret, bool inFinish ) ret << "}"; } - if ( inFinish && !noEnd ) - EOF_CHECK( ret ); - - ret << CTRL_FLOW() << "goto _again;"; - - ret << "}"; + if ( inFinish && !noEnd ) + EOF_CHECK( ret ); + + ret << CTRL_FLOW() << "goto _again;"; + + ret << "}"; } void FlatCodeGen::BREAK( ostream &ret, int targState, bool csForced ) @@ -734,17 +734,17 @@ void FlatCodeGen::writeExec() redFsm->anyRegActions() || redFsm->anyFromStateActions() ) { out << - " " << PTR_CONST() << ARRAY_TYPE(redFsm->maxActArrItem) << PTR_CONST_END() << POINTER() << "_acts;\n" + " " << PTR_CONST() << ARRAY_TYPE(redFsm->maxActArrItem) << PTR_CONST_END() << POINTER() << "_acts;\n" " " << UINT() << " _nacts;\n"; } out << - " " << PTR_CONST() << WIDE_ALPH_TYPE() << PTR_CONST_END() << POINTER() << "_keys;\n" - " " << PTR_CONST() << ARRAY_TYPE(redFsm->maxIndex) << PTR_CONST_END() << POINTER() << "_inds;\n"; + " " << PTR_CONST() << WIDE_ALPH_TYPE() << PTR_CONST_END() << POINTER() << "_keys;\n" + " " << PTR_CONST() << ARRAY_TYPE(redFsm->maxIndex) << PTR_CONST_END() << POINTER() << "_inds;\n"; if ( redFsm->anyConditions() ) { out << - " " << PTR_CONST() << ARRAY_TYPE(redFsm->maxCond) << PTR_CONST_END() << POINTER() << "_conds;\n" + " " << PTR_CONST() << ARRAY_TYPE(redFsm->maxCond) << PTR_CONST_END() << POINTER() << "_conds;\n" " " << WIDE_ALPH_TYPE() << " _widec;\n"; } @@ -863,7 +863,7 @@ void FlatCodeGen::writeExec() if ( redFsm->anyEofActions() ) { out << - " " << PTR_CONST() << ARRAY_TYPE(redFsm->maxActArrItem) << PTR_CONST_END() << + " " << PTR_CONST() << ARRAY_TYPE(redFsm->maxActArrItem) << PTR_CONST_END() << POINTER() << "__acts = " << ARR_OFF( A(), EA() + "[" + vCS() + "]" ) << ";\n" " " << UINT() << " __nacts = " << CAST(UINT()) << " *__acts++;\n" |