]> granicus.if.org Git - re2c/commitdiff
- Improved check for neccessity for translation
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Mon, 17 Nov 2008 22:04:29 +0000 (22:04 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Mon, 17 Nov 2008 22:04:29 +0000 (22:04 +0000)
re2c/dfa.cc

index df6401d7e179e457dd0b570fd0bb5d0d3f64366e..3bbd57659f9b038deb6d4e50eeb89d8a839e15c9 100644 (file)
@@ -10,7 +10,7 @@ namespace re2c
 
 void prtChOrHex(std::ostream& o, uint c, bool useTalx)
 {
-       int oc = (int)((re2c::wFlag && !re2c::eFlag) || !useTalx ? c : re2c::talx[c]);
+       uint oc = eFlag && !wFlag && useTalx ? re2c::talx[c] : c;
 
        if ((oc < 256) && (isprint(oc) || isspace(oc)))
        {
@@ -28,7 +28,7 @@ void prtChOrHex(std::ostream& o, uint c, bool useTalx)
 
 void prtHex(std::ostream& o, uint c, bool useTalx)
 {
-       int oc = (int)((re2c::wFlag && !re2c::eFlag) || !useTalx ? c : re2c::talx[c]);
+       uint oc = eFlag && !wFlag && useTalx ? re2c::talx[c] : c;
 
        if (re2c::uFlag)
        {
@@ -60,7 +60,7 @@ void prtHex(std::ostream& o, uint c, bool useTalx)
 
 void prtCh(std::ostream& o, uint c, bool useTalx)
 {
-       int oc = (int)((re2c::wFlag && !re2c::eFlag) || !useTalx ? c : re2c::talx[c]);
+       uint oc = eFlag && !wFlag && useTalx ? re2c::talx[c] : c;
 
        switch (oc)
        {