Merge remote-tracking branch 'origin/maint'

* origin/maint:
  build: don't try to generate docs when cross-compiling
  package: fix a reporter's name
  %union: fix the support for named %union
  package: bump to 2015
  flex: don't trust YY_USER_INIT
  yacc.c: fix broken union when api.value.type=union and %defines are used
  doc: fix missing xref
  gnulib: update
  location: remove some ugly debugging code traces
  build: use abort to pacify compiler errors
  package: bump to 2014
  doc: specify documentation encoding
This commit is contained in:
Akim Demaille
2015-01-05 13:51:30 +01:00
204 changed files with 754 additions and 473 deletions

View File

@@ -52,7 +52,7 @@ into various formats.
-----
Copyright (C) 2002, 2008-2013 Free Software Foundation, Inc.
Copyright (C) 2002, 2008-2015 Free Software Foundation, Inc.
This file is part of GNU Bison.

View File

@@ -2,7 +2,7 @@
# Language-independent M4 Macros for Bison.
# Copyright (C) 2002, 2004-2013 Free Software Foundation, Inc.
# Copyright (C) 2002, 2004-2015 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
@@ -1061,3 +1061,6 @@ b4_percent_define_ifdef([api.value.type],
[['%s' and '%s' cannot be used together]],
[%yacc],
[%define api.value.type "union"])])])])
# api.value.union.name.
b4_percent_define_check_kind([api.value.union.name], [keyword])

View File

@@ -2,7 +2,7 @@
# C++ skeleton dispatching for Bison.
# Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
# Copyright (C) 2006-2007, 2009-2015 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

View File

@@ -2,7 +2,7 @@
# C++ skeleton for Bison
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
# Copyright (C) 2002-2015 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
@@ -17,6 +17,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Sanity checks, before defaults installed by c.m4.
b4_percent_define_ifdef([[api.value.union.name]],
[b4_complain_at(b4_percent_define_get_loc([[api.value.union.name]]),
[named %union is invalid in C++])])
m4_include(b4_pkgdatadir/[c.m4])
# b4_comment(TEXT, [PREFIX])

View File

@@ -2,7 +2,7 @@
# Common code for C-like languages (C, C++, Java, etc.)
# Copyright (C) 2012-2013 Free Software Foundation, Inc.
# Copyright (C) 2012-2015 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

View File

@@ -2,7 +2,7 @@
# C skeleton dispatching for Bison.
# Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
# Copyright (C) 2006-2007, 2009-2015 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

View File

