]> granicus.if.org Git - re2c/commitdiff
readCh must only be true when state-link == NULL
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sat, 24 Apr 2004 23:53:55 +0000 (23:53 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sat, 24 Apr 2004 23:53:55 +0000 (23:53 +0000)
code.cc

diff --git a/code.cc b/code.cc
index 259db7e6a4ccc13f7b6aa943ac0360c2f4d6572b..5b139c27ec019ef9169418f8ebb5023fbee9815a 100644 (file)
--- a/code.cc
+++ b/code.cc
@@ -261,7 +261,11 @@ static void need(ostream &o, uint n, bool & readCh)
 
 void Match::emit(ostream &o, bool &readCh)
 {
-       if (state->link || !readAhead())
+       if (state->link)
+       {
+               o << "\t++YYCURSOR;\n";
+       }
+       else if (!readAhead())
        {
                /* do not read next char if match */
                o << "\t++YYCURSOR;\n";