From: helly Date: Wed, 15 Jun 2005 21:09:51 +0000 (+0000) Subject: - Fix code generation for -b X-Git-Tag: 0.13.6~635 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=054579b43985759c905e7a9ad505a25d457fcfcb;p=re2c - Fix code generation for -b --- diff --git a/code.cc b/code.cc index 48925c21..1dc028e2 100644 --- a/code.cc +++ b/code.cc @@ -1021,7 +1021,7 @@ void DFA::emit(std::ostream &o) { static uint label = 0; State *s; - uint i; + uint i, bitmap_brace = 0; bool hasFillLabels = (0<=vFillIndexes); if (hasFillLabels==true && label!=0) @@ -1186,6 +1186,9 @@ void DFA::emit(std::ostream &o) if (bFlag) { + o << "{\n"; + ++oline; + bitmap_brace = 1; BitMap::gen(o, lbChar, ubChar); } @@ -1267,6 +1270,10 @@ void DFA::emit(std::ostream &o) } o << "}\n"; + if (bitmap_brace) { + o << "}\n"; + ++oline; + } ++oline; BitMap::first = NULL;