@@ -2,7 +2,7 @@
# C M4 Macros for Bison.
# Copyright (C) 2002, 2004-2013 Free Software Foundation, Inc.
# Copyright (C) 2002, 2004-2015 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
@@ -97,7 +97,8 @@ m4_define([b4_api_PREFIX],
m4_define_default([b4_prefix], [b4_api_prefix])
# If the %union is not named, its name is YYSTYPE.
m4_define_default([b4_union_name], [b4_api_PREFIX[]STYPE])
b4_percent_define_default([[api.value.union.name]],
[b4_api_PREFIX[][STYPE]])
## ------------------------ ##
@@ -560,15 +561,15 @@ b4_locations_if([, yylocationp])[]b4_user_args[);
# b4_symbol_type_register(SYMBOL-NUM)
# -----------------------------------
# Symbol SYMBOL-NUM has a type (for variant) instead of a type-tag.
# Extend the definition of %union's body with a field of that type,
# and extend the symbol's "type" field to point to the field name,
# instead of the type name.
# Extend the definition of %union's body (b4_union_members) with a
# field of that type, and extend the symbol's "type" field to point to
# the field name, instead of the type name.
m4_define([b4_symbol_type_register],
[m4_define([b4_symbol($1, type_tag)],
[b4_symbol_if([$1], [has_id],
[b4_symbol([$1], [id])],
[yytype_[]b4_symbol([$1], [number])])])dnl
m4_append([b4_user_union_members],
m4_append([b4_union_members],
m4_expand([
b4_symbol_tag_comment([$1])dnl
b4_symbol([$1], [type]) b4_symbol([$1], [type_tag]);]))
@@ -608,10 +609,9 @@ m4_copy_force([b4_symbol_value_union], [b4_symbol_value])
])
# ---------------- #
# api.value.type. #
# ---------------- #
# -------------------------- #
# api.value.type = variant. #
# -------------------------- #
# b4_value_type_setup_variant
# ---------------------------
@@ -686,11 +686,13 @@ typedef ]b4_percent_define_get([[api.value.type]])[ ]b4_api_PREFIX[STYPE;
[m4_bmatch(b4_percent_define_get([[api.value.type]]),
[union\|union-directive],
[[#if ! defined ]b4_api_PREFIX[STYPE && ! defined ]b4_api_PREFIX[STYPE_IS_DECLARED
typedef union ]b4_union_name[ ]b4_api_PREFIX[STYPE;
union ]b4_union_name[
]b4_percent_define_get_syncline([[api.value.union.name]])[
union ]b4_percent_define_get([[api.value.union.name]])[
{
]b4_user_union_members[
};
]b4_percent_define_get_syncline([[api.value.union.name]])[
typedef union ]b4_percent_define_get([[api.value.union.name]])[ ]b4_api_PREFIX[STYPE;
# define ]b4_api_PREFIX[STYPE_IS_TRIVIAL 1
# define ]b4_api_PREFIX[STYPE_IS_DECLARED 1
#endif

View File

@@ -2,7 +2,7 @@
# GLR skeleton for Bison
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
# Copyright (C) 2002-2015 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
@@ -178,9 +178,42 @@ m4_if(b4_skeleton, ["glr.c"],
## Output files. ##
## -------------- ##
# Unfortunately the order of generation between the header and the
# implementation file matters (for glr.c) because of the current
# implementation of api.value.type=union. In that case we still use a
# union for YYSTYPE, but we generate the contents of this union when
# setting up YYSTYPE. This is needed for other aspects, such as
# defining yy_symbol_value_print, since we need to now the name of the
# members of this union.
#
# To avoid this issue, just generate the header before the
# implementation file. But we should also make them more independant.
# ----------------- #
# The header file. #
# ----------------- #
# glr.cc produces its own header.
m4_if(b4_skeleton, ["glr.c"],
[b4_defines_if(
[b4_output_begin([b4_spec_defines_file])
b4_copyright([Skeleton interface for Bison GLR parsers in C],
[2002-2015])[
]b4_cpp_guard_open([b4_spec_defines_file])[
]b4_shared_declarations[
]b4_cpp_guard_close([b4_spec_defines_file])[
]b4_output_end()
])])
# ------------------------- #
# The implementation file. #
# ------------------------- #
b4_output_begin([b4_parser_file_name])
b4_copyright([Skeleton implementation for Bison GLR parsers in C],
[2002-2013])[
[2002-2015])[
/* C GLR parser skeleton written by Paul Hilfinger. */
@@ -2539,16 +2572,3 @@ m4_if(b4_prefix, [yy], [],
]b4_epilogue[]dnl
b4_output_end()
# glr.cc produces its own header.
m4_if(b4_skeleton, ["glr.c"],
[b4_defines_if(
[b4_output_begin([b4_spec_defines_file])
b4_copyright([Skeleton interface for Bison GLR parsers in C],
[2002-2013])[
]b4_cpp_guard_open([b4_spec_defines_file])[
]b4_shared_declarations[
]b4_cpp_guard_close([b4_spec_defines_file])[
]b4_output_end()
])])

View File

@@ -1,6 +1,6 @@
# C++ GLR skeleton for Bison
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
# Copyright (C) 2002-2015 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
@@ -329,7 +329,7 @@ b4_percent_define_flag_if([[global_tokens_and_yystype]],
b4_defines_if(
[b4_output_begin([b4_spec_defines_file])
b4_copyright([Skeleton interface for Bison GLR parsers in C++],
[2002-2013])[
[2002-2015])[
// C++ GLR parser skeleton written by Akim Demaille.

View File

@@ -2,7 +2,7 @@
# Java skeleton dispatching for Bison.
# Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
# Copyright (C) 2007, 2009-2015 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

View File

@@ -2,7 +2,7 @@
# Java language support for Bison
# Copyright (C) 2007-2013 Free Software Foundation, Inc.
# Copyright (C) 2007-2015 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

View File

@@ -1,6 +1,6 @@
# C++ skeleton for Bison
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
# Copyright (C) 2002-2015 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
@@ -131,7 +131,7 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param))])])
m4_pushdef([b4_copyright_years],
[2002-2013])
[2002-2015])
m4_define([b4_parser_class_name],
[b4_percent_define_get([[parser_class_name]])])

View File

@@ -1,6 +1,6 @@
# Java skeleton for Bison -*- autoconf -*-
# Copyright (C) 2007-2013 Free Software Foundation, Inc.
# Copyright (C) 2007-2015 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
@@ -84,7 +84,7 @@ m4_define([b4_define_state],[[
b4_output_begin([b4_parser_file_name])
b4_copyright([Skeleton implementation for Bison LALR(1) parsers in Java],
[2007-2013])
[2007-2015])
b4_percent_define_ifdef([package], [package b4_percent_define_get([package]);
])[/* First part of user declarations. */

View File

@@ -1,4 +1,4 @@
## Copyright (C) 2002, 2005-2013 Free Software Foundation, Inc.
## Copyright (C) 2002, 2005-2015 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

View File

@@ -1,6 +1,6 @@
# C++ skeleton for Bison
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
# Copyright (C) 2002-2015 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
@@ -16,7 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
m4_pushdef([b4_copyright_years],
[2002-2013])
[2002-2015])
# b4_position_define
# ------------------
@@ -273,8 +273,7 @@ m4_define([b4_location_define],
operator<< (std::basic_ostream<YYChar>& ostr, const location& loc)
{
unsigned int end_col = 0 < loc.end.column ? loc.end.column - 1 : 0;
ostr << loc.begin// << "(" << loc.end << ") "
;
ostr << loc.begin;
if (loc.end.filename
&& (!loc.begin.filename
|| *loc.begin.filename != *loc.end.filename))

View File

@@ -1,6 +1,6 @@
# C++ skeleton for Bison
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
# Copyright (C) 2002-2015 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
@@ -16,7 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
m4_pushdef([b4_copyright_years],
[2002-2013])
[2002-2015])
# b4_stack_define
# ---------------

View File

@@ -1,6 +1,6 @@
# C++ skeleton for Bison
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
# Copyright (C) 2002-2015 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

View File

@@ -3,7 +3,7 @@
<!--
bison.xsl - common templates for Bison XSLT.
Copyright (C) 2007-2013 Free Software Foundation, Inc.
Copyright (C) 2007-2015 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.

View File

@@ -3,7 +3,7 @@
<!--
xml2dot.xsl - transform Bison XML Report into DOT.
Copyright (C) 2007-2013 Free Software Foundation, Inc.
Copyright (C) 2007-2015 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.

View File

@@ -3,7 +3,7 @@
<!--
xml2text.xsl - transform Bison XML Report into plain text.
Copyright (C) 2007-2013 Free Software Foundation, Inc.
Copyright (C) 2007-2015 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.

View File

@@ -3,7 +3,7 @@
<!--
xml2html.xsl - transform Bison XML Report into XHTML.
Copyright (C) 2007-2013 Free Software Foundation, Inc.
Copyright (C) 2007-2015 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.

View File

@@ -1,11 +1,11 @@
-*- C -*-
# Yacc compatible skeleton for Bison
# Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation,
# Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation,
# Inc.
m4_pushdef([b4_copyright_years],
[1984, 1989-1990, 2000-2013])
[1984, 1989-1990, 2000-2015])
# 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