]> granicus.if.org Git - re2c/commitdiff
- Fix minor issue with -u code generation
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sat, 24 Feb 2007 17:21:01 +0000 (17:21 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sat, 24 Feb 2007 17:21:01 +0000 (17:21 +0000)
re2c/CHANGELOG
re2c/code.cc
re2c/test/cvsignore.wb.c

index 0519ccd85a0c683892c608e0336b4ad21c96619d..3ea6cfea576ea5735e509e62df4e1c33c49bb6b7 100644 (file)
@@ -1,5 +1,6 @@
 Version 0.11.2 (????-??-??)
 ---------------------------
+- Fixed -u switch code generation.
 - Added ability to avoid defines and overwrite variable and label names.
 
 Version 0.11.1 (2007-02-20)
index 17851bb79ed90c5abbf9968fd1c90d2f9cd02aff..1d3af0970b67a99e6cdc3ece20227882746525a0 100644 (file)
@@ -904,7 +904,7 @@ void Go::genCpGoto(std::ostream &o, uint ind, const State *from, const State *ne
        readCh = false;
        if (wFlag)
        {
-               o << indent(ind) << "if(" << sYych <<" & 0xFF00) {\n";
+               o << indent(ind) << "if(" << sYych <<" & ~0xFF) {\n";
                genBase(o, ind+1, from, next, readCh, 1);
                o << indent(ind++) << "} else {\n";
                sYych = mapCodeName["yych"];
@@ -1021,7 +1021,7 @@ void Go::genGoto(std::ostream &o, uint ind, const State *from, const State *next
                                        readCh = false;
                                        if (wFlag)
                                        {
-                                               o << indent(ind) << "if(" << sYych << " & 0xFF00) {\n";
+                                               o << indent(ind) << "if(" << sYych << " & ~0xFF) {\n";
                                                sYych = mapCodeName["yych"];
                                                genBase(o, ind+1, from, next, readCh, 1);
                                                o << indent(ind) << "} else ";
index d51ee1c62b19cc73f48d6be2d23a9d8daa49c81b..04a0bfd4701cc405f7cf9c872a8d60197a6843cc 100755 (executable)
@@ -138,7 +138,7 @@ yy17:
                if(YYLIMIT == YYCURSOR) YYFILL(1);
                yych = *YYCURSOR;
 yy18:
-               if(yych & 0xFF00) {
+               if(yych & ~0xFF) {
                        goto yy17;
                } else if(yybm[0+yych] & 128) {
                        goto yy17;