mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 05:13:04 +00:00
Fix strange %define locations for default values.
Reported by Akim Demaille at <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html> and discussed again starting at <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>. * data/bison.m4 (b4_percent_define_default): Leave syncline blank because location information is bogus. Use angle brackets to delimit fake file name because square brackets look like over-quoted m4. Choose a better fake file name. Use negative line numbers. * src/muscle_tab.c (muscle_percent_define_default): Likewise. * src/location.c (location_print): If line for a boundary is negative, only print that boundary's file name. * src/location.h: Document that. * tests/skeletons.at (%define Boolean variables: invalid skeleton defaults): Update output.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
-*- Autoconf -*-
|
||||
|
||||
# Language-independent M4 Macros for Bison.
|
||||
# Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008 Free Software Foundation,
|
||||
# Inc.
|
||||
# Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
|
||||
# Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -464,10 +464,9 @@ m4_define([b4_percent_define_default],
|
||||
[m4_ifndef([b4_percent_define(]$1[)],
|
||||
[m4_define([b4_percent_define(]$1[)], [$2])dnl
|
||||
m4_define([b4_percent_define_loc(]$1[)],
|
||||
[[[[[Bison:b4_percent_define_default]:1.0]], [[[Bison:b4_percent_define_default]:1.0]]]])dnl
|
||||
m4_define([b4_percent_define_syncline(]$1[)],
|
||||
[[]b4_syncline(1, [["[Bison:b4_percent_define_default]"]])[
|
||||
]])])])
|
||||
[[[[<skeleton default value>:-1.-1]],
|
||||
[[<skeleton default value>:-1.-1]]]])dnl
|
||||
m4_define([b4_percent_define_syncline(]$1[)], [[]])])])
|
||||
|
||||
# b4_percent_define_check_values(VALUES)
|
||||
# --------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user