From: helly Date: Sat, 24 Apr 2004 23:53:55 +0000 (+0000) Subject: readCh must only be true when state-link == NULL X-Git-Tag: 0.13.6~710 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=abcfe34a28b9e71fd91a5b1c9cc144b367c341d7;p=re2c readCh must only be true when state-link == NULL --- diff --git a/code.cc b/code.cc index 259db7e6..5b139c27 100644 --- 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";