Add comparison operators for C++ location classes. Discussed at

<http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
* data/c++.m4 (b4_define_location_comparison): New boolean %define
declaration indicating whether filename_type has an operator==.  If
filename_type is `std::string', it defaults to `1', `0' otherwise.
* data/location.cc: Iff b4_define_location_comparison is `1', add
operator== and operator!= for class position and for class location.

Some minor fixes.
* src/scan-action.l: Remove unused file.
* src/symtab.c (symbol_printer_set): Use printer_location not
destructor_location.
* src/symtab.h (struct symbol): Replace incorrect source comment for
printer members.
* tests/input.at (Incompatible Aliases): Update output with correct
printer location.
This commit is contained in:
Joel E. Denny
2006-06-22 19:46:05 +00:00
parent 9bc0dd679f
commit 31b2b07ef7
7 changed files with 55 additions and 869 deletions

View File

@@ -163,7 +163,7 @@ input.y:3.7-11: first declaration
input.y:10.13-17: %destructor redeclaration for foo
input.y:5.13-17: first declaration
input.y:9.10-14: %printer redeclaration for foo
input.y:10.13-17: first declaration
input.y:4.10-14: first declaration
input.y:11.1-5: %left redeclaration for foo
input.y:6.1-5: first declaration
]])