Compare commits

...
28 Commits
Author SHA1 Message Date
Akim Demaille 1f5542fe2d version 2.7.1
* NEWS: Record release date.
2013-04-15 13:59:02 +02:00
Akim Demaille d065cb3853 regen 2013-04-15 11:29:54 +02:00
Akim Demaille 49964a4fe0 glr.cc: fix a clang warning
* data/glr.cc (b4_epilogue): Be sure to end with an end-of-line,
so that the file does end with one.
2013-04-08 19:52:16 +02:00
Akim Demaille 68f91d58f1 maint: update copyright years
Run "make update-copyright".
2013-04-08 13:44:57 +02:00
Akim Demaille 42bcf1ce44 build: fix VPATH issue
* Makefile.am (update-b4-copyright, update-package-copyright-year): Fix
path to build-aux.
(cherry picked from commit f6df83b4e8)

Conflicts:
	Makefile.am
2013-04-08 13:39:21 +02:00
Akim Demaille de7331a075 build: avoid clang's colored diagnostics in the test suite
The syncline tests, which try to recognize compiler diagnostics,
are confused by escapes for colors.

* configure.ac (warn_tests): New, to factor the warnings for both
C and C++ tests.
Add -fno-color-diagnostics to it.
* tests/local.at (AT_TEST_TABLES_AND_PARSE): Do not remove glue
together compiler flags.

Conflicts:
	configure.ac
2013-04-08 13:32:47 +02:00
Akim Demaille b0db817ff2 tests: please clang and use ".cc", not ".c", for C++ input
When fed with foo.c, clang++ 3.2 answers:

  clang: error: treating 'c' input as 'c++' when in C++ mode,
                this behavior is deprecated

* tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use *.cc and *.hh
for C++.
2013-04-08 13:29:26 +02:00
Akim Demaille a565f73276 gnulib: update 2013-04-08 11:26:44 +02:00
Akim Demaille 3cf3393bd4 skeletons: avoid empty switch constructs
Reported by Rob Conde.
http://lists.gnu.org/archive/html/bug-bison/2013-03/msg00003.html

* data/c.m4 (b4_symbol_actions): Rename as...
(_b4_symbol_actions): this.
(b4_symbol_actions): New wrapper.
Do not emit empty switches.
Adjust all b4_symbol_actions callers.
2013-04-08 11:17:09 +02:00
Akim Demaille e83be476a5 lalr1.cc: fix compiler warnings
Reported by Rob Conde.
http://lists.gnu.org/archive/html/bug-bison/2013-03/msg00003.html

* data/stack.hh (operator=, stack(const stack&)): Make this class
uncopyable, i.e., "undefine" these operators: make them private and
don't implement them.
(clear): New.
* data/lalr1.cc: Use it instead of an assignment.
(parser): Make this class uncopyable.
2013-04-08 10:59:19 +02:00
Akim Demaille 80a2826e69 yacc.c: do not use __attribute__ unprotected
Reported by Victor Khomenko.
http://lists.gnu.org/archive/html/bug-bison/2013-04/msg00001.html

* data/glr.c (YYUSE, __attribute__): Fuse their definition into...
* data/c.m4 (b4_attribute_define): this new macro.
* data/yacc.c, data/glr.c: Use it.
2013-04-08 10:44:09 +02:00
Akim Demaille 657ed6d3be tests: style changes
* tests/glr-regression.at: Issue yyerror before yylex.
2012-12-15 14:58:05 +01:00
Akim Demaille 2bd435c36c maint: credit Wojciech Polak
* NEWS, THANKS: He is the author of XML support (including XSLTs).
2012-12-13 09:29:18 +01:00
Akim Demaille 0a7b855930 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2012-12-12 16:23:44 +01:00
Akim Demaille c13bb3484c version 2.7
* NEWS: Record release date.
2012-12-12 16:07:46 +01:00
Akim Demaille 4b6d641913 yacc.c: scope reduction
* data/yacc.c (yysyntax_error): here.
2012-12-12 12:41:37 +01:00
Akim Demaille bb990d3809 tests: C90 compliance
* tests/synclines.at: here.
2012-12-12 12:38:28 +01:00
Akim Demaille 1127a75a72 fix C90 compliance
* data/glr.c, src/graphviz.h, src/ielr.c, src/scan-gram.l,
* src/system.h, tests/actions.at, tests/glr-regression.at: Do not
use // comments.
Do not introduce variables after statements.
Provide "main" with a return value.
2012-12-12 11:44:39 +01:00
Akim Demaille fc28638e1c glr.c: scope reduction
* data/glr.c (yyreportSyntaxError): Reduce the scope of yysize1 (now
yysz).
2012-12-12 11:28:24 +01:00
Akim Demaille 911537c30f gnulib: update 2012-12-12 08:42:54 +01:00
Akim Demaille d4fe9e88f3 news: prepare for forthcoming release
* NEWS: Fill paragraph.
Reorder.
Update examples.
Remove line for 2.6.90.
2012-12-09 17:12:55 +01:00
Akim Demaille be22823e78 doc: explain how mid-rule actions are translated
* doc/bison.texi (Actions in Mid-Rule): Mention and use named references.
Split into three subsections, among which...
(Mid-Rule Action Translation): this new section.
2012-12-09 16:49:58 +01:00
Akim Demaille 235892350f error: use better locations for unused midrule values
On

  %%
  exp: {;} {$$;} { $$ = $1; }

instead of reporting (with -fcaret -Wmidrule-value)

  midrule.y:2.6-8: warning: unset value: $$ [-Wmidrule-values]
   exp: {;} {$$;} { $$ = $1; }
        ^^^
  midrule.y:2.6-27: warning: unused value: $2 [-Wmidrule-values]
   exp: {;} {$$;} { $$ = $1; }
        ^^^^^^^^^^^^^^^^^^^^^^

report

  midrule.y:2.6-8: warning: unset value: $$
   exp: {;} {$$;} { $$ = $1; }
        ^^^
  midrule.y:2.10-14: warning: unused value: $2
   exp: {;} {$$;} { $$ = $1; }
            ^^^^^

