bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: code_start is not initialized for epilogue


From: Akim Demaille
Subject: FYI: code_start is not initialized for epilogue
Date: Sat, 01 Mar 2003 11:54:59 +0100
User-agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.2

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * 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.

Index: src/scan-gram.l
===================================================================
RCS file: /cvsroot/bison/bison/src/scan-gram.l,v
retrieving revision 1.55
diff -u -u -r1.55 scan-gram.l
--- src/scan-gram.l 3 Feb 2003 15:35:57 -0000 1.55
+++ src/scan-gram.l 1 Mar 2003 10:54:25 -0000
@@ -138,8 +138,9 @@
   /* 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.  */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]