]> granicus.if.org Git - re2c/commitdiff
- Fixed #1313083 -e (EBCDIC cross compile) broken.
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Wed, 2 Nov 2005 20:29:41 +0000 (20:29 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Wed, 2 Nov 2005 20:29:41 +0000 (20:29 +0000)
CHANGELOG
actions.cc

index 704ab11f651f17a379ba2a2cc6801b84d3acf798..2edfbfb1f51b5fc205ec0780e413a7702a195665 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,6 @@
 Version 0.9.11 (????-??-??)
 ---------------------------
+- Fixed #1313083 -e (EBCDIC cross compile) broken.
 - Fixed #1297658 underestimation of n in YYFILL(n).
 - Applied #1339483 Avoid rebuilds of re2c when running subtargets.
 - Implemented #1335305 symbol table reimplementation, just slightly modifed.
index 28939f18b61827bcde276dc9d30b6bfe4552ced3..16cf2e3344900125cfbe3759b0515eb8e4de7d69 100644 (file)
@@ -601,7 +601,7 @@ uchar Scanner::unescape(SubStr &s) const
 
 Range * Scanner::getRange(SubStr &s) const
 {
-       uchar lb = unescape(s), ub;
+       uint lb = unescape(s), ub, xlb, xub, c;
 
        if (s.len < 2 || *s.str != '-')
        {
@@ -615,11 +615,30 @@ Range * Scanner::getRange(SubStr &s) const
 
                if (ub < lb)
                {
-                       uchar tmp;
-                       tmp = lb;
+                       uint tmp = lb;
                        lb = ub;
                        ub = tmp;
                }
+               
+               xlb = xlat[lb];
+               xub = xlat[ub];
+               
+               for(c = lb; c <= ub; c++)
+               {
+                       if (!(xlb <= xlat[c] && xlat[c] <= ub))
+                       {
+                               /* range doesn't work */
+                               Range * r = new Range(xlb, xlb + 1);
+                               for (c = lb + 1; c <= ub; c++)
+                               {
+                                       r = doUnion(r, new Range(xlat[c], xlat[c] + 1));
+                               }
+                               return r;
+                       }
+               }
+               
+               lb = xlb;
+               ub = xub;
        }
 
        return new Range(lb, ub + 1);