From: Ulya Trofimovich Date: Wed, 4 Mar 2015 17:26:40 +0000 (+0000) Subject: Continued separating .dot case from other cases in codegen. X-Git-Tag: 0.15~366 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d9a7de6b90efcab468d9a97fbc98f4251869b617;p=re2c Continued separating .dot case from other cases in codegen. --- diff --git a/re2c/code.cc b/re2c/code.cc index 8d031644..65d0d5c5 100644 --- a/re2c/code.cc +++ b/re2c/code.cc @@ -821,9 +821,8 @@ static void printDotCharInterval(OutputFile & o, uint lastPrintableChar, uint ch o << "]"; } -static bool genCasesD(OutputFile & o, uint lb, Span *s, bool &newLine, const State *from, const State *to) +static void genCasesD(OutputFile & o, uint lb, Span *s, bool &newLine, const State *from, const State *to) { - bool used = false; uint lastPrintableChar = 0; if (!newLine) @@ -852,7 +851,6 @@ static bool genCasesD(OutputFile & o, uint lb, Span *s, bool &newLine, const Sta printDotCharInterval(o, lastPrintableChar, lb, from, to, true); lastPrintableChar = 0; newLine = false; - used = true; if (++lb == s->ub) { @@ -871,8 +869,6 @@ static bool genCasesD(OutputFile & o, uint lb, Span *s, bool &newLine, const Sta o << "\n"; newLine = true; } - - return used; } static bool genCases(OutputFile & o, uint ind, uint lb, Span *s, bool &newLine, uint mask) @@ -945,26 +941,24 @@ void Go::genSwitchD (OutputFile & o, const State *from) const while (t != &sP[0]) { - bool used = false; - r = s = &sP[0]; const State *to = (*s)->to; if (*s == &span[0]) { - used |= genCasesD(o, 0, *s, newLine, from, to); + genCasesD(o, 0, *s, newLine, from, to); } else { - used |= genCasesD(o, (*s)[ -1].ub, *s, newLine, from, to); + genCasesD(o, (*s)[ -1].ub, *s, newLine, from, to); } while (++s < t) { if ((*s)->to == to) { - used |= genCasesD(o, (*s)[ -1].ub, *s, newLine, from, to); + genCasesD(o, (*s)[ -1].ub, *s, newLine, from, to); } else {