]> granicus.if.org Git - re2c/commitdiff
- Fix/Add missing readCh support in yyaccept jump generation
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sun, 7 May 2006 20:33:06 +0000 (20:33 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sun, 7 May 2006 20:33:06 +0000 (20:33 +0000)
# shouldn't be necessary, but might become at some point

code.cc

diff --git a/code.cc b/code.cc
index 549ccc8c3699e7933ff860cd3d8280abda9936fc..5ef1071f08244568ef3feecfead847f5a819b2e2 100644 (file)
--- a/code.cc
+++ b/code.cc
@@ -529,6 +529,12 @@ void Accept::emit(std::ostream &o, uint ind, bool &readCh) const
                bUsedYYMarker = true;
                o << indent(ind) << "YYCURSOR = YYMARKER;\n";
 
+               if (readCh) // shouldn't be necessary, but might become at some point
+               {
+                       o << indent(ind) << "yych = *YYCURSOR;\n";
+                       readCh = false;
+               }
+
                if (mapRules.size() > 1)
                {
                        bUsedYYAccept = true;