]> granicus.if.org Git - re2c/commitdiff
- Fix code generation for -b
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Wed, 15 Jun 2005 21:09:51 +0000 (21:09 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Wed, 15 Jun 2005 21:09:51 +0000 (21:09 +0000)
code.cc

diff --git a/code.cc b/code.cc
index 48925c21a9f8535ffa654eba013f7dbc00cdb61e..1dc028e25feb5e576fe15367bf841cac96be88ed 100644 (file)
--- 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;