From abcfe34a28b9e71fd91a5b1c9cc144b367c341d7 Mon Sep 17 00:00:00 2001 From: helly Date: Sat, 24 Apr 2004 23:53:55 +0000 Subject: [PATCH] readCh must only be true when state-link == NULL --- code.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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"; -- 2.50.1