bison-patches
[Top][All Lists]
Advanced

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

[PATCH 0/3] {maint} check and fix the display of locations


From: Akim Demaille
Subject: [PATCH 0/3] {maint} check and fix the display of locations
Date: Fri, 30 Nov 2012 13:22:08 +0100

YY_LOCATION_PRINT was recently improved to display the locations
more nicely.  In some situations, the displayed column could be
negative.  The following changes address this issue.

There is one dubious point on which I'd like opinions: I wrote the
yy_location_print function to take a location by pointer, but the
YY_LOCATION_PRINT macro takes a location by value.  So I have:

#  define YY_LOCATION_PRINT(File, Loc)          \
  yy_location_print_ (File, &(Loc))

which in some situations can be really wrong (if Loc is a temporary).
I don't think this would happen in practice, yet it is possible.
I can change the yy_location_print function to take the location
by value too, but that seems less natural (yet it is what bison
does for its own handling of locations).

Akim Demaille (3):
  glr.c: remove stray macro
  formatting changes
  yacc.c, glr.c: check and fix the display of locations

 THANKS           |  1 +
 data/c.m4        | 92 ++++++++++++++++++++++++++++++++++++--------------------
 data/glr.c       |  7 -----
 src/location.c   |  4 +--
 tests/actions.at | 77 ++++++++++++++++++++++++++++++++++++++++++++++-
 5 files changed, 138 insertions(+), 43 deletions(-)

-- 
1.8.0.1




reply via email to

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