* src/reader.c (grammar_rule_check): When warning about the value of a
midrule action, use the location of the midrule action instead of the
location of the rule.
the location of the part of the rule.
* tests/actions.at (Default %printer and %destructor for mid-rule values):
Adjust expectations
* tests/input.at (Unused values with default %destructor): Ditto.
(AT_CHECK_UNUSED_VALUES): Ditto.
And use -fcaret.
2012-12-09 16:24:20 +01:00
Akim Demaille c949ada3da doc: various minor improvements and fixes
* doc/figs/example.dot, doc/figs/example.y: New.
* doc/bison.texi: Prefer "token" to TOKEN.
Use @group where appropriate.
Adjust with style changes in the output (State 0, not state 0).
Fix some @ref that were missing the third argument.
Fix some incorrect line numbers.
Use "nonterminal", not "non-terminal".
Fix overfull and underfull TeX hboxes.
Put the comments in the index.
Remove duplicate index entries.
Fuse glossary entries where appropriate.
(Understanding): Improve the continuity between sections.
Use example.dot to show the whole graph.
* doc/Makefile.am: Adjust.
2012-12-09 16:24:19 +01:00
Akim Demaille d4dcde2b75 tests: ignore more useless compiler warnings
* tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore complains about
using c++ to compile C.
2012-12-09 16:24:19 +01:00
Akim Demaille c8e966e272 tests: be robust to C being compiled with a C++11 compiler
* tests/glr-regression.at: Use YY_NULL instead of NULL.
Comment changes.
2012-12-09 16:03:19 +01:00
Akim Demaille d4728d92c7 build: beware of Clang++ not supporting POSIXLY_CORRECT
* m4/c-working.m4 (BISON_LANG_COMPILER_POSIXLY_CORRECT): New.
(BISON_C_COMPILER_POSIXLY_CORRECT): Use it.
For consistency with C++, also define BISON_C_WORKS.
* m4/cxx.m4 (BISON_CXX_COMPILER_POSIXLY_CORRECT): New.
* configure.ac: Use it.
* tests/atlocal.in: Get its result.
Propagate properly CXX values when used to compile C.
When POSIXLY_CORRECT, adjust BISON_C_WORKS and BISON_CXX_WORKS.
* tests/local.at (AT_COMPILE): Use BISON_C_WORKS.
2012-12-09 13:07:47 +01:00
Akim Demaille 09a1cd5e58 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2012-12-07 11:49:12 +01:00
194 changed files with 1270 additions and 858 deletions
+1 -1
View File
@@ -1 +1 @@
2.6.5
2.7
+1 -1
View File
@@ -24,7 +24,7 @@ and nasty bugs.
-----
Copyright (C) 1998-2012 Free Software Foundation, Inc.
Copyright (C) 1998-2013 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -24286,7 +24286,7 @@
-----
Copyright (C) 1987-1988, 1991-2012 Free Software Foundation,
Copyright (C) 1987-1988, 1991-2013 Free Software Foundation,
Inc.
Copying and distribution of this file, with or without
+4 -5
View File
@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in -*-Makefile-*-
## Copyright (C) 2001-2012 Free Software Foundation, Inc.
## Copyright (C) 2001-2013 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
@@ -56,12 +56,11 @@ dist-hook: gen-ChangeLog
.PHONY: update-b4-copyright update-package-copyright-year
update-b4-copyright:
$(AM_V_GEN) find data -type f \
| grep -v -E '^data/bison.m4$$' \
| xargs $(build_aux)/$@
$(AM_V_GEN)find $(srcdir)/data -type f \
| xargs $(srcdir)/build-aux/$@
@echo 'warning: src/parse-gram.[hc] may need to be regenerated.'
update-package-copyright-year:
$(AM_V_GEN)$(build_aux)/$@ configure.ac
$(AM_V_GEN)$(srcdir)/build-aux/$@ $(srcdir)/configure.ac
gen_start_date = 2012-01-16
.PHONY: gen-ChangeLog
+67 -37
View File
@@ -1,20 +1,49 @@
GNU Bison NEWS
* Noteworthy changes in release 2.6.90 (2012-12-07) [beta]
* Noteworthy changes in release 2.7.1 (2013-04-15) [stable]
** Bug fixes
*** Fix compiler attribute portability (yacc.c)
With locations enabled, __attribute__ was used unprotected.
*** Fix some compiler warnings (lalr1.cc)
* Noteworthy changes in release 2.7 (2012-12-12) [stable]
** Bug fixes
Warnings about uninitialized yylloc in yyparse have been fixed.
** %language is no longer an experimental feature.
Restored C90 compliance (yet no report was ever made).
The introduction of this feature, in 2.4, was four years ago. The --language
option and the %language directive are no longer experimental.
** Diagnostics are improved
** New format for error reports: carets
*** Changes in the format of error messages
Caret errors have been added to Bison, for example (taken from the
documentation):
This used to be the format of many error reports:
input.y:2.7-12: %type redeclaration for exp
input.y:1.7-12: previous declaration
It is now:
input.y:2.7-12: error: %type redeclaration for exp
input.y:1.7-12: previous declaration
*** New format for error reports: carets
Caret errors have been added to Bison:
input.y:2.7-12: error: %type redeclaration for exp
%type <sval> exp
^^^^^^
input.y:1.7-12: previous declaration
%type <ival> exp
^^^^^^
or
input.y:3.20-23: error: ambiguous reference: '$exp'
exp: exp '+' exp { $exp = $1 + $3; };
@@ -29,42 +58,23 @@ GNU Bison NEWS
exp: exp '+' exp { $exp = $1 + $3; };
^^^
The default behaviour for now is still not to display these unless explictly
asked with -fall of -fcaret. However, in a later release, it will be made the
default behavior (but may still be deactivated with -fno-caret).
The default behaviour for now is still not to display these unless
explictly asked with -fcaret (or -fall). However, in a later release, it
will be made the default behavior (but may still be deactivated with
-fno-caret).
** New value for %define variable: api.pure full
The %define variable api.pure requests a pure (reentrant) parser. However,
for historical reasons, using it in a location-tracking Yacc parser resulted
in a yyerror function that did not take a location as a parameter. With this
new value, the user may request a better pure parser, where yyerror does take
a location as a parameter (in location-tracking parsers).
for historical reasons, using it in a location-tracking Yacc parser
resulted in a yyerror function that did not take a location as a
parameter. With this new value, the user may request a better pure parser,
where yyerror does take a location as a parameter (in location-tracking
parsers).
The use of "%define api.pure true" is deprecated in favor of this new
"%define api.pure full".
** Changes in the format of error messages
This used to be the format of many error reports:
foo.y:5.10-24: result type clash on merge function 'merge': <t3> != <t2>
foo.y:4.13-27: previous declaration
It is now:
foo.y:5.10-25: result type clash on merge function 'merge': <t3> != <t2>
foo.y:4.13-27: previous declaration
** Exception safety (lalr1.cc)
The parse function now catches exceptions, uses the %destructors to
release memory (the lookahead symbol and the symbols pushed on the stack)
before re-throwing the exception.
This feature is somewhat experimental. User feedback would be
appreciated.
** New %define variable: api.location.type (glr.cc, lalr1.cc, lalr1.java)
The %define variable api.location.type defines the name of the type to use
@@ -84,6 +94,15 @@ GNU Bison NEWS
position_type are deprecated in favor of api.location.type and
api.position.type.
** Exception safety (lalr1.cc)
The parse function now catches exceptions, uses the %destructors to
release memory (the lookahead symbol and the symbols pushed on the stack)
before re-throwing the exception.
This feature is somewhat experimental. User feedback would be
appreciated.
** Graph improvements in DOT and XSLT
The graphical presentation of the states is more readable: their shape is
@@ -96,13 +115,21 @@ GNU Bison NEWS
These changes are present in both --graph output and xml2dot.xsl XSLT
processing, with minor (documented) differences.
Two nodes were added to the documentation: Xml and Graphviz.
** %language is no longer an experimental feature.
The introduction of this feature, in 2.4, was four years ago. The
--language option and the %language directive are no longer experimental.
** Documentation
The sections about shift/reduce and reduce/reduce conflicts resolution
have been fixed and extended.
Although introduced more than four years ago, XML and Graphviz reports
were not properly documented.
The translation of mid-rule actions is now described.
* Noteworthy changes in release 2.6.5 (2012-11-07) [stable]
We consider compiler warnings about Bison generated parsers to be bugs.
@@ -488,6 +515,7 @@ GNU Bison NEWS
These features are experimental in this version. More user feedback
will help to stabilize them.
Contributed by Alex Rozenman.
** IELR(1) and canonical LR(1):
@@ -1004,6 +1032,7 @@ GNU Bison NEWS
The current Java interface is experimental and may evolve. More user
feedback will help to stabilize it.
Contributed by Paolo Bonzini.
** %language
@@ -1017,6 +1046,7 @@ GNU Bison NEWS
Bison can now generate an XML report of the LALR(1) automaton using the new
"--xml" option. The current XML schema is experimental and may evolve. More
user feedback will help to stabilize it.
Contributed by Wojciech Polak.
** The grammar file may now specify the name of the parser header file using
%defines. For example:
@@ -1993,7 +2023,7 @@ Output file does not redefine const for C++.
-----
Copyright (C) 1995-2012 Free Software Foundation, Inc.
Copyright (C) 1995-2013 Free Software Foundation, Inc.
This file is part of Bison, the GNU Parser Generator.
+1 -1
View File
@@ -36,7 +36,7 @@ to the bison package.
-----
Copyright (C) 2002, 2005, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2002, 2005, 2009-2013 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -44,7 +44,7 @@ End:
-----
Copyright (C) 1992, 1998-1999, 2003-2005, 2008-2012 Free Software
Copyright (C) 1992, 1998-1999, 2003-2005, 2008-2013 Free Software
Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -12,7 +12,7 @@ the problems you encounter.
-----
Copyright (C) 2002, 2004, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2002, 2004, 2009-2013 Free Software Foundation, Inc.
This file is part of GNU Bison.
+1 -1
View File
@@ -408,7 +408,7 @@ Push these changes.
-----
Copyright (C) 2002-2005, 2007-2012 Free Software Foundation, Inc.
Copyright (C) 2002-2005, 2007-2013 Free Software Foundation, Inc.
This file is part of GNU Bison.
+4 -1
View File
@@ -103,6 +103,7 @@ Ralf Wildenhues [email protected]
Richard Stallman [email protected]
Rob Vermaas [email protected]
Robert Anisko [email protected]
Rob Conde [email protected]
Satya Kiran Popuri [email protected]
Sebastian Setzer [email protected]
Sebastien Fricker [email protected]
@@ -121,10 +122,12 @@ Tom Tromey [email protected]
Tommy Nordgren [email protected]
Troy A. Johnson [email protected]
Tys Lefering [email protected]
Victor Khomenko [email protected]
Vin Shelton [email protected]
W.C.A. Wijngaards [email protected]
Wayne Green [email protected]
Wei Song [email protected]
Wojciech Polak [email protected]
Wolfgang S. Kechel [email protected]
Wolfram Wagner [email protected]
Wwp [email protected]
@@ -140,7 +143,7 @@ End:
-----
Copyright (C) 2000-2012 Free Software Foundation, Inc.
Copyright (C) 2000-2013 Free Software Foundation, Inc.
This file is part of Bison, the GNU Parser Generator.
+1 -1
View File
@@ -351,7 +351,7 @@ End:
-----
Copyright (C) 2001-2004, 2006, 2008-2012 Free Software Foundation, Inc.
Copyright (C) 2001-2004, 2006, 2008-2013 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+35 -30
View File
@@ -1,10 +1,10 @@
#! /bin/sh
# Print a version string.
scriptversion=2012-07-19.14; # UTC
scriptversion=2013-03-08.16; # UTC
# Bootstrap this package from checked-out sources.
# Copyright (C) 2003-2012 Free Software Foundation, Inc.
# Copyright (C) 2003-2013 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
@@ -306,34 +306,34 @@ if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
die "Bootstrapping from a non-checked-out distribution is risky."
fi
# Ensure that lines starting with ! sort last, per gitignore conventions
# for whitelisting exceptions after a more generic blacklist pattern.
sort_patterns() {
sort -u "$@" | sed '/^!/ {
H
d
}
$ {
P
x
s/^\n//
}' | sed '/^$/d'
# Strip blank and comment lines to leave significant entries.
gitignore_entries() {
sed '/^#/d; /^$/d' "$@"
}
# If $STR is not already on a line by itself in $FILE, insert it,
# sorting the new contents of the file and replacing $FILE with the result.
insert_sorted_if_absent() {
# If $STR is not already on a line by itself in $FILE, insert it at the start.
# Entries are inserted at the start of the ignore list to ensure existing
# entries starting with ! are not overridden. Such entries support
# whitelisting exceptions after a more generic blacklist pattern.
insert_if_absent() {
file=$1
str=$2
test -f $file || touch $file
echo "$str" | sort_patterns - $file | cmp -s - $file > /dev/null \
|| { echo "$str" | sort_patterns - $file > $file.bak \
&& mv $file.bak $file; } \
|| die "insert_sorted_if_absent $file $str: failed"
test -r $file || die "Error: failed to read ignore file: $file"
duplicate_entries=$(gitignore_entries $file | sort | uniq -d)
if [ "$duplicate_entries" ] ; then
die "Error: Duplicate entries in $file: " $duplicate_entries
fi
linesold=$(gitignore_entries $file | wc -l)
linesnew=$(echo "$str" | gitignore_entries - $file | sort -u | wc -l)
if [ $linesold != $linesnew ] ; then
{ echo "$str" | cat - $file > $file.bak && mv $file.bak $file; } \
|| die "insert_if_absent $file $str: failed"
fi
}
# Adjust $PATTERN for $VC_IGNORE_FILE and insert it with
# insert_sorted_if_absent.
# insert_if_absent.
insert_vc_ignore() {
vc_ignore_file="$1"
pattern="$2"
@@ -344,7 +344,7 @@ insert_vc_ignore() {
# .gitignore entry.
pattern=$(echo "$pattern" | sed s,^,/,);;
esac
insert_sorted_if_absent "$vc_ignore_file" "$pattern"
insert_if_absent "$vc_ignore_file" "$pattern"
}
# Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac.
@@ -630,9 +630,13 @@ esac
if $bootstrap_sync; then
cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || {
echo "$0: updating bootstrap and restarting..."
case $(sh -c 'echo "$1"' -- a) in
a) ignored=--;;
*) ignored=ignored;;
esac
exec sh -c \
'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
-- "$GNULIB_SRCDIR/build-aux/bootstrap" \
$ignored "$GNULIB_SRCDIR/build-aux/bootstrap" \
"$0" "$@" --no-bootstrap-sync
}
fi
@@ -889,20 +893,21 @@ find "$m4_base" "$source_base" \
-depth \( -name '*.m4' -o -name '*.[ch]' \) \
-type l -xtype l -delete > /dev/null 2>&1
# Invoke autoreconf with --force --install to ensure upgrades of tools
# such as ylwrap.
AUTORECONFFLAGS="--verbose --install --force -I $m4_base $ACLOCAL_FLAGS"
# Some systems (RHEL 5) are using ancient autotools, for which the
# --no-recursive option had not been invented. Detect that lack and
# omit the option when it's not supported. FIXME in 2017: remove this
# hack when RHEL 5 autotools are updated, or when they become irrelevant.
no_recursive=
case $($AUTORECONF --help) in
*--no-recursive*) no_recursive=--no-recursive;;
*--no-recursive*) AUTORECONFFLAGS="$AUTORECONFFLAGS --no-recursive";;
esac
# Tell autoreconf not to invoke autopoint or libtoolize; they were run above.
echo "running: AUTOPOINT=true LIBTOOLIZE=true " \
"$AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS"
AUTOPOINT=true LIBTOOLIZE=true \
$AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS \
echo "running: AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS"
AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS \
|| die "autoreconf failed"
# Get some extra files from gnulib, overriding existing files.
+1 -1
View File
@@ -1,6 +1,6 @@
# Bootstrap configuration.
# Copyright (C) 2006-2012 Free Software Foundation, Inc.
# Copyright (C) 2006-2013 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
+1 -1
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
## Copyright (C) 2006, 2009-2013 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
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (C) 2012 Free Software Foundation, Inc.
# Copyright (C) 2012-2013 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
+1 -1
View File
@@ -3,7 +3,7 @@
# Update b4_copyright invocations or b4_copyright_years definitions to
# include the current year.
# Copyright (C) 2009-2012 Free Software Foundation, Inc.
# Copyright (C) 2009-2013 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
+1 -1
View File
@@ -2,7 +2,7 @@
# In configure.ac, update PACKAGE_COPYRIGHT_YEAR to the current year.
# Copyright (C) 2010-2012 Free Software Foundation, Inc.
# Copyright (C) 2010-2013 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
+1 -1
View File
@@ -1,5 +1,5 @@
# Customize maint.mk -*- makefile -*-
# Copyright (C) 2008-2012 Free Software Foundation, Inc.
# Copyright (C) 2008-2013 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
+23 -8
View File
@@ -1,6 +1,6 @@
# Configure template for GNU Bison. -*-Autoconf-*-
#
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
# Copyright (C) 2001-2013 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
@@ -26,7 +26,7 @@ m4_pattern_forbid([^gl_[A-Z]])
AC_INIT([GNU Bison],
m4_esyscmd([build-aux/git-version-gen .tarball-version]),
[[email protected]])
AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2012])
AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2013])
AC_DEFINE_UNQUOTED([PACKAGE_COPYRIGHT_YEAR], [$PACKAGE_COPYRIGHT_YEAR],
[The copyright year for this package])
@@ -84,6 +84,13 @@ if test "$enable_gcc_warnings" = yes; then
-Wformat -Wpointer-arith -Wwrite-strings'
warn_c='-Wbad-function-cast -Wshadow -Wstrict-prototypes'
warn_cxx='-Wnoexcept'
# Warnings for the test suite only.
#
# -fno-color-diagnostics: Clang's use of colors in the error
# messages is confusing the tests looking at the compiler's output
# (e.g., synclines.at).
warn_tests='-Wundef -pedantic -fno-color-diagnostics'
AC_LANG_PUSH([C])
# Clang supports many of GCC's -W options, but only issues warnings
# on the ones it does not recognize. In that case, gl_WARN_ADD
@@ -111,12 +118,13 @@ if test "$enable_gcc_warnings" = yes; then
AS_VAR_APPEND([WARN_CFLAGS], [" $WARN_CFLAGS_TEST"])
# Warnings for the test suite only.
gl_WARN_ADD([-Wundef], [WARN_CFLAGS_TEST])
gl_WARN_ADD([-pedantic], [WARN_CFLAGS_TEST])
for i in $warn_tests;
do
gl_WARN_ADD([$i], [WARN_CFLAGS_TEST])
done
CFLAGS=$save_CFLAGS
AC_LANG_POP([C])
AC_LANG_PUSH([C++])
save_CXXFLAGS=$CXXFLAGS
gl_WARN_ADD([-Werror=unknown-warning-option], [CXXFLAGS])
@@ -128,15 +136,22 @@ if test "$enable_gcc_warnings" = yes; then
[AC_LANG_PROGRAM([], [nullptr])])
gl_WARN_ADD([-Werror], [WERROR_CXXFLAGS])
# Warnings for the test suite only.
gl_WARN_ADD([-Wundef], [WARN_CXXFLAGS_TEST])
gl_WARN_ADD([-pedantic], [WARN_CXXFLAGS_TEST])
for i in $warn_tests;
do
gl_WARN_ADD([$i], [WARN_CXXFLAGS_TEST])
done
# Clang++ 3.2+ reject C code generated by Flex.
gl_WARN_ADD([-Wno-null-conversion], [WARN_NO_NULL_CONVERSION_CXXFLAGS])
# Variants break strict aliasing analysis.
gl_WARN_ADD([-fno-strict-aliasing], [NO_STRICT_ALIAS_CXXFLAGS])
CXXFLAGS=$save_CXXFLAGS
AC_LANG_POP([C++])
fi
BISON_TEST_FOR_WORKING_C_COMPILER
BISON_TEST_FOR_WORKING_CXX_COMPILER
BISON_C_COMPILER_POSIXLY_CORRECT
BISON_TEST_FOR_WORKING_CXX_COMPILER
BISON_CXX_COMPILER_POSIXLY_CORRECT
AC_ARG_ENABLE([yacc],
[AC_HELP_STRING([--disable-yacc],
+1 -1
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2002, 2005-2012 Free Software Foundation, Inc.
## Copyright (C) 2002, 2005-2013 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
+1 -1
View File
@@ -52,7 +52,7 @@ into various formats.
-----
Copyright (C) 2002, 2008-2012 Free Software Foundation, Inc.
Copyright (C) 2002, 2008-2013 Free Software Foundation, Inc.
This file is part of GNU Bison.
+1 -1
View File
@@ -2,7 +2,7 @@
# Language-independent M4 Macros for Bison.
# Copyright (C) 2002, 2004-2012 Free Software Foundation, Inc.
# Copyright (C) 2002, 2004-2013 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
+1 -1
View File
@@ -2,7 +2,7 @@
# C++ skeleton dispatching for Bison.
# Copyright (C) 2006-2007, 2009-2012 Free Software Foundation, Inc.
# Copyright (C) 2006-2007, 2009-2013 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
+1 -1
View File
@@ -2,7 +2,7 @@
# C++ skeleton for Bison
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
# Copyright (C) 2002-2013 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
+1 -1
View File
@@ -2,7 +2,7 @@
# Common code for C-like languages (C, C++, Java, etc.)
# Copyright (C) 2012 Free Software Foundation, Inc.
# Copyright (C) 2012-2013 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
+1 -1
View File
@@ -2,7 +2,7 @@
# C skeleton dispatching for Bison.
# Copyright (C) 2006-2007, 2009-2012 Free Software Foundation, Inc.
# Copyright (C) 2006-2007, 2009-2013 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
+46 -22
View File
@@ -2,7 +2,7 @@
# C M4 Macros for Bison.
# Copyright (C) 2002, 2004-2012 Free Software Foundation, Inc.
# Copyright (C) 2002, 2004-2013 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
@@ -187,9 +187,29 @@ m4_define([b4_table_value_equals],
[(!!(($2) == ($3)))])])
## ---------##
## Values. ##
## ---------##
## ----------------- ##
## Compiler issues. ##
## ----------------- ##
# b4_attribute_define
# -------------------
# Provide portability for __attribute__.
m4_define([b4_attribute_define],
[#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
# if (! defined __GNUC__ || __GNUC__ < 2 \
|| (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
# define __attribute__(Spec) /* empty */
# endif
#endif
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
# define YYUSE(E) ((void) (E))
#else
# define YYUSE(E) /* empty */
#endif
])
# b4_null_define
@@ -405,7 +425,7 @@ m4_define([b4_c_arg],
## ----------- ##
# b4_sync_start(LINE, FILE)
# -----------------------
# -------------------------
m4_define([b4_sync_start], [[#]line $1 $2])
@@ -420,15 +440,15 @@ m4_define([b4_case],
$2
break;])
# b4_symbol_actions(FILENAME, LINENO,
# SYMBOL-TAG, SYMBOL-NUM,
# SYMBOL-ACTION, SYMBOL-TYPENAME)
# -------------------------------------------------
# _b4_symbol_actions(FILENAME, LINENO,
# SYMBOL-TAG, SYMBOL-NUM,
# SYMBOL-ACTION, SYMBOL-TYPENAME)
# --------------------------------------------------
# Issue the code for a symbol action (e.g., %printer).
#
# Define b4_dollar_dollar([TYPE-NAME]), and b4_at_dollar, which are
# invoked where $<TYPE-NAME>$ and @$ were specified by the user.
m4_define([b4_symbol_actions],
m4_define([_b4_symbol_actions],
[b4_dollar_pushdef([(*yyvaluep)], [$6], [(*yylocationp)])dnl
case $4: /* $3 */
b4_syncline([$2], [$1])
@@ -438,6 +458,20 @@ b4_syncline([@oline@], [@ofile@])
b4_dollar_popdef[]dnl
])
# b4_symbol_actions(KIND)
# -----------------------
# Emit the symbol actions for KIND ("printers" or "destructors").
# Dispatch on "yytype".
m4_define([b4_symbol_actions],
[m4_ifval(m4_defn([b4_symbol_$1]),
[[switch (yytype)
{
]m4_map([_b4_symbol_actions], m4_defn([b4_symbol_$1]))[
default:
break;
}]],
[YYUSE (yytype);])])
# b4_yydestruct_generate(FUNCTION-DECLARATOR)
# -------------------------------------------
@@ -467,12 +501,7 @@ b4_parse_param_use[]dnl
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
switch (yytype)
{
]m4_map([b4_symbol_actions], m4_defn([b4_symbol_destructors]))[
default:
break;
}
]b4_symbol_actions([destructors])[
}]dnl
])
@@ -510,12 +539,7 @@ b4_parse_param_use[]dnl
# else
YYUSE (yyoutput);
# endif
switch (yytype)
{
]m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl
[ default:
break;
}
]b4_symbol_actions([printers])[
}
+17 -29
View File
@@ -2,7 +2,7 @@
# GLR skeleton for Bison
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
# Copyright (C) 2002-2013 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
@@ -181,7 +181,7 @@ m4_define([b4_shared_declarations],
b4_output_begin([b4_parser_file_name])
b4_copyright([Skeleton implementation for Bison GLR parsers in C],
[2002-2012])[
[2002-2013])[
/* C GLR parser skeleton written by Paul Hilfinger. */
@@ -246,13 +246,6 @@ b4_percent_code_get[]dnl
# endif
#endif
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
# define YYUSE(E) ((void) (E))
#else
# define YYUSE(E) /* empty */
#endif
/* Identity function, used to suppress warnings about constant conditions. */
#ifndef lint
# define YYID(N) (N)
@@ -287,21 +280,11 @@ b4_percent_code_get[]dnl
# include <setjmp.h>
# define YYJMP_BUF jmp_buf
# define YYSETJMP(Env) setjmp (Env)
// Pacify clang.
/* Pacify clang. */
# define YYLONGJMP(Env, Val) (longjmp (Env, Val), YYASSERT (0))
#endif
/*-----------------.
| GCC extensions. |
`-----------------*/
#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
# if (! defined __GNUC__ || __GNUC__ < 2 \
|| (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
# define __attribute__(Spec) /* empty */
# endif
#endif
]b4_attribute_define[
#ifndef YYASSERT
# define YYASSERT(Condition) ((void) ((Condition) || (abort (), 0)))
@@ -2013,10 +1996,10 @@ yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
#if ! YYERROR_VERBOSE
yyerror (]b4_lyyerror_args[YY_("syntax error"));
#else
{
yySymbol yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
size_t yysize0 = yytnamerr (YY_NULL, yytokenName (yytoken));
size_t yysize = yysize0;
size_t yysize1;
yybool yysize_overflow = yyfalse;
char* yymsg = YY_NULL;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
@@ -2076,9 +2059,11 @@ yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
break;
}
yyarg[yycount++] = yytokenName (yyx);
yysize1 = yysize + yytnamerr (YY_NULL, yytokenName (yyx));
yysize_overflow |= yysize1 < yysize;
yysize = yysize1;
{
size_t yysz = yysize + yytnamerr (YY_NULL, yytokenName (yyx));
yysize_overflow |= yysz < yysize;
yysize = yysz;
}
}
}
}
@@ -2098,9 +2083,11 @@ yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
#undef YYCASE_
}
yysize1 = yysize + strlen (yyformat);
yysize_overflow |= yysize1 < yysize;
yysize = yysize1;
{
size_t yysz = yysize + strlen (yyformat);
yysize_overflow |= yysz < yysize;
yysize = yysz;
}
if (!yysize_overflow)
yymsg = (char *) YYMALLOC (yysize);
@@ -2130,6 +2117,7 @@ yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
yyerror (]b4_lyyerror_args[YY_("syntax error"));
yyMemoryExhausted (yystackp);
}
}
#endif /* YYERROR_VERBOSE */
yynerrs += 1;
}
@@ -2575,7 +2563,7 @@ 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-2012])[
[2002-2013])[
]b4_cpp_guard_open([b4_spec_defines_file])[
]b4_shared_declarations[
+5 -9
View File
@@ -2,7 +2,7 @@
# C++ GLR skeleton for Bison
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
# Copyright (C) 2002-2013 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
@@ -167,12 +167,7 @@ m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
std::ostream& yyoutput = debug_stream ();
std::ostream& yyo = yyoutput;
YYUSE (yyo);
switch (yytype)
{
]m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl
[ default:
break;
}
]b4_symbol_actions([printers])[
}
@@ -216,7 +211,8 @@ m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
#endif
]m4_popdef([b4_parse_param])dnl
b4_namespace_close])
b4_namespace_close
])
# Let glr.c believe that the user arguments include the parser itself.
@@ -232,7 +228,7 @@ m4_popdef([b4_parse_param])
b4_output_begin([b4_spec_defines_file])
b4_copyright([Skeleton interface for Bison GLR parsers in C++],
[2002-2006, 2009-2012])[
[2002-2006, 2009-2013])[
/* C++ GLR parser skeleton written by Akim Demaille. */
+1 -1
View File
@@ -2,7 +2,7 @@
# Java skeleton dispatching for Bison.
# Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
# Copyright (C) 2007, 2009-2013 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
+1 -1
View File
@@ -2,7 +2,7 @@
# Java language support for Bison
# Copyright (C) 2007-2012 Free Software Foundation, Inc.
# Copyright (C) 2007-2013 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
+12 -18
View File
@@ -1,6 +1,6 @@
# C++ skeleton for Bison
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
# Copyright (C) 2002-2013 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
@@ -33,7 +33,7 @@ m4_include(b4_pkgdatadir/[stack.hh])
b4_defines_if(
[b4_output_begin([b4_spec_defines_file])
b4_copyright([Skeleton interface for Bison LALR(1) parsers in C++],
[2002-2012])
[2002-2013])
[
/**
** \file ]b4_spec_defines_file[
@@ -107,6 +107,10 @@ b4_user_stype
#endif
private:
/// This class is not copyable.
]b4_parser_class_name[ (const ]b4_parser_class_name[&);
]b4_parser_class_name[& operator= (const ]b4_parser_class_name[&);
/// Report a syntax error.
/// \param loc where the syntax error is found.
/// \param msg a description of the syntax error.
@@ -268,7 +272,7 @@ b4_output_end()
b4_output_begin([b4_parser_file_name])
b4_copyright([Skeleton implementation for Bison LALR(1) parsers in C++],
[2002-2012])
[2002-2013])
b4_percent_code_get([[top]])[]dnl
m4_if(b4_prefix, [yy], [],
[
@@ -418,12 +422,7 @@ do { \
std::ostream& yyo = debug_stream ();
std::ostream& yyoutput = yyo;
YYUSE (yyoutput);
switch (yytype)
{
]m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl
[ default:
break;
}
]b4_symbol_actions([printers])[
}
@@ -450,12 +449,7 @@ do { \
if (yymsg)
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
switch (yytype)
{
]m4_map([b4_symbol_actions], m4_defn([b4_symbol_destructors]))[
default:
break;
}
]b4_symbol_actions([destructors])[
}
void
@@ -552,9 +546,9 @@ b4_dollar_popdef])[]dnl
yynewstate, since the latter expects the semantical and the
location values to have been already stored, initialize these
stacks with a primary value. */
yystate_stack_ = state_stack_type (0);
yysemantic_stack_ = semantic_stack_type (0);
yylocation_stack_ = location_stack_type (0);
yystate_stack_.clear ();
yysemantic_stack_.clear ();
yylocation_stack_.clear ();
yysemantic_stack_.push (yylval);
yylocation_stack_.push (yylloc);
+2 -2
View File
@@ -1,6 +1,6 @@
# Java skeleton for Bison -*- autoconf -*-
# Copyright (C) 2007-2012 Free Software Foundation, Inc.
# Copyright (C) 2007-2013 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
@@ -24,7 +24,7 @@ m4_ifval(m4_defn([b4_symbol_destructors]),
b4_output_begin([b4_parser_file_name])
b4_copyright([Skeleton implementation for Bison LALR(1) parsers in Java],
[2007-2012])
[2007-2013])
b4_percent_define_ifdef([package], [package b4_percent_define_get([package]);
])[/* First part of user declarations. */
+3 -3
View File
@@ -1,6 +1,6 @@
# C++ skeleton for Bison
# Copyright (C) 2002-2007, 2009-2012 Free Software Foundation, Inc.
# Copyright (C) 2002-2007, 2009-2013 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
@@ -18,7 +18,7 @@
b4_output_begin([b4_dir_prefix[]position.hh])
b4_copyright([Positions for Bison parsers in C++],
[2002-2007, 2009-2012])[
[2002-2007, 2009-2013])[
/**
** \file ]b4_dir_prefix[position.hh
@@ -152,7 +152,7 @@ b4_output_end()
b4_output_begin([b4_dir_prefix[]location.hh])
b4_copyright([Locations for Bison parsers in C++],
[2002-2007, 2009-2012])[
[2002-2007, 2009-2013])[
/**
** \file ]b4_dir_prefix[location.hh
+11 -3
View File
@@ -1,6 +1,6 @@
# C++ skeleton for Bison
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
# Copyright (C) 2002-2013 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,11 +16,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
m4_pushdef([b4_copyright_years],
[2002-2012])
[2002-2013])
b4_output_begin([b4_dir_prefix[]stack.hh])
b4_copyright([Stack handling for Bison parsers in C++],
[2002-2012])[
[2002-2013])[
/**
** \file ]b4_dir_prefix[stack.hh
@@ -77,6 +77,12 @@ b4_copyright([Stack handling for Bison parsers in C++],
seq_.pop_front ();
}
void
clear ()
{
seq_.clear ();
}
inline
unsigned int
height () const
@@ -88,6 +94,8 @@ b4_copyright([Stack handling for Bison parsers in C++],
inline const_iterator end () const { return seq_.rend (); }
private:
stack (const stack&);
stack& operator= (const stack&);
S seq_;
};
+1 -1
View File
@@ -3,7 +3,7 @@
<!--
bison.xsl - common templates for Bison XSLT.
Copyright (C) 2007-2012 Free Software Foundation, Inc.
Copyright (C) 2007-2013 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -3,7 +3,7 @@
<!--
xml2dot.xsl - transform Bison XML Report into DOT.
Copyright (C) 2007-2012 Free Software Foundation, Inc.
Copyright (C) 2007-2013 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -3,7 +3,7 @@
<!--
xml2text.xsl - transform Bison XML Report into plain text.
Copyright (C) 2007-2012 Free Software Foundation, Inc.
Copyright (C) 2007-2013 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -3,7 +3,7 @@
<!--
xml2html.xsl - transform Bison XML Report into XHTML.
Copyright (C) 2007-2012 Free Software Foundation, Inc.
Copyright (C) 2007-2013 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+17 -19
View File
@@ -2,7 +2,7 @@
# Yacc compatible skeleton for Bison
# Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation,
# Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation,
# Inc.
# This program is free software: you can redistribute it and/or modify
@@ -333,7 +333,7 @@ m4_define([b4_shared_declarations],
b4_output_begin([b4_parser_file_name])
b4_copyright([Bison implementation for Yacc-like parsers in C],
[1984, 1989-1990, 2000-2012])[
[1984, 1989-1990, 2000-2013])[
/* C LALR(1) parser skeleton written by Richard Stallman, by
simplifying the original so-called "semantic" parser. */
@@ -447,12 +447,7 @@ typedef short int yytype_int16;
# endif
#endif
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
# define YYUSE(E) ((void) (E))
#else
# define YYUSE(E) /* empty */
#endif
]b4_attribute_define[
/* Identity function, used to suppress warnings about constant conditions. */
#ifndef lint
@@ -1247,7 +1242,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
{
YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
YYSIZE_T yysize = yysize0;
YYSIZE_T yysize1;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
const char *yyformat = YY_NULL;
@@ -1328,11 +1322,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
break;
}
yyarg[yycount++] = yytname[yyx];
yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
if (! (yysize <= yysize1
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
yysize = yysize1;
{
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
if (! (yysize <= yysize1
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
yysize = yysize1;
}
}
}]b4_lac_if([[
# if ]b4_api_PREFIX[DEBUG
@@ -1356,10 +1352,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
# undef YYCASE_
}
yysize1 = yysize + yystrlen (yyformat);
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
yysize = yysize1;
{
YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
yysize = yysize1;
}
if (*yymsg_alloc < yysize)
{
@@ -2055,7 +2053,7 @@ b4_output_end()
b4_defines_if(
[b4_output_begin([b4_spec_defines_file])[
]b4_copyright([Bison interface for Yacc-like parsers in C],
[1984, 1989-1990, 2000-2012])[
[1984, 1989-1990, 2000-2013])[
]b4_shared_declarations[
]b4_output_end()
+1 -1
View File
@@ -1,7 +1,7 @@
# DJGPP Maintainer's Makefile -*-Makefile-*-
# Requires GNU sed
## Copyright (C) 2005-2012 Free Software Foundation, Inc.
## Copyright (C) 2005-2013 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
+1 -1
View File
@@ -1,6 +1,6 @@
This is a port of GNU Bison @VERSION@ to MSDOS/DJGPP.
Copyright (C) 2005-2012 Free Software Foundation, Inc.
Copyright (C) 2005-2013 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
+1 -1
View File
@@ -4,7 +4,7 @@ Rem Configure Bison for DJGPP.
Rem WARNING WARNING WARNING: This file needs to have DOS CRLF end-of-line
Rem format, or else stock DOS/Windows shells will refuse to run it.
Rem Copyright (C) 2005-2012 Free Software Foundation, Inc.
Rem Copyright (C) 2005-2013 Free Software Foundation, Inc.
Rem This program is free software: you can redistribute it and/or modify
Rem it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -2,7 +2,7 @@
# Sed script for additional DJGPP specific editing
# of the configure script generated by autoconf 2.62.
# Copyright (C) 2005-2012 Free Software Foundation, Inc.
# Copyright (C) 2005-2013 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
+1 -1
View File
@@ -3,7 +3,7 @@
# This is the config.site file for configuring GNU packages
# which are to be built with DJGPP tools.
# Copyright (C) 2005-2012 Free Software Foundation, Inc.
# Copyright (C) 2005-2013 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
+1 -1
View File
@@ -1,6 +1,6 @@
# sed script for DJGPP specific editing of config.hin
# Copyright (C) 2005-2012 Free Software Foundation, Inc.
# Copyright (C) 2005-2013 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
+1 -1
View File
@@ -7,7 +7,7 @@ Rem This batch file unpacks the Bison distribution while simultaneously
Rem renaming some of the files whose names are invalid on DOS or conflict
Rem with other file names after truncation to DOS 8+3 namespace.
Rem
Rem Copyright (C) 2005-2012 Free Software Foundation, Inc.
Rem Copyright (C) 2005-2013 Free Software Foundation, Inc.
Rem
Rem This program is free software: you can redistribute it and/or modify
Rem it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
/* Subprocesses with pipes.
Copyright (C) 2005-2012 Free Software Foundation, Inc.
Copyright (C) 2005-2013 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
+1 -1
View File
@@ -1,6 +1,6 @@
/* Subprocesses with pipes.
Copyright (C) 2005-2012 Free Software Foundation, Inc.
Copyright (C) 2005-2013 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
+1 -1
View File
@@ -2,7 +2,7 @@
# Sed script for additional DJGPP specific editing
# of the testsuite script generated by autoconf 2.61.
# Copyright (C) 2007-2012 Free Software Foundation, Inc.
# Copyright (C) 2007-2013 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
+6 -5
View File
@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in -*-Makefile-*-
## Copyright (C) 2001-2003, 2005-2012 Free Software Foundation, Inc.
## Copyright (C) 2001-2003, 2005-2013 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
@@ -96,13 +96,14 @@ PREPATH = $(top_builddir)/src
nodist_man_MANS = yacc.1
## ----------------------------- ##
## Graphviz examples generation. ##
## ----------------------------- ##
## ------------------------------ ##
## Graphviz examples generation. ##
## ------------------------------ ##
CLEANDIRS += figs
FIGS_DOT = figs/example-reduce.dot figs/example-shift.dot
FIGS_DOT = figs/example.dot figs/example-reduce.dot figs/example-shift.dot
EXTRA_DIST += \
figs/example.y \
$(FIGS_DOT) \
$(FIGS_DOT:.dot=.eps) $(FIGS_DOT:.dot=.pdf) $(FIGS_DOT:.dot=.png)
SUFFIXES += .dot .eps .pdf .png
+253 -95
View File
@@ -33,7 +33,7 @@
This manual (@value{UPDATED}) is for GNU Bison (version
@value{VERSION}), the GNU parser generator.
Copyright @copyright{} 1988-1993, 1995, 1998-2012 Free Software
Copyright @copyright{} 1988-1993, 1995, 1998-2013 Free Software
Foundation, Inc.
@quotation
@@ -208,6 +208,12 @@ Defining Language Semantics
This says when, why and how to use the exceptional
action in the middle of a rule.
Actions in Mid-Rule
* Using Mid-Rule Actions:: Putting an action in the middle of a rule.
* Mid-Rule Action Translation:: How mid-rule actions are actually processed.
* Mid-Rule Conflicts:: Mid-rule actions can cause conflicts.
Tracking Locations
* Location Type:: Specifying a data type for locations.
@@ -2722,6 +2728,9 @@ The Bison grammar file conventionally has a name ending in @samp{.y}.
@node Grammar Outline
@section Outline of a Bison Grammar
@cindex comment
@findex // @dots{}
@findex /* @dots{} */
A Bison grammar file has four main sections, shown here with the
appropriate delimiters:
@@ -2741,8 +2750,8 @@ appropriate delimiters:
@end example
Comments enclosed in @samp{/* @dots{} */} may appear in any of the sections.
As a GNU extension, @samp{//} introduces a comment that
continues until end of line.
As a GNU extension, @samp{//} introduces a comment that continues until end
of line.
@menu
* Prologue:: Syntax and usage of the prologue.
@@ -3736,6 +3745,15 @@ Occasionally it is useful to put an action in the middle of a rule.
These actions are written just like usual end-of-rule actions, but they
are executed before the parser even recognizes the following components.
@menu
* Using Mid-Rule Actions:: Putting an action in the middle of a rule.
* Mid-Rule Action Translation:: How mid-rule actions are actually processed.
* Mid-Rule Conflicts:: Mid-rule actions can cause conflicts.
@end menu
@node Using Mid-Rule Actions
@subsubsection Using Mid-Rule Actions
A mid-rule action may refer to the components preceding it using
@code{$@var{n}}, but it may not refer to subsequent components because
it is run before they are parsed.
@@ -3768,10 +3786,16 @@ remove it afterward. Here is how it is done:
@example
@group
stmt:
LET '(' var ')'
@{ $<context>$ = push_context (); declare_variable ($3); @}
"let" '(' var ')'
@{
$<context>$ = push_context ();
declare_variable ($3);
@}
stmt
@{ $$ = $6; pop_context ($<context>5); @}
@{
$$ = $6;
pop_context ($<context>5);
@}
@end group
@end example
@@ -3782,8 +3806,27 @@ list of accessible variables) as its semantic value, using alternative
@code{context} in the data-type union. Then it calls
@code{declare_variable} to add the new variable to that list. Once the
first action is finished, the embedded statement @code{stmt} can be
parsed. Note that the mid-rule action is component number 5, so the
@samp{stmt} is component number 6.
parsed.
Note that the mid-rule action is component number 5, so the @samp{stmt} is
component number 6. Named references can be used to improve the readability
and maintainability (@pxref{Named References}):
@example
@group
stmt:
"let" '(' var ')'
@{
$<context>let = push_context ();
declare_variable ($3);
@}[let]
stmt
@{
$$ = $6;
pop_context ($<context>let);
@}
@end group
@end example
After the embedded statement is parsed, its semantic value becomes the
value of the entire @code{let}-statement. Then the semantic value from the
@@ -3817,13 +3860,13 @@ stmt:
let stmt
@{
$$ = $2;
pop_context ($1);
pop_context ($let);
@};
let:
LET '(' var ')'
"let" '(' var ')'
@{
$$ = push_context ();
$let = push_context ();
declare_variable ($3);
@};
@@ -3835,6 +3878,76 @@ Note that the action is now at the end of its rule.
Any mid-rule action can be converted to an end-of-rule action in this way, and
this is what Bison actually does to implement mid-rule actions.
@node Mid-Rule Action Translation
@subsubsection Mid-Rule Action Translation
@vindex $@@@var{n}
@vindex @@@var{n}
As hinted earlier, mid-rule actions are actually transformed into regular
rules and actions. The various reports generated by Bison (textual,
graphical, etc., see @ref{Understanding, , Understanding Your Parser})
reveal this translation, best explained by means of an example. The
following rule:
@example
exp: @{ a(); @} "b" @{ c(); @} @{ d(); @} "e" @{ f(); @};
@end example
@noindent
is translated into:
@example
$@@1: /* empty */ @{ a(); @};
$@@2: /* empty */ @{ c(); @};
$@@3: /* empty */ @{ d(); @};
exp: $@@1 "b" $@@2 $@@3 "e" @{ f(); @};
@end example
@noindent
with new nonterminal symbols @code{$@@@var{n}}, where @var{n} is a number.
A mid-rule action is expected to generate a value if it uses @code{$$}, or
the (final) action uses @code{$@var{n}} where @var{n} denote the mid-rule
action. In that case its nonterminal is rather named @code{@@@var{n}}:
@example
exp: @{ a(); @} "b" @{ $$ = c(); @} @{ d(); @} "e" @{ f = $1; @};
@end example
@noindent
is translated into
@example
@@1: /* empty */ @{ a(); @};
@@2: /* empty */ @{ $$ = c(); @};
$@@3: /* empty */ @{ d(); @};
exp: @@1 "b" @@2 $@@3 "e" @{ f = $1; @}
@end example
There are probably two errors in the above example: the first mid-rule
action does not generate a value (it does not use @code{$$} although the
final action uses it), and the value of the second one is not used (the
final action does not use @code{$3}). Bison reports these errors when the
@code{midrule-value} warnings are enabled (@pxref{Invocation, ,Invoking
Bison}):
@example
$ bison -fcaret -Wmidrule-value mid.y
@group
mid.y:2.6-13: warning: unset value: $$
exp: @{ a(); @} "b" @{ $$ = c(); @} @{ d(); @} "e" @{ f = $1; @};
^^^^^^^^
@end group
@group
mid.y:2.19-31: warning: unused value: $3
exp: @{ a(); @} "b" @{ $$ = c(); @} @{ d(); @} "e" @{ f = $1; @};
^^^^^^^^^^^^^
@end group
@end example
@node Mid-Rule Conflicts
@subsubsection Conflicts due to Mid-Rule Actions
Taking action before a rule is completely recognized often leads to
conflicts since the parser must commit to a parse in order to execute the
action. For example, the following two rules, without mid-rule actions,
@@ -3932,6 +4045,7 @@ compound:
Now Bison can execute the action in the rule for @code{subroutine} without
deciding which rule for @code{compound} it will eventually use.
@node Tracking Locations
@section Tracking Locations
@cindex location
@@ -5389,8 +5503,8 @@ I.e., if @samp{%locations %define api.pure} is passed then the prototypes for
@code{yyerror} are:
@example
void yyerror (char const *msg); /* Yacc parsers. */
void yyerror (YYLTYPE *locp, char const *msg); /* GLR parsers. */
void yyerror (char const *msg); // Yacc parsers.
void yyerror (YYLTYPE *locp, char const *msg); // GLR parsers.
@end example
But if @samp{%locations %define api.pure %parse-param @{int *nastiness@}} is
@@ -6386,7 +6500,6 @@ Actions}).
@end deffn
@deffn {Value} @@$
@findex @@$
Acts like a structure variable containing information on the textual
location of the grouping made by the current rule. @xref{Tracking
Locations}.
@@ -6445,7 +6558,7 @@ GNU Automake.
@item
@cindex bison-i18n.m4
Into the directory containing the GNU Autoconf macros used
by the package---often called @file{m4}---copy the
by the package ---often called @file{m4}--- copy the
@file{bison-i18n.m4} file installed by Bison under
@samp{share/aclocal/bison-i18n.m4} in Bison's installation directory.
For example:
@@ -8191,8 +8304,26 @@ clear the flag.
Developing a parser can be a challenge, especially if you don't understand
the algorithm (@pxref{Algorithm, ,The Bison Parser Algorithm}). This
chapter explains how to generate and read the detailed description of the
automaton, and how to enable and understand the parser run-time traces.
chapter explains how understand and debug a parser.
The first sections focus on the static part of the parser: its structure.
They explain how to generate and read the detailed description of the
automaton. There are several formats available:
@itemize @minus
@item
as text, see @ref{Understanding, , Understanding Your Parser};
@item
as a graph, see @ref{Graphviz,, Visualizing Your Parser};
@item
or as a markup report that can be turned, for instance, into HTML, see
@ref{Xml,, Visualizing your parser in multiple formats}.
@end itemize
The last section focuses on the dynamic part of the parser: how to enable
and understand the parser run-time traces (@pxref{Tracing, ,Tracing Your
Parser}).
@menu
* Understanding:: Understanding the structure of your parser.
@@ -8207,8 +8338,7 @@ automaton, and how to enable and understand the parser run-time traces.
As documented elsewhere (@pxref{Algorithm, ,The Bison Parser Algorithm})
Bison parsers are @dfn{shift/reduce automata}. In some cases (much more
frequent than one would hope), looking at this automaton is required to
tune or simply fix a parser. Bison provides two different
representation of it, either textually or graphically (as a DOT file).
tune or simply fix a parser.
The textual file is generated when the options @option{--report} or
@option{--verbose} are specified, see @ref{Invocation, , Invoking
@@ -8222,9 +8352,12 @@ The following grammar file, @file{calc.y}, will be used in the sequel:
@example
%token NUM STR
@group
%left '+' '-'
%left '*'
@end group
%%
@group
exp:
exp '+' exp
| exp '-' exp
@@ -8232,6 +8365,7 @@ exp:
| exp '/' exp
| NUM
;
@end group
useless: STR;
%%
@end example
@@ -8241,8 +8375,8 @@ useless: STR;
@example
calc.y: warning: 1 nonterminal useless in grammar
calc.y: warning: 1 rule useless in grammar
calc.y:11.1-7: warning: nonterminal useless in grammar: useless
calc.y:11.10-12: warning: rule useless in grammar: useless: STR
calc.y:12.1-7: warning: nonterminal useless in grammar: useless
calc.y:12.10-12: warning: rule useless in grammar: useless: STR
calc.y: conflicts: 7 shift/reduce
@end example
@@ -8336,7 +8470,7 @@ item is a production rule together with a point (@samp{.}) marking
the location of the input cursor.
@example
state 0
State 0
0 $accept: . exp $end
@@ -8366,7 +8500,7 @@ you want to see more detail you can invoke @command{bison} with
@option{--report=itemset} to list the derived items as well:
@example
state 0
State 0
0 $accept: . exp $end
1 exp: . exp '+' exp
@@ -8384,7 +8518,7 @@ state 0
In the state 1@dots{}
@example
state 1
State 1
5 exp: NUM .
@@ -8394,11 +8528,11 @@ state 1
@noindent
the rule 5, @samp{exp: NUM;}, is completed. Whatever the lookahead token
(@samp{$default}), the parser will reduce it. If it was coming from
state 0, then, after this reduction it will return to state 0, and will
State 0, then, after this reduction it will return to state 0, and will
jump to state 2 (@samp{exp: go to state 2}).
@example
state 2
State 2
0 $accept: exp . $end
1 exp: exp . '+' exp
@@ -8426,7 +8560,7 @@ The state 3 is named the @dfn{final state}, or the @dfn{accepting
state}:
@example
state 3
State 3
0 $accept: exp $end .
@@ -8441,7 +8575,7 @@ The interpretation of states 4 to 7 is straightforward, and is left to
the reader.
@example
state 4
State 4
1 exp: exp '+' . exp
@@ -8450,7 +8584,7 @@ state 4
exp go to state 8
state 5
State 5
2 exp: exp '-' . exp
@@ -8459,7 +8593,7 @@ state 5
exp go to state 9
state 6
State 6
3 exp: exp '*' . exp
@@ -8468,7 +8602,7 @@ state 6
exp go to state 10
state 7
State 7
4 exp: exp '/' . exp
@@ -8481,7 +8615,7 @@ As was announced in beginning of the report, @samp{State 8 conflicts:
1 shift/reduce}:
@example
state 8
State 8
1 exp: exp . '+' exp
1 | exp '+' exp .
@@ -8524,7 +8658,7 @@ with some set of possible lookahead tokens. When run with
@option{--report=lookahead}, Bison specifies these lookahead tokens:
@example
state 8
State 8
1 exp: exp . '+' exp
1 | exp '+' exp . [$end, '+', '-', '/']
@@ -8556,7 +8690,7 @@ The remaining states are similar:
@example
@group
state 9
State 9
1 exp: exp . '+' exp
2 | exp . '-' exp
@@ -8572,7 +8706,7 @@ state 9
@end group
@group
state 10
State 10
1 exp: exp . '+' exp
2 | exp . '-' exp
@@ -8587,7 +8721,7 @@ state 10
@end group
@group
state 11
State 11
1 exp: exp . '+' exp
2 | exp . '-' exp
@@ -8610,12 +8744,11 @@ state 11
@noindent
Observe that state 11 contains conflicts not only due to the lack of
precedence of @samp{/} with respect to @samp{+}, @samp{-}, and
@samp{*}, but also because the
associativity of @samp{/} is not specified.
precedence of @samp{/} with respect to @samp{+}, @samp{-}, and @samp{*}, but
also because the associativity of @samp{/} is not specified.
Note that Bison may also produce an HTML version of this output, via an XML
file and XSLT processing (@pxref{Xml}).
Bison may also produce an HTML version of this output, via an XML file and
XSLT processing (@pxref{Xml,,Visualizing your parser in multiple formats}).
@c ================================================= Graphical Representation
@@ -8635,7 +8768,10 @@ This file is generated when the @option{--graph} option is specified
(@pxref{Invocation, , Invoking Bison}). Its name is made by removing
@samp{.tab.c} or @samp{.c} from the parser implementation file name, and
adding @samp{.dot} instead. If the grammar file is @file{foo.y}, the
Graphviz output file is called @file{foo.dot}.
Graphviz output file is called @file{foo.dot}. A DOT file may also be
produced via an XML file and XSLT processing (@pxref{Xml,,Visualizing your
parser in multiple formats}).
The following grammar file, @file{rr.y}, will be used in the sequel:
@@ -8648,10 +8784,20 @@ b: "0";
@end group
@end example
The graphical output is very similar to the textual one, and as such it is
easier understood by making direct comparisons between them. See
@ref{Debugging, , Debugging Your Parser} for a detailled analysis of the
textual report.
The graphical output
@ifnotinfo
(see @ref{fig:graph})
@end ifnotinfo
is very similar to the textual one, and as such it is easier understood by
making direct comparisons between them. @xref{Debugging, , Debugging Your
Parser}, for a detailled analysis of the textual report.
@ifnotinfo
@float Figure,fig:graph
@image{figs/example, 430pt}
@caption{A graphical rendering of the parser.}
@end float
@end ifnotinfo
@subheading Graphical Representation of States
@@ -8676,7 +8822,7 @@ shift. The following describes a reduction in the @file{rr.output} file:
@example
@group
state 3
State 3
1 exp: a . ";"
@@ -8697,7 +8843,7 @@ action for the given state, there is no such label.
This is how reductions are represented in the verbose file @file{rr.output}:
@example
state 1
State 1
3 a: "0" . [";"]
4 b: "0" . ["."]
@@ -8716,17 +8862,14 @@ reduction, see @ref{Shift/Reduce, , Shift/Reduce Conflicts}. Discarded actions
are distinguished by a red filling color on these nodes, just like how they are
reported between square brackets in the verbose file.
The reduction corresponding to the rule number 0 is the acceptation state. It
is shown as a blue diamond, labelled "Acc".
The reduction corresponding to the rule number 0 is the acceptation
state. It is shown as a blue diamond, labelled ``Acc''.
@subheading Graphical representation of go tos
The @samp{go to} jump transitions are represented as dotted lines bearing
the name of the rule being jumped to.
Note that a DOT file may also be produced via an XML file and XSLT
processing (@pxref{Xml}).
@c ================================================= XML
@node Xml
@@ -8734,8 +8877,10 @@ processing (@pxref{Xml}).
@cindex xml
Bison supports two major report formats: textual output
(@pxref{Understanding}) when invoked with option @option{--verbose}, and DOT
(@pxref{Graphviz}) when invoked with option @option{--graph}. However,
(@pxref{Understanding, ,Understanding Your Parser}) when invoked
with option @option{--verbose}, and DOT
(@pxref{Graphviz,, Visualizing Your Parser}) when invoked with
option @option{--graph}. However,
another alternative is to output an XML file that may then be, with
@command{xsltproc}, rendered as either a raw text format equivalent to the
verbose file, or as an HTML version of the same file, with clickable
@@ -8743,7 +8888,7 @@ transitions, or even as a DOT. The @file{.output} and DOT files obtained via
XSLT have no difference whatsoever with those obtained by invoking
@command{bison} with options @option{--verbose} or @option{--graph}.
The textual file is generated when the options @option{-x} or
The XML file is generated when the options @option{-x} or
@option{--xml[=FILE]} are specified, see @ref{Invocation,,Invoking Bison}.
If not specified, its name is made by removing @samp{.tab.c} or @samp{.c}
from the parser implementation file name, and adding @samp{.xml} instead.
@@ -8757,19 +8902,19 @@ files to apply to the XML file. Their names are non-ambiguous:
@item xml2dot.xsl
Used to output a copy of the DOT visualization of the automaton.
@item xml2text.xsl
Used to output a copy of the .output file.
Used to output a copy of the @samp{.output} file.
@item xml2xhtml.xsl
Used to output an xhtml enhancement of the .output file.
Used to output an xhtml enhancement of the @samp{.output} file.
@end table
Sample usage (requires @code{xsltproc}):
Sample usage (requires @command{xsltproc}):
@example
$ bison -x input.y
$ bison -x gr.y
@group
$ bison --print-datadir
/usr/local/share/bison
@end group
$ xsltproc /usr/local/share/bison/xslt/xml2xhtml.xsl input.xml > input.html
$ xsltproc /usr/local/share/bison/xslt/xml2xhtml.xsl gr.xml >gr.html
@end example
@c ================================================= Tracing
@@ -8960,7 +9105,7 @@ Entering state 24
@noindent
The previous reduction demonstrates the @code{%printer} directive for
@code{<val>}: both the token @code{NUM} and the resulting non-terminal
@code{<val>}: both the token @code{NUM} and the resulting nonterminal
@code{exp} have @samp{1} as value.
@example
@@ -9250,7 +9395,7 @@ Show caret errors, in a manner similar to GCC's
@option{-fdiagnostics-show-caret}, or Clang's @option{-fcaret-diagnotics}. The
location provided with the message is used to quote the corresponding line of
the source file, underlining the important part of it with carets (^). Here is
an example, using the following file @file{input.y}:
an example, using the following file @file{in.y}:
@example
%type <ival> exp
@@ -9262,27 +9407,27 @@ When invoked with @option{-fcaret}, Bison will report:
@example
@group
input.y:3.20-23: error: ambiguous reference: '$exp'
in.y:3.20-23: error: ambiguous reference: '$exp'
exp: exp '+' exp @{ $exp = $1 + $2; @};
^^^^
@end group
@group
input.y:3.1-3: refers to: $exp at $$
in.y:3.1-3: refers to: $exp at $$
exp: exp '+' exp @{ $exp = $1 + $2; @};
^^^
@end group
@group
input.y:3.6-8: refers to: $exp at $1
in.y:3.6-8: refers to: $exp at $1
exp: exp '+' exp @{ $exp = $1 + $2; @};
^^^
@end group
@group
input.y:3.14-16: refers to: $exp at $3
in.y:3.14-16: refers to: $exp at $3
exp: exp '+' exp @{ $exp = $1 + $2; @};
^^^
@end group
@group
input.y:3.32-33: error: $2 of 'exp' has no declared type
in.y:3.32-33: error: $2 of 'exp' has no declared type
exp: exp '+' exp @{ $exp = $1 + $2; @};
^^
@end group
@@ -10295,19 +10440,30 @@ It is convenient to use a typedef to shorten
%@{
typedef yy::calcxx_parser::token token;
%@}
/* Convert ints to the actual type of tokens. */
[-+*/] return yy::calcxx_parser::token_type (yytext[0]);
":=" return token::ASSIGN;
@{int@} @{
errno = 0;
long n = strtol (yytext, NULL, 10);
if (! (INT_MIN <= n && n <= INT_MAX && errno != ERANGE))
driver.error (*yylloc, "integer is out of range");
yylval->ival = n;
return token::NUMBER;
@}
@{id@} yylval->sval = new std::string (yytext); return token::IDENTIFIER;
. driver.error (*yylloc, "invalid character");
/* Convert ints to the actual type of tokens. */
[-+*/] return yy::calcxx_parser::token_type (yytext[0]);
":=" return token::ASSIGN;
@group
@{int@} @{
errno = 0;
long n = strtol (yytext, NULL, 10);
if (! (INT_MIN <= n && n <= INT_MAX && errno != ERANGE))
driver.error (*yylloc, "integer is out of range");
yylval->ival = n;
return token::NUMBER;
@}
@end group
@group
@{id@} @{
yylval->sval = new std::string (yytext);
return token::IDENTIFIER;
@}
@end group
. driver.error (*yylloc, "invalid character");
%%
@end example
@@ -11353,18 +11509,23 @@ In an action, the location of the left-hand side of the rule.
@end deffn
@deffn {Variable} @@@var{n}
@deffnx {Symbol} @@@var{n}
In an action, the location of the @var{n}-th symbol of the right-hand side
of the rule. @xref{Tracking Locations}.
In a grammar, the Bison-generated nonterminal symbol for a mid-rule action
with a semantical value. @xref{Mid-Rule Action Translation}.
@end deffn
@deffn {Variable} @@@var{name}
In an action, the location of a symbol addressed by name. @xref{Tracking
Locations}.
@deffnx {Variable} @@[@var{name}]
In an action, the location of a symbol addressed by @var{name}.
@xref{Tracking Locations}.
@end deffn
@deffn {Variable} @@[@var{name}]
In an action, the location of a symbol addressed by name. @xref{Tracking
Locations}.
@deffn {Symbol} $@@@var{n}
In a grammar, the Bison-generated nonterminal symbol for a mid-rule action
with no semantical value. @xref{Mid-Rule Action Translation}.
@end deffn
@deffn {Variable} $$
@@ -11378,12 +11539,8 @@ right-hand side of the rule. @xref{Actions}.
@end deffn
@deffn {Variable} $@var{name}
In an action, the semantic value of a symbol addressed by name.
@xref{Actions}.
@end deffn
@deffn {Variable} $[@var{name}]
In an action, the semantic value of a symbol addressed by name.
@deffnx {Variable} $[@var{name}]
In an action, the semantic value of a symbol addressed by @var{name}.
@xref{Actions}.
@end deffn
@@ -11401,8 +11558,9 @@ the grammar file. @xref{Grammar Outline, ,Outline of a Bison
Grammar}.
@end deffn
@deffn {Construct} /*@dots{}*/
Comment delimiters, as in C.
@deffn {Construct} /* @dots{} */
@deffnx {Construct} // @dots{}
Comments, as in C/C++.
@end deffn
@deffn {Delimiter} :
@@ -11885,7 +12043,7 @@ Data type of semantic values; @code{int} by default.
@item Accepting state
A state whose only action is the accept action.
The accepting state is thus a consistent state.
@xref{Understanding,,}.
@xref{Understanding, ,Understanding Your Parser}.
@item Backus-Naur Form (BNF; also called ``Backus Normal Form'')
Formal method of specifying context-free grammars originally proposed
+35
View File
@@ -0,0 +1,35 @@
// Generated by GNU Bison 2.6.90.
// Report bugs to <[email protected]>.
// Home page: <http://www.gnu.org/software/bison/>.
digraph "/tmp/fo.y"
{
node [fontname = courier, shape = box, colorscheme = paired6]
edge [fontname = courier]
0 [label="State 0\n\l 0 $accept: . exp $end\l 1 exp: . a \";\"\l 2 | . b \".\"\l 3 a: . \"0\"\l 4 b: . \"0\"\l"]
0 -> 1 [style=solid label="\"0\""]
0 -> 2 [style=dashed label="exp"]
0 -> 3 [style=dashed label="a"]
0 -> 4 [style=dashed label="b"]
1 [label="State 1\n\l 3 a: \"0\" . [\";\"]\l 4 b: \"0\" . [\".\"]\l"]
1 -> "1R3" [style=solid]
"1R3" [label="R3", fillcolor=3, shape=diamond, style=filled]
1 -> "1R4" [label="[\".\"]", style=solid]
"1R4" [label="R4", fillcolor=3, shape=diamond, style=filled]
2 [label="State 2\n\l 0 $accept: exp . $end\l"]
2 -> 5 [style=solid label="$end"]
3 [label="State 3\n\l 1 exp: a . \";\"\l"]
3 -> 6 [style=solid label="\";\""]
4 [label="State 4\n\l 2 exp: b . \".\"\l"]
4 -> 7 [style=solid label="\".\""]
5 [label="State 5\n\l 0 $accept: exp $end .\l"]
5 -> "5R0" [style=solid]
"5R0" [label="Acc", fillcolor=1, shape=diamond, style=filled]
6 [label="State 6\n\l 1 exp: a \";\" .\l"]
6 -> "6R1" [style=solid]
"6R1" [label="R1", fillcolor=3, shape=diamond, style=filled]
7 [label="State 7\n\l 2 exp: b \".\" .\l"]
7 -> "7R2" [style=solid]
"7R2" [label="R2", fillcolor=3, shape=diamond, style=filled]
}
+4
View File
@@ -0,0 +1,4 @@
%%
exp: a ";" | b ".";
a: "0";
b: "0";
+1 -1
View File
@@ -19,7 +19,7 @@
\def\finalout{\overfullrule=0pt}
%\finalout
% Copyright (c) 1998, 2001, 2009-2012 Free Software Foundation, Inc.
% Copyright (c) 1998, 2001, 2009-2013 Free Software Foundation, Inc.
%
% This file is part of Bison.
%
+1 -1
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
## Copyright (C) 2006, 2009-2013 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
+1 -1
View File
@@ -16,7 +16,7 @@ straightforward use of _build/src/bison would.)
--
Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -1,6 +1,6 @@
#! /usr/bin/perl -w
# Copyright (C) 2006, 2008-2012 Free Software Foundation, Inc.
# Copyright (C) 2006, 2008-2013 Free Software Foundation, Inc.
#
# This file is part of Bison, the GNU Compiler Compiler.
#
+1 -1
View File
@@ -1,5 +1,5 @@
## Process this file with automake to produce Makefile.in -*-Makefile-*-
## Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc.
## Copyright (C) 2005, 2009-2013 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
+1 -1
View File
@@ -1,5 +1,5 @@
## Process this file with automake to produce Makefile.in -*-Makefile-*-
## Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc.
## Copyright (C) 2005-2006, 2009-2013 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
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/sh
# Copyright (C) 2005-2012 Free Software Foundation, Inc.
# Copyright (C) 2005-2013 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
+1 -1
View File
@@ -2,7 +2,7 @@
# This file is part of GNU Bison
# Copyright (C) 1992, 2000-2001, 2005-2006, 2009-2012 Free Software
# Copyright (C) 1992, 2000-2001, 2005-2006, 2009-2013 Free Software
# Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
+1 -1
Submodule gnulib updated: c457e702ba...076ac82d1d
-1
View File
@@ -275,7 +275,6 @@
/bitrotate.c
/math.c
/sig-handler.c
/stdio.c
/unistd.c
/wctype-h.c
/getdelim.c
+1 -1
View File
@@ -1,6 +1,6 @@
# Make bison/lib.
# Copyright (C) 2001-2004, 2006, 2008-2012 Free Software Foundation,
# Copyright (C) 2001-2004, 2006, 2008-2013 Free Software Foundation,
# Inc.
# This program is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -1,6 +1,6 @@
/* Array bitsets.
Copyright (C) 2002-2003, 2006, 2009-2012 Free Software Foundation,
Copyright (C) 2002-2003, 2006, 2009-2013 Free Software Foundation,
Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -1
View File
@@ -1,6 +1,6 @@
/* Functions to support abitsets.
Copyright (C) 2002, 2004, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2002, 2004, 2009-2013 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -1
View File
@@ -1,6 +1,6 @@
/* Base bitset stuff.
Copyright (C) 2002-2004, 2006, 2009-2012 Free Software Foundation,
Copyright (C) 2002-2004, 2006, 2009-2013 Free Software Foundation,
Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -1
View File
@@ -1,6 +1,6 @@
/* General bitsets.
Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2002-2006, 2009-2013 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -1
View File
@@ -1,6 +1,6 @@
/* Generic bitsets.
Copyright (C) 2002-2004, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2002-2004, 2009-2013 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -1
View File
@@ -1,6 +1,6 @@
/* Bitset statistics.
Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2002-2006, 2009-2013 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -1
View File
@@ -1,6 +1,6 @@
/* Functions to support bitset statistics.
Copyright (C) 2002-2004, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2002-2004, 2009-2013 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -1
View File
@@ -1,6 +1,6 @@
/* Bitset vectors.
Copyright (C) 2001-2002, 2004, 2006, 2009-2012 Free Software
Copyright (C) 2001-2002, 2004, 2006, 2009-2013 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -1,6 +1,6 @@
/* Bitset vectors.
Copyright (C) 2002, 2004, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2002, 2004, 2009-2013 Free Software Foundation, Inc.
Contributed by Akim Demaille (akim@freefriends.org).
+1 -1
View File
@@ -1,6 +1,6 @@
/* Bitset vectors.
Copyright (C) 2001-2002, 2004-2006, 2009-2012 Free Software
Copyright (C) 2001-2002, 2004-2006, 2009-2013 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -1,6 +1,6 @@
/* Bitset vectors.
Copyright (C) 2002, 2004, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2002, 2004, 2009-2013 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -1
View File
@@ -1,6 +1,6 @@
/* Functions to support expandable bitsets.
Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2002-2006, 2009-2013 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -1
View File
@@ -1,6 +1,6 @@
/* Functions to support ebitsets.
Copyright (C) 2002, 2004, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2002, 2004, 2009-2013 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -1
View File
@@ -1,6 +1,6 @@
/* get-errno.c - get and set errno.
Copyright (C) 2002, 2006, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2002, 2006, 2009-2013 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
+1 -1
View File
@@ -1,6 +1,6 @@
/* get-errno.h - get and set errno.
Copyright (C) 2002, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2002, 2009-2013 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
+1 -1
View File
@@ -1,6 +1,6 @@
/* Functions to support link list bitsets.
Copyright (C) 2002-2004, 2006, 2009-2012 Free Software Foundation,
Copyright (C) 2002-2004, 2006, 2009-2013 Free Software Foundation,
Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -1
View File
@@ -1,6 +1,6 @@
/* Functions to support lbitsets.
Copyright (C) 2002, 2004, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2002, 2004, 2009-2013 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -1
View File
@@ -1,6 +1,6 @@
/* Fake libiberty.h for Bison.
Copyright (C) 2002-2004, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2002-2004, 2009-2013 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
+1 -1
View File
@@ -1,6 +1,6 @@
/* Yacc library main function.
Copyright (C) 2002, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2002, 2009-2013 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -1,6 +1,6 @@
/* Timing variables for measuring compiler performance.
Copyright (C) 2000, 2002, 2004, 2006, 2009-2012 Free Software
Copyright (C) 2000, 2002, 2004, 2006, 2009-2013 Free Software
Foundation, Inc.
Contributed by Alex Samuel <samuel@codesourcery.com>
+1 -1
View File
@@ -1,7 +1,7 @@
/* This file contains the definitions for timing variables used to -*- C -*-
measure run-time performance of the compiler.
Copyright (C) 2002, 2007, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2002, 2007, 2009-2013 Free Software Foundation, Inc.
Contributed by Akim Demaille <akim@freefriends.org>.
+1 -1
View File
@@ -1,6 +1,6 @@
/* Timing variables for measuring compiler performance.
Copyright (C) 2000, 2002, 2004, 2009-2012 Free Software Foundation,
Copyright (C) 2000, 2002, 2004, 2009-2013 Free Software Foundation,
Inc.
Contributed by Alex Samuel <samuel@codesourcery.com>
+1 -1
View File
@@ -1,6 +1,6 @@
/* Variable array bitsets.
Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2002-2006, 2009-2013 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -1
View File
@@ -1,6 +1,6 @@
/* Functions to support vbitsets.
Copyright (C) 2002, 2004, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2002, 2004, 2009-2013 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -1
View File
@@ -1,6 +1,6 @@
/* Yacc library error-printing function.
Copyright (C) 2002, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2002, 2009-2013 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -1,6 +1,6 @@
# bison-i18n.m4 serial 2
dnl Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc.
dnl Copyright (C) 2005-2006, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
+27 -19
View File
@@ -1,6 +1,6 @@
# Sanity test a C compiler.
# Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
# Copyright (C) 2006, 2009-2013 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
@@ -24,6 +24,7 @@ AC_DEFUN([BISON_TEST_FOR_WORKING_C_COMPILER], [
int test_array[CHAR_BIT];]])],
[],
[AC_MSG_FAILURE([cannot compile a simple C program])])
AC_SUBST([BISON_C_WORKS], [:])
])
# BISON_CHECK_WITH_POSIXLY_CORRECT(CODE)
@@ -47,25 +48,32 @@ case $gl_had_POSIXLY_CORRECT in
esac
])
# BISON_C_COMPILER_POSIXLY_CORRECT
# --------------------------------
# Whether the compiler supports -g in POSIXLY_CORRECT mode. clang-2.9
# on OS X does not, because "clang-mp-2.9 -o test -g test.c" launches
# "/usr/bin/dsymutil test -o test.dSYM" which fails with "error:
# unable to open executable '-o'".
# BISON_LANG_COMPILER_POSIXLY_CORRECT
# -----------------------------------
# Whether the compiler for the current language supports -g in
# POSIXLY_CORRECT mode. clang-2.9 on OS X does not, because
# "clang-mp-2.9 -o test -g test.c" launches "/usr/bin/dsymutil test -o
# test.dSYM" which fails with "error: unable to open executable '-o'".
#
# Sets C_COMPILER_POSIXLY_CORRECT to true/false.
AC_DEFUN([BISON_C_COMPILER_POSIXLY_CORRECT],
[AC_CACHE_CHECK([whether $CC supports POSIXLY_CORRECT=1],
[bison_cv_cc_supports_posixly_correct],
# Sets <LANG>_COMPILER_POSIXLY_CORRECT to true/false.
AC_DEFUN([BISON_LANG_COMPILER_POSIXLY_CORRECT],
[AC_CACHE_CHECK([whether $_AC_CC supports POSIXLY_CORRECT=1],
[bison_cv_[]_AC_LANG_ABBREV[]_supports_posixly_correct],
[BISON_CHECK_WITH_POSIXLY_CORRECT(
[AC_LANG_PUSH([C])
AC_LINK_IFELSE([AC_LANG_PROGRAM],
[bison_cv_cc_supports_posixly_correct=yes],
[bison_cv_cc_supports_posixly_correct=no])
AC_LANG_POP([C])])])
case $bison_cv_cc_supports_posixly_correct in
yes) AC_SUBST([C_COMPILER_POSIXLY_CORRECT], [true]) ;;
no) AC_SUBST([C_COMPILER_POSIXLY_CORRECT], [false]);;
[AC_LINK_IFELSE([AC_LANG_PROGRAM],
[bison_cv_[]_AC_LANG_ABBREV[]_supports_posixly_correct=yes],
[bison_cv_[]_AC_LANG_ABBREV[]_supports_posixly_correct=no])])])
case $bison_cv_[]_AC_LANG_ABBREV[]_supports_posixly_correct in
yes) AC_SUBST(_AC_LANG_PREFIX[_COMPILER_POSIXLY_CORRECT], [true]) ;;
no) AC_SUBST(_AC_LANG_PREFIX[_COMPILER_POSIXLY_CORRECT], [false]);;
esac
])
# BISON_C_COMPILER_POSIXLY_CORRECT
# --------------------------------
# Whether the C compiler supports -g in POSIXLY_CORRECT mode.
AC_DEFUN([BISON_C_COMPILER_POSIXLY_CORRECT],
[AC_LANG_PUSH([C])
BISON_LANG_COMPILER_POSIXLY_CORRECT
AC_LANG_POP([C])
])
+10 -1
View File
@@ -1,7 +1,7 @@
# -*- Autoconf -*-
# Sanity-test a C++ compiler.
#
# Copyright (C) 2004, 2006, 2009-2012 Free Software Foundation, Inc.
# Copyright (C) 2004, 2006, 2009-2013 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
@@ -58,3 +58,12 @@ AC_DEFUN([BISON_TEST_FOR_WORKING_CXX_COMPILER],
AC_SUBST([BISON_CXX_WORKS])
AM_CONDITIONAL(BISON_CXX_WORKS, test $bison_cv_cxx_works = yes)
])
# BISON_CXX_COMPILER_POSIXLY_CORRECT
# ----------------------------------
# Whether the C++ compiler supports -g in POSIXLY_CORRECT mode.
AC_DEFUN([BISON_CXX_COMPILER_POSIXLY_CORRECT],
[AC_LANG_PUSH([C++])
BISON_LANG_COMPILER_POSIXLY_CORRECT
AC_LANG_POP([C++])
])
+1 -1
View File
@@ -1,5 +1,5 @@
# flex.m4 serial 2
# Copyright (C) 2012 Free Software Foundation, Inc.
# Copyright (C) 2012-2013 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+1 -1
View File
@@ -1,7 +1,7 @@
# -*- Autoconf -*-
# Checks required to run `timevar', a time tracker.
#
# Copyright (C) 2002-2003, 2009-2012 Free Software Foundation, Inc.
# Copyright (C) 2002-2003, 2009-2013 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
+1 -1
View File
@@ -1,6 +1,6 @@
/* IELR's inadequacy annotation list.
Copyright (C) 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2009-2013 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -1,6 +1,6 @@
/* IELR's inadequacy annotation list.
Copyright (C) 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2009-2013 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -1,6 +1,6 @@
/* IELR's inadequacy list.
Copyright (C) 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2009-2013 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -1,6 +1,6 @@
/* IELR's inadequacy list.
Copyright (C) 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2009-2013 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -1,6 +1,6 @@
/* Generate the LR(0) parser states for Bison.
Copyright (C) 1984, 1986, 1989, 2000-2002, 2004-2007, 2009-2012 Free
Copyright (C) 1984, 1986, 1989, 2000-2002, 2004-2007, 2009-2013 Free
Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.

Some files were not shown because too many files have changed in this diff Show More