mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-08-08 18:25:13 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d2a7d608e | ||
|
|
5ea72c19da | ||
|
|
97d520633b | ||
|
|
af8a609a90 | ||
|
|
73edad9a25 | ||
|
|
9736697d6d | ||
|
|
e2f3fda11a | ||
|
|
3c0be43411 | ||
|
|
d45708d418 | ||
|
|
219c26ea51 | ||
|
|
f1ceed0774 | ||
|
|
d2829fdc04 | ||
|
|
43dc3c8bc4 | ||
|
|
3d04b5673d | ||
|
|
39c2566994 | ||
|
|
1694ac5cf2 | ||
|
|
dfff662817 | ||
|
|
adf1725fdb | ||
|
|
7aaf9ce758 | ||
|
|
2ceb8c617c | ||
|
|
87b9c9bc43 | ||
|
|
dc25ce6bb1 | ||
|
|
ace92a2691 | ||
|
|
397bb3932f | ||
|
|
bbbbe221d7 | ||
|
|
4d7b57b527 | ||
|
|
321fe707f4 | ||
|
|
1266b63674 | ||
|
|
b9ad39c1fb | ||
|
|
b1a4261e6d | ||
|
|
a022ff4186 | ||
|
|
b5b94bd5e6 | ||
|
|
b9e42bb439 | ||
|
|
75ac158b82 | ||
|
|
f23cd66008 | ||
|
|
9874460819 | ||
|
|
915becaa5d | ||
|
|
ae50972393 | ||
|
|
c9e0a88079 | ||
|
|
50bcb22c4c | ||
|
|
cfc9e431c3 | ||
|
|
42f8609bbd | ||
|
|
9e408f848d | ||
|
|
48578d6c12 | ||
|
|
914e713d07 | ||
|
|
94505fb7e2 | ||
|
|
1bcbca4368 | ||
|
|
a17352a9da | ||
|
|
c984dee8d1 | ||
|
|
cefb18280b | ||
|
|
2f3064f08e | ||
|
|
ab3a683f05 | ||
|
|
ecd1b61cd4 | ||
|
|
f67c40374e | ||
|
|
0213d65176 | ||
|
|
c19178bfaf | ||
|
|
0d2b2ab033 | ||
|
|
8ba62e3e10 | ||
|
|
f490771b4b | ||
|
|
5bc993d947 | ||
|
|
580c075d7f | ||
|
|
5d3a1ecbbe | ||
|
|
015e86a7b2 | ||
|
|
c1455babda | ||
|
|
2075a82a18 | ||
|
|
26fccd4d7b | ||
|
|
6469c4d72b | ||
|
|
b328890a9e | ||
|
|
f307943941 | ||
|
|
5339158d01 | ||
|
|
8defe11bfa | ||
|
|
41930e7ad8 | ||
|
|
d07932ef3d | ||
|
|
0364b3344f | ||
|
|
876fd8357a | ||
|
|
1eb0b14659 | ||
|
|
bee1df15b2 | ||
|
|
7e6d1e2296 | ||
|
|
a957d06cef | ||
|
|
462503f825 | ||
|
|
bf151b75ff | ||
|
|
f56274a8f9 | ||
|
|
b5775a81c1 | ||
|
|
7ed73f82ad | ||
|
|
4b1ebc495b | ||
|
|
738cde3e93 | ||
|
|
d6fb461dd8 | ||
|
|
14da0cdd07 | ||
|
|
c9ba9e5978 |
@@ -26,6 +26,7 @@ conftest*
|
||||
gnulib
|
||||
javacomp.sh
|
||||
javaexec.sh
|
||||
maint.mk
|
||||
patches
|
||||
releases
|
||||
stamp-h*
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
/gnulib
|
||||
/javacomp.sh
|
||||
/javaexec.sh
|
||||
/maint.mk
|
||||
/patches
|
||||
/releases
|
||||
/stamp-h*
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
COPYING
|
||||
^doc/fdl\.texi$
|
||||
^doc/gpl-3\.0\.texi$
|
||||
^doc/yacc\.1\.in$
|
||||
^src/parse-gram\.h$
|
||||
^data/m4sugar/
|
||||
@@ -1,3 +1,668 @@
|
||||
2010-01-22 Joel E. Denny <[email protected]>
|
||||
|
||||
Version 2.4.1a delayed.
|
||||
* NEWS (2.4.1a): Increment release date as there has been a
|
||||
small delay in getting the announcements and tarballs out.
|
||||
|
||||
2010-01-21 Joel E. Denny <[email protected]>
|
||||
|
||||
Version 2.4.1a.
|
||||
* NEWS (2.4.2): Rename to...
|
||||
(2.4.1a): ... this for now. Set date.
|
||||
* configure.ac (AM_INIT_AUTOMAKE): Disable gnits for now because
|
||||
it does not like this version name.
|
||||
|
||||
2010-01-21 Joel E. Denny <[email protected]>
|
||||
|
||||
* cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
|
||||
|
||||
2010-01-21 Joel E. Denny <[email protected]>
|
||||
|
||||
maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
|
||||
* HACKING (Release Procedure): Update notes on copyright years.
|
||||
* Makefile.am (update-package-copyright-year): New target rule.
|
||||
* build-aux/update-package-copyright-year: New file.
|
||||
* cfg.mk (update-copyright): Add update-package-copyright-year
|
||||
as a dependency.
|
||||
|
||||
2010-01-19 Joel E. Denny <[email protected]>
|
||||
|
||||
* bootstrap: Import improvements from latest gnulib.
|
||||
|
||||
2010-01-19 Joel E. Denny <[email protected]>
|
||||
|
||||
build: require Automake 1.11.1 to avoid a security flaw.
|
||||
* HACKING (Release Procedure): Don't document Automake security
|
||||
flaw here.
|
||||
* configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
|
||||
why here.
|
||||
|
||||
2010-01-19 Joel E. Denny <[email protected]>
|
||||
|
||||
gnulib: update to latest.
|
||||
|
||||
2010-01-19 Joel E. Denny <[email protected]>
|
||||
|
||||
ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
|
||||
|
||||
2010-01-15 Joel E. Denny <[email protected]>
|
||||
|
||||
Thank the developer of the initial push parser implementation.
|
||||
This unfortunate oversight is several years old.
|
||||
* THANKS (Odd Arild Olsen): Add.
|
||||
|
||||
2010-01-04 Joel E. Denny <[email protected]>
|
||||
|
||||
maint: run "make update-copyright"
|
||||
|
||||
2009-12-30 Joel E. Denny <[email protected]>
|
||||
|
||||
POSIX: warn if %prec's token was not defined.
|
||||
Reported by Florian Krohm at
|
||||
<http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
|
||||
* NEWS (2.4.2): Document.
|
||||
* src/reader.c (grammar_rule_check): Implement.
|
||||
(grammar_current_rule_prec_set): Add comments explaining that we
|
||||
here assume a %prec identifier is a token, but we still manage
|
||||
to support POSIX.
|
||||
* tests/input.at (%prec's token must be defined): New test
|
||||
group.
|
||||
|
||||
2009-12-31 Joel E. Denny <[email protected]>
|
||||
|
||||
* HACKING (Release Procedure): Recommend a secure automake.
|
||||
|
||||
2009-12-21 Joel E. Denny <[email protected]>
|
||||
|
||||
YYFAIL: deprecate.
|
||||
* NEWS (2.4.2): Document deprecation and the phase-out plan.
|
||||
* data/lalr1.java (parser::YYStack::YYFAIL): Add comment about
|
||||
deprecation.
|
||||
* data/yacc.c (YYFAIL): Likewise, and suppress warnings about
|
||||
YYFAIL from GCC cpp's -Wunused-macros.
|
||||
* doc/bison.texinfo (Java Action Features): Remove YYFAIL
|
||||
documentation.
|
||||
|
||||
2009-12-16 Joel E. Denny <[email protected]>
|
||||
|
||||
Add gcc's -Wundef to test suite and fix another warning from it.
|
||||
* NEWS (2.4.2): Update description of -Wundef fix.
|
||||
* configure.ac (WARN_CXXFLAGS_TEST): New substitution.
|
||||
(WARN_CFLAGS_TEST): New substitution.
|
||||
* data/glr.c: Avoid warning about __STRICT_ANSI__.
|
||||
* tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
|
||||
WARN_CFLAGS.
|
||||
(CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
|
||||
|
||||
2009-12-16 Joel E. Denny <[email protected]>
|
||||
|
||||
Document gcc -Wundef fix.
|
||||
* NEWS (2.4.2): Here.
|
||||
* THANKS (Jonathan Nieder): Add.
|
||||
|
||||
2009-12-15 Jonathan Nieder <[email protected]> (tiny change)
|
||||
|
||||
Avoid warnings from gcc -Wundef y.tab.c.
|
||||
* data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
|
||||
defined before using them.
|
||||
* data/lalr1.cc: Likewise.
|
||||
* data/yacc.c: Likewise.
|
||||
|
||||
2009-12-15 Joel E. Denny <[email protected]>
|
||||
|
||||
Import M4 detection fix from Autoconf.
|
||||
Reported by Eric Blake.
|
||||
* m4/m4.m4: Copy serial 10.
|
||||
|
||||
2009-12-14 Joel E. Denny <[email protected]>
|
||||
|
||||
Enable assertion output and --disable-assert for configure.
|
||||
* bootstrap.conf (gnulib_modules): Add assert module.
|
||||
* src/system.h (aver): Define as assert, and summarize the
|
||||
discussion on this issue.
|
||||
|
||||
2009-10-11 Joel E. Denny <[email protected]>
|
||||
|
||||
portability: use va_start and va_end in the same function.
|
||||
* src/complain.c (error_message): Move va_end from here...
|
||||
(ERROR_MESSAGE): ... to here.
|
||||
|
||||
2009-10-04 Joel E. Denny <[email protected]>
|
||||
|
||||
tests: skip tests of file names that platform does not support.
|
||||
Reported by Michael Raskin at
|
||||
<http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
|
||||
* THANKS (Michael Raskin): Add.
|
||||
* tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
|
||||
to fail at least for file names containing ":" or "\".
|
||||
|
||||
2009-09-16 Akim Demaille <[email protected]>
|
||||
|
||||
doc: spell checking.
|
||||
* doc/bison.texinfo: here.
|
||||
|
||||
2009-09-13 Joel E. Denny <[email protected]>
|
||||
|
||||
tests: clean up push.at test group titles.
|
||||
* tests/push.at: Remove "Push Parsing: " from test group titles
|
||||
because these are already under the banner "Push Parsing Tests".
|
||||
|
||||
2009-09-03 Akim Demaille <[email protected]>
|
||||
|
||||
* NEWS (2.4.2): Add "Internationalization" item.
|
||||
|
||||
2009-09-03 Akim Demaille <[email protected]>
|
||||
|
||||
bootstrap: fix/improve find_tool.
|
||||
* bootstrap (find_tool): Improve error messages.
|
||||
Fix typo about find_tool_names.
|
||||
|
||||
2009-08-27 Eric Blake <[email protected]>
|
||||
|
||||
scan-gram: avoid portability trap with ctype usage.
|
||||
* src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
|
||||
Avoid compiler warning.
|
||||
|
||||
2009-08-27 Joel E. Denny <[email protected]>
|
||||
|
||||
tests: use perl for printing special sequences to files.
|
||||
And skip tests if perl is not available. This is better than
|
||||
playing tricks with shell portability. Suggested by Akim
|
||||
Demaille.
|
||||
* tests/input.at (Bad character literals): Use it here for
|
||||
omitting final newlines.
|
||||
(Bad escapes in literals): Use it here for special characters.
|
||||
|
||||
2009-08-21 Joel E. Denny <[email protected]>
|
||||
|
||||
Use locale when quoting.
|
||||
* src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
|
||||
quote rather than implementing quoting here.
|
||||
|
||||
2009-08-20 Eric Blake <[email protected]>
|
||||
|
||||
Make previous patch more robust.
|
||||
* src/output.c (ARRAY_CARDINALITY): New macro, copied from
|
||||
argmatch.h.
|
||||
(output_skeleton): Use it.
|
||||
Suggested by Akim Demaille.
|
||||
|
||||
Import latest m4/m4.m4.
|
||||
* m4/m4.m4: Copy from autoconf 2.64.
|
||||
* configure.ac (M4_GNU_OPTION): New define.
|
||||
* src/output.c (output_skeleton): Use it to resolve FIXME.
|
||||
* NEWS: Mention this.
|
||||
|
||||
2009-08-19 Joel E. Denny <[email protected]>
|
||||
|
||||
Fix complaints about escape sequences.
|
||||
Discussed starting at
|
||||
<http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
|
||||
* src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
|
||||
For a \0 and similar escape sequences meaning the null
|
||||
character, report an invalid escape sequence instead of an
|
||||
invalid null character because the latter does not actually
|
||||
appear in the user's input.
|
||||
In all escape sequence complaints, don't escape the initial
|
||||
backslash, and don't quote when the sequence appears at the end
|
||||
of the complaint line unless there's whitespace that quotearg
|
||||
won't escape.
|
||||
Consistently say "invalid" not "unrecognized".
|
||||
* tests/input.at (Bad escapes in literals): New.
|
||||
|
||||
2009-08-19 Akim Demaille <[email protected]>
|
||||
|
||||
doc: %initial-action to initialize yylloc.
|
||||
Reported by Bill Allombert.
|
||||
* doc/bison.texinfo: Set fill-column to 76.
|
||||
(Location Type): Document the use of %initial-action to initialize
|
||||
yylloc.
|
||||
|
||||
2009-08-18 Joel E. Denny <[email protected]>
|
||||
|
||||
maint: update for gnulib's recent update-copyright changes
|
||||
* gnulib: Update.
|
||||
* .x-update-copyright (COPYING): Add as it's no longer implied
|
||||
when .x-update-copyright is present.
|
||||
* cfg.mk (update-copyright-local): Remove, now ignored.
|
||||
(update-copyright): Declare update-b4-copyright as a dependency.
|
||||
|
||||
2009-08-17 Akim Demaille <[email protected]>
|
||||
|
||||
build: lower gettext requirements.
|
||||
|
||||
Bison was uselessly requiring the formatstring macros from
|
||||
gettext, which resulted in mo files not being installed on systems
|
||||
that perfectly supported Bison mo files. Lower the requirement.
|
||||
http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
|
||||
|
||||
* configure.ac: Require need-ngettext instead of
|
||||
need-formatstring-macros.
|
||||
Reported by Martin Jabocs.
|
||||
Suggested by Bruno Haible.
|
||||
* INSTALL: Restructure.
|
||||
(Internationalization): New.
|
||||
|
||||
2009-08-14 Joel E. Denny <[email protected]>
|
||||
|
||||
maint: fix use of copyright year intervals.
|
||||
* gnulib: Update.
|
||||
* bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
|
||||
as now recommended in gnulib/NEWS.
|
||||
* build-aux/update-b4-copyright: Fix.
|
||||
* cfg.mk (update-copyright-env): Configure update-copyright.
|
||||
|
||||
2009-08-12 Akim Demaille <[email protected]>
|
||||
|
||||
distcheck: fix.
|
||||
|
||||
* examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
|
||||
|
||||
2009-08-06 Joel E. Denny <[email protected]>
|
||||
|
||||
maint: run "make update-copyright"
|
||||
But first...
|
||||
* .x-update-copyright (^data/m4sugar/): Add, because these
|
||||
files are from Autoconf.
|
||||
|
||||
2009-08-06 Joel E. Denny <[email protected]>
|
||||
|
||||
maint: make update-b4-copyright easier to use
|
||||
* build-aux/update-b4-copyright: In warnings, report line
|
||||
numbers rather than character positions.
|
||||
* cfg.mk (update-copyright-local): Set to update-b4-copyright so
|
||||
that update-copyright runs it.
|
||||
* gnulib: Update.
|
||||
|
||||
2009-08-05 Joel E. Denny <[email protected]>
|
||||
|
||||
maint: clean up update-b4-copyright code
|
||||
* build-aux/update-b4-copyright: Do not accept 2-digit
|
||||
UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
|
||||
Don't accept a `[' in a b4_copyright argument.
|
||||
Format code more consistently.
|
||||
Don't assume b4*copyright never occurs.
|
||||
|
||||
2009-08-04 Joel E. Denny <[email protected]>
|
||||
|
||||
maint: automate b4_copyright updates.
|
||||
* Makefile.am (update-b4-copyright): New target rule.
|
||||
* build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
|
||||
* build-aux/update-b4-copyright: New.
|
||||
* data/yacc.c: Remove stray characters around b4_copyright
|
||||
invocations.
|
||||
|
||||
2009-08-04 Joel E. Denny <[email protected]>
|
||||
|
||||
maint: automate annual package-wide copyright-year update.
|
||||
* .x-update-copyright: New.
|
||||
* Makefile.am (EXTRA_DIST): Remove maint.mk.
|
||||
* bootstrap.conf (gnulib_modules): Add maintainer-makefile and
|
||||
update-copyright. Remove gnumakefile, which is implied by
|
||||
maintainer-makefile.
|
||||
* cfg.mk (bootstrap-tools): Copy from old maint.mk.
|
||||
* gnulib: Update.
|
||||
* maint.mk: Remove, now copied from gnulib.
|
||||
* examples/extexi: Add missing "(C)" in copyright statement so
|
||||
update-copyright can recognize it.
|
||||
* src/LR0.h: Likewise.
|
||||
* src/print.h: Likewise.
|
||||
* src/print_graph.h: Likewise.
|
||||
* src/gram.c: Add missing comma in copyright statement.
|
||||
* src/gram.h: Likewise.
|
||||
|
||||
2009-08-04 Joel E. Denny <[email protected]>
|
||||
|
||||
Fix "make distcheck".
|
||||
* examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
|
||||
of just calc.stamp.
|
||||
|
||||
2009-08-01 Joel E. Denny <[email protected]>
|
||||
|
||||
Pacify "gcc -Wunused" for the input function from Flex.
|
||||
Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
|
||||
and later.
|
||||
* src/scan-code.l: Add "%option noinput", which I cannot find in
|
||||
the Flex manual, but which Flex has supported since at least as
|
||||
far back as 2.5.4. However, if any of our developers still use
|
||||
Flex 2.5.4, they'll need to stop configuring with
|
||||
--enable-gcc-warnings because "%option noinput" didn't work
|
||||
correctly until Flex 2.5.6.
|
||||
* src/scan-gram.l: Likewise.
|
||||
* src/scan-skel.l: Likewise.
|
||||
|
||||
2009-06-29 Akim Demaille <[email protected]>
|
||||
|
||||
build: avoid concurrent extraction of calc++.
|
||||
* examples/calc++/Makefile.am (calc.stamp): New.
|
||||
Depend on it to create the sources of calc++ so that concurrent
|
||||
builds don't launch several "extexi" in parallel.
|
||||
Not only this is inefficient, this also builds incorrect sources
|
||||
with several extractions mixed together.
|
||||
|
||||
2009-06-25 Akim Demaille <[email protected]>
|
||||
|
||||
hash: check insertion for memory exhaustion.
|
||||
* src/uniqstr.c (uniqstr_new): New.
|
||||
|
||||
2009-06-11 Akim Demaille <[email protected]>
|
||||
|
||||
hash: check insertion for memory exhaustion.
|
||||
* src/muscle-tab.c (muscle_insert, muscle_grow)
|
||||
* src/state.c (state_hash_insert): Check the return value of
|
||||
hash_insert.
|
||||
|
||||
2009-06-10 Akim Demaille <[email protected]>
|
||||
|
||||
gnulib: update.
|
||||
* gnulib: Update to latest.
|
||||
* lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
|
||||
* m4/.gitignore: Regen.
|
||||
* src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
|
||||
Call xalloc_die on hash_insert failures.
|
||||
Requested by the new __warn_unused_result__ attribute of
|
||||
hash_insert.
|
||||
|
||||
2009-05-22 Joel E. Denny <[email protected]>
|
||||
|
||||
* data/c++.m4: Update copyright year.
|
||||
|
||||
2009-05-19 Joel E. Denny <[email protected]>
|
||||
|
||||
Handle a trailing `:' in a user-supplied C++ namespace better.
|
||||
* data/c++.m4 (b4_namespace_close): Don't let it be printed
|
||||
among the closing braces here. This fix might make the
|
||||
generated code easier to debug, but otherwise it should be
|
||||
insignificant because a trailing `:' is a C++ error already.
|
||||
|
||||
2009-05-11 Akim Demaille <[email protected]>
|
||||
|
||||
doc: use C++ headers.
|
||||
* doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
|
||||
headers.
|
||||
|
||||
2009-05-01 Joel E. Denny <[email protected]>
|
||||
|
||||
Declare %code to be a permanent feature.
|
||||
* NEWS (2.4.2): Here.
|
||||
* doc/bison.texinfo (Prologue Alternatives): Don't say it's
|
||||
experimental.
|
||||
(Decl Summary): Likewise.
|
||||
|
||||
2009-04-14 Akim Demaille <[email protected]>
|
||||
|
||||
doc: minor fixes.
|
||||
* doc/bison.texinfo (Decl Summary): Fix entry about %debug.
|
||||
(Table of Symbols): Remove duplicate entry for %debug.
|
||||
|
||||
2009-04-06 Eric Blake <[email protected]>
|
||||
|
||||
Work around autoconf 2.63b bug in testsuite.
|
||||
* tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
|
||||
autoconf bug related to # in test.
|
||||
|
||||
2009-04-06 Joel E. Denny <[email protected]>
|
||||
|
||||
Fix options documentation.
|
||||
* build-aux/cross-options.pl: As in --help output, write optional
|
||||
arguments as [=ARG] not =[ARG].
|
||||
* doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
|
||||
|
||||
2008-11-07 Akim Demaille <[email protected]>
|
||||
|
||||
Fix --help.
|
||||
* src/getargs.c (usage): Fix help string for -W.
|
||||
|
||||
2008-11-07 Akim Demaille <[email protected]>
|
||||
|
||||
Handle more general types of option arguments.
|
||||
* build-aux/cross-options.pl: The argument ends at the first
|
||||
space, not the first non-symbol character.
|
||||
Use @var for each word appearing the argument description.
|
||||
|
||||
2009-04-04 Joel E. Denny <[email protected]>
|
||||
|
||||
Remove spurious initial empty lines.
|
||||
* data/location.cc: End the @output lines with an @.
|
||||
|
||||
2008-11-04 Akim Demaille <[email protected]>
|
||||
|
||||
Remove spurious initial empty lines.
|
||||
* data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
|
||||
* data/yacc.c: End the @output lines with an @.
|
||||
|
||||
2009-04-04 Joel E. Denny <[email protected]>
|
||||
|
||||
Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
|
||||
If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
|
||||
requirements for a correct m4 are stricter.
|
||||
* m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
|
||||
* configure.ac: Update to use AC_PROG_GNU_M4.
|
||||
Reported by Eric Blake.
|
||||
|
||||
2009-04-03 Joel E. Denny <[email protected]>
|
||||
|
||||
Help with updating web manual.
|
||||
* HACKING: Incorporate instructions from gnulib/doc/README.
|
||||
* bootstrap.conf (gnulib_modules): Add gendocs.
|
||||
|
||||
2009-04-03 Joel E. Denny <[email protected]>
|
||||
|
||||
Fix strange %define locations for default values.
|
||||
Reported by Akim Demaille at
|
||||
<http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
|
||||
and discussed again starting at
|
||||
<http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
|
||||
* data/bison.m4 (b4_percent_define_default): Leave syncline blank
|
||||
because location information is bogus.
|
||||
Use angle brackets to delimit fake file name because square brackets
|
||||
look like underexpanded m4. Choose a better fake file name.
|
||||
Use negative line numbers.
|
||||
* src/muscle_tab.c (muscle_percent_define_default): Likewise.
|
||||
* src/location.c (location_print): If line for a boundary is negative,
|
||||
only print that boundary's file name.
|
||||
* src/location.h: Document that.
|
||||
* tests/skeletons.at (%define Boolean variables: invalid skeleton
|
||||
defaults): Update output.
|
||||
|
||||
2008-11-07 Akim Demaille <[email protected]>
|
||||
|
||||
Locations without columns for command line arguments.
|
||||
* src/location.c (location_print): Don't display negative columns.
|
||||
* src/location.h: Document this.
|
||||
|
||||
2009-02-03 Joel E. Denny <[email protected]>
|
||||
|
||||
Add reminder about uploading public key to keys.gnupg.net.
|
||||
* HACKING (Release Procedure): Here.
|
||||
|
||||
2009-03-31 Akim Demaille <[email protected]>
|
||||
|
||||
bootstrap: --help to stdout.
|
||||
* bootstrap (usage): Don't send --help to stderr.
|
||||
Use a here doc instead of a long string.
|
||||
|
||||
2009-03-31 Akim Demaille <[email protected]>
|
||||
|
||||
bootstrap: README-hacking no longer exists
|
||||
* bootstrap (checkout_only_file): Set to HACKING.
|
||||
|
||||
2009-03-26 Akim Demaille <[email protected]>
|
||||
|
||||
doc: merge HACKING and README-hacking.
|
||||
Two files is confusing.
|
||||
Reported by Alexandre Duret-Lutz.
|
||||
|
||||
* README-hacking: Merge into...
|
||||
* HACKING (Working from the repository): here.
|
||||
|
||||
2009-03-26 Akim Demaille <[email protected]>
|
||||
|
||||
doc: update README-hacking.
|
||||
* README-hacking: We now use git and git submodules.
|
||||
Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
|
||||
|
||||
2009-03-26 Akim Demaille <[email protected]>
|
||||
|
||||
lalr1.cc: avoid GCC 4.3 warnings.
|
||||
GCC 4.3 now warns about "a || b && c" and asks for explicit
|
||||
parentheses.
|
||||
Reported by Alexandre Duret-Lutz.
|
||||
* data/location.cc: Update copyright years.
|
||||
(Position::operator==): Use parens to make precedence explicit.
|
||||
Compare lines and columns first, as they are more likely to be
|
||||
different, and they are faster to compare.
|
||||
|
||||
2009-03-26 Akim Demaille <[email protected]>
|
||||
|
||||
gnulib: update.
|
||||
* gnulib: Update to latest.
|
||||
* lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
|
||||
use +=.
|
||||
|
||||
2009-01-08 Akim Demaille <[email protected]>
|
||||
|
||||
Fix grep portability issues.
|
||||
Grep on Solaris does not support -q.
|
||||
Reported by Summum Bonum.
|
||||
|
||||
* NEWS: Add a stub for 2.4.2.
|
||||
* THANKS: Add Summum Bonum.
|
||||
* tests/atlocal.in (EGREP): New.
|
||||
(CC, CXX, XSLTPROC): Make it possible to override them via
|
||||
envvars.
|
||||
* tests/java.at: Use $EGREP instead of egrep.
|
||||
Use AT_CHECK's ignore instead of grep's -q.
|
||||
|
||||
2008-12-11 Joel E. Denny <[email protected]>
|
||||
|
||||
Version 2.4.1.
|
||||
* NEWS: Set version and date.
|
||||
* lib/Makefile.am: Update copyright year.
|
||||
* tests/atlocal.in: Update copyright year.
|
||||
|
||||
2008-12-11 Joel E. Denny <[email protected]>
|
||||
|
||||
Semicolon feature removal is not about future language support.
|
||||
* NEWS: The semicolon feature is no longer active for newer languages,
|
||||
so don't claim that it causes trouble for them.
|
||||
|
||||
2008-12-11 Joel E. Denny <[email protected]>
|
||||
|
||||
* gnulib: Update submodule to HEAD.
|
||||
|
||||
2008-12-09 Akim Demaille <[email protected]>
|
||||
|
||||
Update data/README.
|
||||
* data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
|
||||
|
||||
2008-12-05 Eric Blake <[email protected]>
|
||||
|
||||
Build testsuite with newer autoconf.
|
||||
* tests/output.at (m4_expand): Don't override in newer autoconf,
|
||||
where the underlying implementation changed.
|
||||
* tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
|
||||
(_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
|
||||
(_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
|
||||
(_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
|
||||
since some of them contain unbalanced ')'.
|
||||
|
||||
2008-11-19 Joel E. Denny <[email protected]>
|
||||
|
||||
* NEWS: Clarify a little.
|
||||
|
||||
2008-11-19 Joel E. Denny <[email protected]>
|
||||
|
||||
* NEWS: Update for recent changes.
|
||||
|
||||
2008-11-18 Joel E. Denny <[email protected]>
|
||||
|
||||
Fix unexpanded macros in GLR defines file.
|
||||
Reported by Csaba Raduly at
|
||||
<http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
|
||||
* THANKS (Csaba Raduly): Add.
|
||||
* data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
|
||||
* tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
|
||||
lexer in a separate module that includes the defines file.
|
||||
(AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
|
||||
source.
|
||||
* tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
|
||||
Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
|
||||
(AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
|
||||
(AT_DATA_SOURCE_PROLOGUE): New.
|
||||
(AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
|
||||
(AT_DATA_SOURCE): New.
|
||||
(AT_FULL_COMPILE): New, copied from master branch and extended to
|
||||
support an additional source file.
|
||||
|
||||
2008-11-17 Joel E. Denny <[email protected]>
|
||||
|
||||
Don't let maintainer-*-check targets force a version update.
|
||||
* cfg.mk (_is-dist-target): Implement. maintainer-check* was already
|
||||
handled.
|
||||
|
||||
2008-11-17 Di-an Jan <[email protected]>
|
||||
|
||||
* doc/bison.texinfo: Synchronize ``Detail Node Listing''.
|
||||
Align menus. Adjust word wrapping. Use node names for menu names.
|
||||
(Examples): Don't abbreviate node names.
|
||||
(LocalWords): Remove abbreviations.
|
||||
(Copying): Make description a sentence.
|
||||
(Java Action Features): Remove period to match the rest of menu.
|
||||
|
||||
2008-11-11 Paolo Bonzini <[email protected]>
|
||||
|
||||
* bootstrap.conf: Replace m4/warning.m4 with warnings module.
|
||||
* configure.ac: Adjust usage.
|
||||
* lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
|
||||
* src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
|
||||
* tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
|
||||
|
||||
2008-11-07 Joel E. Denny <[email protected]>
|
||||
|
||||
Don't add a semicolon to actions for %skeleton or %language.
|
||||
It breaks Java test cases as reported by Akim Demaille.
|
||||
* src/scan-code.l: Implement.
|
||||
|
||||
2008-11-07 Joel E. Denny <[email protected]>
|
||||
|
||||
Clean up %skeleton and %language priority implementation.
|
||||
* src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
|
||||
remove static qualifier because others will soon need to see it.
|
||||
(language_prio): Likewise.
|
||||
(getargs): Use command_line_prio rather than 0.
|
||||
* src/getargs.h (command_line_prio, grammar_prio, default_prio): New
|
||||
enum fields.
|
||||
(skeleton_prio): Extern it.
|
||||
(language_prio): Extern it.
|
||||
* src/parse-gram.y: Use grammar_prio rather than 1.
|
||||
|
||||
2008-11-04 Akim Demaille <[email protected]>
|
||||
|
||||
* NEWS: Mention the trailing semicolon in action.
|
||||
|
||||
2008-11-04 Akim Demaille <[email protected]>
|
||||
|
||||
Reformat NEWS.
|
||||
* NEWS: Use more outline-mode markup.
|
||||
Suggested by Jim Meyering.
|
||||
|
||||
2008-11-04 Joel E. Denny <[email protected]>
|
||||
|
||||
Fix user actions without a trailing semicolon.
|
||||
Reported by Sergei Steshenko at
|
||||
<http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
|
||||
* THANKS (Sergei Steshenko): Add.
|
||||
* src/scan-code.l (SC_RULE_ACTION): Fix it.
|
||||
* tests/regression.at (Fix user actions without a trailing semicolon):
|
||||
New test case.
|
||||
|
||||
2008-11-02 Joel E. Denny <[email protected]>
|
||||
|
||||
Initiate further development.
|
||||
* NEWS: Create an empty section for new entries.
|
||||
* gnulib: Update submodule to HEAD.
|
||||
|
||||
2008-11-02 Joel E. Denny <[email protected]>
|
||||
|
||||
* NEWS: Version 2.4.
|
||||
@@ -184,9 +849,9 @@
|
||||
2008-08-29 Akim Demaille <[email protected]>
|
||||
|
||||
Clarify UPDATED use.
|
||||
* doc/bison.texinfo: It refers to the last edition of this file,
|
||||
* doc/bison.texinfo: It refers to the last edition of this file,
|
||||
not to the release date of Bison.
|
||||
Reported by Joel E. Denny.
|
||||
Reported by Joel E. Denny.
|
||||
|
||||
2008-08-29 Akim Demaille <[email protected]>
|
||||
|
||||
@@ -206,15 +871,15 @@
|
||||
2008-08-27 Akim Demaille <[email protected]>
|
||||
|
||||
Check yyerrok in calc.at.
|
||||
* tests/calc.at (calc.y): Use yyerrok on "( error )".
|
||||
(AT_CHECK_CALC): Add a check that ensures that yyerrok works as
|
||||
expected.
|
||||
* tests/calc.at (calc.y): Use yyerrok on "( error )".
|
||||
(AT_CHECK_CALC): Add a check that ensures that yyerrok works as
|
||||
expected.
|
||||
|
||||
2008-08-27 Akim Demaille <[email protected]>
|
||||
|
||||
Support yyerrok in lalr1.cc.
|
||||
YYBACKUP is still to import back into lalr1.cc.
|
||||
* data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
|
||||
* data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
|
||||
|
||||
2008-08-26 Joel E. Denny <[email protected]>
|
||||
|
||||
@@ -3802,9 +4467,12 @@
|
||||
|
||||
2006-09-15 Bob Rossi <[email protected]>
|
||||
|
||||
Add support for push parsing. Based on the original work of
|
||||
Odd Arild Olsen <[email protected]>.
|
||||
* data/Makefile.am (dist_pkgdata_DATA): Add push.c.
|
||||
* data/c.m4 (YYPUSH): New.
|
||||
(b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
|
||||
* data/push.c: New file.
|
||||
* src/getargs.c (push_parser): New var.
|
||||
* src/getargs.h (push_parser): New declaration.
|
||||
* src/output.c (prepare): Add macro insertion of `push_flag'.
|
||||
@@ -20977,9 +21645,8 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
|
||||
1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1987-1988, 1991-2010 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice and this
|
||||
|
||||
@@ -5,7 +5,7 @@ Don't put this file into the distribution.
|
||||
|
||||
Everything related to the development of Bison is on Savannah:
|
||||
|
||||
http://savannah.gnu.org/projects/bison/
|
||||
http://savannah.gnu.org/projects/bison/
|
||||
|
||||
|
||||
* Administrivia
|
||||
@@ -47,6 +47,118 @@ of the .output file etc. This excludes impossible error messages
|
||||
meant for the maintainers only.
|
||||
|
||||
|
||||
* Working from the repository
|
||||
|
||||
These notes intend to help people working on the checked-out sources.
|
||||
These requirements do not apply when building from a distribution tarball.
|
||||
|
||||
** Requirements
|
||||
|
||||
We've opted to keep only the highest-level sources in the repository.
|
||||
This eases our maintenance burden, (fewer merges etc.), but imposes more
|
||||
requirements on anyone wishing to build from the just-checked-out sources.
|
||||
For example, you have to use the latest stable versions of the maintainer
|
||||
tools we depend upon, including:
|
||||
|
||||
- Automake <http://www.gnu.org/software/automake/>
|
||||
- Autoconf <http://www.gnu.org/software/autoconf/>
|
||||
- Flex <http://www.gnu.org/software/flex/>
|
||||
- Gettext <http://www.gnu.org/software/gettext/>
|
||||
- Gzip <http://www.gnu.org/software/gzip/>
|
||||
- Perl <http://www.cpan.org/>
|
||||
- Rsync <http://samba.anu.edu.au/rsync/>
|
||||
- Tar <http://www.gnu.org/software/tar/>
|
||||
|
||||
Valgrind <http://valgrind.org/> is also highly recommended, if
|
||||
Valgrind supports your architecture.
|
||||
|
||||
Bison is written using Bison grammars, so there are bootstrapping
|
||||
issues. The bootstrap script attempts to discover when the C code
|
||||
generated from the grammars is out of date, and to bootstrap with an
|
||||
out-of-date version of the C code, but the process is not foolproof.
|
||||
Also, you may run into similar problems yourself if you modify Bison.
|
||||
|
||||
Only building the initial full source tree will be a bit painful.
|
||||
Later, after synchronizing from the repository a plain `make' should
|
||||
be sufficient.
|
||||
|
||||
** First checkout
|
||||
|
||||
Obviously, if you are reading these notes, you did manage to check out
|
||||
this package from the repository. For the record, you will find all the
|
||||
relevant information on:
|
||||
|
||||
http://savannah.gnu.org/git/?group=bison
|
||||
|
||||
Bison uses Git submodules: subscriptions to other Git repositories.
|
||||
In particular it uses gnulib, the GNU portability library. To ask Git
|
||||
to perform the first checkout of the submodules, run
|
||||
|
||||
$ git submodule update --init
|
||||
|
||||
Git submodule support is weak before versions 1.6 and later, you
|
||||
should probably upgrade Git if your version is older.
|
||||
|
||||
The next step is to get other files needed to build, which are
|
||||
extracted from other source packages:
|
||||
|
||||
$ ./bootstrap
|
||||
|
||||
And there you are! Just
|
||||
|
||||
$ ./configure
|
||||
$ make
|
||||
$ make check
|
||||
|
||||
At this point, there should be no difference between your local copy,
|
||||
and the master copy:
|
||||
|
||||
$ git diff
|
||||
|
||||
should output no difference.
|
||||
|
||||
Enjoy!
|
||||
|
||||
** Updating
|
||||
|
||||
The use of submodules make things somewhat different because git does
|
||||
not support recursive operations: submodules must be taken care of
|
||||
explicitly by the user.
|
||||
|
||||
*** Updating Bison
|
||||
|
||||
If you pull a newer version of a branch, say via `git pull', you might
|
||||
import requests for updated submodules. A simple `git diff' will
|
||||
reveal if the current version of the submodule (i.e., the actual
|
||||
contents of the gnulib directory) and the current request from the
|
||||
subscriber (i.e., the reference of the version of gnulib that the
|
||||
Bison reporitory requests) differ. To upgrade the submodules (i.e.,
|
||||
to check out the version that is actually requested by the subscriber,
|
||||
run `git submodule update'.
|
||||
|
||||
$ git pull
|
||||
$ git submodule update
|
||||
|
||||
*** Updating a submodule
|
||||
To update a submodule, say gnulib, do as follows:
|
||||
|
||||
Get the most recent version of the master branch from git.
|
||||
|
||||
$ cd gnulib
|
||||
$ git fetch
|
||||
$ git checkout -b master --track origin/master
|
||||
|
||||
Make sure Bison can live with that version of gnulib.
|
||||
|
||||
$ cd ..
|
||||
$ ./bootstrap
|
||||
$ make distcheck
|
||||
|
||||
Register your changes.
|
||||
|
||||
$ git checkin ...
|
||||
|
||||
|
||||
* Test suite
|
||||
|
||||
** make check
|
||||
@@ -98,9 +210,17 @@ causes it to be rejected by recent Gettext releases; please report
|
||||
these to the Translation Project.
|
||||
|
||||
** Update README
|
||||
Make sure the information in this file is current. Most notably, make sure it
|
||||
recommends a version of GNU M4 that is compatible with the latest Bison
|
||||
sources.
|
||||
Make sure the information in README is current. Most notably, make sure
|
||||
it recommends a version of GNU M4 that is compatible with the latest
|
||||
Bison sources.
|
||||
|
||||
** Check copyright years.
|
||||
We update years in copyright statements throughout Bison once at the
|
||||
start of every year by running `make update-copyright'. However, before
|
||||
a release, it's good to verify that it's actually been run. Besides the
|
||||
copyright statement for each Bison file, check the copyright statements
|
||||
that the skeletons insert into generated parsers, and check all
|
||||
occurrences of PACKAGE_COPYRIGHT_YEAR in configure.ac.
|
||||
|
||||
** Update NEWS
|
||||
The version number, *and* the date of the release (including for
|
||||
@@ -109,9 +229,6 @@ betas).
|
||||
** Update ChangeLog
|
||||
Should have an entry similar to `Version 1.49b.'.
|
||||
|
||||
** Update configure.ac
|
||||
Be sure PACKAGE_COPYRIGHT_YEAR is up-to-date.
|
||||
|
||||
** Tag the release
|
||||
Before Bison will build with the right version number, you must tag the release
|
||||
in git. Do this after all other changes. The command is similar to:
|
||||
@@ -145,9 +262,15 @@ The generic GNU upload procedure is at:
|
||||
|
||||
http://www.gnu.org/prep/maintain/maintain.html#Automated-FTP-Uploads
|
||||
|
||||
After following the instructions there to register your information so you're
|
||||
permitted to upload, here's a brief reminder of how to roll the tarballs and
|
||||
upload them:
|
||||
Follow the instructions there to register your information so you're permitted
|
||||
to upload. Make sure your public key has been uploaded at least to
|
||||
keys.gnupg.net. You can upload it with:
|
||||
|
||||
gpg --keyserver keys.gnupg.net --send-keys F125BDF3
|
||||
|
||||
where F125BDF3 should be replaced with your key ID.
|
||||
|
||||
Here's a brief reminder of how to roll the tarballs and upload them:
|
||||
|
||||
*** make distcheck
|
||||
*** gpg -b bison-2.3b.tar.gz
|
||||
@@ -165,6 +288,47 @@ upload them:
|
||||
*** put bison-2.3b.tar.gz.directive.asc
|
||||
*** Repeat all these steps for bison-2.3b.tar.bz2.
|
||||
|
||||
** Update Bison manual on www.gnu.org.
|
||||
|
||||
*** You need a non-anonymous checkout of the web pages directory.
|
||||
|
||||
$ cvs -d [email protected]:/web/bison checkout bison
|
||||
|
||||
*** Get familiar with the instructions for web page maintainers.
|
||||
http://www.gnu.org/server/standards/readme_index.html
|
||||
http://www.gnu.org/server/standards/README.software.html
|
||||
especially the note about symlinks.
|
||||
|
||||
*** Build the web pages.
|
||||
Assuming BISON_CHECKOUT refers to a checkout of the Bison dir, and
|
||||
BISON_WWW_CHECKOUT refers to the web directory created above, do:
|
||||
|
||||
$ cd $BISON_CHECKOUT/doc
|
||||
$ make stamp-vti
|
||||
$ ../build-aux/gendocs.sh -o "$BISON_WWW_CHECKOUT/manual" \
|
||||
bison "Bison - GNU parser generator"
|
||||
$ cd $BISON_WWW_CHECKOUT
|
||||
|
||||
Verify that the result looks sane.
|
||||
|
||||
*** Commit the modified and the new files.
|
||||
|
||||
*** Remove old files.
|
||||
Find the files which have not been overwritten (because they belonged to
|
||||
sections that have been removed or renamed):
|
||||
|
||||
$ cd manual/html_node
|
||||
$ ls -lt
|
||||
|
||||
Remove these files and commit their removal to CVS. For each of these
|
||||
files, add a line to the file .symlinks. This will ensure that
|
||||
hyperlinks to the removed files will redirect to the entire manual; this
|
||||
is better than a 404 error.
|
||||
|
||||
There is a problem with 'index.html' being written twice (once for POSIX
|
||||
function 'index', once for the table of contents); you can ignore this
|
||||
issue.
|
||||
|
||||
** Announce
|
||||
To generate a template announcement file:
|
||||
|
||||
@@ -195,7 +359,7 @@ Push these changes.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2005, 2007-2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bison.
|
||||
|
||||
|
||||
+11
-3
@@ -1,6 +1,5 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
|
||||
## Foundation, Inc.
|
||||
## Copyright (C) 2001-2010 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,7 +22,7 @@ SUBDIRS = build-aux po runtime-po lib data src doc examples tests etc
|
||||
aclocaldir = @aclocaldir@
|
||||
aclocal_DATA = m4/bison-i18n.m4
|
||||
|
||||
EXTRA_DIST = .prev-version .version cfg.mk maint.mk \
|
||||
EXTRA_DIST = .prev-version .version cfg.mk \
|
||||
OChangeLog PACKAGING \
|
||||
djgpp/Makefile.maint djgpp/README.in djgpp/config.bat \
|
||||
djgpp/config.sed djgpp/config.site djgpp/config_h.sed \
|
||||
@@ -57,3 +56,12 @@ $(top_srcdir)/.version: configure
|
||||
echo $(VERSION) > $@-t && mv $@-t $@
|
||||
dist-hook:
|
||||
echo $(VERSION) > $(distdir)/.tarball-version
|
||||
|
||||
.PHONY: update-b4-copyright update-package-copyright-year
|
||||
update-b4-copyright:
|
||||
find data -type f \
|
||||
| grep -v -E '^data/bison.m4$$' \
|
||||
| xargs $(build_aux)/$@
|
||||
@echo 'warning: src/parse-gram.[hc] may need to be regenerated.'
|
||||
update-package-copyright-year:
|
||||
$(build_aux)/$@ configure.ac
|
||||
|
||||
@@ -36,7 +36,7 @@ to the bison package.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002, 2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2005, 2009-2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
@@ -1,31 +1,47 @@
|
||||
This package contains the GNU Bison parser generator.
|
||||
|
||||
See the file INSTALL for generic compilation and installation instructions.
|
||||
* Installation
|
||||
** Build
|
||||
See the file INSTALL for generic compilation and installation
|
||||
instructions.
|
||||
|
||||
Bison requires GNU m4 1.4.6 or later. See:
|
||||
|
||||
ftp://ftp.gnu.org/gnu/m4/m4-1.4.6.tar.gz
|
||||
|
||||
** Internationalization
|
||||
Bison supports two catalogues: one for Bison itself (i.e., for the
|
||||
maintainer-side parser generation), and one for the generated parsers
|
||||
(i.e., for the user-side parser execution). The requirements between
|
||||
both differ: bison needs ngettext, the generated parsers do not. To
|
||||
simplify the build system, neither are installed if ngettext is not
|
||||
supported, even if generated parsers could have been localized. See
|
||||
http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html for
|
||||
more details.
|
||||
|
||||
* Questions
|
||||
See the section FAQ in the documentation (doc/bison.info) for
|
||||
frequently asked questions. The documentation is also available in
|
||||
PDF and HTML, provided you have a recent version of Texinfo installed:
|
||||
run "make pdf" or "make html".
|
||||
|
||||
Bison requires GNU m4 1.4.6 or later. See:
|
||||
|
||||
ftp://ftp.gnu.org/gnu/m4/m4-1.4.6.tar.gz
|
||||
|
||||
Bison can work with pre-1.4.6 distributions of GNU m4 if they are
|
||||
sufficiently patched, but if you encounter a bug with an older
|
||||
distribution and report a bug we will probably suggest that you
|
||||
upgrade to 1.4.6 as the first step in trying to fix it.
|
||||
If you have questions about using Bison and the documentation does
|
||||
not answer them, please send mail to <[email protected]>.
|
||||
|
||||
* Bug reports
|
||||
Please send bug reports to <[email protected]>. Please include the
|
||||
version number from `bison --version', and a complete, self-contained
|
||||
test case in each bug report.
|
||||
|
||||
If you have questions about using Bison and the documentation does
|
||||
not answer them, please send mail to <[email protected]>.
|
||||
|
||||
Local Variables:
|
||||
mode: outline
|
||||
End:
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 1992, 1998, 1999, 2003, 2004, 2005, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1998-1999, 2003-2005, 2008-2010 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ the problems you encounter.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2009-2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bison.
|
||||
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
-*- outline -*-
|
||||
|
||||
These notes intend to help people working on the checked-out sources.
|
||||
These requirements do not apply when building from a distribution tarball.
|
||||
|
||||
* Requirements
|
||||
|
||||
We've opted to keep only the highest-level sources in the repository.
|
||||
This eases our maintenance burden, (fewer merges etc.), but imposes more
|
||||
requirements on anyone wishing to build from the just-checked-out sources.
|
||||
For example, you have to use the latest stable versions of the maintainer
|
||||
tools we depend upon, including:
|
||||
|
||||
- Automake <http://www.gnu.org/software/automake/>
|
||||
- Autoconf <http://www.gnu.org/software/autoconf/>
|
||||
- Flex <http://www.gnu.org/software/flex/>
|
||||
- Gettext <http://www.gnu.org/software/gettext/>
|
||||
- Gzip <http://www.gnu.org/software/gzip/>
|
||||
- Perl <http://www.cpan.org/>
|
||||
- Rsync <http://samba.anu.edu.au/rsync/>
|
||||
- Tar <http://www.gnu.org/software/tar/>
|
||||
|
||||
Valgrind <http://valgrind.org/> is also highly recommended, if
|
||||
Valgrind supports your architecture.
|
||||
|
||||
Bison is written using Bison grammars, so there are bootstrapping
|
||||
issues. The bootstrap script attempts to discover when the C code
|
||||
generated from the grammars is out of date, and to bootstrap with an
|
||||
out-of-date version of the C code, but the process is not foolproof.
|
||||
Also, you may run into similar problems yourself if you modify Bison.
|
||||
|
||||
Only building the initial full source tree will be a bit painful.
|
||||
Later, after synchronizing from the repository a plain `make' should
|
||||
be sufficient.
|
||||
|
||||
* First checkout
|
||||
|
||||
Obviously, if you are reading these notes, you did manage to check out
|
||||
this package from the repository. For the record, you will find all the
|
||||
relevant information on:
|
||||
|
||||
http://savannah.gnu.org/cvs/?group_id=56
|
||||
|
||||
The next step is to get other files needed to build, which are
|
||||
extracted from other source packages:
|
||||
|
||||
$ ./bootstrap
|
||||
|
||||
And there you are! Just
|
||||
|
||||
$ ./configure
|
||||
$ make
|
||||
$ make check
|
||||
|
||||
At this point, there should be no difference between your local copy,
|
||||
and the master copy:
|
||||
|
||||
$ cvs diff
|
||||
|
||||
should output no difference.
|
||||
|
||||
Enjoy!
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 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
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
@@ -290,8 +290,7 @@ Equip the parser with a means to create the (visual) parse tree.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation,
|
||||
Inc.
|
||||
Copyright (C) 2001-2004, 2006, 2009-2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
# Bootstrap this package from checked-out sources.
|
||||
|
||||
# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation,
|
||||
# Inc.
|
||||
# Copyright (C) 2003-2010 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
|
||||
@@ -36,28 +35,29 @@ bt_regex=`echo "$bt"| sed 's/\./[.]/g'`
|
||||
bt2=${bt}2
|
||||
|
||||
usage() {
|
||||
echo >&2 "\
|
||||
cat <<EOF
|
||||
Usage: $0 [OPTION]...
|
||||
Bootstrap this package from the checked-out sources.
|
||||
|
||||
Options:
|
||||
--gnulib-srcdir=DIRNAME Specify the local directory where gnulib
|
||||
sources reside. Use this if you already
|
||||
have gnulib sources on your machine, and
|
||||
do not want to waste your bandwidth downloading
|
||||
them again.
|
||||
sources reside. Use this if you already
|
||||
have gnulib sources on your machine, and
|
||||
do not want to waste your bandwidth downloading
|
||||
them again.
|
||||
--copy Copy files instead of creating symbolic links.
|
||||
--force Attempt to bootstrap even if the sources seem
|
||||
not to have been checked out.
|
||||
not to have been checked out.
|
||||
--skip-po Do not download po files.
|
||||
--cvs-user=USERNAME Set the username to use when checking out
|
||||
sources from the gnulib repository.
|
||||
|
||||
If the file bootstrap.conf exists in the current working directory, its
|
||||
If the file $0.conf exists in the same directory as this script, its
|
||||
contents are read as shell variables to configure the bootstrap.
|
||||
|
||||
For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
|
||||
are honored.
|
||||
|
||||
Running without arguments will suffice in most cases.
|
||||
"
|
||||
EOF
|
||||
}
|
||||
|
||||
# Configuration.
|
||||
@@ -71,6 +71,10 @@ gnulib_modules=
|
||||
# Any gnulib files needed that are not in modules.
|
||||
gnulib_files=
|
||||
|
||||
# A function to be called after everything else in this script.
|
||||
# Override it via your own definition in bootstrap.conf.
|
||||
bootstrap_epilogue() { :; }
|
||||
|
||||
# The command to download all .po files for a specified domain into
|
||||
# a specified directory. Fill in the first %s is the domain name, and
|
||||
# the second with the destination directory. Use rsync's -L and -r
|
||||
@@ -81,9 +85,10 @@ po_download_command_format=\
|
||||
|
||||
extract_package_name='
|
||||
/^AC_INIT(/{
|
||||
/.*,.*,.*,/{
|
||||
/.*,.*,.*, */{
|
||||
s///
|
||||
s/[][]//g
|
||||
s/)$//
|
||||
p
|
||||
q
|
||||
}
|
||||
@@ -99,16 +104,21 @@ package=`sed -n "$extract_package_name" configure.ac` || exit
|
||||
gnulib_name=lib$package
|
||||
|
||||
build_aux=build-aux
|
||||
source_base=lib
|
||||
m4_base=m4
|
||||
doc_base=doc
|
||||
tests_base=tests
|
||||
|
||||
# Extra files from gnulib, which override files from other sources.
|
||||
gnulib_extra_files="
|
||||
$build_aux/install-sh
|
||||
$build_aux/missing
|
||||
$build_aux/mdate-sh
|
||||
$build_aux/texinfo.tex
|
||||
$build_aux/depcomp
|
||||
$build_aux/config.guess
|
||||
$build_aux/config.sub
|
||||
doc/INSTALL
|
||||
$build_aux/install-sh
|
||||
$build_aux/missing
|
||||
$build_aux/mdate-sh
|
||||
$build_aux/texinfo.tex
|
||||
$build_aux/depcomp
|
||||
$build_aux/config.guess
|
||||
$build_aux/config.sub
|
||||
doc/INSTALL
|
||||
"
|
||||
|
||||
# Additional gnulib-tool options to use. Use "\newline" to break lines.
|
||||
@@ -124,12 +134,15 @@ XGETTEXT_OPTIONS='\\\
|
||||
--flag=error:3:c-format --flag=error_at_line:5:c-format\\\
|
||||
'
|
||||
|
||||
# Package bug report address for gettext files
|
||||
[email protected]
|
||||
|
||||
# Files we don't want to import.
|
||||
excluded_files=
|
||||
|
||||
# File that should exist in the top directory of a checked out hierarchy,
|
||||
# but not in a distribution tarball.
|
||||
checkout_only_file=README-hacking
|
||||
checkout_only_file=HACKING
|
||||
|
||||
# Whether to use copies instead of symlinks.
|
||||
copy=false
|
||||
@@ -142,29 +155,37 @@ vc_ignore=auto
|
||||
|
||||
# find_tool ENVVAR NAMES...
|
||||
# -------------------------
|
||||
# Search for a required program. Use the value of ENVVAR, if set,
|
||||
# otherwise find the first of the NAMES that can be run (i.e.,
|
||||
# supports --version). If found, set ENVVAR to the program name,
|
||||
# die otherwise.
|
||||
find_tool ()
|
||||
{
|
||||
# Find sha1sum, named gsha1sum on MacPorts.
|
||||
find_tool_envvar=$1
|
||||
shift
|
||||
if eval test x"\$$find_tool_envvar" = x; then
|
||||
find_tool_names=$@
|
||||
eval "find_tool_res=\$$find_tool_envvar"
|
||||
if test x"$find_tool_res" = x; then
|
||||
for i
|
||||
do
|
||||
if ($i --version </dev/null) >/dev/null 2>&1; then
|
||||
find_tool_res=$i
|
||||
break
|
||||
find_tool_res=$i
|
||||
break
|
||||
fi
|
||||
done
|
||||
else
|
||||
find_tool_error_prefix="\$$find_tool_envvar: "
|
||||
fi
|
||||
if test x"$find_tool_res" = x; then
|
||||
echo >&2 "$0: $find_tool_name is required"
|
||||
echo >&2 "$0: one of these is required: $find_tool_names"
|
||||
exit 1
|
||||
fi
|
||||
($find_tool_res --version </dev/null) >/dev/null 2>&1 || {
|
||||
echo >&2 "$0: cannot run $find_tool_res --version"
|
||||
echo >&2 "$0: ${find_tool_error_prefix}cannot run $find_tool_res --version"
|
||||
exit 1
|
||||
}
|
||||
eval "$find_tool_envvar=\"$find_tool_res\""
|
||||
eval "$find_tool_envvar=\$find_tool_res"
|
||||
eval "export $find_tool_envvar"
|
||||
}
|
||||
|
||||
@@ -172,7 +193,13 @@ find_tool ()
|
||||
find_tool SHA1SUM sha1sum gsha1sum
|
||||
|
||||
# Override the default configuration, if necessary.
|
||||
test -r bootstrap.conf && . ./bootstrap.conf
|
||||
# Make sure that bootstrap.conf is sourced from the current directory
|
||||
# if we were invoked as "sh bootstrap".
|
||||
case "$0" in
|
||||
*/*) test -r "$0.conf" && . "$0.conf" ;;
|
||||
*) test -r "$0.conf" && . ./"$0.conf" ;;
|
||||
esac
|
||||
|
||||
|
||||
if test "$vc_ignore" = auto; then
|
||||
vc_ignore=
|
||||
@@ -191,9 +218,7 @@ do
|
||||
usage
|
||||
exit;;
|
||||
--gnulib-srcdir=*)
|
||||
GNULIB_SRCDIR=`expr "$option" : '--gnulib-srcdir=\(.*\)'`;;
|
||||
--cvs-user=*)
|
||||
CVS_USER=`expr "$option" : '--cvs-user=\(.*\)'`;;
|
||||
GNULIB_SRCDIR=`expr "X$option" : 'X--gnulib-srcdir=\(.*\)'`;;
|
||||
--skip-po)
|
||||
SKIP_PO=t;;
|
||||
--force)
|
||||
@@ -211,13 +236,13 @@ if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# If each line in $STR is not already on a line by itself in $FILE, insert it,
|
||||
# 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() {
|
||||
file=$1
|
||||
str=$2
|
||||
test -f $file || touch $file
|
||||
echo "$str" | sort -u - $file | cmp -s - $file \
|
||||
echo "$str" | sort -u - $file | cmp - $file > /dev/null \
|
||||
|| echo "$str" | sort -u - $file -o $file \
|
||||
|| exit 1
|
||||
}
|
||||
@@ -259,16 +284,113 @@ if test ! -d $build_aux; then
|
||||
done
|
||||
fi
|
||||
|
||||
echo "$0: Bootstrapping from checked-out $package sources..."
|
||||
# Note this deviates from the version comparison in automake
|
||||
# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
|
||||
# but this should suffice as we won't be specifying old
|
||||
# version formats or redundant trailing .0 in bootstrap.conf.
|
||||
# If we did want full compatibility then we should probably
|
||||
# use m4_version_compare from autoconf.
|
||||
sort_ver() { # sort -V is not generally available
|
||||
ver1="$1"
|
||||
ver2="$2"
|
||||
|
||||
cleanup_gnulib() {
|
||||
status=$?
|
||||
rm -fr gnulib
|
||||
exit $status
|
||||
# split on '.' and compare each component
|
||||
i=1
|
||||
while : ; do
|
||||
p1=$(echo "$ver1" | cut -d. -f$i)
|
||||
p2=$(echo "$ver2" | cut -d. -f$i)
|
||||
if [ ! "$p1" ]; then
|
||||
echo "$1 $2"
|
||||
break
|
||||
elif [ ! "$p2" ]; then
|
||||
echo "$2 $1"
|
||||
break
|
||||
elif [ ! "$p1" = "$p2" ]; then
|
||||
if [ "$p1" -gt "$p2" ] 2>/dev/null; then # numeric comparison
|
||||
echo "$2 $1"
|
||||
elif [ "$p2" -gt "$p1" ] 2>/dev/null; then # numeric comparison
|
||||
echo "$1 $2"
|
||||
else # numeric, then lexicographic comparison
|
||||
lp=$(printf "$p1\n$p2\n" | LANG=C sort -n | tail -n1)
|
||||
if [ "$lp" = "$p2" ]; then
|
||||
echo "$1 $2"
|
||||
else
|
||||
echo "$2 $1"
|
||||
fi
|
||||
fi
|
||||
break
|
||||
fi
|
||||
i=$(($i+1))
|
||||
done
|
||||
}
|
||||
|
||||
# See if we can use gnulib's git-merge-changelog merge driver.
|
||||
get_version() {
|
||||
app=$1
|
||||
|
||||
$app --version >/dev/null 2>&1 || return 1
|
||||
|
||||
$app --version 2>&1 |
|
||||
sed -n '# extract version within line
|
||||
s/.*[v ]\{1,\}\([0-9]\{1,\}\.[.a-z0-9-]*\).*/\1/
|
||||
t done
|
||||
|
||||
# extract version at start of line
|
||||
s/^\([0-9]\{1,\}\.[.a-z0-9-]*\).*/\1/
|
||||
t done
|
||||
|
||||
d
|
||||
|
||||
:done
|
||||
#the following essentially does s/5.005/5.5/
|
||||
s/\.0*\([1-9]\)/.\1/g
|
||||
p
|
||||
q'
|
||||
}
|
||||
|
||||
check_versions() {
|
||||
ret=0
|
||||
|
||||
while read app req_ver; do
|
||||
# Honor $APP variables ($TAR, $AUTOCONF, etc.)
|
||||
appvar=`echo $app | tr '[a-z]' '[A-Z]'`
|
||||
test "$appvar" = TAR && appvar=AMTAR
|
||||
eval "app=\${$appvar-$app}"
|
||||
inst_ver=$(get_version $app)
|
||||
if [ ! "$inst_ver" ]; then
|
||||
echo "Error: '$app' not found" >&2
|
||||
ret=1
|
||||
elif [ ! "$req_ver" = "-" ]; then
|
||||
latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2)
|
||||
if [ ! "$latest_ver" = "$inst_ver" ]; then
|
||||
echo "Error: '$app' version == $inst_ver is too old" >&2
|
||||
echo " '$app' version >= $req_ver is required" >&2
|
||||
ret=1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
print_versions() {
|
||||
echo "Program Min_version"
|
||||
echo "----------------------"
|
||||
printf "$buildreq"
|
||||
echo "----------------------"
|
||||
# can't depend on column -t
|
||||
}
|
||||
|
||||
if ! printf "$buildreq" | check_versions; then
|
||||
test -f README-prereq &&
|
||||
echo "See README-prereq for notes on obtaining these prerequisite programs:" >&2
|
||||
echo
|
||||
print_versions
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "$0: Bootstrapping from checked-out $package sources..."
|
||||
|
||||
# See if we can use gnulib's git-merge-changelog merge driver.
|
||||
if test -d .git && (git --version) >/dev/null 2>/dev/null ; then
|
||||
if git config merge.merge-changelog.driver >/dev/null ; then
|
||||
:
|
||||
@@ -281,35 +403,52 @@ if test -d .git && (git --version) >/dev/null 2>/dev/null ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
cleanup_gnulib() {
|
||||
status=$?
|
||||
rm -fr gnulib
|
||||
exit $status
|
||||
}
|
||||
|
||||
git_modules_config () {
|
||||
test -f .gitmodules && git config --file .gitmodules "$@"
|
||||
}
|
||||
|
||||
# Get gnulib files.
|
||||
|
||||
case ${GNULIB_SRCDIR--} in
|
||||
-)
|
||||
if [ ! -d gnulib ]; then
|
||||
if git_modules_config submodule.gnulib.url >/dev/null; then
|
||||
echo "$0: getting gnulib files..."
|
||||
git submodule init || exit $?
|
||||
git submodule update || exit $?
|
||||
|
||||
case ${CVS_AUTH-pserver} in
|
||||
pserver)
|
||||
CVS_PREFIX=':pserver:anonymous@';;
|
||||
ssh)
|
||||
CVS_PREFIX="$CVS_USER${CVS_USER+@}";;
|
||||
*)
|
||||
echo "$0: $CVS_AUTH: Unknown CVS access method" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
|
||||
case $CVS_RSH in
|
||||
'') CVS_RSH=ssh; export CVS_RSH;;
|
||||
esac
|
||||
elif [ ! -d gnulib ]; then
|
||||
echo "$0: getting gnulib files..."
|
||||
|
||||
trap cleanup_gnulib 1 2 13 15
|
||||
|
||||
cvs -z3 -q -d ${CVS_PREFIX}pserver.git.sv.gnu.org:/gnulib.git co -d gnulib HEAD ||
|
||||
git clone --help|grep depth > /dev/null && shallow='--depth 2' || shallow=
|
||||
git clone $shallow git://git.sv.gnu.org/gnulib ||
|
||||
cleanup_gnulib
|
||||
|
||||
trap - 1 2 13 15
|
||||
fi
|
||||
GNULIB_SRCDIR=gnulib
|
||||
;;
|
||||
*)
|
||||
# Redirect the gnulib submodule to the directory on the command line
|
||||
# if possible.
|
||||
if test -d "$GNULIB_SRCDIR"/.git && \
|
||||
git_modules_config submodule.gnulib.url >/dev/null; then
|
||||
git submodule init
|
||||
GNULIB_SRCDIR=`cd $GNULIB_SRCDIR && pwd`
|
||||
git_modules_config --replace-all submodule.gnulib.url $GNULIB_SRCDIR
|
||||
echo "$0: getting gnulib files..."
|
||||
git submodule update || exit $?
|
||||
GNULIB_SRCDIR=gnulib
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
|
||||
@@ -342,13 +481,20 @@ update_po_files() {
|
||||
&& ls "$ref_po_dir"/*.po 2>/dev/null |
|
||||
sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS"
|
||||
|
||||
for po in `cd $ref_po_dir && echo *.po|sed 's/\.po//g'`; do
|
||||
new_po="$ref_po_dir/$po.po"
|
||||
cksum_file="$ref_po_dir/$po.s1"
|
||||
if ! "$SHA1SUM" -c --status "$cksum_file" < "$new_po" > /dev/null; then
|
||||
echo "updated $po_dir/$po.po..."
|
||||
cp "$new_po" "$po_dir/$po.po" && "$SHA1SUM" < "$new_po" > "$cksum_file"
|
||||
fi
|
||||
langs=`cd $ref_po_dir && echo *.po|sed 's/\.po//g'`
|
||||
test "$langs" = '*' && langs=x
|
||||
for po in $langs; do
|
||||
case $po in x) continue;; esac
|
||||
new_po="$ref_po_dir/$po.po"
|
||||
cksum_file="$ref_po_dir/$po.s1"
|
||||
if ! test -f "$cksum_file" ||
|
||||
! test -f "$po_dir/$po.po" ||
|
||||
! $SHA1SUM -c --status "$cksum_file" \
|
||||
< "$new_po" > /dev/null; then
|
||||
echo "updated $po_dir/$po.po..."
|
||||
cp "$new_po" "$po_dir/$po.po" \
|
||||
&& $SHA1SUM < "$new_po" > "$cksum_file"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
@@ -395,37 +541,37 @@ symlink_to_dir()
|
||||
|
||||
if $copy; then
|
||||
{
|
||||
test ! -h "$dst" || {
|
||||
echo "$0: rm -f $dst" &&
|
||||
rm -f "$dst"
|
||||
}
|
||||
test ! -h "$dst" || {
|
||||
echo "$0: rm -f $dst" &&
|
||||
rm -f "$dst"
|
||||
}
|
||||
} &&
|
||||
test -f "$dst" &&
|
||||
cmp -s "$src" "$dst" || {
|
||||
echo "$0: cp -fp $src $dst" &&
|
||||
cp -fp "$src" "$dst"
|
||||
echo "$0: cp -fp $src $dst" &&
|
||||
cp -fp "$src" "$dst"
|
||||
}
|
||||
else
|
||||
test -h "$dst" &&
|
||||
src_ls=`ls -diL "$src" 2>/dev/null` && set $src_ls && src_i=$1 &&
|
||||
dst_ls=`ls -diL "$dst" 2>/dev/null` && set $dst_ls && dst_i=$1 &&
|
||||
test "$src_i" = "$dst_i" || {
|
||||
dot_dots=
|
||||
case $src in
|
||||
/*) ;;
|
||||
*)
|
||||
case /$dst/ in
|
||||
*//* | */../* | */./* | /*/*/*/*/*/)
|
||||
echo >&2 "$0: invalid symlink calculation: $src -> $dst"
|
||||
exit 1;;
|
||||
/*/*/*/*/) dot_dots=../../../;;
|
||||
/*/*/*/) dot_dots=../../;;
|
||||
/*/*/) dot_dots=../;;
|
||||
esac;;
|
||||
esac
|
||||
dot_dots=
|
||||
case $src in
|
||||
/*) ;;
|
||||
*)
|
||||
case /$dst/ in
|
||||
*//* | */../* | */./* | /*/*/*/*/*/)
|
||||
echo >&2 "$0: invalid symlink calculation: $src -> $dst"
|
||||
exit 1;;
|
||||
/*/*/*/*/) dot_dots=../../../;;
|
||||
/*/*/*/) dot_dots=../../;;
|
||||
/*/*/) dot_dots=../;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
echo "$0: ln -fs $dot_dots$src $dst" &&
|
||||
ln -fs "$dot_dots$src" "$dst"
|
||||
echo "$0: ln -fs $dot_dots$src $dst" &&
|
||||
ln -fs "$dot_dots$src" "$dst"
|
||||
}
|
||||
fi
|
||||
}
|
||||
@@ -450,9 +596,13 @@ cp_mark_as_generated()
|
||||
|
||||
if test -z "$c1"; then
|
||||
cmp -s "$cp_src" "$cp_dst" || {
|
||||
echo "$0: cp -f $cp_src $cp_dst" &&
|
||||
rm -f "$cp_dst" &&
|
||||
sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst"
|
||||
# Copy the file first to get proper permissions if it
|
||||
# doesn't already exist. Then overwrite the copy.
|
||||
echo "$0: cp -f $cp_src $cp_dst" &&
|
||||
rm -f "$cp_dst" &&
|
||||
cp "$cp_src" "$cp_dst-t" &&
|
||||
sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst-t" &&
|
||||
mv -f "$cp_dst-t" "$cp_dst"
|
||||
}
|
||||
else
|
||||
check_dst_dir "$cp_dst"
|
||||
@@ -460,15 +610,15 @@ cp_mark_as_generated()
|
||||
# doesn't already exist. Then overwrite the copy.
|
||||
cp "$cp_src" "$cp_dst-t" &&
|
||||
(
|
||||
echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" &&
|
||||
echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" &&
|
||||
sed "s!$bt_regex/!!g" "$cp_src"
|
||||
echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" &&
|
||||
echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" &&
|
||||
sed "s!$bt_regex/!!g" "$cp_src"
|
||||
) > $cp_dst-t &&
|
||||
if cmp -s "$cp_dst-t" "$cp_dst"; then
|
||||
rm -f "$cp_dst-t"
|
||||
rm -f "$cp_dst-t"
|
||||
else
|
||||
echo "$0: cp $cp_src $cp_dst # with edits" &&
|
||||
mv -f "$cp_dst-t" "$cp_dst"
|
||||
echo "$0: cp $cp_src $cp_dst # with edits" &&
|
||||
mv -f "$cp_dst-t" "$cp_dst"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -480,9 +630,11 @@ version_controlled_file() {
|
||||
found=no
|
||||
if test -d CVS; then
|
||||
grep -F "/$file/" $dir/CVS/Entries 2>/dev/null |
|
||||
grep '^/[^/]*/[0-9]' > /dev/null && found=yes
|
||||
grep '^/[^/]*/[0-9]' > /dev/null && found=yes
|
||||
elif test -d .git; then
|
||||
git-rm -n "$dir/$file" > /dev/null 2>&1 && found=yes
|
||||
git rm -n "$dir/$file" > /dev/null 2>&1 && found=yes
|
||||
elif test -d .svn; then
|
||||
svn log -r HEAD "$dir/$file" > /dev/null 2>&1 && found=yes
|
||||
else
|
||||
echo "$0: no version control for $dir/$file?" >&2
|
||||
fi
|
||||
@@ -500,35 +652,35 @@ slurp() {
|
||||
esac
|
||||
test -d $1/$dir/$file && continue
|
||||
for excluded_file in $excluded_files; do
|
||||
test "$dir/$file" = "$excluded_file" && continue 2
|
||||
test "$dir/$file" = "$excluded_file" && continue 2
|
||||
done
|
||||
if test $file = Makefile.am; then
|
||||
copied=$copied${sep}$gnulib_mk; sep=$nl
|
||||
remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
|
||||
sed "$remove_intl" $1/$dir/$file | cmp -s - $dir/$gnulib_mk || {
|
||||
echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
|
||||
rm -f $dir/$gnulib_mk &&
|
||||
sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk
|
||||
}
|
||||
copied=$copied${sep}$gnulib_mk; sep=$nl
|
||||
remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
|
||||
sed "$remove_intl" $1/$dir/$file | cmp - $dir/$gnulib_mk > /dev/null || {
|
||||
echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
|
||||
rm -f $dir/$gnulib_mk &&
|
||||
sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk
|
||||
}
|
||||
elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
|
||||
version_controlled_file $dir $file; then
|
||||
echo "$0: $dir/$file overrides $1/$dir/$file"
|
||||
version_controlled_file $dir $file; then
|
||||
echo "$0: $dir/$file overrides $1/$dir/$file"
|
||||
else
|
||||
copied=$copied$sep$file; sep=$nl
|
||||
if test $file = gettext.m4; then
|
||||
echo "$0: patching m4/gettext.m4 to remove need for intl/* ..."
|
||||
rm -f $dir/$file
|
||||
sed '
|
||||
/^AC_DEFUN(\[AM_INTL_SUBDIR],/,/^]/c\
|
||||
AC_DEFUN([AM_INTL_SUBDIR], [
|
||||
/^AC_DEFUN(\[gt_INTL_SUBDIR_CORE],/,/^]/c\
|
||||
AC_DEFUN([gt_INTL_SUBDIR_CORE], [])
|
||||
$a\
|
||||
AC_DEFUN([gl_LOCK_EARLY], [])
|
||||
' $1/$dir/$file >$dir/$file
|
||||
else
|
||||
cp_mark_as_generated $1/$dir/$file $dir/$file
|
||||
fi
|
||||
copied=$copied$sep$file; sep=$nl
|
||||
if test $file = gettext.m4; then
|
||||
echo "$0: patching m4/gettext.m4 to remove need for intl/* ..."
|
||||
rm -f $dir/$file
|
||||
sed '
|
||||
/^AC_DEFUN(\[AM_INTL_SUBDIR],/,/^]/c\
|
||||
AC_DEFUN([AM_INTL_SUBDIR], [
|
||||
/^AC_DEFUN(\[gt_INTL_SUBDIR_CORE],/,/^]/c\
|
||||
AC_DEFUN([gt_INTL_SUBDIR_CORE], [])
|
||||
$a\
|
||||
AC_DEFUN([gl_LOCK_EARLY], [])
|
||||
' $1/$dir/$file >$dir/$file
|
||||
else
|
||||
cp_mark_as_generated $1/$dir/$file $dir/$file
|
||||
fi
|
||||
fi || exit
|
||||
done
|
||||
|
||||
@@ -536,18 +688,18 @@ slurp() {
|
||||
test $dot_ig = x && continue
|
||||
ig=$dir/$dot_ig
|
||||
if test -n "$copied"; then
|
||||
insert_vc_ignore $ig "$copied"
|
||||
# If an ignored file name ends with _.h, then also add
|
||||
# the name with just ".h". Many gnulib headers are generated,
|
||||
# e.g., stdint_.h -> stdint.h, dirent_.h ->..., etc.
|
||||
# Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed
|
||||
f=`echo "$copied"|sed 's/_\.h$/.h/;s/\.sin$/.sed/;s/\.y$/.c/;s/\.gperf$/.h/'`
|
||||
insert_vc_ignore $ig "$f"
|
||||
insert_vc_ignore $ig "$copied"
|
||||
# If an ignored file name ends with .in.h, then also add
|
||||
# the name with just ".h". Many gnulib headers are generated,
|
||||
# e.g., stdint.in.h -> stdint.h, dirent.in.h ->..., etc.
|
||||
# Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed
|
||||
f=`echo "$copied"|sed 's/\.in\.h$/.h/;s/\.sin$/.sed/;s/\.y$/.c/;s/\.gperf$/.h/'`
|
||||
insert_vc_ignore $ig "$f"
|
||||
|
||||
# For files like sys_stat_.h and sys_time_.h, record as
|
||||
# ignorable the directory we might eventually create: sys/.
|
||||
f=`echo "$copied"|sed 's/sys_.*_\.h$/sys/'`
|
||||
insert_vc_ignore $ig "$f"
|
||||
# For files like sys_stat.in.h and sys_time.in.h, record as
|
||||
# ignorable the directory we might eventually create: sys/.
|
||||
f=`echo "$copied"|sed 's/sys_.*\.in\.h$/sys/'`
|
||||
insert_vc_ignore $ig "$f"
|
||||
fi
|
||||
done
|
||||
done
|
||||
@@ -564,13 +716,13 @@ gnulib_tool_options="\
|
||||
--import\
|
||||
--no-changelog\
|
||||
--aux-dir $bt/$build_aux\
|
||||
--doc-base $bt/doc\
|
||||
--doc-base $bt/$doc_base\
|
||||
--lib $gnulib_name\
|
||||
--m4-base $bt/m4/\
|
||||
--source-base $bt/lib/\
|
||||
--tests-base $bt/tests\
|
||||
--m4-base $bt/$m4_base/\
|
||||
--source-base $bt/$source_base/\
|
||||
--tests-base $bt/$tests_base\
|
||||
--local-dir $local_gl_dir\
|
||||
$gnulib_tool_option_extras\
|
||||
$gnulib_tool_option_extras\
|
||||
"
|
||||
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
|
||||
$gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
|
||||
@@ -587,46 +739,50 @@ grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
|
||||
with_gettext=no
|
||||
|
||||
if test $with_gettext = yes; then
|
||||
echo "$0: (cd $bt2; autopoint) ..."
|
||||
echo "$0: (cd $bt2; ${AUTOPOINT-autopoint}) ..."
|
||||
cp configure.ac $bt2 &&
|
||||
(cd $bt2 && autopoint && rm configure.ac) &&
|
||||
(cd $bt2 && ${AUTOPOINT-autopoint} && rm configure.ac) &&
|
||||
slurp $bt2 $bt || exit
|
||||
|
||||
rm -fr $bt $bt2 || exit
|
||||
fi
|
||||
rm -fr $bt $bt2 || exit
|
||||
|
||||
# Coreutils is unusual in that it generates some of its test-related
|
||||
# Makefile.am files. That must be done before invoking automake.
|
||||
mam_template=tests/Makefile.am.in
|
||||
if test -f $mam_template; then
|
||||
PERL=perl
|
||||
for tool in cut head join pr sort tac tail test tr uniq wc; do
|
||||
m=tests/$tool/Makefile.am
|
||||
t=${m}t
|
||||
rm -f $m $t
|
||||
sed -n '1,/^##test-files-begin/p' $mam_template > $t
|
||||
echo "x = $tool" >> $t
|
||||
srcdir=tests/$tool
|
||||
$PERL -I$srcdir -w -- tests/mk-script $srcdir --list >> $t
|
||||
sed -n '/^##test-files-end/,$p' $mam_template >> $t
|
||||
chmod -w $t
|
||||
mv $t $m
|
||||
done
|
||||
fi
|
||||
# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
|
||||
# gnulib-populated directories. Such .m4 files would cause aclocal to fail.
|
||||
# The following requires GNU find 4.2.3 or newer. Considering the usual
|
||||
# portability constraints of this script, that may seem a very demanding
|
||||
# requirement, but it should be ok. Ignore any failure, which is fine,
|
||||
# since this is only a convenience to help developers avoid the relatively
|
||||
# unusual case in which a symlinked-to .m4 file is git-removed from gnulib
|
||||
# between successive runs of this script.
|
||||
find "$m4_base" "$source_base" \
|
||||
-depth \( -name '*.m4' -o -name '*.[ch]' \) \
|
||||
-type l -xtype l -delete > /dev/null 2>&1
|
||||
|
||||
# Reconfigure, getting other files.
|
||||
|
||||
# Skip autoheader if it's not needed.
|
||||
grep -E '^[ ]*AC_CONFIG_HEADERS?\>' configure.ac >/dev/null ||
|
||||
AUTOHEADER=true
|
||||
|
||||
for command in \
|
||||
libtool \
|
||||
'aclocal --force -I m4' \
|
||||
'autoconf --force' \
|
||||
'autoheader --force' \
|
||||
'automake --add-missing --copy --force-missing';
|
||||
"${ACLOCAL-aclocal} --force -I m4" \
|
||||
"${AUTOCONF-autoconf} --force" \
|
||||
"${AUTOHEADER-autoheader} --force" \
|
||||
"${AUTOMAKE-automake} --add-missing --copy --force-missing"
|
||||
do
|
||||
if test "$command" = libtool; then
|
||||
grep '^[ ]*AM_PROG_LIBTOOL\>' configure.ac >/dev/null ||
|
||||
continue
|
||||
command='libtoolize -c -f'
|
||||
use_libtool=0
|
||||
# We'd like to use grep -E, to see if any of LT_INIT,
|
||||
# AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac,
|
||||
# but that's not portable enough (e.g., for Solaris).
|
||||
grep '^[ ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \
|
||||
&& use_libtool=1
|
||||
grep '^[ ]*LT_INIT' configure.ac >/dev/null \
|
||||
&& use_libtool=1
|
||||
test $use_libtool = 0 \
|
||||
&& continue
|
||||
command="${LIBTOOLIZE-libtoolize} -c -f"
|
||||
fi
|
||||
echo "$0: $command ..."
|
||||
$command || exit
|
||||
@@ -649,11 +805,11 @@ if test $with_gettext = yes; then
|
||||
rm -f po/Makevars
|
||||
sed '
|
||||
/^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/
|
||||
/^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/
|
||||
/^MSGID_BUGS_ADDRESS *=/s/=.*/= '"$MSGID_BUGS_ADDRESS"'/
|
||||
/^XGETTEXT_OPTIONS *=/{
|
||||
s/$/ \\/
|
||||
a\
|
||||
'"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+}
|
||||
'"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+}
|
||||
}
|
||||
' po/Makevars.template >po/Makevars
|
||||
|
||||
@@ -665,9 +821,9 @@ if test $with_gettext = yes; then
|
||||
/^subdir *=.*/s/=.*/= runtime-po/
|
||||
/^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/
|
||||
/^XGETTEXT_OPTIONS *=/{
|
||||
s/$/ \\/
|
||||
a\
|
||||
'"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+}
|
||||
s/$/ \\/
|
||||
a\
|
||||
'"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+}
|
||||
}
|
||||
' <po/Makevars.template >runtime-po/Makevars
|
||||
|
||||
@@ -676,4 +832,10 @@ if test $with_gettext = yes; then
|
||||
fi
|
||||
fi
|
||||
|
||||
bootstrap_epilogue
|
||||
|
||||
echo "$0: done. Now you can run './configure'."
|
||||
|
||||
# Local Variables:
|
||||
# indent-tabs-mode: nil
|
||||
# End:
|
||||
|
||||
+7
-12
@@ -1,6 +1,6 @@
|
||||
# Bootstrap configuration.
|
||||
|
||||
# Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006-2010 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,17 +17,12 @@
|
||||
|
||||
# gnulib modules used by this package.
|
||||
gnulib_modules='
|
||||
announce-gen argmatch config-h c-strcase configmake
|
||||
dirname error extensions fopen-safer getopt gettext git-version-gen
|
||||
gnumakefile hash inttypes javacomp-script javaexec-script malloc
|
||||
mbswidth obstack quote quotearg stdbool stpcpy strerror strtoul
|
||||
strverscmp unistd unistd-safer unlocked-io unsetenv verify xalloc
|
||||
xalloc-die xstrndup
|
||||
'
|
||||
|
||||
# Any gnulib files needed that are not in modules.
|
||||
gnulib_files='
|
||||
m4/warning.m4
|
||||
announce-gen argmatch assert config-h c-strcase configmake dirname
|
||||
error extensions fopen-safer gendocs getopt-gnu gettext
|
||||
git-version-gen hash inttypes javacomp-script javaexec-script
|
||||
maintainer-makefile malloc mbswidth obstack quote quotearg stdbool
|
||||
stpcpy strerror strtoul strverscmp unistd unistd-safer unlocked-io
|
||||
update-copyright unsetenv verify warnings xalloc xalloc-die xstrndup
|
||||
'
|
||||
|
||||
# Additional xgettext options to use. Use "\\\newline" to break lines.
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
announce-gen
|
||||
arg-nonnull.h
|
||||
compile
|
||||
config.guess
|
||||
config.rpath
|
||||
config.sub
|
||||
depcomp
|
||||
gendocs.sh
|
||||
git-version-gen
|
||||
install-sh
|
||||
javacomp.sh.in
|
||||
@@ -14,4 +16,8 @@ link-warning.h
|
||||
mdate-sh
|
||||
missing
|
||||
texinfo.tex
|
||||
update-copyright
|
||||
useless-if-before-free
|
||||
vc-list-files
|
||||
warn-on-use.h
|
||||
ylwrap
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
/Makefile
|
||||
/Makefile.in
|
||||
/announce-gen
|
||||
/arg-nonnull.h
|
||||
/compile
|
||||
/config.guess
|
||||
/config.rpath
|
||||
/config.sub
|
||||
/depcomp
|
||||
/gendocs.sh
|
||||
/git-version-gen
|
||||
/install-sh
|
||||
/javacomp.sh.in
|
||||
@@ -14,4 +16,8 @@
|
||||
/mdate-sh
|
||||
/missing
|
||||
/texinfo.tex
|
||||
/update-copyright
|
||||
/useless-if-before-free
|
||||
/vc-list-files
|
||||
/warn-on-use.h
|
||||
/ylwrap
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
EXTRA_DIST = prev-version.txt cross-options.pl
|
||||
EXTRA_DIST = prev-version.txt cross-options.pl update-b4-copyright
|
||||
|
||||
+24
-10
@@ -7,22 +7,33 @@ use strict;
|
||||
my %option;
|
||||
while (<>)
|
||||
{
|
||||
if (/^\s* # Initial spaces.
|
||||
(?:(-\w),\s+)? # $1: Possible short option.
|
||||
(--[-\w]+) # $2: Long option.
|
||||
(\[?) # $3: '[' iff the argument is optional.
|
||||
(?:=([-\w]+))? # $4: Possible argument name.
|
||||
if (/^\s* # Initial spaces.
|
||||
(?:(-\w),\s+)? # $1: $short: Possible short option.
|
||||
(--[-\w]+) # $2: $long: Long option.
|
||||
(\[?) # $3: $opt: '[' iff the argument is optional.
|
||||
(?:=(\S+))? # $4: $arg: Possible argument name.
|
||||
\s # Spaces.
|
||||
/x)
|
||||
{
|
||||
my ($short, $long, $opt, $arg) = ($1, $2, $3, $4);
|
||||
$short = defined $short ? '@option{' . $short . '}' : '';
|
||||
if ($arg)
|
||||
{
|
||||
# if $opt, $arg contains the closing ].
|
||||
substr ($arg, -1) = ''
|
||||
if $opt eq '[';
|
||||
$arg =~ s/^=//;
|
||||
$arg = '@var{' . lc ($arg) . '}';
|
||||
$arg = '[' . $arg . ']'
|
||||
if $opt eq '[';
|
||||
$option{"$long=$arg"} = $short ? "$short $arg" : '';
|
||||
$arg = lc ($arg);
|
||||
# If the argument is compite (e.g., for --define[=NAME[=VALUE]]),
|
||||
# put each word in @var, to build @var{name}[=@var{value}], not
|
||||
# @var{name[=value]}].
|
||||
$arg =~ s/(\w+)/\@var{$1}/g;
|
||||
my $long_arg = "=$arg";
|
||||
if ($opt eq '[') {
|
||||
$long_arg = "[$long_arg]";
|
||||
$arg = "[$arg]";
|
||||
}
|
||||
$option{"$long$long_arg"} = $short ? "$short $arg" : '';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -33,5 +44,8 @@ while (<>)
|
||||
|
||||
foreach my $long (sort keys %option)
|
||||
{
|
||||
printf "\@item %-40s \@tab %s\n", '@option{' . $long . '}', $option{$long};
|
||||
# Avoid trailing spaces.
|
||||
printf ("\@item %-40s \@tab%s\n",
|
||||
'@option{' . $long . '}',
|
||||
$option{$long} ? " $option{$long}" : "");
|
||||
}
|
||||
|
||||
Executable
+152
@@ -0,0 +1,152 @@
|
||||
#!/usr/bin/perl -0777 -pi
|
||||
|
||||
# Update b4_copyright invocations or b4_copyright_years definitions to
|
||||
# include the current year.
|
||||
|
||||
# Copyright (C) 2009-2010 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
|
||||
# the Free Software Foundation; either version 3, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $margin = 72;
|
||||
|
||||
my $this_year = $ENV{UPDATE_COPYRIGHT_YEAR};
|
||||
if (!$this_year || $this_year !~ m/^\d{4}$/)
|
||||
{
|
||||
my ($sec, $min, $hour, $mday, $month, $year) = localtime (time ());
|
||||
$this_year = $year + 1900;
|
||||
}
|
||||
my $old_re = <<'EOF'
|
||||
(
|
||||
(?:^|\n)
|
||||
#BEFORE
|
||||
(?:
|
||||
b4_copyright\(\[[^][]*]
|
||||
| m4_(?:push|pop)def\(\[b4_copyright_years]
|
||||
)
|
||||
#AFTER
|
||||
)
|
||||
(?:
|
||||
,\s*
|
||||
(
|
||||
\[\s* (?:\d{4}(?:,\s*|-))* (\d{4}) \s*]
|
||||
)
|
||||
)?
|
||||
\)
|
||||
EOF
|
||||
;
|
||||
|
||||
while (/($old_re)/gx)
|
||||
{
|
||||
my $start = pos() - length ($1);
|
||||
my $b4_copyright_line = $2;
|
||||
my $year_lines = $3;
|
||||
my $final_year = $4;
|
||||
$year_lines .= ')';
|
||||
|
||||
# If there was a second argument, it contains years, so update them.
|
||||
if ($final_year)
|
||||
{
|
||||
$b4_copyright_line .= ',';
|
||||
if ($final_year != $this_year)
|
||||
{
|
||||
# Update the year.
|
||||
$year_lines =~ s/$final_year/$final_year, $this_year/;
|
||||
}
|
||||
|
||||
# Normalize all whitespace.
|
||||
$year_lines =~ s/\s+/ /g;
|
||||
|
||||
# Put spaces after commas.
|
||||
$year_lines =~ s/, ?/, /g;
|
||||
|
||||
# Compress to intervals.
|
||||
$year_lines =~
|
||||
s/
|
||||
(\d{4})
|
||||
(?:
|
||||
(,\ |-)
|
||||
((??{
|
||||
if ($2 eq '-') { '\d{4}'; }
|
||||
elsif (!$3) { $1 + 1; }
|
||||
else { $3 + 1; }
|
||||
}))
|
||||
)+
|
||||
/$1-$3/gx;
|
||||
|
||||
# Format within margin.
|
||||
my $year_lines_new;
|
||||
my $indent = index ($b4_copyright_line, '[');
|
||||
--$indent if ($b4_copyright_line =~ m/^\n/);
|
||||
while (length $year_lines)
|
||||
{
|
||||
my $text_margin = $margin - $indent;
|
||||
if (($year_lines =~ s/^(.{1,$text_margin})(?: |$)//)
|
||||
|| ($year_lines =~ s/^([\S]+)(?: |$)//))
|
||||
{
|
||||
my $line = "\n" . (' 'x$indent) . $1;
|
||||
++$indent if (!$year_lines_new);
|
||||
$year_lines_new .= $line;
|
||||
}
|
||||
else
|
||||
{
|
||||
# Should be unreachable, but we don't want an infinite
|
||||
# loop if it can be reached.
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
||||
# Replace the old invocation. Should never die.
|
||||
die if (!s/$old_re\G/$b4_copyright_line$year_lines_new/x);
|
||||
|
||||
# Prepare for the next search.
|
||||
pos () = $start + length ("$b4_copyright_line$year_lines_new");
|
||||
}
|
||||
}
|
||||
|
||||
while (/(\bb4_copyright\()/g)
|
||||
{
|
||||
my $start = pos () - length ($1);
|
||||
my $end = pos ();
|
||||
my $re = $old_re;
|
||||
pos () = $start;
|
||||
$re =~ s/\#BEFORE/\\G/;
|
||||
if (!/$re/x)
|
||||
{
|
||||
my $line = (substr ($_, 0, $start) =~ s/\n/\n/g) + 1;
|
||||
print STDERR
|
||||
"$ARGV:$line: warning: failed to update a b4_copyright\n";
|
||||
}
|
||||
pos () = $end;
|
||||
}
|
||||
|
||||
while (/(\[b4_copyright_years])/g)
|
||||
{
|
||||
my $start = pos () - length ($1);
|
||||
my $end = pos ();
|
||||
my $re = $old_re;
|
||||
$re =~ s/\#AFTER/\\G/;
|
||||
if (!/$re/x)
|
||||
{
|
||||
# The substr operation blows away pos (), so restoring pos ()
|
||||
# at the end is necessary.
|
||||
my $line = (substr ($_, 0, $start) =~ s/\n/\n/g) + 1;
|
||||
print STDERR
|
||||
"$ARGV:$line: warning: failed to update a"
|
||||
. " b4_copyright_years\n";
|
||||
}
|
||||
pos () = $end;
|
||||
}
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/perl -0777 -pi
|
||||
|
||||
# In configure.ac, update PACKAGE_COPYRIGHT_YEAR to the current year.
|
||||
|
||||
# Copyright (C) 2010 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
|
||||
# the Free Software Foundation; either version 3, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $this_year = $ENV{UPDATE_COPYRIGHT_YEAR};
|
||||
if (!$this_year || $this_year !~ m/^\d{4}$/)
|
||||
{
|
||||
my ($sec, $min, $hour, $mday, $month, $year) = localtime (time ());
|
||||
$this_year = $year + 1900;
|
||||
}
|
||||
my $old_re = <<'EOF'
|
||||
(
|
||||
MACRO\(
|
||||
\[PACKAGE_COPYRIGHT_YEAR],
|
||||
\s*\[
|
||||
)
|
||||
(\d{4})
|
||||
(?=])
|
||||
EOF
|
||||
;
|
||||
foreach my $macro ("AC_DEFINE", "AC_SUBST")
|
||||
{
|
||||
my $this_old_re = $old_re;
|
||||
$this_old_re =~ s/MACRO/$macro/;
|
||||
if (!s/$this_old_re/$1$this_year/x)
|
||||
{
|
||||
print STDERR
|
||||
"$ARGV: warning: failed to update PACKAGE_COPYRIGHT_YEAR in"
|
||||
. " $macro.\n";
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
# Customize maint.mk -*- makefile -*-
|
||||
# Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2008-2010 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
|
||||
@@ -14,11 +14,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/>.
|
||||
|
||||
# It's useful to run maintainer-check* targets during development, but we don't
|
||||
# want to wait on a recompile because of an update to $(VERSION). Thus,
|
||||
# override the _is-dist-target from GNUmakefile so that maintainer-check*
|
||||
# It's useful to run maintainer-*check* targets during development, but we
|
||||
# don't want to wait on a recompile because of an update to $(VERSION). Thus,
|
||||
# override the _is-dist-target from GNUmakefile so that maintainer-*check*
|
||||
# targets are filtered out.
|
||||
_is-dist-target = $(filter-out %clean maintainer-check%, \
|
||||
_is-dist-target = $(filter-out %clean maintainer-check% maintainer-%-check, \
|
||||
$(filter maintainer-% dist% alpha beta major,$(MAKECMDGOALS)))
|
||||
|
||||
# Use alpha.gnu.org for alpha and beta releases.
|
||||
@@ -39,4 +39,10 @@ local-checks-to-skip = changelog-check
|
||||
|
||||
# The local directory containing the checked-out copy of gnulib used in
|
||||
# this release. Used solely to get a date for the "announcement" target.
|
||||
gnulib_dir = $(srcdir)/../../gnulib
|
||||
gnulib_dir = $(srcdir)/gnulib
|
||||
|
||||
bootstrap-tools = autoconf,automake,flex,gnulib
|
||||
|
||||
update-copyright: update-b4-copyright update-package-copyright-year
|
||||
update-copyright-env = \
|
||||
UPDATE_COPYRIGHT_FORCE=1 UPDATE_COPYRIGHT_USE_INTERVALS=1
|
||||
|
||||
+37
-28
@@ -1,7 +1,6 @@
|
||||
# Configure template for GNU Bison. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 2001-2010 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
|
||||
@@ -22,19 +21,24 @@ AC_PREREQ(2.61)
|
||||
AC_INIT([GNU Bison],
|
||||
m4_esyscmd([build-aux/git-version-gen .tarball-version]),
|
||||
[[email protected]])
|
||||
AC_DEFINE([PACKAGE_COPYRIGHT_YEAR], [2008],
|
||||
AC_DEFINE([PACKAGE_COPYRIGHT_YEAR], [2010],
|
||||
[The copyright year for this package])
|
||||
AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2008])
|
||||
AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2010])
|
||||
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
# We don't have a file m4/Makefile.am, so we need Automake 1.8 or later.
|
||||
# Automake 1.10.3 and 1.11.1 fix a security flaw discussed here:
|
||||
#
|
||||
# http://thread.gmane.org/gmane.comp.sysutils.autotools.announce/131
|
||||
#
|
||||
# To avoid 1.11, we make 1.11.1 the minimum version.
|
||||
#
|
||||
# We want gnits strictness only when rolling a formal release so that we can,
|
||||
# for example, run make dist at other times without being required to add a
|
||||
# bogus NEWS entry.
|
||||
AM_INIT_AUTOMAKE([1.8 dist-bzip2]
|
||||
m4_bmatch(m4_defn([AC_PACKAGE_VERSION]), [-], [gnu], [gnits]))
|
||||
AM_INIT_AUTOMAKE([1.11.1 dist-bzip2]
|
||||
m4_bmatch(m4_defn([AC_PACKAGE_VERSION]), [-], [gnu], [gnu]))
|
||||
AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])
|
||||
|
||||
# Checks for the compiler.
|
||||
@@ -51,23 +55,29 @@ AC_ARG_ENABLE(gcc-warnings,
|
||||
esac],
|
||||
[enableval=no])
|
||||
if test "${enableval}" = yes; then
|
||||
gl_WARNING_CFLAGS([-Werror])
|
||||
AC_SUBST([WERROR_CFLAGS], [$WARNING_CFLAGS])
|
||||
WARNING_CFLAGS=
|
||||
gl_WARNING_CFLAGS([-Wall])
|
||||
gl_WARNING_CFLAGS([-Wextra -Wno-sign-compare])
|
||||
gl_WARNING_CFLAGS([-Wcast-align])
|
||||
gl_WARNING_CFLAGS([-Wcast-qual])
|
||||
gl_WARNING_CFLAGS([-Wformat])
|
||||
gl_WARNING_CFLAGS([-Wpointer-arith])
|
||||
gl_WARNING_CFLAGS([-Wwrite-strings])
|
||||
AC_SUBST([WARNING_CXXFLAGS], [$WARNING_CFLAGS])
|
||||
gl_WARN_ADD([-Werror], [WERROR_CFLAGS])
|
||||
AC_SUBST([WERROR_CFLAGS])
|
||||
gl_WARN_ADD([-Wall])
|
||||
gl_WARN_ADD([-Wextra -Wno-sign-compare])
|
||||
gl_WARN_ADD([-Wcast-align])
|
||||
gl_WARN_ADD([-Wcast-qual])
|
||||
gl_WARN_ADD([-Wformat])
|
||||
gl_WARN_ADD([-Wpointer-arith])
|
||||
gl_WARN_ADD([-Wwrite-strings])
|
||||
AC_SUBST([WARN_CXXFLAGS], [$WARN_CFLAGS])
|
||||
# The following warnings are not suitable for C++.
|
||||
gl_WARNING_CFLAGS([-Wbad-function-cast])
|
||||
gl_WARNING_CFLAGS([-Wmissing-declarations])
|
||||
gl_WARNING_CFLAGS([-Wmissing-prototypes])
|
||||
gl_WARNING_CFLAGS([-Wshadow])
|
||||
gl_WARNING_CFLAGS([-Wstrict-prototypes])
|
||||
gl_WARN_ADD([-Wbad-function-cast])
|
||||
gl_WARN_ADD([-Wmissing-declarations])
|
||||
gl_WARN_ADD([-Wmissing-prototypes])
|
||||
gl_WARN_ADD([-Wshadow])
|
||||
gl_WARN_ADD([-Wstrict-prototypes])
|
||||
AC_SUBST([WARN_CFLAGS])
|
||||
# Warnings for the test suite only.
|
||||
gl_WARN_ADD([-Wundef], [WARN_CFLAGS_TEST])
|
||||
WARN_CXXFLAGS_TEST="$WARN_CXXFLAGS $WARN_CFLAGS_TEST"
|
||||
WARN_CFLAGS_TEST="$WARN_CFLAGS $WARN_CFLAGS_TEST"
|
||||
AC_SUBST([WARN_CXXFLAGS_TEST])
|
||||
AC_SUBST([WARN_CFLAGS_TEST])
|
||||
AC_DEFINE([lint], 1, [Define to 1 if the compiler is checking for lint.])
|
||||
fi
|
||||
|
||||
@@ -92,11 +102,10 @@ AC_SUBST([YACC_LIBRARY])
|
||||
AC_PROG_LEX
|
||||
AC_PROG_YACC
|
||||
AC_PROG_RANLIB
|
||||
BISON_PROG_GNU_M4
|
||||
if test x"$ac_cv_prog_gnu_m4" != xyes; then
|
||||
AC_MSG_ERROR([GNU M4 1.4 is required])
|
||||
fi
|
||||
AC_PROG_GNU_M4
|
||||
AC_DEFINE_UNQUOTED([M4], ["$M4"], [Define to the GNU M4 executable name.])
|
||||
AC_DEFINE_UNQUOTED([M4_GNU_OPTION], ["$M4_GNU"], [Define to "-g" if GNU M4
|
||||
supports -g, otherwise to "".])
|
||||
AM_MISSING_PROG([HELP2MAN], [help2man])
|
||||
AC_PATH_PROG([XSLTPROC], [xsltproc])
|
||||
AC_SUBST([XSLTPROC])
|
||||
@@ -119,7 +128,7 @@ BISON_PREREQ_TIMEVAR
|
||||
|
||||
# Gettext.
|
||||
# We've never tested with gettext versions before 0.15, so play it safe.
|
||||
AM_GNU_GETTEXT([external], [need-formatstring-macros])
|
||||
AM_GNU_GETTEXT([external], [need-ngettext])
|
||||
AM_GNU_GETTEXT_VERSION([0.15])
|
||||
BISON_I18N
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
## Copyright (C) 2002, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2002, 2005-2010 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
|
||||
|
||||
+34
-7
@@ -1,31 +1,58 @@
|
||||
-*- outline -*-
|
||||
|
||||
This directory contains Bison skeletons: the general shapes of the
|
||||
different parser kinds, that are specialized for specific grammars by
|
||||
the bison program.
|
||||
This directory contains data needed by Bison.
|
||||
|
||||
Currently, there are only three supported skeletons:
|
||||
* Skeletons
|
||||
Bison skeletons: the general shapes of the different parser kinds,
|
||||
that are specialized for specific grammars by the bison program.
|
||||
|
||||
Currently, the supported skeletons are:
|
||||
|
||||
- yacc.c
|
||||
It used to be named bison.simple: it corresponds to C Yacc
|
||||
compatible LALR(1) parsers.
|
||||
|
||||
- lalr1.cc
|
||||
Produces a C++ parser class. It is still very experimental, and not
|
||||
yet supported. Please, subscribe to [email protected].
|
||||
Produces a C++ parser class.
|
||||
|
||||
- lalr1.java
|
||||
Produces a Java parser class.
|
||||
|
||||
- glr.c
|
||||
A Generalized LR C parser based on Bison's LALR(1) tables.
|
||||
|
||||
- glr.cc
|
||||
A Generalized LR C++ parser. Actually a C++ wrapper around glr.c.
|
||||
|
||||
These skeletons are the only ones supported by the Bison team.
|
||||
Because the interface between skeletons and the bison program is not
|
||||
finished, *we are not bound to it*. In particular, Bison is not
|
||||
mature enough for us to consider that ``foreign skeletons'' are
|
||||
supported.
|
||||
|
||||
* m4sugar
|
||||
This directory contains M4sugar, sort of an extended library for M4,
|
||||
which is used by Bison to instantiate the skeletons.
|
||||
|
||||
* xslt
|
||||
This directory contains XSLT programs that transform Bison's XML output
|
||||
into various formats.
|
||||
|
||||
- bison.xsl
|
||||
A library of routines used by the other XSLT programs.
|
||||
|
||||
- xml2dot.xsl
|
||||
Conversion into GraphViz's dot format.
|
||||
|
||||
- xml2text.xsl
|
||||
Conversion into text.
|
||||
|
||||
- xml2xhtml.xsl
|
||||
Conversion into XHTML.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2008-2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bison.
|
||||
|
||||
|
||||
+4
-6
@@ -1,8 +1,7 @@
|
||||
-*- Autoconf -*-
|
||||
|
||||
# Language-independent M4 Macros for Bison.
|
||||
# Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008 Free Software Foundation,
|
||||
# Inc.
|
||||
# Copyright (C) 2002, 2004-2010 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -464,10 +463,9 @@ m4_define([b4_percent_define_default],
|
||||
[m4_ifndef([b4_percent_define(]$1[)],
|
||||
[m4_define([b4_percent_define(]$1[)], [$2])dnl
|
||||
m4_define([b4_percent_define_loc(]$1[)],
|
||||
[[[[[Bison:b4_percent_define_default]:1.0]], [[[Bison:b4_percent_define_default]:1.0]]]])dnl
|
||||
m4_define([b4_percent_define_syncline(]$1[)],
|
||||
[[]b4_syncline(1, [["[Bison:b4_percent_define_default]"]])[
|
||||
]])])])
|
||||
[[[[<skeleton default value>:-1.-1]],
|
||||
[[<skeleton default value>:-1.-1]]]])dnl
|
||||
m4_define([b4_percent_define_syncline(]$1[)], [[]])])])
|
||||
|
||||
# b4_percent_define_check_values(VALUES)
|
||||
# --------------------------------------
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
-*- Autoconf -*-
|
||||
|
||||
# C++ skeleton dispatching for Bison.
|
||||
# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006-2007, 2009-2010 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
|
||||
|
||||
+2
-3
@@ -2,8 +2,7 @@
|
||||
|
||||
# C++ skeleton for Bison
|
||||
|
||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation,
|
||||
# Inc.
|
||||
# Copyright (C) 2002-2010 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
|
||||
@@ -74,7 +73,7 @@ m4_define([b4_namespace_open],
|
||||
|
||||
m4_define([b4_namespace_close],
|
||||
[b4_user_code([b4_percent_define_get_syncline([[namespace]])
|
||||
m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref),
|
||||
m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref[ ]),
|
||||
[^\(.\)[ ]*\(::\)?\([^][:]\|:[^][:]\)*],
|
||||
[\1])),
|
||||
[::\([^][:]\|:[^][:]\)*], [} ])[} // ]b4_namespace_ref])])
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
-*- Autoconf -*-
|
||||
|
||||
# C skeleton dispatching for Bison.
|
||||
# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006-2007, 2009-2010 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,8 +1,7 @@
|
||||
-*- Autoconf -*-
|
||||
|
||||
# C M4 Macros for Bison.
|
||||
# Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 2002, 2004-2010 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
|
||||
|
||||
+11
-11
@@ -1,8 +1,7 @@
|
||||
-*- C -*-
|
||||
|
||||
# GLR skeleton for Bison
|
||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation,
|
||||
# Inc.
|
||||
# Copyright (C) 2002-2010 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
|
||||
@@ -148,9 +147,9 @@ m4_define([b4_rhs_location],
|
||||
# We do want M4 expansion after # for CPP macros.
|
||||
m4_changecom()
|
||||
m4_divert_push(0)dnl
|
||||
@output(b4_parser_file_name@)
|
||||
@output(b4_parser_file_name@)@
|
||||
b4_copyright([Skeleton implementation for Bison GLR parsers in C],
|
||||
[2002, 2003, 2004, 2005, 2006])
|
||||
[2002-2006, 2009-2010])
|
||||
[
|
||||
/* C GLR parser skeleton written by Paul Hilfinger. */
|
||||
|
||||
@@ -248,7 +247,7 @@ b4_percent_code_get[]dnl
|
||||
#include <string.h>
|
||||
|
||||
#ifndef YY_
|
||||
# if YYENABLE_NLS
|
||||
# if defined YYENABLE_NLS && YYENABLE_NLS
|
||||
# if ENABLE_NLS
|
||||
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
||||
@@ -310,7 +309,8 @@ b4_percent_code_get[]dnl
|
||||
#ifndef __attribute__
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
# if (! defined __GNUC__ || __GNUC__ < 2 \
|
||||
|| (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__)
|
||||
|| (__GNUC__ == 2 && __GNUC_MINOR__ < 5) \
|
||||
|| (defined __STRICT_ANSI__ && __STRICT_ANSI__))
|
||||
# define __attribute__(Spec) /* empty */
|
||||
# endif
|
||||
#endif
|
||||
@@ -2323,7 +2323,7 @@ yyrecoverSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
|
||||
yychar = YYEMPTY;
|
||||
yylval = yyval_default;
|
||||
]b4_locations_if([
|
||||
#if YYLTYPE_IS_TRIVIAL
|
||||
#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||
yylloc.first_line = yylloc.last_line = ]b4_location_initial_line[;
|
||||
yylloc.first_column = yylloc.last_column = ]b4_location_initial_column[;
|
||||
#endif
|
||||
@@ -2637,17 +2637,17 @@ dnl glr.cc produces its own header.
|
||||
dnl
|
||||
m4_if(b4_skeleton, ["glr.c"],
|
||||
[b4_defines_if(
|
||||
[@output(b4_spec_defines_file@)
|
||||
[@output(b4_spec_defines_file@)@
|
||||
b4_copyright([Skeleton interface for Bison GLR parsers in C],
|
||||
[2002, 2003, 2004, 2005, 2006])
|
||||
[2002-2006, 2009-2010])
|
||||
|
||||
b4_shared_declarations
|
||||
|
||||
b4_pure_if([],
|
||||
[[extern YYSTYPE b4_prefix][lval;]])
|
||||
[[extern YYSTYPE ]b4_prefix[lval;]])
|
||||
|
||||
b4_locations_if([b4_pure_if([],
|
||||
[extern YYLTYPE b4_prefix[]lloc;])
|
||||
[extern YYLTYPE ]b4_prefix[lloc;])
|
||||
])
|
||||
])])
|
||||
m4_divert_pop(0)
|
||||
|
||||
+3
-4
@@ -1,8 +1,7 @@
|
||||
-*- C -*-
|
||||
|
||||
# C++ GLR skeleton for Bison
|
||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation,
|
||||
# Inc.
|
||||
# Copyright (C) 2002-2010 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
|
||||
@@ -217,9 +216,9 @@ m4_include(b4_pkgdatadir/[glr.c])
|
||||
m4_popdef([b4_parse_param])
|
||||
|
||||
m4_divert_push(0)
|
||||
@output(b4_spec_defines_file@)
|
||||
@output(b4_spec_defines_file@)@
|
||||
b4_copyright([Skeleton interface for Bison GLR parsers in C++],
|
||||
[2002, 2003, 2004, 2005, 2006])[
|
||||
[2002-2006, 2009-2010])[
|
||||
|
||||
/* C++ GLR parser skeleton written by Akim Demaille. */
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
-*- Autoconf -*-
|
||||
|
||||
# Java skeleton dispatching for Bison.
|
||||
# Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2007, 2009-2010 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
@@ -2,7 +2,7 @@
|
||||
|
||||
# Java language support for Bison
|
||||
|
||||
# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2007-2010 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
|
||||
|
||||
+8
-9
@@ -1,7 +1,6 @@
|
||||
# C++ skeleton for Bison
|
||||
|
||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002-2010 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,9 +32,9 @@ m4_include(b4_pkgdatadir/[location.cc])
|
||||
m4_changecom()
|
||||
m4_divert_push(0)dnl
|
||||
b4_defines_if(
|
||||
[@output(b4_spec_defines_file@)
|
||||
[@output(b4_spec_defines_file@)@
|
||||
b4_copyright([Skeleton interface for Bison LALR(1) parsers in C++],
|
||||
[2002, 2003, 2004, 2005, 2006, 2007, 2008])
|
||||
[2002-2010])
|
||||
dnl FIXME: This is wrong, we want computed header guards.
|
||||
[
|
||||
/* C++ LALR(1) parser skeleton written by Akim Demaille. */
|
||||
@@ -298,9 +297,9 @@ b4_percent_code_get([[provides]])[]dnl
|
||||
|
||||
[#endif /* ! defined PARSER_HEADER_H */]
|
||||
])dnl
|
||||
@output(b4_parser_file_name@)
|
||||
@output(b4_parser_file_name@)@
|
||||
b4_copyright([Skeleton implementation for Bison LALR(1) parsers in C++],
|
||||
[2002, 2003, 2004, 2005, 2006, 2007, 2008])
|
||||
[2002-2010])
|
||||
b4_percent_code_get([[top]])[]dnl
|
||||
m4_if(b4_prefix, [yy], [],
|
||||
[
|
||||
@@ -318,7 +317,7 @@ b4_defines_if([[
|
||||
b4_percent_code_get[]dnl
|
||||
|
||||
[#ifndef YY_
|
||||
# if YYENABLE_NLS
|
||||
# if defined YYENABLE_NLS && YYENABLE_NLS
|
||||
# if ENABLE_NLS
|
||||
# include <libintl.h> /* FIXME: INFRINGES ON USER NAME SPACE */
|
||||
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
||||
@@ -1055,9 +1054,9 @@ b4_error_verbose_if([, int tok])[)
|
||||
|
||||
]b4_epilogue
|
||||
dnl
|
||||
@output(b4_dir_prefix[]stack.hh@)
|
||||
@output(b4_dir_prefix[]stack.hh@)@
|
||||
b4_copyright([Stack handling for Bison parsers in C++],
|
||||
[2002, 2003, 2004, 2005, 2006, 2007, 2008])[
|
||||
[2002-2010])[
|
||||
|
||||
#ifndef BISON_STACK_HH
|
||||
# define BISON_STACK_HH
|
||||
|
||||
+43
-42
@@ -1,6 +1,6 @@
|
||||
# Java skeleton for Bison -*- autoconf -*-
|
||||
|
||||
# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2007-2010 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,9 +23,9 @@ m4_ifval(m4_defn([b4_symbol_destructors]),
|
||||
[])
|
||||
|
||||
m4_divert_push(0)dnl
|
||||
@output(b4_parser_file_name@)
|
||||
@output(b4_parser_file_name@)@
|
||||
b4_copyright([Skeleton implementation for Bison LALR(1) parsers in Java],
|
||||
[2007, 2008])
|
||||
[2007-2010])
|
||||
|
||||
b4_percent_define_ifdef([package], [package b4_percent_define_get([package]);
|
||||
])[/* First part of user declarations. */
|
||||
@@ -130,7 +130,7 @@ b4_token_enums(b4_tokens)
|
||||
/**
|
||||
* Entry point for the scanner. Returns the token identifier corresponding
|
||||
* to the next token and prepares to return the semantic value
|
||||
* ]b4_locations_if([and beginning/ending positions ])[of the token.
|
||||
* ]b4_locations_if([and beginning/ending positions ])[of the token.
|
||||
* @@return the token identifier corresponding to the next token. */
|
||||
int yylex () ]b4_maybe_throws([b4_lex_throws])[;
|
||||
|
||||
@@ -228,11 +228,11 @@ b4_lexer_if([[
|
||||
|
||||
public int size = 16;
|
||||
public int height = -1;
|
||||
|
||||
|
||||
public final void push (int state, ]b4_yystype[ value]dnl
|
||||
b4_locations_if([, ]b4_location_type[ loc])[) {
|
||||
b4_locations_if([, ]b4_location_type[ loc])[) {
|
||||
height++;
|
||||
if (size == height)
|
||||
if (size == height)
|
||||
{
|
||||
int[] newStateStack = new int[size * 2];
|
||||
System.arraycopy (stateStack, 0, newStateStack, 0, height);
|
||||
@@ -241,7 +241,7 @@ b4_lexer_if([[
|
||||
]b4_location_type[[] newLocStack = new ]b4_location_type[[size * 2];
|
||||
System.arraycopy (locStack, 0, newLocStack, 0, height);
|
||||
locStack = newLocStack;]])
|
||||
|
||||
|
||||
b4_yystype[[] newValueStack = new ]b4_yystype[[size * 2];
|
||||
System.arraycopy (valueStack, 0, newValueStack, 0, height);
|
||||
valueStack = newValueStack;
|
||||
@@ -283,7 +283,7 @@ b4_lexer_if([[
|
||||
public void print (java.io.PrintStream out)
|
||||
{
|
||||
out.print ("Stack now");
|
||||
|
||||
|
||||
for (int i = 0; i < height; i++)
|
||||
{
|
||||
out.print (' ');
|
||||
@@ -310,7 +310,8 @@ b4_lexer_if([[
|
||||
|
||||
/**
|
||||
* Returned by a Bison action in order to print an error message and start
|
||||
* error recovery. */
|
||||
* error recovery. Formally deprecated in Bison 2.4.2's NEWS entry, where
|
||||
* a plan to phase it out is discussed. */
|
||||
public static final int YYFAIL = 3;
|
||||
|
||||
private static final int YYNEWSTATE = 4;
|
||||
@@ -337,7 +338,7 @@ b4_lexer_if([[
|
||||
|
||||
/* If YYLEN is nonzero, implement the default value of the action:
|
||||
`$$ = $1'. Otherwise, use the top of the stack.
|
||||
|
||||
|
||||
Otherwise, the following line sets YYVAL to garbage.
|
||||
This behavior is undocumented and Bison
|
||||
users should not rely upon it. */
|
||||
@@ -345,7 +346,7 @@ b4_lexer_if([[
|
||||
yyval = yystack.valueAt (yylen - 1);
|
||||
else
|
||||
yyval = yystack.valueAt (0);
|
||||
|
||||
|
||||
yy_reduce_print (yyn, yystack);
|
||||
|
||||
switch (yyn)
|
||||
@@ -482,11 +483,11 @@ m4_popdef([b4_at_dollar])])dnl
|
||||
yycdebug ("Entering state " + yystate + "\n");
|
||||
if (yydebug > 0)
|
||||
yystack.print (yyDebugStream);
|
||||
|
||||
|
||||
/* Accept? */
|
||||
if (yystate == yyfinal_)
|
||||
return true;
|
||||
|
||||
|
||||
/* Take a decision. First try without lookahead. */
|
||||
yyn = yypact_[yystate];
|
||||
if (yyn == yypact_ninf_)
|
||||
@@ -494,7 +495,7 @@ m4_popdef([b4_at_dollar])])dnl
|
||||
label = YYDEFAULT;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
/* Read a lookahead token. */
|
||||
if (yychar == yyempty_)
|
||||
{
|
||||
@@ -502,10 +503,10 @@ m4_popdef([b4_at_dollar])])dnl
|
||||
yychar = yylex ();]
|
||||
b4_locations_if([[
|
||||
yylloc = new ]b4_location_type[(yylexer.getStartPos (),
|
||||
yylexer.getEndPos ());]])
|
||||
yylexer.getEndPos ());]])
|
||||
yylval = yylexer.getLVal ();[
|
||||
}
|
||||
|
||||
|
||||
/* Convert token to internal form. */
|
||||
if (yychar <= EOF)
|
||||
{
|
||||
@@ -516,15 +517,15 @@ m4_popdef([b4_at_dollar])])dnl
|
||||
{
|
||||
yytoken = yytranslate_ (yychar);
|
||||
yy_symbol_print ("Next token is", yytoken,
|
||||
yylval]b4_locations_if([, yylloc])[);
|
||||
yylval]b4_locations_if([, yylloc])[);
|
||||
}
|
||||
|
||||
|
||||
/* If the proper action on seeing token YYTOKEN is to reduce or to
|
||||
detect an error, take that action. */
|
||||
yyn += yytoken;
|
||||
if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yytoken)
|
||||
label = YYDEFAULT;
|
||||
|
||||
|
||||
/* <= 0 means reduce or error. */
|
||||
else if ((yyn = yytable_[yyn]) <= 0)
|
||||
{
|
||||
@@ -536,27 +537,27 @@ m4_popdef([b4_at_dollar])])dnl
|
||||
label = YYREDUCE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
/* Shift the lookahead token. */
|
||||
yy_symbol_print ("Shifting", yytoken,
|
||||
yylval]b4_locations_if([, yylloc])[);
|
||||
|
||||
yylval]b4_locations_if([, yylloc])[);
|
||||
|
||||
/* Discard the token being shifted. */
|
||||
yychar = yyempty_;
|
||||
|
||||
|
||||
/* Count tokens shifted since error; after three, turn off error
|
||||
status. */
|
||||
if (yyerrstatus_ > 0)
|
||||
--yyerrstatus_;
|
||||
|
||||
|
||||
yystate = yyn;
|
||||
yystack.push (yystate, yylval]b4_locations_if([, yylloc])[);
|
||||
label = YYNEWSTATE;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
/*-----------------------------------------------------------.
|
||||
| yydefault -- do the default action for the current state. |
|
||||
`-----------------------------------------------------------*/
|
||||
@@ -567,7 +568,7 @@ m4_popdef([b4_at_dollar])])dnl
|
||||
else
|
||||
label = YYREDUCE;
|
||||
break;
|
||||
|
||||
|
||||
/*-----------------------------.
|
||||
| yyreduce -- Do a reduction. |
|
||||
`-----------------------------*/
|
||||
@@ -576,7 +577,7 @@ m4_popdef([b4_at_dollar])])dnl
|
||||
label = yyaction (yyn, yystack, yylen);
|
||||
yystate = yystack.stateAt (0);
|
||||
break;
|
||||
|
||||
|
||||
/*------------------------------------.
|
||||
| yyerrlab -- here on detecting error |
|
||||
`------------------------------------*/
|
||||
@@ -587,13 +588,13 @@ m4_popdef([b4_at_dollar])])dnl
|
||||
++yynerrs_;
|
||||
yyerror (]b4_locations_if([yylloc, ])[yysyntax_error (yystate, yytoken));
|
||||
}
|
||||
|
||||
|
||||
]b4_locations_if([yyerrloc = yylloc;])[
|
||||
if (yyerrstatus_ == 3)
|
||||
{
|
||||
/* If just tried and failed to reuse lookahead token after an
|
||||
error, discard it. */
|
||||
|
||||
|
||||
if (yychar <= EOF)
|
||||
{
|
||||
/* Return failure if at end of input. */
|
||||
@@ -603,17 +604,17 @@ m4_popdef([b4_at_dollar])])dnl
|
||||
else
|
||||
yychar = yyempty_;
|
||||
}
|
||||
|
||||
|
||||
/* Else will try to reuse lookahead token after shifting the error
|
||||
token. */
|
||||
label = YYERRLAB1;
|
||||
break;
|
||||
|
||||
|
||||
/*---------------------------------------------------.
|
||||
| errorlab -- error raised explicitly by YYERROR. |
|
||||
`---------------------------------------------------*/
|
||||
case YYERROR:
|
||||
|
||||
|
||||
]b4_locations_if([yyerrloc = yystack.locationAt (yylen - 1);])[
|
||||
/* Do not reclaim the symbols of the rule which action triggered
|
||||
this YYERROR. */
|
||||
@@ -622,13 +623,13 @@ m4_popdef([b4_at_dollar])])dnl
|
||||
yystate = yystack.stateAt (0);
|
||||
label = YYERRLAB1;
|
||||
break;
|
||||
|
||||
|
||||
/*-------------------------------------------------------------.
|
||||
| yyerrlab1 -- common code for both syntax error and YYERROR. |
|
||||
`-------------------------------------------------------------*/
|
||||
case YYERRLAB1:
|
||||
yyerrstatus_ = 3; /* Each real token shifted decrements this. */
|
||||
|
||||
|
||||
for (;;)
|
||||
{
|
||||
yyn = yypact_[yystate];
|
||||
@@ -642,18 +643,18 @@ m4_popdef([b4_at_dollar])])dnl
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Pop the current state because it cannot handle the error token. */
|
||||
if (yystack.height == 1)
|
||||
return false;
|
||||
|
||||
|
||||
]b4_locations_if([yyerrloc = yystack.locationAt (0);])[
|
||||
yystack.pop ();
|
||||
yystate = yystack.stateAt (0);
|
||||
if (yydebug > 0)
|
||||
yystack.print (yyDebugStream);
|
||||
}
|
||||
|
||||
|
||||
]b4_locations_if([
|
||||
/* Muck with the stack to setup for yylloc. */
|
||||
yystack.push (0, null, yylloc);
|
||||
@@ -664,16 +665,16 @@ m4_popdef([b4_at_dollar])])dnl
|
||||
/* Shift the error token. */
|
||||
yy_symbol_print ("Shifting", yystos_[yyn],
|
||||
yylval]b4_locations_if([, yyloc])[);
|
||||
|
||||
|
||||
yystate = yyn;
|
||||
yystack.push (yyn, yylval]b4_locations_if([, yyloc])[);
|
||||
label = YYNEWSTATE;
|
||||
break;
|
||||
|
||||
|
||||
/* Accept. */
|
||||
case YYACCEPT:
|
||||
return true;
|
||||
|
||||
|
||||
/* Abort. */
|
||||
case YYABORT:
|
||||
return false;
|
||||
@@ -842,7 +843,7 @@ m4_popdef([b4_at_dollar])])dnl
|
||||
for (int yyi = 0; yyi < yynrhs; yyi++)
|
||||
yy_symbol_print (" $" + (yyi + 1) + " =",
|
||||
yyrhs_[yyprhs_[yyrule] + yyi],
|
||||
]b4_rhs_value(yynrhs, yyi + 1)b4_locations_if([,
|
||||
]b4_rhs_value(yynrhs, yyi + 1)b4_locations_if([,
|
||||
b4_rhs_location(yynrhs, yyi + 1)])[);
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -1,7 +1,6 @@
|
||||
# C++ skeleton for Bison
|
||||
|
||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation,
|
||||
# Inc.
|
||||
# Copyright (C) 2002-2007, 2009-2010 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
|
||||
@@ -19,9 +18,9 @@
|
||||
# We do want M4 expansion after # for CPP macros.
|
||||
m4_changecom()
|
||||
m4_divert_push(0)dnl
|
||||
@output(b4_dir_prefix[]position.hh@)
|
||||
@output(b4_dir_prefix[]position.hh@)@
|
||||
b4_copyright([Positions for Bison parsers in C++],
|
||||
[2002, 2003, 2004, 2005, 2006])[
|
||||
[2002-2007, 2009-2010])[
|
||||
|
||||
/**
|
||||
** \file position.hh
|
||||
@@ -116,10 +115,11 @@ b4_copyright([Positions for Bison parsers in C++],
|
||||
inline bool
|
||||
operator== (const position& pos1, const position& pos2)
|
||||
{
|
||||
return
|
||||
(pos1.filename == pos2.filename
|
||||
|| pos1.filename && pos2.filename && *pos1.filename == *pos2.filename)
|
||||
&& pos1.line == pos2.line && pos1.column == pos2.column;
|
||||
return (pos1.line == pos2.line
|
||||
&& pos1.column == pos2.column
|
||||
&& (pos1.filename == pos2.filename
|
||||
|| (pos1.filename && pos2.filename
|
||||
&& *pos1.filename == *pos2.filename)));
|
||||
}
|
||||
|
||||
/// Compare two position objects.
|
||||
@@ -143,9 +143,9 @@ b4_copyright([Positions for Bison parsers in C++],
|
||||
|
||||
]b4_namespace_close[
|
||||
#endif // not BISON_POSITION_HH]
|
||||
@output(b4_dir_prefix[]location.hh@)
|
||||
@output(b4_dir_prefix[]location.hh@)@
|
||||
b4_copyright([Locations for Bison parsers in C++],
|
||||
[2002, 2003, 2004, 2005, 2006])[
|
||||
[2002-2007, 2009-2010])[
|
||||
|
||||
/**
|
||||
** \file location.hh
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
<!--
|
||||
bison.xsl - common templates for Bison XSLT.
|
||||
|
||||
Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2007-2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!--
|
||||
xml2dot.xsl - transform Bison XML Report into DOT.
|
||||
|
||||
Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2007-2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!--
|
||||
xml2text.xsl - transform Bison XML Report into plain text.
|
||||
|
||||
Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2007-2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!--
|
||||
xml2html.xsl - transform Bison XML Report into XHTML.
|
||||
|
||||
Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2007-2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
+21
-12
@@ -2,8 +2,8 @@
|
||||
|
||||
# Yacc compatible skeleton for Bison
|
||||
|
||||
# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
# 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1984, 1989-1990, 2000-2010 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
|
||||
@@ -153,9 +153,9 @@ m4_define([b4_rhs_location],
|
||||
# We do want M4 expansion after # for CPP macros.
|
||||
m4_changecom()
|
||||
m4_divert_push(0)dnl
|
||||
@output(b4_parser_file_name@)
|
||||
b4_copyright([Skeleton implementation for Bison's Yacc-like parsers in C],dnl '
|
||||
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006])[
|
||||
@output(b4_parser_file_name@)@
|
||||
b4_copyright([Skeleton implementation for Bison's Yacc-like parsers in C],
|
||||
[1984, 1989-1990, 2000-2006, 2009-2010])[
|
||||
|
||||
/* C LALR(1) parser skeleton written by Richard Stallman, by
|
||||
simplifying the original so-called "semantic" parser. */
|
||||
@@ -310,7 +310,7 @@ typedef short int yytype_int16;
|
||||
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
|
||||
|
||||
#ifndef YY_
|
||||
# if YYENABLE_NLS
|
||||
# if defined YYENABLE_NLS && YYENABLE_NLS
|
||||
# if ENABLE_NLS
|
||||
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
||||
@@ -609,9 +609,18 @@ static const ]b4_int_type_for([b4_stos])[ yystos[] =
|
||||
|
||||
/* Like YYERROR except do call yyerror. This remains here temporarily
|
||||
to ease the transition to the new meaning of YYERROR, for GCC.
|
||||
Once GCC version 2 has supplanted version 1, this can go. */
|
||||
Once GCC version 2 has supplanted version 1, this can go. However,
|
||||
YYFAIL appears to be in use. Nevertheless, it is formally deprecated
|
||||
in Bison 2.4.2's NEWS entry, where a plan to phase it out is
|
||||
discussed. */
|
||||
|
||||
#define YYFAIL goto yyerrlab
|
||||
#if defined YYFAIL
|
||||
/* This is here to suppress warnings from the GCC cpp's
|
||||
-Wunused-macros. Normally we don't worry about that warning, but
|
||||
some users do, and we want to make it easy for users to remove
|
||||
YYFAIL uses, which will produce warnings from Bison 2.5. */
|
||||
#endif
|
||||
|
||||
#define YYRECOVERING() (!!yyerrstatus)
|
||||
|
||||
@@ -668,7 +677,7 @@ while (YYID (0))
|
||||
we won't break user code: when these are the locations we know. */
|
||||
|
||||
#ifndef YY_LOCATION_PRINT
|
||||
# if YYLTYPE_IS_TRIVIAL
|
||||
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||
# define YY_LOCATION_PRINT(File, Loc) \
|
||||
fprintf (File, "%d.%d-%d.%d", \
|
||||
(Loc).first_line, (Loc).first_column, \
|
||||
@@ -1234,7 +1243,7 @@ b4_push_if([b4_pure_if([], [[ int yypushed_char = yychar;
|
||||
yyvsp = yyvs;]b4_locations_if([[
|
||||
yylsp = yyls;
|
||||
|
||||
#if YYLTYPE_IS_TRIVIAL
|
||||
#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||
/* Initialize the default location before parsing starts. */
|
||||
yylloc.first_line = yylloc.last_line = ]b4_location_initial_line[;
|
||||
yylloc.first_column = yylloc.last_column = ]b4_location_initial_column[;
|
||||
@@ -1674,9 +1683,9 @@ yypushreturn:
|
||||
|
||||
]b4_epilogue
|
||||
b4_defines_if(
|
||||
[@output(b4_spec_defines_file@)
|
||||
b4_copyright([Skeleton interface for Bison's Yacc-like parsers in C],dnl '
|
||||
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006])
|
||||
[@output(b4_spec_defines_file@)@
|
||||
b4_copyright([Skeleton interface for Bison's Yacc-like parsers in C],
|
||||
[1984, 1989-1990, 2000-2006, 2009-2010])
|
||||
|
||||
b4_percent_code_get([[requires]])[]dnl
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# DJGPP Maintainer's Makefile -*-Makefile-*-
|
||||
# Requires GNU sed
|
||||
|
||||
## Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2005-2010 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
@@ -1,6 +1,6 @@
|
||||
This is a port of GNU Bison @VERSION@ to MSDOS/DJGPP.
|
||||
|
||||
Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005-2010 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
@@ -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, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
Rem Copyright (C) 2005-2010 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
@@ -3,7 +3,7 @@
|
||||
# of the configure script generated by autoconf 2.62.
|
||||
|
||||
|
||||
# Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2005-2010 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
@@ -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, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2005-2010 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
@@ -1,6 +1,6 @@
|
||||
# sed script for DJGPP specific editing of config.hin
|
||||
|
||||
# Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2005-2010 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
@@ -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, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
Rem Copyright (C) 2005-2010 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
@@ -1,6 +1,6 @@
|
||||
/* Subprocesses with pipes.
|
||||
|
||||
Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005-2010 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
@@ -1,5 +1,5 @@
|
||||
/* Subprocesses with pipes.
|
||||
Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005-2010 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
@@ -3,7 +3,7 @@
|
||||
# of the testsuite script generated by autoconf 2.61.
|
||||
|
||||
|
||||
# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2007-2010 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
|
||||
|
||||
+3
-2
@@ -1,4 +1,6 @@
|
||||
*.info*
|
||||
Makefile
|
||||
Makefile.in
|
||||
bison.1
|
||||
bison.aux
|
||||
bison.cp
|
||||
@@ -15,11 +17,10 @@ bison.toc
|
||||
bison.tp
|
||||
bison.vr
|
||||
cross-options.texi
|
||||
Makefile.in
|
||||
gendocs_template
|
||||
refcard.dvi
|
||||
refcard.log
|
||||
refcard.ps
|
||||
*.info*
|
||||
stamp-vti
|
||||
version.texi
|
||||
yacc.1
|
||||
|
||||
+3
-2
@@ -1,4 +1,6 @@
|
||||
/*.info*
|
||||
/Makefile
|
||||
/Makefile.in
|
||||
/bison.1
|
||||
/bison.aux
|
||||
/bison.cp
|
||||
@@ -15,11 +17,10 @@
|
||||
/bison.tp
|
||||
/bison.vr
|
||||
/cross-options.texi
|
||||
/Makefile.in
|
||||
/gendocs_template
|
||||
/refcard.dvi
|
||||
/refcard.log
|
||||
/refcard.ps
|
||||
/*.info*
|
||||
/stamp-vti
|
||||
/version.texi
|
||||
/yacc.1
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
## Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2008 Free Software
|
||||
## Foundation, Inc.
|
||||
## Copyright (C) 2001-2003, 2005-2010 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
|
||||
|
||||
+196
-208
@@ -33,8 +33,7 @@
|
||||
This manual (@value{UPDATED}) is for @acronym{GNU} Bison (version
|
||||
@value{VERSION}), the @acronym{GNU} parser generator.
|
||||
|
||||
Copyright @copyright{} 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1998,
|
||||
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
|
||||
Copyright @copyright{} 1988-1993, 1995, 1998-2010 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
@quotation
|
||||
@@ -89,76 +88,76 @@ Cover art by Etienne Suvasa.
|
||||
@menu
|
||||
* Introduction::
|
||||
* Conditions::
|
||||
* Copying:: The @acronym{GNU} General Public License says
|
||||
how you can copy and share Bison
|
||||
* Copying:: The @acronym{GNU} General Public License says
|
||||
how you can copy and share Bison.
|
||||
|
||||
Tutorial sections:
|
||||
* Concepts:: Basic concepts for understanding Bison.
|
||||
* Examples:: Three simple explained examples of using Bison.
|
||||
* Concepts:: Basic concepts for understanding Bison.
|
||||
* Examples:: Three simple explained examples of using Bison.
|
||||
|
||||
Reference sections:
|
||||
* Grammar File:: Writing Bison declarations and rules.
|
||||
* Interface:: C-language interface to the parser function @code{yyparse}.
|
||||
* Algorithm:: How the Bison parser works at run-time.
|
||||
* Error Recovery:: Writing rules for error recovery.
|
||||
* Grammar File:: Writing Bison declarations and rules.
|
||||
* Interface:: C-language interface to the parser function @code{yyparse}.
|
||||
* Algorithm:: How the Bison parser works at run-time.
|
||||
* Error Recovery:: Writing rules for error recovery.
|
||||
* Context Dependency:: What to do if your language syntax is too
|
||||
messy for Bison to handle straightforwardly.
|
||||
* Debugging:: Understanding or debugging Bison parsers.
|
||||
* Invocation:: How to run Bison (to produce the parser source file).
|
||||
* Other Languages:: Creating C++ and Java parsers.
|
||||
* FAQ:: Frequently Asked Questions
|
||||
* Table of Symbols:: All the keywords of the Bison language are explained.
|
||||
* Glossary:: Basic concepts are explained.
|
||||
* Copying This Manual:: License for copying this manual.
|
||||
* Index:: Cross-references to the text.
|
||||
messy for Bison to handle straightforwardly.
|
||||
* Debugging:: Understanding or debugging Bison parsers.
|
||||
* Invocation:: How to run Bison (to produce the parser source file).
|
||||
* Other Languages:: Creating C++ and Java parsers.
|
||||
* FAQ:: Frequently Asked Questions
|
||||
* Table of Symbols:: All the keywords of the Bison language are explained.
|
||||
* Glossary:: Basic concepts are explained.
|
||||
* Copying This Manual:: License for copying this manual.
|
||||
* Index:: Cross-references to the text.
|
||||
|
||||
@detailmenu
|
||||
--- The Detailed Node Listing ---
|
||||
|
||||
The Concepts of Bison
|
||||
|
||||
* Language and Grammar:: Languages and context-free grammars,
|
||||
as mathematical ideas.
|
||||
* Grammar in Bison:: How we represent grammars for Bison's sake.
|
||||
* Semantic Values:: Each token or syntactic grouping can have
|
||||
a semantic value (the value of an integer,
|
||||
the name of an identifier, etc.).
|
||||
* Semantic Actions:: Each rule can have an action containing C code.
|
||||
* GLR Parsers:: Writing parsers for general context-free languages.
|
||||
* Locations Overview:: Tracking Locations.
|
||||
* Bison Parser:: What are Bison's input and output,
|
||||
how is the output used?
|
||||
* Stages:: Stages in writing and running Bison grammars.
|
||||
* Grammar Layout:: Overall structure of a Bison grammar file.
|
||||
* Language and Grammar:: Languages and context-free grammars,
|
||||
as mathematical ideas.
|
||||
* Grammar in Bison:: How we represent grammars for Bison's sake.
|
||||
* Semantic Values:: Each token or syntactic grouping can have
|
||||
a semantic value (the value of an integer,
|
||||
the name of an identifier, etc.).
|
||||
* Semantic Actions:: Each rule can have an action containing C code.
|
||||
* GLR Parsers:: Writing parsers for general context-free languages.
|
||||
* Locations Overview:: Tracking Locations.
|
||||
* Bison Parser:: What are Bison's input and output,
|
||||
how is the output used?
|
||||
* Stages:: Stages in writing and running Bison grammars.
|
||||
* Grammar Layout:: Overall structure of a Bison grammar file.
|
||||
|
||||
Writing @acronym{GLR} Parsers
|
||||
|
||||
* Simple GLR Parsers:: Using @acronym{GLR} parsers on unambiguous grammars.
|
||||
* Merging GLR Parses:: Using @acronym{GLR} parsers to resolve ambiguities.
|
||||
* GLR Semantic Actions:: Deferred semantic actions have special concerns.
|
||||
* Compiler Requirements:: @acronym{GLR} parsers require a modern C compiler.
|
||||
* Simple GLR Parsers:: Using @acronym{GLR} parsers on unambiguous grammars.
|
||||
* Merging GLR Parses:: Using @acronym{GLR} parsers to resolve ambiguities.
|
||||
* GLR Semantic Actions:: Deferred semantic actions have special concerns.
|
||||
* Compiler Requirements:: @acronym{GLR} parsers require a modern C compiler.
|
||||
|
||||
Examples
|
||||
|
||||
* RPN Calc:: Reverse polish notation calculator;
|
||||
a first example with no operator precedence.
|
||||
* Infix Calc:: Infix (algebraic) notation calculator.
|
||||
Operator precedence is introduced.
|
||||
* RPN Calc:: Reverse polish notation calculator;
|
||||
a first example with no operator precedence.
|
||||
* Infix Calc:: Infix (algebraic) notation calculator.
|
||||
Operator precedence is introduced.
|
||||
* Simple Error Recovery:: Continuing after syntax errors.
|
||||
* Location Tracking Calc:: Demonstrating the use of @@@var{n} and @@$.
|
||||
* Multi-function Calc:: Calculator with memory and trig functions.
|
||||
It uses multiple data-types for semantic values.
|
||||
* Exercises:: Ideas for improving the multi-function calculator.
|
||||
* Multi-function Calc:: Calculator with memory and trig functions.
|
||||
It uses multiple data-types for semantic values.
|
||||
* Exercises:: Ideas for improving the multi-function calculator.
|
||||
|
||||
Reverse Polish Notation Calculator
|
||||
|
||||
* Decls: Rpcalc Decls. Prologue (declarations) for rpcalc.
|
||||
* Rules: Rpcalc Rules. Grammar Rules for rpcalc, with explanation.
|
||||
* Lexer: Rpcalc Lexer. The lexical analyzer.
|
||||
* Main: Rpcalc Main. The controlling function.
|
||||
* Error: Rpcalc Error. The error reporting function.
|
||||
* Gen: Rpcalc Gen. Running Bison on the grammar file.
|
||||
* Comp: Rpcalc Compile. Run the C compiler on the output code.
|
||||
* Rpcalc Declarations:: Prologue (declarations) for rpcalc.
|
||||
* Rpcalc Rules:: Grammar Rules for rpcalc, with explanation.
|
||||
* Rpcalc Lexer:: The lexical analyzer.
|
||||
* Rpcalc Main:: The controlling function.
|
||||
* Rpcalc Error:: The error reporting function.
|
||||
* Rpcalc Generate:: Running Bison on the grammar file.
|
||||
* Rpcalc Compile:: Run the C compiler on the output code.
|
||||
|
||||
Grammar Rules for @code{rpcalc}
|
||||
|
||||
@@ -168,15 +167,15 @@ Grammar Rules for @code{rpcalc}
|
||||
|
||||
Location Tracking Calculator: @code{ltcalc}
|
||||
|
||||
* Decls: Ltcalc Decls. Bison and C declarations for ltcalc.
|
||||
* Rules: Ltcalc Rules. Grammar rules for ltcalc, with explanations.
|
||||
* Lexer: Ltcalc Lexer. The lexical analyzer.
|
||||
* Ltcalc Declarations:: Bison and C declarations for ltcalc.
|
||||
* Ltcalc Rules:: Grammar rules for ltcalc, with explanations.
|
||||
* Ltcalc Lexer:: The lexical analyzer.
|
||||
|
||||
Multi-Function Calculator: @code{mfcalc}
|
||||
|
||||
* Decl: Mfcalc Decl. Bison declarations for multi-function calculator.
|
||||
* Rules: Mfcalc Rules. Grammar rules for the calculator.
|
||||
* Symtab: Mfcalc Symtab. Symbol table management subroutines.
|
||||
* Mfcalc Declarations:: Bison declarations for multi-function calculator.
|
||||
* Mfcalc Rules:: Grammar rules for the calculator.
|
||||
* Mfcalc Symbol Table:: Symbol table management subroutines.
|
||||
|
||||
Bison Grammar Files
|
||||
|
||||
@@ -191,11 +190,11 @@ Bison Grammar Files
|
||||
|
||||
Outline of a Bison Grammar
|
||||
|
||||
* Prologue:: Syntax and usage of the prologue.
|
||||
* Prologue:: Syntax and usage of the prologue.
|
||||
* Prologue Alternatives:: Syntax and usage of alternatives to the prologue.
|
||||
* Bison Declarations:: Syntax and usage of the Bison declarations section.
|
||||
* Grammar Rules:: Syntax and usage of the grammar rules section.
|
||||
* Epilogue:: Syntax and usage of the epilogue.
|
||||
* Bison Declarations:: Syntax and usage of the Bison declarations section.
|
||||
* Grammar Rules:: Syntax and usage of the grammar rules section.
|
||||
* Epilogue:: Syntax and usage of the epilogue.
|
||||
|
||||
Defining Language Semantics
|
||||
|
||||
@@ -230,24 +229,28 @@ Bison Declarations
|
||||
|
||||
Parser C-Language Interface
|
||||
|
||||
* Parser Function:: How to call @code{yyparse} and what it returns.
|
||||
* Lexical:: You must supply a function @code{yylex}
|
||||
which reads tokens.
|
||||
* Error Reporting:: You must supply a function @code{yyerror}.
|
||||
* Action Features:: Special features for use in actions.
|
||||
* Internationalization:: How to let the parser speak in the user's
|
||||
native language.
|
||||
* Parser Function:: How to call @code{yyparse} and what it returns.
|
||||
* Push Parser Function:: How to call @code{yypush_parse} and what it returns.
|
||||
* Pull Parser Function:: How to call @code{yypull_parse} and what it returns.
|
||||
* Parser Create Function:: How to call @code{yypstate_new} and what it returns.
|
||||
* Parser Delete Function:: How to call @code{yypstate_delete} and what it returns.
|
||||
* Lexical:: You must supply a function @code{yylex}
|
||||
which reads tokens.
|
||||
* Error Reporting:: You must supply a function @code{yyerror}.
|
||||
* Action Features:: Special features for use in actions.
|
||||
* Internationalization:: How to let the parser speak in the user's
|
||||
native language.
|
||||
|
||||
The Lexical Analyzer Function @code{yylex}
|
||||
|
||||
* Calling Convention:: How @code{yyparse} calls @code{yylex}.
|
||||
* Token Values:: How @code{yylex} must return the semantic value
|
||||
of the token it has read.
|
||||
* Token Locations:: How @code{yylex} must return the text location
|
||||
(line number, etc.) of the token, if the
|
||||
actions want that.
|
||||
* Pure Calling:: How the calling convention differs
|
||||
in a pure parser (@pxref{Pure Decl, ,A Pure (Reentrant) Parser}).
|
||||
* Token Values:: How @code{yylex} must return the semantic value
|
||||
of the token it has read.
|
||||
* Token Locations:: How @code{yylex} must return the text location
|
||||
(line number, etc.) of the token, if the
|
||||
actions want that.
|
||||
* Pure Calling:: How the calling convention differs in a pure parser
|
||||
(@pxref{Pure Decl, ,A Pure (Reentrant) Parser}).
|
||||
|
||||
The Bison Parser Algorithm
|
||||
|
||||
@@ -257,7 +260,7 @@ The Bison Parser Algorithm
|
||||
* Contextual Precedence:: When an operator's precedence depends on context.
|
||||
* Parser States:: The parser is a finite-state-machine with stack.
|
||||
* Reduce/Reduce:: When two rules are applicable in the same situation.
|
||||
* Mystery Conflicts:: Reduce/reduce conflicts that look unjustified.
|
||||
* Mystery Conflicts:: Reduce/reduce conflicts that look unjustified.
|
||||
* Generalized LR Parsing:: Parsing arbitrary context-free grammars.
|
||||
* Memory Management:: What happens when memory is exhausted. How to avoid it.
|
||||
|
||||
@@ -311,33 +314,33 @@ A Complete C++ Example
|
||||
|
||||
Java Parsers
|
||||
|
||||
* Java Bison Interface:: Asking for Java parser generation
|
||||
* Java Semantic Values:: %type and %token vs. Java
|
||||
* Java Location Values:: The position and location classes
|
||||
* Java Parser Interface:: Instantiating and running the parser
|
||||
* Java Scanner Interface:: Specifying the scanner for the parser
|
||||
* Java Action Features:: Special features for use in actions.
|
||||
* Java Differences:: Differences between C/C++ and Java Grammars
|
||||
* Java Declarations Summary:: List of Bison declarations used with Java
|
||||
* Java Bison Interface:: Asking for Java parser generation
|
||||
* Java Semantic Values:: %type and %token vs. Java
|
||||
* Java Location Values:: The position and location classes
|
||||
* Java Parser Interface:: Instantiating and running the parser
|
||||
* Java Scanner Interface:: Specifying the scanner for the parser
|
||||
* Java Action Features:: Special features for use in actions
|
||||
* Java Differences:: Differences between C/C++ and Java Grammars
|
||||
* Java Declarations Summary:: List of Bison declarations used with Java
|
||||
|
||||
Frequently Asked Questions
|
||||
|
||||
* Memory Exhausted:: Breaking the Stack Limits
|
||||
* How Can I Reset the Parser:: @code{yyparse} Keeps some State
|
||||
* Strings are Destroyed:: @code{yylval} Loses Track of Strings
|
||||
* Implementing Gotos/Loops:: Control Flow in the Calculator
|
||||
* Multiple start-symbols:: Factoring closely related grammars
|
||||
* Secure? Conform?:: Is Bison @acronym{POSIX} safe?
|
||||
* I can't build Bison:: Troubleshooting
|
||||
* Where can I find help?:: Troubleshouting
|
||||
* Bug Reports:: Troublereporting
|
||||
* Other Languages:: Parsers in Java and others
|
||||
* Beta Testing:: Experimenting development versions
|
||||
* Mailing Lists:: Meeting other Bison users
|
||||
* Memory Exhausted:: Breaking the Stack Limits
|
||||
* How Can I Reset the Parser:: @code{yyparse} Keeps some State
|
||||
* Strings are Destroyed:: @code{yylval} Loses Track of Strings
|
||||
* Implementing Gotos/Loops:: Control Flow in the Calculator
|
||||
* Multiple start-symbols:: Factoring closely related grammars
|
||||
* Secure? Conform?:: Is Bison @acronym{POSIX} safe?
|
||||
* I can't build Bison:: Troubleshooting
|
||||
* Where can I find help?:: Troubleshouting
|
||||
* Bug Reports:: Troublereporting
|
||||
* More Languages:: Parsers in C++, Java, and so on
|
||||
* Beta Testing:: Experimenting development versions
|
||||
* Mailing Lists:: Meeting other Bison users
|
||||
|
||||
Copying This Manual
|
||||
|
||||
* Copying This Manual:: License for copying this manual.
|
||||
* Copying This Manual:: License for copying this manual.
|
||||
|
||||
@end detailmenu
|
||||
@end menu
|
||||
@@ -417,19 +420,19 @@ details of Bison will not make sense. If you do not already know how to
|
||||
use Bison or Yacc, we suggest you start by reading this chapter carefully.
|
||||
|
||||
@menu
|
||||
* Language and Grammar:: Languages and context-free grammars,
|
||||
as mathematical ideas.
|
||||
* Grammar in Bison:: How we represent grammars for Bison's sake.
|
||||
* Semantic Values:: Each token or syntactic grouping can have
|
||||
a semantic value (the value of an integer,
|
||||
the name of an identifier, etc.).
|
||||
* Semantic Actions:: Each rule can have an action containing C code.
|
||||
* GLR Parsers:: Writing parsers for general context-free languages.
|
||||
* Locations Overview:: Tracking Locations.
|
||||
* Bison Parser:: What are Bison's input and output,
|
||||
how is the output used?
|
||||
* Stages:: Stages in writing and running Bison grammars.
|
||||
* Grammar Layout:: Overall structure of a Bison grammar file.
|
||||
* Language and Grammar:: Languages and context-free grammars,
|
||||
as mathematical ideas.
|
||||
* Grammar in Bison:: How we represent grammars for Bison's sake.
|
||||
* Semantic Values:: Each token or syntactic grouping can have
|
||||
a semantic value (the value of an integer,
|
||||
the name of an identifier, etc.).
|
||||
* Semantic Actions:: Each rule can have an action containing C code.
|
||||
* GLR Parsers:: Writing parsers for general context-free languages.
|
||||
* Locations Overview:: Tracking Locations.
|
||||
* Bison Parser:: What are Bison's input and output,
|
||||
how is the output used?
|
||||
* Stages:: Stages in writing and running Bison grammars.
|
||||
* Grammar Layout:: Overall structure of a Bison grammar file.
|
||||
@end menu
|
||||
|
||||
@node Language and Grammar
|
||||
@@ -745,10 +748,10 @@ user-defined function on the resulting values to produce an arbitrary
|
||||
merged result.
|
||||
|
||||
@menu
|
||||
* Simple GLR Parsers:: Using @acronym{GLR} parsers on unambiguous grammars.
|
||||
* Merging GLR Parses:: Using @acronym{GLR} parsers to resolve ambiguities.
|
||||
* GLR Semantic Actions:: Deferred semantic actions have special concerns.
|
||||
* Compiler Requirements:: @acronym{GLR} parsers require a modern C compiler.
|
||||
* Simple GLR Parsers:: Using @acronym{GLR} parsers on unambiguous grammars.
|
||||
* Merging GLR Parses:: Using @acronym{GLR} parsers to resolve ambiguities.
|
||||
* GLR Semantic Actions:: Deferred semantic actions have special concerns.
|
||||
* Compiler Requirements:: @acronym{GLR} parsers require a modern C compiler.
|
||||
@end menu
|
||||
|
||||
@node Simple GLR Parsers
|
||||
@@ -1376,15 +1379,15 @@ languages are written the same way. You can copy these examples into a
|
||||
source file to try them.
|
||||
|
||||
@menu
|
||||
* RPN Calc:: Reverse polish notation calculator;
|
||||
a first example with no operator precedence.
|
||||
* Infix Calc:: Infix (algebraic) notation calculator.
|
||||
Operator precedence is introduced.
|
||||
* RPN Calc:: Reverse polish notation calculator;
|
||||
a first example with no operator precedence.
|
||||
* Infix Calc:: Infix (algebraic) notation calculator.
|
||||
Operator precedence is introduced.
|
||||
* Simple Error Recovery:: Continuing after syntax errors.
|
||||
* Location Tracking Calc:: Demonstrating the use of @@@var{n} and @@$.
|
||||
* Multi-function Calc:: Calculator with memory and trig functions.
|
||||
It uses multiple data-types for semantic values.
|
||||
* Exercises:: Ideas for improving the multi-function calculator.
|
||||
* Multi-function Calc:: Calculator with memory and trig functions.
|
||||
It uses multiple data-types for semantic values.
|
||||
* Exercises:: Ideas for improving the multi-function calculator.
|
||||
@end menu
|
||||
|
||||
@node RPN Calc
|
||||
@@ -1403,16 +1406,16 @@ The source code for this calculator is named @file{rpcalc.y}. The
|
||||
@samp{.y} extension is a convention used for Bison input files.
|
||||
|
||||
@menu
|
||||
* Decls: Rpcalc Decls. Prologue (declarations) for rpcalc.
|
||||
* Rules: Rpcalc Rules. Grammar Rules for rpcalc, with explanation.
|
||||
* Lexer: Rpcalc Lexer. The lexical analyzer.
|
||||
* Main: Rpcalc Main. The controlling function.
|
||||
* Error: Rpcalc Error. The error reporting function.
|
||||
* Gen: Rpcalc Gen. Running Bison on the grammar file.
|
||||
* Comp: Rpcalc Compile. Run the C compiler on the output code.
|
||||
* Rpcalc Declarations:: Prologue (declarations) for rpcalc.
|
||||
* Rpcalc Rules:: Grammar Rules for rpcalc, with explanation.
|
||||
* Rpcalc Lexer:: The lexical analyzer.
|
||||
* Rpcalc Main:: The controlling function.
|
||||
* Rpcalc Error:: The error reporting function.
|
||||
* Rpcalc Generate:: Running Bison on the grammar file.
|
||||
* Rpcalc Compile:: Run the C compiler on the output code.
|
||||
@end menu
|
||||
|
||||
@node Rpcalc Decls
|
||||
@node Rpcalc Declarations
|
||||
@subsection Declarations for @code{rpcalc}
|
||||
|
||||
Here are the C and Bison declarations for the reverse polish notation
|
||||
@@ -1662,7 +1665,7 @@ therefore, @code{NUM} becomes a macro for @code{yylex} to use.
|
||||
The semantic value of the token (if it has one) is stored into the
|
||||
global variable @code{yylval}, which is where the Bison parser will look
|
||||
for it. (The C data type of @code{yylval} is @code{YYSTYPE}, which was
|
||||
defined at the beginning of the grammar; @pxref{Rpcalc Decls,
|
||||
defined at the beginning of the grammar; @pxref{Rpcalc Declarations,
|
||||
,Declarations for @code{rpcalc}}.)
|
||||
|
||||
A token type code of zero is returned if the end-of-input is encountered.
|
||||
@@ -1758,7 +1761,7 @@ have not written any error rules in this example, so any invalid input will
|
||||
cause the calculator program to exit. This is not clean behavior for a
|
||||
real calculator, but it is adequate for the first example.
|
||||
|
||||
@node Rpcalc Gen
|
||||
@node Rpcalc Generate
|
||||
@subsection Running Bison to Make the Parser
|
||||
@cindex running Bison (introduction)
|
||||
|
||||
@@ -1977,12 +1980,12 @@ most of the work needed to use locations will be done in the lexical
|
||||
analyzer.
|
||||
|
||||
@menu
|
||||
* Decls: Ltcalc Decls. Bison and C declarations for ltcalc.
|
||||
* Rules: Ltcalc Rules. Grammar rules for ltcalc, with explanations.
|
||||
* Lexer: Ltcalc Lexer. The lexical analyzer.
|
||||
* Ltcalc Declarations:: Bison and C declarations for ltcalc.
|
||||
* Ltcalc Rules:: Grammar rules for ltcalc, with explanations.
|
||||
* Ltcalc Lexer:: The lexical analyzer.
|
||||
@end menu
|
||||
|
||||
@node Ltcalc Decls
|
||||
@node Ltcalc Declarations
|
||||
@subsection Declarations for @code{ltcalc}
|
||||
|
||||
The C and Bison declarations for the location tracking calculator are
|
||||
@@ -2218,12 +2221,12 @@ $
|
||||
Note that multiple assignment and nested function calls are permitted.
|
||||
|
||||
@menu
|
||||
* Decl: Mfcalc Decl. Bison declarations for multi-function calculator.
|
||||
* Rules: Mfcalc Rules. Grammar rules for the calculator.
|
||||
* Symtab: Mfcalc Symtab. Symbol table management subroutines.
|
||||
* Mfcalc Declarations:: Bison declarations for multi-function calculator.
|
||||
* Mfcalc Rules:: Grammar rules for the calculator.
|
||||
* Mfcalc Symbol Table:: Symbol table management subroutines.
|
||||
@end menu
|
||||
|
||||
@node Mfcalc Decl
|
||||
@node Mfcalc Declarations
|
||||
@subsection Declarations for @code{mfcalc}
|
||||
|
||||
Here are the C and Bison declarations for the multi-function calculator.
|
||||
@@ -2319,7 +2322,7 @@ exp: NUM @{ $$ = $1; @}
|
||||
%%
|
||||
@end smallexample
|
||||
|
||||
@node Mfcalc Symtab
|
||||
@node Mfcalc Symbol Table
|
||||
@subsection The @code{mfcalc} Symbol Table
|
||||
@cindex symbol table example
|
||||
|
||||
@@ -2632,11 +2635,11 @@ As a @acronym{GNU} extension, @samp{//} introduces a comment that
|
||||
continues until end of line.
|
||||
|
||||
@menu
|
||||
* Prologue:: Syntax and usage of the prologue.
|
||||
* Prologue:: Syntax and usage of the prologue.
|
||||
* Prologue Alternatives:: Syntax and usage of alternatives to the prologue.
|
||||
* Bison Declarations:: Syntax and usage of the Bison declarations section.
|
||||
* Grammar Rules:: Syntax and usage of the grammar rules section.
|
||||
* Epilogue:: Syntax and usage of the epilogue.
|
||||
* Bison Declarations:: Syntax and usage of the Bison declarations section.
|
||||
* Grammar Rules:: Syntax and usage of the grammar rules section.
|
||||
* Epilogue:: Syntax and usage of the epilogue.
|
||||
@end menu
|
||||
|
||||
@node Prologue
|
||||
@@ -2700,9 +2703,6 @@ feature test macros can affect the behavior of Bison-generated
|
||||
@findex %code requires
|
||||
@findex %code provides
|
||||
@findex %code top
|
||||
(The prologue alternatives described here are experimental.
|
||||
More user feedback will help to determine whether they should become permanent
|
||||
features.)
|
||||
|
||||
The functionality of @var{Prologue} sections can often be subtle and
|
||||
inflexible.
|
||||
@@ -3799,8 +3799,11 @@ typedef struct YYLTYPE
|
||||
@} YYLTYPE;
|
||||
@end example
|
||||
|
||||
At the beginning of the parsing, Bison initializes all these fields to 1
|
||||
for @code{yylloc}.
|
||||
When @code{YYLTYPE} is not defined, at the beginning of the parsing, Bison
|
||||
initializes all these fields to 1 for @code{yylloc}. To initialize
|
||||
@code{yylloc} with a custom location type (or to chose a different
|
||||
initialization), use the @code{%initial-action} directive. @xref{Initial
|
||||
Action Decl, , Performing Actions before Parsing}.
|
||||
|
||||
@node Actions and Locations
|
||||
@subsection Actions and Locations
|
||||
@@ -4737,10 +4740,6 @@ Thus, @code{%code} replaces the traditional Yacc prologue,
|
||||
For a detailed discussion, see @ref{Prologue Alternatives}.
|
||||
|
||||
For Java, the default location is inside the parser class.
|
||||
|
||||
(Like all the Yacc prologue alternatives, this directive is experimental.
|
||||
More user feedback will help to determine whether it should become a permanent
|
||||
feature.)
|
||||
@end deffn
|
||||
|
||||
@deffn {Directive} %code @var{qualifier} @{@var{code}@}
|
||||
@@ -4818,10 +4817,6 @@ before any class definitions.
|
||||
@end itemize
|
||||
@end itemize
|
||||
|
||||
(Like all the Yacc prologue alternatives, this directive is experimental.
|
||||
More user feedback will help to determine whether it should become a permanent
|
||||
feature.)
|
||||
|
||||
@cindex Prologue
|
||||
For a detailed discussion of how to use @code{%code} in place of the
|
||||
traditional Yacc prologue for C/C++, see @ref{Prologue Alternatives}.
|
||||
@@ -4830,8 +4825,8 @@ traditional Yacc prologue for C/C++, see @ref{Prologue Alternatives}.
|
||||
@deffn {Directive} %debug
|
||||
In the parser file, define the macro @code{YYDEBUG} to 1 if it is not
|
||||
already defined, so that the debugging facilities are compiled.
|
||||
@end deffn
|
||||
@xref{Tracing, ,Tracing Your Parser}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Directive} %define @var{variable}
|
||||
@deffnx {Directive} %define @var{variable} "@var{value}"
|
||||
@@ -5221,19 +5216,17 @@ identifier (aside from those in this manual) in an action or in epilogue
|
||||
in the grammar file, you are likely to run into trouble.
|
||||
|
||||
@menu
|
||||
* Parser Function:: How to call @code{yyparse} and what it returns.
|
||||
* Push Parser Function:: How to call @code{yypush_parse} and what it returns.
|
||||
* Pull Parser Function:: How to call @code{yypull_parse} and what it returns.
|
||||
* Parser Create Function:: How to call @code{yypstate_new} and what it
|
||||
returns.
|
||||
* Parser Delete Function:: How to call @code{yypstate_delete} and what it
|
||||
returns.
|
||||
* Lexical:: You must supply a function @code{yylex}
|
||||
which reads tokens.
|
||||
* Error Reporting:: You must supply a function @code{yyerror}.
|
||||
* Action Features:: Special features for use in actions.
|
||||
* Internationalization:: How to let the parser speak in the user's
|
||||
native language.
|
||||
* Parser Function:: How to call @code{yyparse} and what it returns.
|
||||
* Push Parser Function:: How to call @code{yypush_parse} and what it returns.
|
||||
* Pull Parser Function:: How to call @code{yypull_parse} and what it returns.
|
||||
* Parser Create Function:: How to call @code{yypstate_new} and what it returns.
|
||||
* Parser Delete Function:: How to call @code{yypstate_delete} and what it returns.
|
||||
* Lexical:: You must supply a function @code{yylex}
|
||||
which reads tokens.
|
||||
* Error Reporting:: You must supply a function @code{yyerror}.
|
||||
* Action Features:: Special features for use in actions.
|
||||
* Internationalization:: How to let the parser speak in the user's
|
||||
native language.
|
||||
@end menu
|
||||
|
||||
@node Parser Function
|
||||
@@ -5357,7 +5350,7 @@ This function is available if either the @code{%define api.push_pull "push"} or
|
||||
@xref{Push Decl, ,A Push Parser}.
|
||||
|
||||
@deftypefun yypstate *yypstate_new (void)
|
||||
The fuction will return a valid parser instance if there was memory available
|
||||
The function will return a valid parser instance if there was memory available
|
||||
or 0 if no memory was available.
|
||||
In impure mode, it will also return 0 if a parser instance is currently
|
||||
allocated.
|
||||
@@ -5400,13 +5393,13 @@ that need it. @xref{Invocation, ,Invoking Bison}.
|
||||
|
||||
@menu
|
||||
* Calling Convention:: How @code{yyparse} calls @code{yylex}.
|
||||
* Token Values:: How @code{yylex} must return the semantic value
|
||||
of the token it has read.
|
||||
* Token Locations:: How @code{yylex} must return the text location
|
||||
(line number, etc.) of the token, if the
|
||||
actions want that.
|
||||
* Pure Calling:: How the calling convention differs
|
||||
in a pure parser (@pxref{Pure Decl, ,A Pure (Reentrant) Parser}).
|
||||
* Token Values:: How @code{yylex} must return the semantic value
|
||||
of the token it has read.
|
||||
* Token Locations:: How @code{yylex} must return the text location
|
||||
(line number, etc.) of the token, if the
|
||||
actions want that.
|
||||
* Pure Calling:: How the calling convention differs in a pure parser
|
||||
(@pxref{Pure Decl, ,A Pure (Reentrant) Parser}).
|
||||
@end menu
|
||||
|
||||
@node Calling Convention
|
||||
@@ -6049,7 +6042,7 @@ This kind of parser is known in the literature as a bottom-up parser.
|
||||
* Contextual Precedence:: When an operator's precedence depends on context.
|
||||
* Parser States:: The parser is a finite-state-machine with stack.
|
||||
* Reduce/Reduce:: When two rules are applicable in the same situation.
|
||||
* Mystery Conflicts:: Reduce/reduce conflicts that look unjustified.
|
||||
* Mystery Conflicts:: Reduce/reduce conflicts that look unjustified.
|
||||
* Generalized LR Parsing:: Parsing arbitrary context-free grammars.
|
||||
* Memory Management:: What happens when memory is exhausted. How to avoid it.
|
||||
@end menu
|
||||
@@ -6814,7 +6807,7 @@ that allows variable-length arrays. The default is 200.
|
||||
Do not allow @code{YYINITDEPTH} to be greater than @code{YYMAXDEPTH}.
|
||||
|
||||
@c FIXME: C++ output.
|
||||
Because of semantical differences between C and C++, the
|
||||
Because of semantic differences between C and C++, the
|
||||
@acronym{LALR}(1) parsers in C produced by Bison cannot grow when compiled
|
||||
by C++ compilers. In this precise case (compiling a C parser as C++) you are
|
||||
suggested to grow @code{YYINITDEPTH}. The Bison maintainers hope to fix
|
||||
@@ -7653,7 +7646,7 @@ standard I/O stream, the numeric code for the token type, and the token
|
||||
value (from @code{yylval}).
|
||||
|
||||
Here is an example of @code{YYPRINT} suitable for the multi-function
|
||||
calculator (@pxref{Mfcalc Decl, ,Declarations for @code{mfcalc}}):
|
||||
calculator (@pxref{Mfcalc Declarations, ,Declarations for @code{mfcalc}}):
|
||||
|
||||
@smallexample
|
||||
%@{
|
||||
@@ -7781,8 +7774,8 @@ traditional Yacc grammars. If your grammar uses a Bison extension
|
||||
like @samp{%glr-parser}, Bison might not be Yacc-compatible even if
|
||||
this option is specified.
|
||||
|
||||
@item -W
|
||||
@itemx --warnings
|
||||
@item -W [@var{category}]
|
||||
@itemx --warnings[=@var{category}]
|
||||
Output warnings falling in @var{category}. @var{category} can be one
|
||||
of:
|
||||
@table @code
|
||||
@@ -8453,7 +8446,7 @@ global variables.
|
||||
|
||||
@noindent
|
||||
Then we request the location tracking feature, and initialize the
|
||||
first location's file name. Afterwards new locations are computed
|
||||
first location's file name. Afterward new locations are computed
|
||||
relatively to the previous locations: the file name will be
|
||||
automatically propagated.
|
||||
|
||||
@@ -8584,8 +8577,8 @@ parser's to get the set of defined tokens.
|
||||
@example
|
||||
%@{ /* -*- C++ -*- */
|
||||
# include <cstdlib>
|
||||
# include <errno.h>
|
||||
# include <limits.h>
|
||||
# include <cerrno>
|
||||
# include <climits>
|
||||
# include <string>
|
||||
# include "calc++-driver.hh"
|
||||
# include "calc++-parser.hh"
|
||||
@@ -8728,14 +8721,14 @@ main (int argc, char *argv[])
|
||||
@section Java Parsers
|
||||
|
||||
@menu
|
||||
* Java Bison Interface:: Asking for Java parser generation
|
||||
* Java Semantic Values:: %type and %token vs. Java
|
||||
* Java Location Values:: The position and location classes
|
||||
* Java Parser Interface:: Instantiating and running the parser
|
||||
* Java Scanner Interface:: Specifying the scanner for the parser
|
||||
* Java Action Features:: Special features for use in actions.
|
||||
* Java Differences:: Differences between C/C++ and Java Grammars
|
||||
* Java Declarations Summary:: List of Bison declarations used with Java
|
||||
* Java Bison Interface:: Asking for Java parser generation
|
||||
* Java Semantic Values:: %type and %token vs. Java
|
||||
* Java Location Values:: The position and location classes
|
||||
* Java Parser Interface:: Instantiating and running the parser
|
||||
* Java Scanner Interface:: Specifying the scanner for the parser
|
||||
* Java Action Features:: Special features for use in actions
|
||||
* Java Differences:: Differences between C/C++ and Java Grammars
|
||||
* Java Declarations Summary:: List of Bison declarations used with Java
|
||||
@end menu
|
||||
|
||||
@node Java Bison Interface
|
||||
@@ -8987,7 +8980,7 @@ changed using @code{%define location_type "@var{class-name}".}
|
||||
|
||||
@deftypemethod {Lexer} {int} yylex ()
|
||||
Return the next token. Its type is the return value, its semantic
|
||||
value and location are saved and returned by the ther methods in the
|
||||
value and location are saved and returned by the their methods in the
|
||||
interface.
|
||||
|
||||
Use @code{%define lex_throws} to specify any uncaught exceptions.
|
||||
@@ -9005,7 +8998,7 @@ The return type can be changed using @code{%define position_type
|
||||
@end deftypemethod
|
||||
|
||||
@deftypemethod {Lexer} {Object} getLVal ()
|
||||
Return the semantical value of the last token that yylex returned.
|
||||
Return the semantic value of the last token that yylex returned.
|
||||
|
||||
The return type can be changed using @code{%define stype
|
||||
"@var{class-name}".}
|
||||
@@ -9075,11 +9068,6 @@ Start error recovery without printing an error message.
|
||||
@xref{Error Recovery}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Statement} {return YYFAIL;}
|
||||
Print an error message and start error recovery.
|
||||
@xref{Error Recovery}.
|
||||
@end deffn
|
||||
|
||||
@deftypefn {Function} {boolean} recovering ()
|
||||
Return whether error recovery is being done. In this state, the parser
|
||||
reads token until it reaches a known state, and then restarts normal
|
||||
@@ -9121,7 +9109,7 @@ corresponds to these C macros.}.
|
||||
@item
|
||||
Java lacks unions, so @code{%union} has no effect. Instead, semantic
|
||||
values have a common base type: @code{Object} or as specified by
|
||||
@code{%define stype}. Angle backets on @code{%token}, @code{type},
|
||||
@samp{%define stype}. Angle brackets on @code{%token}, @code{type},
|
||||
@code{$@var{n}} and @code{$$} specify subtypes rather than fields of
|
||||
an union. The type of @code{$$}, even with angle brackets, is the base
|
||||
type since Java casts are not allow on the left-hand side of assignments.
|
||||
@@ -9130,7 +9118,7 @@ left-hand side of assignments. See @pxref{Java Semantic Values} and
|
||||
@pxref{Java Action Features}.
|
||||
|
||||
@item
|
||||
The prolog declarations have a different meaning than in C/C++ code.
|
||||
The prologue declarations have a different meaning than in C/C++ code.
|
||||
@table @asis
|
||||
@item @code{%code imports}
|
||||
blocks are placed at the beginning of the Java source code. They may
|
||||
@@ -9776,10 +9764,6 @@ Insert @var{code} verbatim into output parser source.
|
||||
Equip the parser for debugging. @xref{Decl Summary}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Directive} %debug
|
||||
Equip the parser for debugging. @xref{Decl Summary}.
|
||||
@end deffn
|
||||
|
||||
@ifset defaultprec
|
||||
@deffn {Directive} %default-prec
|
||||
Assign a precedence to rules that lack an explicit @samp{%prec}
|
||||
@@ -10352,12 +10336,16 @@ grammatically indivisible. The piece of text it represents is a token.
|
||||
|
||||
@bye
|
||||
|
||||
@c Local Variables:
|
||||
@c fill-column: 76
|
||||
@c End:
|
||||
|
||||
@c LocalWords: texinfo setfilename settitle setchapternewpage finalout
|
||||
@c LocalWords: ifinfo smallbook shorttitlepage titlepage GPL FIXME iftex
|
||||
@c LocalWords: akim fn cp syncodeindex vr tp synindex dircategory direntry
|
||||
@c LocalWords: ifset vskip pt filll insertcopying sp ISBN Etienne Suvasa
|
||||
@c LocalWords: ifnottex yyparse detailmenu GLR RPN Calc var Decls Rpcalc
|
||||
@c LocalWords: rpcalc Lexer Gen Comp Expr ltcalc mfcalc Decl Symtab yylex
|
||||
@c LocalWords: rpcalc Lexer Expr ltcalc mfcalc yylex
|
||||
@c LocalWords: yyerror pxref LR yylval cindex dfn LALR samp gpl BNF xref
|
||||
@c LocalWords: const int paren ifnotinfo AC noindent emph expr stmt findex
|
||||
@c LocalWords: glr YYSTYPE TYPENAME prog dprec printf decl init stmtMerge
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
\def\finalout{\overfullrule=0pt}
|
||||
%\finalout
|
||||
|
||||
% Copyright (c) 1998, 2001 Free Software Foundation, Inc.
|
||||
% Copyright (c) 1998, 2001, 2009-2010 Free Software Foundation, Inc.
|
||||
%
|
||||
% This file is part of Bison.
|
||||
%
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
## Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2006, 2009-2010 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
@@ -19,7 +19,7 @@ straightforward use of _build/src/bison would.)
|
||||
|
||||
--
|
||||
|
||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
#! /usr/bin/perl -w
|
||||
|
||||
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006, 2008-2010 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of Bison, the GNU Compiler Compiler.
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
## Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2005, 2009-2010 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,5 +1,5 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
## Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2005-2006, 2009-2010 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
|
||||
@@ -31,12 +31,16 @@ $(BISON): $(BISON_IN)
|
||||
doc = $(top_srcdir)/doc/bison.texinfo
|
||||
extexi = $(top_srcdir)/examples/extexi
|
||||
# Extract in src.
|
||||
$(calc_extracted): $(doc) $(extexi)
|
||||
$(srcdir)/calc.stamp: $(doc) $(extexi)
|
||||
rm -f $@ $@.tmp
|
||||
touch $@.tmp
|
||||
cd $(srcdir) && \
|
||||
$(AWK) -f ../extexi -v VERSION="$(VERSION)" \
|
||||
../../doc/bison.texinfo -- calc++-parser.yy \
|
||||
calc++-scanner.ll calc++.cc calc++-driver.hh calc++-driver.cc
|
||||
mv $@.tmp $@
|
||||
|
||||
$(calc_extracted): $(srcdir)/calc.stamp
|
||||
|
||||
## ------------------- ##
|
||||
## Parser generation. ##
|
||||
@@ -50,7 +54,10 @@ MAINTAINERCLEANFILES = $(srcdir)/*.stamp $(BUILT_SOURCES)
|
||||
# Compile the parser and save cycles.
|
||||
# This code comes from "Handling Tools that Produce Many Outputs",
|
||||
# from the Automake documentation.
|
||||
EXTRA_DIST = $(srcdir)/calc++-parser.stamp $(srcdir)/calc++-parser.yy
|
||||
EXTRA_DIST = \
|
||||
$(srcdir)/calc++-parser.stamp \
|
||||
$(srcdir)/calc++-parser.yy \
|
||||
$(srcdir)/calc.stamp
|
||||
# Don't depend on $(BISON) otherwise we would rebuild these files
|
||||
# in srcdir, including during distcheck, which is forbidden.
|
||||
$(srcdir)/calc++-parser.stamp: $(srcdir)/calc++-parser.yy $(BISON_IN)
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
# Extract all examples from the manual source. -*- AWK -*-
|
||||
|
||||
# This file is part of GNU Bison
|
||||
# Copyright 1992, 2000, 2001, 2005, 2006 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 2000-2001, 2005-2006, 2009-2010 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
Submodule gnulib updated: cdccece581...102c411be0
@@ -3,7 +3,9 @@ Makefile
|
||||
Makefile.in
|
||||
argmatch.c
|
||||
argmatch.h
|
||||
basename-lgpl.c
|
||||
basename.c
|
||||
bitrotate.h
|
||||
c-ctype.c
|
||||
c-ctype.h
|
||||
c-strcase.h
|
||||
@@ -14,22 +16,30 @@ config.charset
|
||||
config.h
|
||||
config.hin
|
||||
configmake.h
|
||||
dirname-lgpl.c
|
||||
dirname.c
|
||||
dirname.h
|
||||
dup-safer.c
|
||||
dup2.c
|
||||
errno.h
|
||||
errno.in.h
|
||||
error.c
|
||||
error.h
|
||||
exitfail.c
|
||||
exitfail.h
|
||||
fcntl.c
|
||||
fcntl.h
|
||||
fcntl.in.h
|
||||
fd-safer.c
|
||||
fopen-safer.c
|
||||
fopen.c
|
||||
getopt.c
|
||||
getopt.h
|
||||
getopt.in.h
|
||||
getopt1.c
|
||||
getopt_.h
|
||||
getopt_int.h
|
||||
getpagesize.c
|
||||
gettext.h
|
||||
gnulib.mk
|
||||
hash.c
|
||||
@@ -41,8 +51,12 @@ inttypes_.h
|
||||
localcharset.c
|
||||
localcharset.h
|
||||
malloc.c
|
||||
mbrtowc.c
|
||||
mbsinit.c
|
||||
mbswidth.c
|
||||
mbswidth.h
|
||||
memchr.c
|
||||
memchr.valgrind
|
||||
obstack.c
|
||||
obstack.h
|
||||
pipe-safer.c
|
||||
@@ -58,11 +72,16 @@ stamp-h1
|
||||
stdbool.h
|
||||
stdbool.in.h
|
||||
stdbool_.h
|
||||
stddef.h
|
||||
stddef.in.h
|
||||
stdint.h
|
||||
stdint.in.h
|
||||
stdint_.h
|
||||
stdio--.h
|
||||
stdio-safer.h
|
||||
stdio-write.c
|
||||
stdio.h
|
||||
stdio.in.h
|
||||
stdlib.h
|
||||
stdlib.in.h
|
||||
stdlib_.h
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
/Makefile.in
|
||||
/argmatch.c
|
||||
/argmatch.h
|
||||
/basename-lgpl.c
|
||||
/basename.c
|
||||
/bitrotate.h
|
||||
/c-ctype.c
|
||||
/c-ctype.h
|
||||
/c-strcase.h
|
||||
@@ -17,22 +19,30 @@
|
||||
/config.h
|
||||
/config.hin
|
||||
/configmake.h
|
||||
/dirname-lgpl.c
|
||||
/dirname.c
|
||||
/dirname.h
|
||||
/dup-safer.c
|
||||
/dup2.c
|
||||
/errno.h
|
||||
/errno.in.h
|
||||
/error.c
|
||||
/error.h
|
||||
/exitfail.c
|
||||
/exitfail.h
|
||||
/fcntl.c
|
||||
/fcntl.h
|
||||
/fcntl.in.h
|
||||
/fd-safer.c
|
||||
/fopen-safer.c
|
||||
/fopen.c
|
||||
/getopt.c
|
||||
/getopt.h
|
||||
/getopt.in.h
|
||||
/getopt1.c
|
||||
/getopt_.h
|
||||
/getopt_int.h
|
||||
/getpagesize.c
|
||||
/gettext.h
|
||||
/gnulib.mk
|
||||
/hash.c
|
||||
@@ -44,8 +54,12 @@
|
||||
/localcharset.c
|
||||
/localcharset.h
|
||||
/malloc.c
|
||||
/mbrtowc.c
|
||||
/mbsinit.c
|
||||
/mbswidth.c
|
||||
/mbswidth.h
|
||||
/memchr.c
|
||||
/memchr.valgrind
|
||||
/obstack.c
|
||||
/obstack.h
|
||||
/pipe-safer.c
|
||||
@@ -61,11 +75,16 @@
|
||||
/stdbool.h
|
||||
/stdbool.in.h
|
||||
/stdbool_.h
|
||||
/stddef.h
|
||||
/stddef.in.h
|
||||
/stdint.h
|
||||
/stdint.in.h
|
||||
/stdint_.h
|
||||
/stdio--.h
|
||||
/stdio-safer.h
|
||||
/stdio-write.c
|
||||
/stdio.h
|
||||
/stdio.in.h
|
||||
/stdlib.h
|
||||
/stdlib.in.h
|
||||
/stdlib_.h
|
||||
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
# Make bison/lib.
|
||||
|
||||
# Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2004, 2006, 2008-2010 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,7 +18,7 @@
|
||||
|
||||
include gnulib.mk
|
||||
|
||||
AM_CFLAGS = $(WARNING_CFLAGS)
|
||||
AM_CFLAGS += $(WARN_CFLAGS)
|
||||
|
||||
# Implementation of bitsets.
|
||||
bitsets_sources = \
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
/* Array bitsets.
|
||||
Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2003, 2006, 2009-2010 Free Software Foundation,
|
||||
Inc.
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/* Functions to support abitsets.
|
||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2009-2010 Free Software Foundation, Inc.
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
/* Base bitset stuff.
|
||||
Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2004, 2006, 2009-2010 Free Software Foundation,
|
||||
Inc.
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/* General bitsets.
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2006, 2009-2010 Free Software Foundation, Inc.
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/* Generic bitsets.
|
||||
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2004, 2009-2010 Free Software Foundation, Inc.
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/* Bitset statistics.
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2006, 2009-2010 Free Software Foundation, Inc.
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/* Functions to support bitset statistics.
|
||||
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2004, 2009-2010 Free Software Foundation, Inc.
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
/* Bitset vectors.
|
||||
Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2001-2002, 2004, 2006, 2009-2010 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
@@ -1,5 +1,5 @@
|
||||
/* Bitset vectors.
|
||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2009-2010 Free Software Foundation, Inc.
|
||||
Contributed by Akim Demaille (akim@freefriends.org).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
/* Bitset vectors.
|
||||
Copyright (C) 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2001-2002, 2004-2006, 2009-2010 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
@@ -1,5 +1,5 @@
|
||||
/* Bitset vectors.
|
||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2009-2010 Free Software Foundation, Inc.
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/* Functions to support expandable bitsets.
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2006, 2009-2010 Free Software Foundation, Inc.
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/* Functions to support ebitsets.
|
||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2009-2010 Free Software Foundation, Inc.
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* get-errno.c - get and set errno.
|
||||
|
||||
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2006, 2009-2010 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
@@ -1,6 +1,6 @@
|
||||
/* get-errno.h - get and set errno.
|
||||
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2009-2010 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
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
/* Functions to support link list bitsets.
|
||||
Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2004, 2006, 2009-2010 Free Software Foundation,
|
||||
Inc.
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/* Functions to support lbitsets.
|
||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2009-2010 Free Software Foundation, Inc.
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/* Fake libiberty.h for Bison.
|
||||
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2004, 2009-2010 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
@@ -1,6 +1,6 @@
|
||||
/* Yacc library main function.
|
||||
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2009-2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
/* Subprocesses with pipes.
|
||||
|
||||
Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004-2006, 2009-2010 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
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
/* Subprocesses with pipes.
|
||||
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004-2005, 2009-2010 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
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
/* Timing variables for measuring compiler performance.
|
||||
Copyright (C) 2000, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000, 2002, 2004-2006, 2009-2010 Free Software
|
||||
Foundation, Inc.
|
||||
Contributed by Alex Samuel <samuel@codesourcery.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* This file contains the definitions for timing variables used to -*- C -*-
|
||||
measure run-time performance of the compiler.
|
||||
Copyright (C) 2002, 2007 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2007, 2009-2010 Free Software Foundation, Inc.
|
||||
Contributed by Akim Demaille <akim@freefriends.org>.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
/* Timing variables for measuring compiler performance.
|
||||
Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000, 2002, 2004, 2009-2010 Free Software Foundation,
|
||||
Inc.
|
||||
Contributed by Alex Samuel <samuel@codesourcery.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/* Variable array bitsets.
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2006, 2009-2010 Free Software Foundation, Inc.
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/* Functions to support vbitsets.
|
||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2009-2010 Free Software Foundation, Inc.
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Yacc library error-printing function.
|
||||
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2009-2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
@@ -1,15 +1,23 @@
|
||||
00gnulib.m4
|
||||
absolute-header.m4
|
||||
argmatch.m4
|
||||
assert.m4
|
||||
config-h.m4
|
||||
dirname.m4
|
||||
dos.m4
|
||||
double-slash-root.m4
|
||||
dup2.m4
|
||||
environ.m4
|
||||
errno_h.m4
|
||||
error.m4
|
||||
exitfail.m4
|
||||
extensions.m4
|
||||
fcntl-o.m4
|
||||
fcntl.m4
|
||||
fcntl_h.m4
|
||||
fopen.m4
|
||||
getopt.m4
|
||||
getpagesize.m4
|
||||
gettext.m4
|
||||
gnulib-cache.m4
|
||||
gnulib-common.m4
|
||||
@@ -29,11 +37,18 @@ lib-ld.m4
|
||||
lib-link.m4
|
||||
lib-prefix.m4
|
||||
localcharset.m4
|
||||
locale-fr.m4
|
||||
locale-ja.m4
|
||||
locale-zh.m4
|
||||
longlong.m4
|
||||
malloc.m4
|
||||
mbrtowc.m4
|
||||
mbsinit.m4
|
||||
mbstate_t.m4
|
||||
mbswidth.m4
|
||||
memchr.m4
|
||||
mmap-anon.m4
|
||||
multiarch.m4
|
||||
nls.m4
|
||||
po.m4
|
||||
progtest.m4
|
||||
@@ -41,9 +56,11 @@ quote.m4
|
||||
quotearg.m4
|
||||
setenv.m4
|
||||
stdbool.m4
|
||||
stddef_h.m4
|
||||
stdint.m4
|
||||
stdint_h.m4
|
||||
stdio-safer.m4
|
||||
stdio_h.m4
|
||||
stdlib_h.m4
|
||||
stpcpy.m4
|
||||
strerror.m4
|
||||
@@ -57,7 +74,9 @@ threadlib.m4
|
||||
unistd-safer.m4
|
||||
unistd_h.m4
|
||||
unlocked-io.m4
|
||||
warn-on-use.m4
|
||||
warning.m4
|
||||
warnings.m4
|
||||
wchar.m4
|
||||
wchar_t.m4
|
||||
wctype.m4
|
||||
|
||||
@@ -1,15 +1,23 @@
|
||||
/00gnulib.m4
|
||||
/absolute-header.m4
|
||||
/argmatch.m4
|
||||
/assert.m4
|
||||
/config-h.m4
|
||||
/dirname.m4
|
||||
/dos.m4
|
||||
/double-slash-root.m4
|
||||
/dup2.m4
|
||||
/environ.m4
|
||||
/errno_h.m4
|
||||
/error.m4
|
||||
/exitfail.m4
|
||||
/extensions.m4
|
||||
/fcntl-o.m4
|
||||
/fcntl.m4
|
||||
/fcntl_h.m4
|
||||
/fopen.m4
|
||||
/getopt.m4
|
||||
/getpagesize.m4
|
||||
/gettext.m4
|
||||
/gnulib-cache.m4
|
||||
/gnulib-common.m4
|
||||
@@ -29,11 +37,18 @@
|
||||
/lib-link.m4
|
||||
/lib-prefix.m4
|
||||
/localcharset.m4
|
||||
/locale-fr.m4
|
||||
/locale-ja.m4
|
||||
/locale-zh.m4
|
||||
/longlong.m4
|
||||
/malloc.m4
|
||||
/mbrtowc.m4
|
||||
/mbsinit.m4
|
||||
/mbstate_t.m4
|
||||
/mbswidth.m4
|
||||
/memchr.m4
|
||||
/mmap-anon.m4
|
||||
/multiarch.m4
|
||||
/nls.m4
|
||||
/po.m4
|
||||
/progtest.m4
|
||||
@@ -41,9 +56,11 @@
|
||||
/quotearg.m4
|
||||
/setenv.m4
|
||||
/stdbool.m4
|
||||
/stddef_h.m4
|
||||
/stdint.m4
|
||||
/stdint_h.m4
|
||||
/stdio-safer.m4
|
||||
/stdio_h.m4
|
||||
/stdlib_h.m4
|
||||
/stpcpy.m4
|
||||
/strerror.m4
|
||||
@@ -57,7 +74,9 @@
|
||||
/unistd-safer.m4
|
||||
/unistd_h.m4
|
||||
/unlocked-io.m4
|
||||
/warn-on-use.m4
|
||||
/warning.m4
|
||||
/warnings.m4
|
||||
/wchar.m4
|
||||
/wchar_t.m4
|
||||
/wctype.m4
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
# bison-i18n.m4 serial 2
|
||||
dnl Copyright (C) 2005-2006 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# Sanity test a C compiler.
|
||||
|
||||
# Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006, 2009-2010 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,7 +1,7 @@
|
||||
# -*- Autoconf -*-
|
||||
# Sanity-test a C++ compiler.
|
||||
#
|
||||
# Copyright (C) 2004, 2006 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2004, 2006, 2009-2010 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,27 +1,72 @@
|
||||
# Copyright 2000 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
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# m4.m4 serial 10
|
||||
|
||||
# BISON_PROG_GNU_M4
|
||||
# -----------------
|
||||
# Check for GNU m4, at least 1.3 (supports frozen files).
|
||||
AC_DEFUN([BISON_PROG_GNU_M4],
|
||||
[AC_PATH_PROGS(M4, gm4 gnum4 m4, m4)
|
||||
AC_CACHE_CHECK(whether m4 supports frozen files, ac_cv_prog_gnu_m4,
|
||||
[ac_cv_prog_gnu_m4=no
|
||||
if test x"$M4" != x; then
|
||||
case `$M4 --help < /dev/null 2>&1` in
|
||||
*reload-state*) ac_cv_prog_gnu_m4=yes ;;
|
||||
esac
|
||||
fi])])
|
||||
# Copyright (C) 2000, 2006-2010 Free Software Foundation, Inc.
|
||||
|
||||
# Copying and distribution of this file, with or without modification,
|
||||
# are permitted in any medium without royalty provided the copyright
|
||||
# notice and this notice are preserved. This file is offered as-is,
|
||||
# without warranty of any kind.
|
||||
|
||||
# AC_PROG_GNU_M4
|
||||
# --------------
|
||||
# Check for GNU M4, at least 1.4.6 (all earlier versions had bugs in
|
||||
# trace support and regexp support):
|
||||
# http://lists.gnu.org/archive/html/bug-gnu-utils/2006-11/msg00096.html
|
||||
# http://lists.gnu.org/archive/html/bug-autoconf/2009-07/msg00023.html
|
||||
# Also, check whether --error-output (through 1.4.x) or --debugfile (2.0)
|
||||
# is supported, and AC_SUBST M4_DEBUGFILE accordingly.
|
||||
AC_DEFUN([AC_PROG_GNU_M4],
|
||||
[AC_ARG_VAR([M4], [Location of GNU M4 1.4.6 or later. Defaults to the first
|
||||
program of `m4', `gm4', or `gnum4' on PATH that meets Autoconf needs.])
|
||||
AC_CACHE_CHECK([for GNU M4 that supports accurate traces], [ac_cv_path_M4],
|
||||
[rm -f conftest.m4f
|
||||
ac_had_posixly_correct=${POSIXLY_CORRECT:+yes}
|
||||
AS_UNSET([POSIXLY_CORRECT])
|
||||
AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4 gnum4],
|
||||
[dnl Creative quoting here to avoid raw dnl and ifdef in configure.
|
||||
# Root out GNU M4 1.4.5, as well as non-GNU m4 that ignore -t, -F.
|
||||
ac_snippet=change'quote(<,>)in''dir(<if''def>,mac,bug)'
|
||||
ac_snippet=${ac_snippet}pat'subst(a,\(b\)\|\(a\),\1)d'nl
|
||||
test -z "`$ac_path_M4 -F conftest.m4f </dev/null 2>&1`" \
|
||||
&& test -z "`AS_ECHO([$ac_snippet]) | $ac_path_M4 --trace=mac 2>&1`" \
|
||||
&& test -f conftest.m4f \
|
||||
&& ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:
|
||||
rm -f conftest.m4f],
|
||||
[AC_MSG_ERROR([no acceptable m4 could be found in \$PATH.
|
||||
GNU M4 1.4.6 or later is required; 1.4.13 is recommended])])])
|
||||
M4=$ac_cv_path_M4
|
||||
AC_CACHE_CHECK([whether $ac_cv_path_M4 accepts --gnu],
|
||||
[ac_cv_prog_gnu_m4_gnu],
|
||||
[case `$M4 --help < /dev/null 2>&1` in
|
||||
*--gnu*) ac_cv_prog_gnu_m4_gnu=yes ;;
|
||||
*) ac_cv_prog_gnu_m4_gnu=no ;;
|
||||
esac])
|
||||
if test "$ac_cv_prog_gnu_m4_gnu" = yes; then
|
||||
M4_GNU=--gnu
|
||||
else
|
||||
M4_GNU=
|
||||
fi
|
||||
AC_SUBST([M4_GNU])
|
||||
if test x$ac_had_posixly_correct = xyes; then
|
||||
POSIXLY_CORRECT=:
|
||||
if test $ac_cv_prog_gnu_m4_gnu = no; then
|
||||
AC_MSG_WARN([The version of M4 that was found does not support -g.])
|
||||
AC_MSG_WARN([Using it with POSIXLY_CORRECT set may cause problems.])
|
||||
fi
|
||||
fi
|
||||
AC_CACHE_CHECK([how m4 supports trace files], [ac_cv_prog_gnu_m4_debugfile],
|
||||
[case `$M4 --help < /dev/null 2>&1` in
|
||||
*debugfile*) ac_cv_prog_gnu_m4_debugfile=--debugfile ;;
|
||||
*) ac_cv_prog_gnu_m4_debugfile=--error-output ;;
|
||||
esac])
|
||||
AC_SUBST([M4_DEBUGFILE], [$ac_cv_prog_gnu_m4_debugfile])
|
||||
])
|
||||
|
||||
# Compatibility for bootstrapping with Autoconf 2.61.
|
||||
dnl FIXME - replace this with AC_PREREQ([2.62]) after the release.
|
||||
# AC_PATH_PROGS_FEATURE_CHECK was added the same time the slightly broken,
|
||||
# undocumented _AC_PATH_PROG_FEATURE_CHECK was deleted.
|
||||
m4_ifndef([AC_PATH_PROGS_FEATURE_CHECK],
|
||||
[m4_define([AC_PATH_PROGS_FEATURE_CHECK],
|
||||
[_AC_PATH_PROG_FEATURE_CHECK([$1], [$2], [$3], [$5])
|
||||
])])
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user