From f82499f0cf8e4884acda1c711e09aed7ce9a0506 Mon Sep 17 00:00:00 2001 From: helly Date: Thu, 31 Mar 2005 16:24:09 +0000 Subject: [PATCH] - Fix bug 1054496 --- code.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/code.cc b/code.cc index 26982b14..8375b991 100644 --- a/code.cc +++ b/code.cc @@ -250,15 +250,15 @@ void BitMap::stats() first = NULL; } -void genGoTo(std::ostream &o, State *from, State *to, bool & readCh) +void genGoTo(std::ostream &o, State *from, State *to, bool & readCh, const char *indent = "\t") { if (readCh && from->label + 1 != to->label) { - o << "\tyych = *YYCURSOR;\n"; + o << indent << "yych = *YYCURSOR;\n"; readCh = false; } - o << "\tgoto yy" << to->label << ";\n"; + o << indent << "goto yy" << to->label << ";\n"; ++oline; vUsedLabels.append(to->label); } @@ -701,8 +701,11 @@ void Go::genGoto(std::ostream &o, State *from, State *next, bool &readCh) o << "yych"; } - o << "] & " << (uint) b->m << ")"; - genGoTo(o, from, to, readCh); + o << "] & " << (uint) b->m << ") {\n"; + oline++; + genGoTo(o, from, to, readCh, "\t\t"); + o << "\t}\n"; + oline++; go.genBase(o, from, next, readCh); delete [] go.span; return ; -- 2.40.0