From 0433ba88f97e23a896ffba2e4b33bac1d09ff345 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sat, 1 Mar 2003 10:55:31 +0000 Subject: [PATCH] * src/scan-gram.l (code_start): Always initialize it when entering into yylex, as SC_EPILOGUE is activated *before* the corresponding yylex invocation. An alternative would be making it static, but then it starts with the second %%'s beginning, instead of its end. --- ChangeLog | 7 +++++++ src/scan-gram.l | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6dac70aa..d0503137 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-03-01 Akim Demaille + + * src/scan-gram.l (code_start): Always initialize it when entering + into yylex, as SC_EPILOGUE is activated *before* the corresponding + yylex invocation. An alternative would be making it static, but + then it starts with the second %%'s beginning, instead of its end. + 2003-02-28 Paul Eggert * lib/mbswidth.c: Include before "mbswidth.h", to work diff --git a/src/scan-gram.l b/src/scan-gram.l index 5f7ac60e..424ae2e9 100644 --- a/src/scan-gram.l +++ b/src/scan-gram.l @@ -138,8 +138,9 @@ splice (\\[ \f\t\v]*\n)* /* Location of most recent identifier, when applicable. */ location id_loc IF_LINT (= *loc); - /* Where containing code started, when applicable. */ - boundary code_start IF_LINT (= loc->start); + /* Where containing code started, when applicable. + Once the second %% seen, we are looking for the epilogue. */ + boundary code_start = loc->end; /* Where containing comment or string or character literal started, when applicable. */ -- 2.47.2