mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-08-08 18:25:13 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f5542fe2d | ||
|
|
d065cb3853 | ||
|
|
49964a4fe0 | ||
|
|
68f91d58f1 | ||
|
|
42bcf1ce44 | ||
|
|
de7331a075 | ||
|
|
b0db817ff2 | ||
|
|
a565f73276 | ||
|
|
3cf3393bd4 | ||
|
|
e83be476a5 | ||
|
|
80a2826e69 | ||
|
|
657ed6d3be | ||
|
|
2bd435c36c | ||
|
|
0a7b855930 | ||
|
|
c13bb3484c | ||
|
|
4b6d641913 | ||
|
|
bb990d3809 | ||
|
|
1127a75a72 | ||
|
|
fc28638e1c | ||
|
|
911537c30f | ||
|
|
d4fe9e88f3 | ||
|
|
be22823e78 | ||
|
|
235892350f | ||
|
|
c949ada3da | ||
|
|
d4dcde2b75 | ||
|
|
c8e966e272 | ||
|
|
d4728d92c7 | ||
|
|
09a1cd5e58 | ||
|
|
a24e6b0d21 | ||
|
|
1a9ac9bdba | ||
|
|
9318e335c8 | ||
|
|
fb6040f0a8 | ||
|
|
c49e2f1535 | ||
|
|
dbda560400 | ||
|
|
edf9a06f27 | ||
|
|
85a2f27fc4 | ||
|
|
28d16d1f7c | ||
|
|
f72721518b | ||
|
|
9960a6ae75 | ||
|
|
b56484a5d3 | ||
|
|
e35cd6def7 | ||
|
|
7ae57e2a35 | ||
|
|
7bada5355e | ||
|
|
505ece5171 | ||
|
|
3f5d1b2c67 | ||
|
|
0db2648930 | ||
|
|
effd30c08d | ||
|
|
a37131cc63 | ||
|
|
d4e985d587 | ||
|
|
03dbf629d5 | ||
|
|
1c7ec959b1 | ||
|
|
6ee95cd0d9 | ||
|
|
8aef6e0db5 | ||
|
|
3804aa260b | ||
|
|
4c36bc2b8d | ||
|
|
5215919366 | ||
|
|
511dd971ba | ||
|
|
371f1b2b7b | ||
|
|
1f1bd57297 | ||
|
|
6428a8a4a5 | ||
|
|
dbb998364f | ||
|
|
c6bf97ccb4 | ||
|
|
fb4c8a7cb9 | ||
|
|
68ac70bc7b | ||
|
|
ac7f308c8e | ||
|
|
53e2cd1ebd | ||
|
|
c28cd5dc5a | ||
|
|
534cee7ae8 | ||
|
|
51356dd2ad | ||
|
|
96029914a6 | ||
|
|
05c93b7d84 | ||
|
|
be3517b007 | ||
|
|
489b320d4a | ||
|
|
ccda5c9eac | ||
|
|
9c16d39944 | ||
|
|
d42fe46ec3 | ||
|
|
bfdcc3a0b2 | ||
|
|
ebbc76d0d7 | ||
|
|
9bf1eca7c9 | ||
|
|
2bb8f621eb | ||
|
|
3a526f5cc3 | ||
|
|
2cf5f72e9e | ||
|
|
429436aaf2 | ||
|
|
3ada393894 | ||
|
|
9d2423f55d | ||
|
|
9d3f7eaf1d | ||
|
|
2ead0fb793 | ||
|
|
63951be29f | ||
|
|
0a36880ad1 | ||
|
|
5a000c51f7 | ||
|
|
049016237e | ||
|
|
3154ff8ef6 | ||
|
|
d03c0413f0 | ||
|
|
41a4806a82 | ||
|
|
8aaa0c2f86 | ||
|
|
63e8426ac6 | ||
|
|
a1d1ab50a0 | ||
|
|
3237f57096 | ||
|
|
7d846072c7 | ||
|
|
8b49e6bfc5 | ||
|
|
0e1ccdfae0 | ||
|
|
86649705b4 | ||
|
|
7dbb8d8aba | ||
|
|
3472de825e | ||
|
|
3112e7a82b | ||
|
|
95066e9208 | ||
|
|
baf0bd6145 | ||
|
|
623a5147e6 | ||
|
|
b720fedf83 | ||
|
|
a7ab55af2a | ||
|
|
003db649bb | ||
|
|
a21733f2b4 | ||
|
|
a68b1f237e | ||
|
|
71cb558dfe | ||
|
|
ead713a176 | ||
|
|
e20daefe98 | ||
|
|
0fb7b95c5f | ||
|
|
4f4a54ab92 | ||
|
|
bb8674a537 | ||
|
|
5fb07775a1 | ||
|
|
e0992e5458 | ||
|
|
54dccdb2ca | ||
|
|
324a557651 | ||
|
|
94843f0aa3 | ||
|
|
20df0160bc | ||
|
|
e73ac5a09b | ||
|
|
851e3f8468 | ||
|
|
df04a68ab5 | ||
|
|
6f1360bd89 | ||
|
|
0ac1584946 | ||
|
|
40a1cd37f3 | ||
|
|
468455e12b | ||
|
|
b7226022b0 | ||
|
|
a4eb820f17 | ||
|
|
6eb8f74f8f | ||
|
|
cc5a986ce4 | ||
|
|
ae2199381e | ||
|
|
7b70847e58 | ||
|
|
19d9b60787 | ||
|
|
8f8439cee1 | ||
|
|
fa5303b8ff | ||
|
|
39845e8e40 | ||
|
|
5b34bb3110 | ||
|
|
c955769a75 | ||
|
|
82443642d2 | ||
|
|
e272d9dc80 | ||
|
|
9a50c55af7 | ||
|
|
e28ce5def0 | ||
|
|
7aa15a0026 | ||
|
|
90b1335aed | ||
|
|
ddbd0c40dc | ||
|
|
c473e022d9 | ||
|
|
6192d2c6de | ||
|
|
3746fc33c4 | ||
|
|
36cdaaac53 | ||
|
|
73c2a97540 | ||
|
|
a8ad048142 | ||
|
|
a029e56f5c | ||
|
|
fc4fdd623e | ||
|
|
dd47b5220c | ||
|
|
ce6cf10f73 | ||
|
|
8048226f50 | ||
|
|
85935600ad | ||
|
|
715978d726 | ||
|
|
7287be84f1 | ||
|
|
e94ca80bbb | ||
|
|
d74d8cb6c5 | ||
|
|
43eb7674aa | ||
|
|
d79683fa95 | ||
|
|
83bae26d3f | ||
|
|
9fc99ca350 | ||
|
|
a13121f759 | ||
|
|
2be37f19fe | ||
|
|
47a31596c6 | ||
|
|
db8ab2be33 | ||
|
|
2aa5b25995 | ||
|
|
211c818502 | ||
|
|
c12c4c507d | ||
|
|
34076080cd | ||
|
|
321d3e35d5 | ||
|
|
e365aa4c3d | ||
|
|
c5178eb75d | ||
|
|
d3e4409ad1 | ||
|
|
e8b86af83d | ||
|
|
25a6ad2f10 | ||
|
|
a26424642b | ||
|
|
7e1fabbeae | ||
|
|
cff926615f | ||
|
|
117c794200 | ||
|
|
88322b77b1 | ||
|
|
535ee0cb54 | ||
|
|
ff020c3061 | ||
|
|
45fdfd8108 | ||
|
|
a727e7124d | ||
|
|
a1a77e1fcc | ||
|
|
10b009fa50 | ||
|
|
ec78bdab6d | ||
|
|
a2b3f10183 | ||
|
|
04a4684a51 | ||
|
|
57f8bd8d18 | ||
|
|
c9d5bcc938 | ||
|
|
5a05f42ecf | ||
|
|
93d133c932 | ||
|
|
b506d9bfcb | ||
|
|
bd52638008 | ||
|
|
b8e7ad5887 | ||
|
|
a974c1ec26 | ||
|
|
6b1e1872d4 | ||
|
|
cbaea0106d | ||
|
|
24d96dd3eb | ||
|
|
63fec1eeba | ||
|
|
6b4cb804b5 | ||
|
|
53425dbfaa | ||
|
|
403ddfb7e0 | ||
|
|
76e5017732 | ||
|
|
592bdad15e | ||
|
|
457bf91968 | ||
|
|
2e350a617f | ||
|
|
d740d2b541 | ||
|
|
e411069eee | ||
|
|
ae62d0fc4f | ||
|
|
e3f8c4ef69 | ||
|
|
933ec5449f | ||
|
|
e1eeecd384 | ||
|
|
43ca804096 | ||
|
|
dcd5344dcd | ||
|
|
62a58c14bd | ||
|
|
e39eff37e2 | ||
|
|
06f2ac78d7 | ||
|
|
1914a78115 | ||
|
|
d6e2a57964 | ||
|
|
a0c45dd5d2 | ||
|
|
c9d546b2a8 | ||
|
|
d61e59ea0e | ||
|
|
aaf63e45b6 | ||
|
|
dbfcf7a89f | ||
|
|
8c707b10e7 | ||
|
|
9c26b8fc03 | ||
|
|
77b214ef48 | ||
|
|
d35d6dd2cd | ||
|
|
466a2de317 | ||
|
|
4acc22e5cf | ||
|
|
7b18c11231 | ||
|
|
e6cab382c5 | ||
|
|
cd735a8c6c | ||
|
|
d6a44ffd00 | ||
|
|
93e3dbab95 | ||
|
|
1c292035e1 | ||
|
|
263137264f | ||
|
|
e20e6a50d5 | ||
|
|
4d24ffb75e | ||
|
|
a74a3158d4 | ||
|
|
4982f078bf | ||
|
|
65a99eca25 | ||
|
|
9a86ee6058 | ||
|
|
0e164d43d1 | ||
|
|
d511fbd576 | ||
|
|
9c46ba16e3 | ||
|
|
55e075f229 | ||
|
|
0bb672d87c | ||
|
|
8617d87e24 | ||
|
|
0601c3bf0f | ||
|
|
eea7239a23 | ||
|
|
e58782294d | ||
|
|
c1cc91bdcd | ||
|
|
13b712d7d4 | ||
|
|
dba9149595 | ||
|
|
9b8585410a | ||
|
|
f9b8635172 | ||
|
|
733d4546ce | ||
|
|
aaf6103699 | ||
|
|
d0d3313d10 | ||
|
|
a4107f24bc |
+1
-1
@@ -11,6 +11,7 @@
|
||||
/INSTALL
|
||||
/Makefile
|
||||
/Makefile.in
|
||||
/README-release
|
||||
/_*
|
||||
/a.exe
|
||||
/a.out
|
||||
@@ -31,4 +32,3 @@
|
||||
/patches
|
||||
/releases
|
||||
/stamp-h*
|
||||
/README-release
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
2.5.91
|
||||
2.7
|
||||
|
||||
@@ -24,7 +24,7 @@ and nasty bugs.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 1998-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998-2013 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
+1
-1
@@ -24286,7 +24286,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 1987-1988, 1991-2012 Free Software Foundation,
|
||||
Copyright (C) 1987-1988, 1991-2013 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
|
||||
+4
-5
@@ -1,6 +1,6 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
|
||||
## Copyright (C) 2001-2012 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -56,12 +56,11 @@ dist-hook: gen-ChangeLog
|
||||
|
||||
.PHONY: update-b4-copyright update-package-copyright-year
|
||||
update-b4-copyright:
|
||||
$(AM_V_GEN) find data -type f \
|
||||
| grep -v -E '^data/bison.m4$$' \
|
||||
| xargs $(build_aux)/$@
|
||||
$(AM_V_GEN)find $(srcdir)/data -type f \
|
||||
| xargs $(srcdir)/build-aux/$@
|
||||
@echo 'warning: src/parse-gram.[hc] may need to be regenerated.'
|
||||
update-package-copyright-year:
|
||||
$(AM_V_GEN)$(build_aux)/$@ configure.ac
|
||||
$(AM_V_GEN)$(srcdir)/build-aux/$@ $(srcdir)/configure.ac
|
||||
|
||||
gen_start_date = 2012-01-16
|
||||
.PHONY: gen-ChangeLog
|
||||
|
||||
@@ -1,5 +1,256 @@
|
||||
GNU Bison NEWS
|
||||
|
||||
* Noteworthy changes in release 2.7.1 (2013-04-15) [stable]
|
||||
|
||||
** Bug fixes
|
||||
|
||||
*** Fix compiler attribute portability (yacc.c)
|
||||
|
||||
With locations enabled, __attribute__ was used unprotected.
|
||||
|
||||
*** Fix some compiler warnings (lalr1.cc)
|
||||
|
||||
* Noteworthy changes in release 2.7 (2012-12-12) [stable]
|
||||
|
||||
** Bug fixes
|
||||
|
||||
Warnings about uninitialized yylloc in yyparse have been fixed.
|
||||
|
||||
Restored C90 compliance (yet no report was ever made).
|
||||
|
||||
** Diagnostics are improved
|
||||
|
||||
*** Changes in the format of error messages
|
||||
|
||||
This used to be the format of many error reports:
|
||||
|
||||
input.y:2.7-12: %type redeclaration for exp
|
||||
input.y:1.7-12: previous declaration
|
||||
|
||||
It is now:
|
||||
|
||||
input.y:2.7-12: error: %type redeclaration for exp
|
||||
input.y:1.7-12: previous declaration
|
||||
|
||||
*** New format for error reports: carets
|
||||
|
||||
Caret errors have been added to Bison:
|
||||
|
||||
input.y:2.7-12: error: %type redeclaration for exp
|
||||
%type <sval> exp
|
||||
^^^^^^
|
||||
input.y:1.7-12: previous declaration
|
||||
%type <ival> exp
|
||||
^^^^^^
|
||||
|
||||
or
|
||||
|
||||
input.y:3.20-23: error: ambiguous reference: '$exp'
|
||||
exp: exp '+' exp { $exp = $1 + $3; };
|
||||
^^^^
|
||||
input.y:3.1-3: refers to: $exp at $$
|
||||
exp: exp '+' exp { $exp = $1 + $3; };
|
||||
^^^
|
||||
input.y:3.6-8: refers to: $exp at $1
|
||||
exp: exp '+' exp { $exp = $1 + $3; };
|
||||
^^^
|
||||
input.y:3.14-16: refers to: $exp at $3
|
||||
exp: exp '+' exp { $exp = $1 + $3; };
|
||||
^^^
|
||||
|
||||
The default behaviour for now is still not to display these unless
|
||||
explictly asked with -fcaret (or -fall). However, in a later release, it
|
||||
will be made the default behavior (but may still be deactivated with
|
||||
-fno-caret).
|
||||
|
||||
** New value for %define variable: api.pure full
|
||||
|
||||
The %define variable api.pure requests a pure (reentrant) parser. However,
|
||||
for historical reasons, using it in a location-tracking Yacc parser
|
||||
resulted in a yyerror function that did not take a location as a
|
||||
parameter. With this new value, the user may request a better pure parser,
|
||||
where yyerror does take a location as a parameter (in location-tracking
|
||||
parsers).
|
||||
|
||||
The use of "%define api.pure true" is deprecated in favor of this new
|
||||
"%define api.pure full".
|
||||
|
||||
** New %define variable: api.location.type (glr.cc, lalr1.cc, lalr1.java)
|
||||
|
||||
The %define variable api.location.type defines the name of the type to use
|
||||
for locations. When defined, Bison no longer generates the position.hh
|
||||
and location.hh files, nor does the parser will include them: the user is
|
||||
then responsible to define her type.
|
||||
|
||||
This can be used in programs with several parsers to factor their location
|
||||
and position files: let one of them generate them, and the others just use
|
||||
them.
|
||||
|
||||
This feature was actually introduced, but not documented, in Bison 2.5,
|
||||
under the name "location_type" (which is maintained for backward
|
||||
compatibility).
|
||||
|
||||
For consistency, lalr1.java's %define variables location_type and
|
||||
position_type are deprecated in favor of api.location.type and
|
||||
api.position.type.
|
||||
|
||||
** Exception safety (lalr1.cc)
|
||||
|
||||
The parse function now catches exceptions, uses the %destructors to
|
||||
release memory (the lookahead symbol and the symbols pushed on the stack)
|
||||
before re-throwing the exception.
|
||||
|
||||
This feature is somewhat experimental. User feedback would be
|
||||
appreciated.
|
||||
|
||||
** Graph improvements in DOT and XSLT
|
||||
|
||||
The graphical presentation of the states is more readable: their shape is
|
||||
now rectangular, the state number is clearly displayed, and the items are
|
||||
numbered and left-justified.
|
||||
|
||||
The reductions are now explicitly represented as transitions to other
|
||||
diamond shaped nodes.
|
||||
|
||||
These changes are present in both --graph output and xml2dot.xsl XSLT
|
||||
processing, with minor (documented) differences.
|
||||
|
||||
** %language is no longer an experimental feature.
|
||||
|
||||
The introduction of this feature, in 2.4, was four years ago. The
|
||||
--language option and the %language directive are no longer experimental.
|
||||
|
||||
** Documentation
|
||||
|
||||
The sections about shift/reduce and reduce/reduce conflicts resolution
|
||||
have been fixed and extended.
|
||||
|
||||
Although introduced more than four years ago, XML and Graphviz reports
|
||||
were not properly documented.
|
||||
|
||||
The translation of mid-rule actions is now described.
|
||||
|
||||
* Noteworthy changes in release 2.6.5 (2012-11-07) [stable]
|
||||
|
||||
We consider compiler warnings about Bison generated parsers to be bugs.
|
||||
Rather than working around them in your own project, please consider
|
||||
reporting them to us.
|
||||
|
||||
** Bug fixes
|
||||
|
||||
Warnings about uninitialized yylval and/or yylloc for push parsers with a
|
||||
pure interface have been fixed for GCC 4.0 up to 4.8, and Clang 2.9 to
|
||||
3.2.
|
||||
|
||||
Other issues in the test suite have been addressed.
|
||||
|
||||
Nul characters are correctly displayed in error messages.
|
||||
|
||||
When possible, yylloc is correctly initialized before calling yylex. It
|
||||
is no longer necessary to initialize it in the %initial-action.
|
||||
|
||||
* Noteworthy changes in release 2.6.4 (2012-10-23) [stable]
|
||||
|
||||
Bison 2.6.3's --version was incorrect. This release fixes this issue.
|
||||
|
||||
* Noteworthy changes in release 2.6.3 (2012-10-22) [stable]
|
||||
|
||||
** Bug fixes
|
||||
|
||||
Bugs and portability issues in the test suite have been fixed.
|
||||
|
||||
Some errors in translations have been addressed, and --help now directs
|
||||
users to the appropriate place to report them.
|
||||
|
||||
Stray Info files shipped by accident are removed.
|
||||
|
||||
Incorrect definitions of YY_, issued by yacc.c when no parser header is
|
||||
generated, are removed.
|
||||
|
||||
All the generated headers are self-contained.
|
||||
|
||||
** Header guards (yacc.c, glr.c, glr.cc)
|
||||
|
||||
In order to avoid collisions, the header guards are now
|
||||
YY_<PREFIX>_<FILE>_INCLUDED, instead of merely <PREFIX>_<FILE>.
|
||||
For instance the header generated from
|
||||
|
||||
%define api.prefix "calc"
|
||||
%defines "lib/parse.h"
|
||||
|
||||
will use YY_CALC_LIB_PARSE_H_INCLUDED as guard.
|
||||
|
||||
** Fix compiler warnings in the generated parser (yacc.c, glr.c)
|
||||
|
||||
The compilation of pure parsers (%define api.pure) can trigger GCC
|
||||
warnings such as:
|
||||
|
||||
input.c: In function 'yyparse':
|
||||
input.c:1503:12: warning: 'yylval' may be used uninitialized in this
|
||||
function [-Wmaybe-uninitialized]
|
||||
*++yyvsp = yylval;
|
||||
^
|
||||
|
||||
This is now fixed; pragmas to avoid these warnings are no longer needed.
|
||||
|
||||
Warnings from clang ("equality comparison with extraneous parentheses" and
|
||||
"function declared 'noreturn' should not return") have also been
|
||||
addressed.
|
||||
|
||||
* Noteworthy changes in release 2.6.2 (2012-08-03) [stable]
|
||||
|
||||
** Bug fixes
|
||||
|
||||
Buffer overruns, complaints from Flex, and portability issues in the test
|
||||
suite have been fixed.
|
||||
|
||||
** Spaces in %lex- and %parse-param (lalr1.cc, glr.cc)
|
||||
|
||||
Trailing end-of-lines in %parse-param or %lex-param would result in
|
||||
invalid C++. This is fixed.
|
||||
|
||||
** Spurious spaces and end-of-lines
|
||||
|
||||
The generated files no longer end (nor start) with empty lines.
|
||||
|
||||
* Noteworthy changes in release 2.6.1 (2012-07-30) [stable]
|
||||
|
||||
Bison no longer executes user-specified M4 code when processing a grammar.
|
||||
|
||||
** Future Changes
|
||||
|
||||
In addition to the removal of the features announced in Bison 2.6, the
|
||||
next major release will remove the "Temporary hack for adding a semicolon
|
||||
to the user action", as announced in the release 2.5. Instead of:
|
||||
|
||||
exp: exp "+" exp { $$ = $1 + $3 };
|
||||
|
||||
write:
|
||||
|
||||
exp: exp "+" exp { $$ = $1 + $3; };
|
||||
|
||||
** Bug fixes
|
||||
|
||||
*** Type names are now properly escaped.
|
||||
|
||||
*** glr.cc: set_debug_level and debug_level work as expected.
|
||||
|
||||
*** Stray @ or $ in actions
|
||||
|
||||
While Bison used to warn about stray $ or @ in action rules, it did not
|
||||
for other actions such as printers, destructors, or initial actions. It
|
||||
now does.
|
||||
|
||||
** Type names in actions
|
||||
|
||||
For consistency with rule actions, it is now possible to qualify $$ by a
|
||||
type-name in destructors, printers, and initial actions. For instance:
|
||||
|
||||
%printer { fprintf (yyo, "(%d, %f)", $<ival>$, $<fval>$); } <*> <>;
|
||||
|
||||
will display two values for each typed and untyped symbol (provided
|
||||
that YYSTYPE has both "ival" and "fval" fields).
|
||||
|
||||
* Noteworthy changes in release 2.6 (2012-07-19) [stable]
|
||||
|
||||
** Future Changes
|
||||
@@ -7,7 +258,7 @@ GNU Bison NEWS
|
||||
The next major release of Bison will drop support for the following
|
||||
deprecated features. Please report disagreements to [email protected].
|
||||
|
||||
*** K&C parsers
|
||||
*** K&R C parsers
|
||||
|
||||
Support for generating parsers in K&R C will be removed. Parsers
|
||||
generated for C support ISO C90, and are tested with ISO C99 and ISO C11
|
||||
@@ -264,6 +515,7 @@ GNU Bison NEWS
|
||||
|
||||
These features are experimental in this version. More user feedback
|
||||
will help to stabilize them.
|
||||
Contributed by Alex Rozenman.
|
||||
|
||||
** IELR(1) and canonical LR(1):
|
||||
|
||||
@@ -780,6 +1032,7 @@ GNU Bison NEWS
|
||||
|
||||
The current Java interface is experimental and may evolve. More user
|
||||
feedback will help to stabilize it.
|
||||
Contributed by Paolo Bonzini.
|
||||
|
||||
** %language
|
||||
|
||||
@@ -793,6 +1046,7 @@ GNU Bison NEWS
|
||||
Bison can now generate an XML report of the LALR(1) automaton using the new
|
||||
"--xml" option. The current XML schema is experimental and may evolve. More
|
||||
user feedback will help to stabilize it.
|
||||
Contributed by Wojciech Polak.
|
||||
|
||||
** The grammar file may now specify the name of the parser header file using
|
||||
%defines. For example:
|
||||
@@ -1769,7 +2023,7 @@ Output file does not redefine const for C++.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 1995-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2013 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Parser Generator.
|
||||
|
||||
@@ -1803,7 +2057,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
LocalWords: namespaces strerror const autoconfiguration Dconst Autoconf's FDL
|
||||
LocalWords: Automake TMPDIR LESSEQ ylwrap endif yydebug YYTOKEN YYLSP ival hh
|
||||
LocalWords: extern YYTOKENTYPE TOKENTYPE yytokentype tokentype STYPE lval pdf
|
||||
LocalWords: lang yyoutput dvi html ps POSIX lvalp llocp
|
||||
LocalWords: lang yyoutput dvi html ps POSIX lvalp llocp calc yyo fval Wmaybe
|
||||
LocalWords: yyvsp pragmas noreturn java's
|
||||
|
||||
Local Variables:
|
||||
mode: outline
|
||||
|
||||
@@ -36,7 +36,7 @@ to the bison package.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002, 2005, 2009-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2005, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ End:
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 1992, 1998-1999, 2003-2005, 2008-2012 Free Software
|
||||
Copyright (C) 1992, 1998-1999, 2003-2005, 2008-2013 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ the problems you encounter.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002, 2004, 2009-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bison.
|
||||
|
||||
|
||||
+27
-13
@@ -43,16 +43,17 @@ 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
|
||||
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/>
|
||||
- Automake <http://www.gnu.org/software/automake/>
|
||||
- Flex <http://www.gnu.org/software/flex/>
|
||||
- Gettext <http://www.gnu.org/software/gettext/>
|
||||
- Graphviz <http://www.graphviz.org>
|
||||
- Gzip <http://www.gnu.org/software/gzip/>
|
||||
- Perl <http://www.cpan.org/>
|
||||
- Rsync <http://samba.anu.edu.au/rsync/>
|
||||
@@ -61,16 +62,16 @@ tools we depend upon, including:
|
||||
Valgrind <http://valgrind.org/> is also highly recommended, if it 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.
|
||||
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. Note, however, that when gnulib is updated, running
|
||||
'./bootstrap' again might be needed.
|
||||
Only building the initial full source tree will be a bit painful. Later,
|
||||
after synchronizing from the repository a plain 'make' should be sufficient.
|
||||
Note, however, that when gnulib is updated, running './bootstrap' again
|
||||
might be needed.
|
||||
|
||||
** First checkout
|
||||
|
||||
@@ -168,6 +169,19 @@ decide whether to update.
|
||||
** make check
|
||||
Use liberally.
|
||||
|
||||
** Typical errors
|
||||
If the test suite shows failures such as the following one
|
||||
|
||||
.../bison/lib/getopt.h:196:8: error: redefinition of 'struct option'
|
||||
/usr/include/getopt.h:54:8: error: previous definition of 'struct option'
|
||||
|
||||
it probably means that some file was compiled without
|
||||
AT_DATA_SOURCE_PROLOGUE. This error is due to the fact that our -I options
|
||||
pick up gnulib's replacement headers, such as getopt.h, and this will go
|
||||
wrong if config.h was not included first.
|
||||
|
||||
See tests/local.at for details.
|
||||
|
||||
** make maintainer-check-valgrind
|
||||
This target uses valgrind both to check bison, and the generated parsers.
|
||||
|
||||
@@ -394,7 +408,7 @@ Push these changes.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002-2005, 2007-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2005, 2007-2013 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bison.
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
Bison was originally written by Robert Corbett. It would not be what
|
||||
it is today without the invaluable help of these people:
|
||||
|
||||
Аскар Сафин [email protected]
|
||||
Airy Andre [email protected]
|
||||
Akim Demaille akim@freefriends.org
|
||||
Akim Demaille akim@lrde.epita.fr
|
||||
Albert Chin-A-Young [email protected]
|
||||
Alexander Belopolsky [email protected]
|
||||
Alexandre Duret-Lutz adl@src.lip6.fr
|
||||
Alexandre Duret-Lutz adl@lrde.epita.fr
|
||||
Andreas Schwab [email protected]
|
||||
Andrew Suffield [email protected]
|
||||
Angelo Borsotti [email protected]
|
||||
@@ -13,6 +14,7 @@ Anthony Heading [email protected]
|
||||
Arnold Robbins [email protected]
|
||||
Art Haas [email protected]
|
||||
Baron Schwartz [email protected]
|
||||
Ben Pfaff [email protected]
|
||||
Benoit Perrot [email protected]
|
||||
Bernd Kiefer [email protected]
|
||||
Bert Deknuydt [email protected]
|
||||
@@ -30,6 +32,7 @@ Dagobert Michelsen [email protected]
|
||||
Daniel Hagerty [email protected]
|
||||
David J. MacKenzie [email protected]
|
||||
David Kastrup [email protected]
|
||||
Dennis Clarke [email protected]
|
||||
Derek M. Jones [email protected]
|
||||
Di-an Jan [email protected]
|
||||
Dick Streefland [email protected]
|
||||
@@ -55,6 +58,7 @@ Jim Kent [email protected]
|
||||
Jim Meyering [email protected]
|
||||
Joel E. Denny [email protected]
|
||||
Johan van Selst [email protected]
|
||||
Jonathan Fabrizio [email protected]
|
||||
Jonathan Nieder [email protected]
|
||||
Juan Manuel Guerrero [email protected]
|
||||
Kees Zeelenberg [email protected]
|
||||
@@ -63,6 +67,8 @@ Laurent Mascherpa [email protected]
|
||||
Lie Yan [email protected]
|
||||
Magnus Fromreide [email protected]
|
||||
Marc Autret [email protected]
|
||||
Marc Mendiola [email protected]
|
||||
Mark Boyall [email protected]
|
||||
Martin Jacobs [email protected]
|
||||
Martin Mokrejs [email protected]
|
||||
Martin Nylin [email protected]
|
||||
@@ -79,20 +85,25 @@ Nicolas Tisserand [email protected]
|
||||
Noah Friedman [email protected]
|
||||
Odd Arild Olsen [email protected]
|
||||
Oleg Smolsky [email protected]
|
||||
Oleksii Taran [email protected]
|
||||
Paolo Bonzini [email protected]
|
||||
Pascal Bart [email protected]
|
||||
Paul Eggert [email protected]
|
||||
Paul Hilfinger [email protected]
|
||||
Per Allansson [email protected]
|
||||
Peter Eisentraut [email protected]
|
||||
Peter Fales [email protected]
|
||||
Peter Hamorsky [email protected]
|
||||
Peter Simons [email protected]
|
||||
Piotr Gackiewicz [email protected]
|
||||
Quoc Peyrot [email protected]
|
||||
R Blake [email protected]
|
||||
Raja R Harinath [email protected]
|
||||
Ralf Wildenhues [email protected]
|
||||
Richard Stallman [email protected]
|
||||
Rob Vermaas [email protected]
|
||||
Robert Anisko [email protected]
|
||||
Rob Conde [email protected]
|
||||
Satya Kiran Popuri [email protected]
|
||||
Sebastian Setzer [email protected]
|
||||
Sebastien Fricker [email protected]
|
||||
@@ -100,7 +111,8 @@ Sergei Steshenko [email protected]
|
||||
Shura [email protected]
|
||||
Stefano Lattarini [email protected]
|
||||
Steve Murphy [email protected]
|
||||
Summum Bonum [email protected]
|
||||
Sum Wu [email protected]
|
||||
Théophile Ranquet [email protected]
|
||||
Thiru Ramakrishnan [email protected]
|
||||
Tim Josling [email protected]
|
||||
Tim Landscheidt [email protected]
|
||||
@@ -110,10 +122,12 @@ Tom Tromey [email protected]
|
||||
Tommy Nordgren [email protected]
|
||||
Troy A. Johnson [email protected]
|
||||
Tys Lefering [email protected]
|
||||
Victor Khomenko [email protected]
|
||||
Vin Shelton [email protected]
|
||||
W.C.A. Wijngaards [email protected]
|
||||
Wayne Green [email protected]
|
||||
Wei Song [email protected]
|
||||
Wojciech Polak [email protected]
|
||||
Wolfgang S. Kechel [email protected]
|
||||
Wolfram Wagner [email protected]
|
||||
Wwp [email protected]
|
||||
@@ -124,11 +138,12 @@ thank them! Please, help us keeping this list up to date.
|
||||
|
||||
Local Variables:
|
||||
mode: text
|
||||
coding: utf-8
|
||||
End:
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2000-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000-2013 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Parser Generator.
|
||||
|
||||
|
||||
@@ -1,4 +1,17 @@
|
||||
* Short term
|
||||
** Graphviz display code thoughts
|
||||
The code for the --graph option is over two files: print_graph, and
|
||||
graphviz. I believe this is because Bison used to also produce VCG graphs,
|
||||
but since this is no longer true, maybe we could consider these files for
|
||||
fusion.
|
||||
|
||||
Little effort factoring seems to have been given to factoring in these files,
|
||||
and their print-xml and print counterpart. We would very much like to re-use
|
||||
the pretty format of states from .output in the .dot
|
||||
|
||||
Also, the underscore in print_graph.[ch] isn't very fitting considering
|
||||
the dashes in the other filenames.
|
||||
|
||||
** Variable names.
|
||||
What should we name `variant' and `lex_symbol'?
|
||||
|
||||
@@ -338,7 +351,7 @@ End:
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2001-2004, 2006, 2008-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2001-2004, 2006, 2008-2013 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Print a version string.
|
||||
scriptversion=2012-07-10.09; # UTC
|
||||
scriptversion=2013-03-08.16; # UTC
|
||||
|
||||
# Bootstrap this package from checked-out sources.
|
||||
|
||||
# Copyright (C) 2003-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -214,6 +214,8 @@ use_git=true
|
||||
# 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.
|
||||
#
|
||||
# FIXME: code duplication, see also gnu-web-doc-update.
|
||||
find_tool ()
|
||||
{
|
||||
find_tool_envvar=$1
|
||||
@@ -304,34 +306,34 @@ if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
|
||||
die "Bootstrapping from a non-checked-out distribution is risky."
|
||||
fi
|
||||
|
||||
# Ensure that lines starting with ! sort last, per gitignore conventions
|
||||
# for whitelisting exceptions after a more generic blacklist pattern.
|
||||
sort_patterns() {
|
||||
sort -u "$@" | sed '/^!/ {
|
||||
H
|
||||
d
|
||||
}
|
||||
$ {
|
||||
P
|
||||
x
|
||||
s/^\n//
|
||||
}' | sed '/^$/d'
|
||||
# Strip blank and comment lines to leave significant entries.
|
||||
gitignore_entries() {
|
||||
sed '/^#/d; /^$/d' "$@"
|
||||
}
|
||||
|
||||
# If $STR is not already on a line by itself in $FILE, insert it,
|
||||
# sorting the new contents of the file and replacing $FILE with the result.
|
||||
insert_sorted_if_absent() {
|
||||
# If $STR is not already on a line by itself in $FILE, insert it at the start.
|
||||
# Entries are inserted at the start of the ignore list to ensure existing
|
||||
# entries starting with ! are not overridden. Such entries support
|
||||
# whitelisting exceptions after a more generic blacklist pattern.
|
||||
insert_if_absent() {
|
||||
file=$1
|
||||
str=$2
|
||||
test -f $file || touch $file
|
||||
echo "$str" | sort_patterns - $file | cmp -s - $file > /dev/null \
|
||||
|| { echo "$str" | sort_patterns - $file > $file.bak \
|
||||
&& mv $file.bak $file; } \
|
||||
|| die "insert_sorted_if_absent $file $str: failed"
|
||||
test -r $file || die "Error: failed to read ignore file: $file"
|
||||
duplicate_entries=$(gitignore_entries $file | sort | uniq -d)
|
||||
if [ "$duplicate_entries" ] ; then
|
||||
die "Error: Duplicate entries in $file: " $duplicate_entries
|
||||
fi
|
||||
linesold=$(gitignore_entries $file | wc -l)
|
||||
linesnew=$(echo "$str" | gitignore_entries - $file | sort -u | wc -l)
|
||||
if [ $linesold != $linesnew ] ; then
|
||||
{ echo "$str" | cat - $file > $file.bak && mv $file.bak $file; } \
|
||||
|| die "insert_if_absent $file $str: failed"
|
||||
fi
|
||||
}
|
||||
|
||||
# Adjust $PATTERN for $VC_IGNORE_FILE and insert it with
|
||||
# insert_sorted_if_absent.
|
||||
# insert_if_absent.
|
||||
insert_vc_ignore() {
|
||||
vc_ignore_file="$1"
|
||||
pattern="$2"
|
||||
@@ -342,7 +344,7 @@ insert_vc_ignore() {
|
||||
# .gitignore entry.
|
||||
pattern=$(echo "$pattern" | sed s,^,/,);;
|
||||
esac
|
||||
insert_sorted_if_absent "$vc_ignore_file" "$pattern"
|
||||
insert_if_absent "$vc_ignore_file" "$pattern"
|
||||
}
|
||||
|
||||
# Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac.
|
||||
@@ -628,9 +630,13 @@ esac
|
||||
if $bootstrap_sync; then
|
||||
cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || {
|
||||
echo "$0: updating bootstrap and restarting..."
|
||||
case $(sh -c 'echo "$1"' -- a) in
|
||||
a) ignored=--;;
|
||||
*) ignored=ignored;;
|
||||
esac
|
||||
exec sh -c \
|
||||
'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
|
||||
-- "$GNULIB_SRCDIR/build-aux/bootstrap" \
|
||||
$ignored "$GNULIB_SRCDIR/build-aux/bootstrap" \
|
||||
"$0" "$@" --no-bootstrap-sync
|
||||
}
|
||||
fi
|
||||
@@ -887,20 +893,21 @@ find "$m4_base" "$source_base" \
|
||||
-depth \( -name '*.m4' -o -name '*.[ch]' \) \
|
||||
-type l -xtype l -delete > /dev/null 2>&1
|
||||
|
||||
# Invoke autoreconf with --force --install to ensure upgrades of tools
|
||||
# such as ylwrap.
|
||||
AUTORECONFFLAGS="--verbose --install --force -I $m4_base $ACLOCAL_FLAGS"
|
||||
|
||||
# Some systems (RHEL 5) are using ancient autotools, for which the
|
||||
# --no-recursive option had not been invented. Detect that lack and
|
||||
# omit the option when it's not supported. FIXME in 2017: remove this
|
||||
# hack when RHEL 5 autotools are updated, or when they become irrelevant.
|
||||
no_recursive=
|
||||
case $($AUTORECONF --help) in
|
||||
*--no-recursive*) no_recursive=--no-recursive;;
|
||||
*--no-recursive*) AUTORECONFFLAGS="$AUTORECONFFLAGS --no-recursive";;
|
||||
esac
|
||||
|
||||
# Tell autoreconf not to invoke autopoint or libtoolize; they were run above.
|
||||
echo "running: AUTOPOINT=true LIBTOOLIZE=true " \
|
||||
"$AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS"
|
||||
AUTOPOINT=true LIBTOOLIZE=true \
|
||||
$AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS \
|
||||
echo "running: AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS"
|
||||
AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS \
|
||||
|| die "autoreconf failed"
|
||||
|
||||
# Get some extra files from gnulib, overriding existing files.
|
||||
|
||||
+8
-3
@@ -1,6 +1,6 @@
|
||||
# Bootstrap configuration.
|
||||
|
||||
# Copyright (C) 2006-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -20,11 +20,16 @@ gnulib_modules='
|
||||
argmatch assert calloc-posix close closeout config-h c-strcase
|
||||
configmake
|
||||
dirname
|
||||
error extensions fdl fopen-safer getopt-gnu
|
||||
error extensions fdl fopen-safer
|
||||
getline
|
||||
getopt-gnu
|
||||
gettext git-version-gen gitlog-to-changelog
|
||||
gpl-3.0 hash inttypes isnan javacomp-script
|
||||
javaexec-script ldexpl malloc-gnu mbschr mbsrchr
|
||||
mbswidth obstack perror progname
|
||||
mbswidth
|
||||
obstack
|
||||
obstack-printf
|
||||
perror progname
|
||||
quote quotearg
|
||||
readme-release
|
||||
realloc-posix
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2012-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
# This file is expected to be used via gitlog-to-changelog's --amend=FILE
|
||||
# option. It specifies what changes to make to each given SHA1's commit
|
||||
# log and metadata, using Perl-eval'able expressions.
|
||||
|
||||
0db2648930e3b6c376a539aabe368aade83ee29a
|
||||
s/--flags/--feature/;
|
||||
s/flag_flag/feature_flag/;
|
||||
s/\bflag\b/feature/;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Update b4_copyright invocations or b4_copyright_years definitions to
|
||||
# include the current year.
|
||||
|
||||
# Copyright (C) 2009-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# In configure.ac, update PACKAGE_COPYRIGHT_YEAR to the current year.
|
||||
|
||||
# Copyright (C) 2010-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2010-2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Customize maint.mk -*- makefile -*-
|
||||
# Copyright (C) 2008-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2008-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -24,6 +24,7 @@ regen: _version
|
||||
|
||||
# Used in maint.mk's web-manual rule
|
||||
manual_title = The Yacc-compatible Parser Generator
|
||||
gendocs_options_ = -I $(abs_top_srcdir)/doc -I $(abs_top_builddir)/doc
|
||||
|
||||
# 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,
|
||||
@@ -60,19 +61,33 @@ update-copyright: update-b4-copyright update-package-copyright-year
|
||||
update-copyright-env = \
|
||||
UPDATE_COPYRIGHT_FORCE=1 UPDATE_COPYRIGHT_USE_INTERVALS=1
|
||||
|
||||
# At least for Mac OS X's grep, the order between . and [ in "[^.[]"
|
||||
# matters:
|
||||
# $ LC_ALL=fr_FR grep -nE '[^[.]' /dev/null
|
||||
# $ LC_ALL=C grep -nE '[^[.]' /dev/null
|
||||
# grep: invalid collating element or class
|
||||
# $ LC_ALL=fr_FR grep -nE '[^.[]' /dev/null
|
||||
# $ LC_ALL=C grep -nE '[^.[]' /dev/null
|
||||
sc_at_parser_check:
|
||||
@prohibit='AT_PARSER_CHECK\(\[+[^.[]|AT_CHECK\(\[+\./' \
|
||||
halt='use AT_PARSER_CHECK for and only for generated parsers' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
exclude = \
|
||||
$(foreach a,$(1),$(eval $(subst $$,$$$$,exclude_file_name_regexp--sc_$(a))))
|
||||
$(call exclude, \
|
||||
bindtextdomain=^lib/main.c$$ \
|
||||
program_name=^lib/main.c$$ \
|
||||
prohibit_always-defined_macros=^data/yacc.c|^djgpp/ \
|
||||
prohibit_always-defined_macros=^data/yacc.c$$|^djgpp/ \
|
||||
prohibit_always-defined_macros+=?|^lib/timevar.c$$ \
|
||||
prohibit_always-defined_macros+=?|^src/(parse-gram.c|system.h)$$ \
|
||||
prohibit_always-defined_macros+=?|^tests/regression.at$$ \
|
||||
prohibit_defined_have_decl_tests=?|^lib/timevar.c$$ \
|
||||
prohibit_empty_lines_at_EOF=^src/parse-gram.[ch]$$ \
|
||||
prohibit_doubled_word=^tests/named-refs.at$$ \
|
||||
prohibit_magic_number_exit=^doc/bison.texi$$ \
|
||||
prohibit_magic_number_exit+=?|^tests/(conflicts|regression).at$$ \
|
||||
require_config_h_first=^(lib/yyerror|data/(glr|yacc))\.c$$ \
|
||||
space_tab=^tests/(input|c\+\+)\.at$$ \
|
||||
trailing_blank=^src/parse-gram.[ch]$$ \
|
||||
unmarked_diagnostics=^(djgpp/|doc/bison.texi$$) \
|
||||
unmarked_diagnostics=^(djgpp/|doc/bison.texi$$|tests/c\+\+\.at$$) \
|
||||
)
|
||||
|
||||
+70
-11
@@ -1,6 +1,6 @@
|
||||
# Configure template for GNU Bison. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -26,7 +26,7 @@ m4_pattern_forbid([^gl_[A-Z]])
|
||||
AC_INIT([GNU Bison],
|
||||
m4_esyscmd([build-aux/git-version-gen .tarball-version]),
|
||||
[[email protected]])
|
||||
AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2012])
|
||||
AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2013])
|
||||
AC_DEFINE_UNQUOTED([PACKAGE_COPYRIGHT_YEAR], [$PACKAGE_COPYRIGHT_YEAR],
|
||||
[The copyright year for this package])
|
||||
|
||||
@@ -58,6 +58,20 @@ AC_PROG_CXX
|
||||
# Gnulib (early checks).
|
||||
gl_EARLY
|
||||
|
||||
# Gnulib uses '#pragma GCC diagnostic push' to silence some
|
||||
# warnings, but older gcc doesn't support this.
|
||||
AC_CACHE_CHECK([whether pragma GCC diagnostic push works],
|
||||
[lv_cv_gcc_pragma_push_works], [
|
||||
save_CFLAGS=$CFLAGS
|
||||
CFLAGS='-Wunknown-pragmas -Werror'
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic pop
|
||||
]])],
|
||||
[lv_cv_gcc_pragma_push_works=yes],
|
||||
[lv_cv_gcc_pragma_push_works=no])
|
||||
CFLAGS=$save_CFLAGS])
|
||||
|
||||
AC_ARG_ENABLE([gcc-warnings],
|
||||
[ --enable-gcc-warnings turn on lots of GCC warnings (not recommended)],
|
||||
[case $enable_gcc_warnings in
|
||||
@@ -67,37 +81,77 @@ AC_ARG_ENABLE([gcc-warnings],
|
||||
[enable_gcc_warnings=no])
|
||||
if test "$enable_gcc_warnings" = yes; then
|
||||
warn_common='-Wall -Wextra -Wno-sign-compare -Wcast-align
|
||||
-Wcast-qual -Wformat -Wpointer-arith -Wwrite-strings'
|
||||
warn_c='-Wbad-function-cast -Wmissing-declarations -Wmissing-prototypes
|
||||
-Wshadow -Wstrict-prototypes'
|
||||
-Wformat -Wpointer-arith -Wwrite-strings'
|
||||
warn_c='-Wbad-function-cast -Wshadow -Wstrict-prototypes'
|
||||
warn_cxx='-Wnoexcept'
|
||||
# Warnings for the test suite only.
|
||||
#
|
||||
# -fno-color-diagnostics: Clang's use of colors in the error
|
||||
# messages is confusing the tests looking at the compiler's output
|
||||
# (e.g., synclines.at).
|
||||
warn_tests='-Wundef -pedantic -fno-color-diagnostics'
|
||||
|
||||
AC_LANG_PUSH([C])
|
||||
# Clang supports many of GCC's -W options, but only issues warnings
|
||||
# on the ones it does not recognize. In that case, gl_WARN_ADD
|
||||
# thinks the option is supported, and unknown options are then added
|
||||
# to CFLAGS. But then, when -Werror is added in the test suite for
|
||||
# instance, the warning about the unknown option turns into an
|
||||
# error.
|
||||
#
|
||||
# This should be addressed by gnulib's gl_WARN_ADD, but in the
|
||||
# meanwhile, turn warnings about unknown options into errors in
|
||||
# CFLAGS, and restore CFLAGS after the tests.
|
||||
save_CFLAGS=$CFLAGS
|
||||
gl_WARN_ADD([-Werror=unknown-warning-option], [CFLAGS])
|
||||
for i in $warn_common $warn_c;
|
||||
do
|
||||
gl_WARN_ADD([$i], [WARN_CFLAGS])
|
||||
done
|
||||
gl_WARN_ADD([-Werror], [WERROR_CFLAGS])
|
||||
|
||||
# Warnings for the test suite, and maybe for bison if GCC is modern
|
||||
# enough.
|
||||
gl_WARN_ADD([-Wmissing-declarations], [WARN_CFLAGS_TEST])
|
||||
gl_WARN_ADD([-Wmissing-prototypes], [WARN_CFLAGS_TEST])
|
||||
test $lv_cv_gcc_pragma_push_works = yes &&
|
||||
AS_VAR_APPEND([WARN_CFLAGS], [" $WARN_CFLAGS_TEST"])
|
||||
|
||||
# Warnings for the test suite only.
|
||||
gl_WARN_ADD([-Wundef], [WARN_CFLAGS_TEST])
|
||||
gl_WARN_ADD([-pedantic], [WARN_CFLAGS_TEST])
|
||||
for i in $warn_tests;
|
||||
do
|
||||
gl_WARN_ADD([$i], [WARN_CFLAGS_TEST])
|
||||
done
|
||||
CFLAGS=$save_CFLAGS
|
||||
AC_LANG_POP([C])
|
||||
|
||||
AC_LANG_PUSH([C++])
|
||||
save_CXXFLAGS=$CXXFLAGS
|
||||
gl_WARN_ADD([-Werror=unknown-warning-option], [CXXFLAGS])
|
||||
for i in $warn_common $warn_cxx;
|
||||
do
|
||||
gl_WARN_ADD([$i], [WARN_CXXFLAGS])
|
||||
done
|
||||
gl_WARN_ADD([ -Wzero-as-null-pointer-constant], [WARN_CXXFLAGS],
|
||||
gl_WARN_ADD([-Wzero-as-null-pointer-constant], [WARN_CXXFLAGS],
|
||||
[AC_LANG_PROGRAM([], [nullptr])])
|
||||
gl_WARN_ADD([-Werror], [WERROR_CXXFLAGS])
|
||||
# Warnings for the test suite only.
|
||||
gl_WARN_ADD([-Wundef], [WARN_CXXFLAGS_TEST])
|
||||
gl_WARN_ADD([-pedantic], [WARN_CXXFLAGS_TEST])
|
||||
for i in $warn_tests;
|
||||
do
|
||||
gl_WARN_ADD([$i], [WARN_CXXFLAGS_TEST])
|
||||
done
|
||||
# Clang++ 3.2+ reject C code generated by Flex.
|
||||
gl_WARN_ADD([-Wno-null-conversion], [WARN_NO_NULL_CONVERSION_CXXFLAGS])
|
||||
# Variants break strict aliasing analysis.
|
||||
gl_WARN_ADD([-fno-strict-aliasing], [NO_STRICT_ALIAS_CXXFLAGS])
|
||||
CXXFLAGS=$save_CXXFLAGS
|
||||
AC_LANG_POP([C++])
|
||||
fi
|
||||
|
||||
BISON_TEST_FOR_WORKING_C_COMPILER
|
||||
BISON_C_COMPILER_POSIXLY_CORRECT
|
||||
BISON_TEST_FOR_WORKING_CXX_COMPILER
|
||||
BISON_CXX_COMPILER_POSIXLY_CORRECT
|
||||
|
||||
AC_ARG_ENABLE([yacc],
|
||||
[AC_HELP_STRING([--disable-yacc],
|
||||
@@ -115,6 +169,7 @@ AC_SUBST([YACC_SCRIPT])
|
||||
AC_SUBST([YACC_LIBRARY])
|
||||
|
||||
# Checks for programs.
|
||||
AM_MISSING_PROG([DOT], [dot])
|
||||
AC_PROG_LEX
|
||||
$LEX_IS_FLEX || AC_MSG_ERROR([Flex is required])
|
||||
AC_PROG_YACC
|
||||
@@ -123,6 +178,10 @@ 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 "".])
|
||||
AC_PATH_PROG([PERL], [perl])
|
||||
if test -z "$PERL"; then
|
||||
AC_MSG_ERROR([perl not found])
|
||||
fi
|
||||
AM_MISSING_PROG([HELP2MAN], [help2man])
|
||||
AC_PATH_PROG([XSLTPROC], [xsltproc])
|
||||
AC_SUBST([XSLTPROC])
|
||||
@@ -170,7 +229,7 @@ case $VALGRIND:$host_os in
|
||||
# VALGRIND+=' --suppressions=$(abs_top_srcdir)/build-aux/darwin11.4.0.valgrind'
|
||||
VALGRIND=;;
|
||||
*:*)
|
||||
AC_SUBST([VALGRIND_PREBISON], [$VALGRIND -q]);;
|
||||
AC_SUBST([VALGRIND_PREBISON], ["$VALGRIND -q"]);;
|
||||
esac
|
||||
|
||||
AM_MISSING_PROG([AUTOM4TE], [autom4te])
|
||||
|
||||
+2
-1
@@ -1,4 +1,4 @@
|
||||
## Copyright (C) 2002, 2005-2012 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2002, 2005-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -14,6 +14,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
dist_pkgdata_DATA = README bison.m4 \
|
||||
c-like.m4 \
|
||||
c-skel.m4 c.m4 yacc.c glr.c \
|
||||
c++-skel.m4 c++.m4 location.cc lalr1.cc glr.cc stack.hh \
|
||||
java-skel.m4 java.m4 lalr1.java
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ into various formats.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002, 2008-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2008-2013 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bison.
|
||||
|
||||
|
||||
+27
-3
@@ -2,7 +2,7 @@
|
||||
|
||||
# Language-independent M4 Macros for Bison.
|
||||
|
||||
# Copyright (C) 2002, 2004-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002, 2004-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -58,6 +58,30 @@ This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison.])])
|
||||
|
||||
|
||||
## -------- ##
|
||||
## Output. ##
|
||||
## -------- ##
|
||||
|
||||
# b4_output_begin(FILE)
|
||||
# ---------------------
|
||||
# Enable output, i.e., send to diversion 0, expand after "#", and
|
||||
# generate the tag to output into FILE. Must be followed by EOL.
|
||||
m4_define([b4_output_begin],
|
||||
[m4_changecom()
|
||||
m4_divert_push(0)dnl
|
||||
@output(m4_unquote([$1])@)@dnl
|
||||
])
|
||||
|
||||
|
||||
# b4_output_end()
|
||||
# ---------------
|
||||
# Output nothing, restore # as comment character (no expansions after #).
|
||||
m4_define([b4_output_end],
|
||||
[m4_divert_pop(0)
|
||||
m4_changecom([#])
|
||||
])
|
||||
|
||||
|
||||
## ---------------- ##
|
||||
## Error handling. ##
|
||||
## ---------------- ##
|
||||
@@ -259,8 +283,8 @@ m4_define([b4_basename],
|
||||
# b4_syncline(LINE, FILE)
|
||||
# -----------------------
|
||||
m4_define([b4_syncline],
|
||||
[b4_flag_if([synclines], [
|
||||
b4_sync_end([__line__], [b4_basename(m4_quote(__file__))])
|
||||
[b4_flag_if([synclines],
|
||||
[b4_sync_end([__line__], [b4_basename(m4_quote(__file__))])
|
||||
b4_sync_start([$1], [$2])])])
|
||||
|
||||
m4_define([b4_sync_end], [b4_comment([Line $1 of $2])])
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
# C++ skeleton dispatching for Bison.
|
||||
|
||||
# Copyright (C) 2006-2007, 2009-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
|
||||
# C++ skeleton for Bison
|
||||
|
||||
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -29,7 +29,7 @@ b4_percent_define_default([[parser_class_name]], [[parser]])
|
||||
# Don't do that so that we remember whether we're using a user
|
||||
# request, or the default value.
|
||||
#
|
||||
# b4_percent_define_default([[location_type]], [[location]])
|
||||
# b4_percent_define_default([[api.location.type]], [[location]])
|
||||
|
||||
b4_percent_define_default([[filename_type]], [[std::string]])
|
||||
b4_percent_define_default([[namespace]], m4_defn([b4_prefix]))
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
-*- Autoconf -*-
|
||||
|
||||
# Common code for C-like languages (C, C++, Java, etc.)
|
||||
|
||||
# Copyright (C) 2012-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# 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/>.
|
||||
|
||||
# b4_dollar_dollar_(VALUE, FIELD, DEFAULT-FIELD)
|
||||
# ----------------------------------------------
|
||||
# If FIELD (or DEFAULT-FIELD) is non-null, return "VALUE.FIELD",
|
||||
# otherwise just VALUE. Be sure to pass "(VALUE)" is VALUE is a
|
||||
# pointer.
|
||||
m4_define([b4_dollar_dollar_],
|
||||
[m4_if([$2], [[]],
|
||||
[m4_ifval([$3], [($1.$3)],
|
||||
[$1])],
|
||||
[($1.$2)])])
|
||||
|
||||
# b4_dollar_pushdef(VALUE-POINTER, DEFAULT-FIELD, LOCATION)
|
||||
# b4_dollar_popdef
|
||||
# ---------------------------------------------------------
|
||||
# Define b4_dollar_dollar for VALUE and DEFAULT-FIELD,
|
||||
# and b4_at_dollar for LOCATION.
|
||||
m4_define([b4_dollar_pushdef],
|
||||
[m4_pushdef([b4_dollar_dollar],
|
||||
[b4_dollar_dollar_([$1], m4_dquote($][1), [$2])])dnl
|
||||
m4_pushdef([b4_at_dollar], [$3])dnl
|
||||
])
|
||||
m4_define([b4_dollar_popdef],
|
||||
[m4_popdef([b4_at_dollar])dnl
|
||||
m4_popdef([b4_dollar_dollar])dnl
|
||||
])
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
# C skeleton dispatching for Bison.
|
||||
|
||||
# Copyright (C) 2006-2007, 2009-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# C M4 Macros for Bison.
|
||||
|
||||
# Copyright (C) 2002, 2004-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002, 2004-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -17,6 +17,7 @@
|
||||
# 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_include(b4_pkgdatadir/[c-like.m4])
|
||||
|
||||
# b4_tocpp(STRING)
|
||||
# ----------------
|
||||
@@ -29,19 +30,21 @@ m4_define([b4_tocpp],
|
||||
# ------------------
|
||||
# A valid C macro name to use as a CPP header guard for FILE.
|
||||
m4_define([b4_cpp_guard],
|
||||
[b4_tocpp(m4_defn([b4_prefix])/[$1])])
|
||||
[[YY_]b4_tocpp(m4_defn([b4_prefix])/[$1])[_INCLUDED]])
|
||||
|
||||
|
||||
# b4_cpp_guard_open(FILE)
|
||||
# b4_cpp_guard_close(FILE)
|
||||
# ------------------------
|
||||
# Open/close CPP inclusion guards for FILE.
|
||||
# If FILE does not expand to nothing, open/close CPP inclusion guards for FILE.
|
||||
m4_define([b4_cpp_guard_open],
|
||||
[m4_ifval(m4_quote($1),
|
||||
[#ifndef b4_cpp_guard([$1])
|
||||
# define b4_cpp_guard([$1])])
|
||||
# define b4_cpp_guard([$1])])])
|
||||
|
||||
m4_define([b4_cpp_guard_close],
|
||||
[#endif b4_comment([!b4_cpp_guard([$1])])])
|
||||
[m4_ifval(m4_quote($1),
|
||||
[#endif b4_comment([!b4_cpp_guard([$1])])])])
|
||||
|
||||
|
||||
## ---------------- ##
|
||||
@@ -160,7 +163,7 @@ m4_define([b4_int_type],
|
||||
|
||||
m4_eval([0 <= $1]), [1], [unsigned int],
|
||||
|
||||
[int])])
|
||||
[int])])
|
||||
|
||||
|
||||
# b4_int_type_for(NAME)
|
||||
@@ -181,12 +184,32 @@ m4_define([b4_table_value_equals],
|
||||
[m4_if(m4_eval($3 < m4_indir([b4_]$1[_min])
|
||||
|| m4_indir([b4_]$1[_max]) < $3), [1],
|
||||
[[YYID (0)]],
|
||||
[[((]$2[) == (]$3[))]])])
|
||||
[(!!(($2) == ($3)))])])
|
||||
|
||||
|
||||
## ---------##
|
||||
## Values. ##
|
||||
## ---------##
|
||||
## ----------------- ##
|
||||
## Compiler issues. ##
|
||||
## ----------------- ##
|
||||
|
||||
# b4_attribute_define
|
||||
# -------------------
|
||||
# Provide portability for __attribute__.
|
||||
m4_define([b4_attribute_define],
|
||||
[#ifndef __attribute__
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
# if (! defined __GNUC__ || __GNUC__ < 2 \
|
||||
|| (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
|
||||
# define __attribute__(Spec) /* empty */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Suppress unused-variable warnings by "using" E. */
|
||||
#if ! defined lint || defined __GNUC__
|
||||
# define YYUSE(E) ((void) (E))
|
||||
#else
|
||||
# define YYUSE(E) /* empty */
|
||||
#endif
|
||||
])
|
||||
|
||||
|
||||
# b4_null_define
|
||||
@@ -253,7 +276,7 @@ m4_define([b4_token_enums],
|
||||
enum ]b4_api_prefix[tokentype {
|
||||
]m4_map_sep([ b4_token_enum], [,
|
||||
],
|
||||
[$@])[
|
||||
[$@])[
|
||||
};
|
||||
#endif
|
||||
]])])
|
||||
@@ -317,7 +340,7 @@ $1 (b4_c_ansi_formals(m4_shift2($@)))[]dnl
|
||||
m4_define([b4_c_ansi_formals],
|
||||
[m4_if([$#], [0], [void],
|
||||
[$#$1], [1], [void],
|
||||
[m4_map_sep([b4_c_ansi_formal], [, ], [$@])])])
|
||||
[m4_map_sep([b4_c_ansi_formal], [, ], [$@])])])
|
||||
|
||||
m4_define([b4_c_ansi_formal],
|
||||
[$1])
|
||||
@@ -338,9 +361,9 @@ m4_define([b4_c_knr_formal_name],
|
||||
# Output the K&R argument declarations.
|
||||
m4_define([b4_c_knr_formal_decls],
|
||||
[m4_map_sep([b4_c_knr_formal_decl],
|
||||
[
|
||||
[
|
||||
],
|
||||
[$@])])
|
||||
[$@])])
|
||||
|
||||
m4_define([b4_c_knr_formal_decl],
|
||||
[ $1;])
|
||||
@@ -352,9 +375,18 @@ m4_define([b4_c_knr_formal_decl],
|
||||
## ------------------------------------------------------------ ##
|
||||
|
||||
|
||||
# b4_c_ansi_function_decl(NAME, RETURN-VALUE, [DECL1, NAME1], ...)
|
||||
# ----------------------------------------------------------------
|
||||
# Declare the function NAME ANSI C style.
|
||||
m4_define([b4_c_ansi_function_decl],
|
||||
[$2 $1 (b4_c_ansi_formals(m4_shift2($@)));[]dnl
|
||||
])
|
||||
|
||||
|
||||
|
||||
# b4_c_function_decl(NAME, RETURN-VALUE, [DECL1, NAME1], ...)
|
||||
# -----------------------------------------------------------
|
||||
# Declare the function NAME.
|
||||
# Declare the function NAME in both K&R and ANSI C.
|
||||
m4_define([b4_c_function_decl],
|
||||
[#if defined __STDC__ || defined __cplusplus
|
||||
b4_c_ansi_function_decl($@)
|
||||
@@ -364,15 +396,6 @@ $2 $1 ();
|
||||
])
|
||||
|
||||
|
||||
# b4_c_ansi_function_decl(NAME, RETURN-VALUE, [DECL1, NAME1], ...)
|
||||
# ----------------------------------------------------------------
|
||||
# Declare the function NAME.
|
||||
m4_define([b4_c_ansi_function_decl],
|
||||
[$2 $1 (b4_c_ansi_formals(m4_shift2($@)));[]dnl
|
||||
])
|
||||
|
||||
|
||||
|
||||
|
||||
## --------------------- ##
|
||||
## Calling C functions. ##
|
||||
@@ -402,7 +425,7 @@ m4_define([b4_c_arg],
|
||||
## ----------- ##
|
||||
|
||||
# b4_sync_start(LINE, FILE)
|
||||
# -----------------------
|
||||
# -------------------------
|
||||
m4_define([b4_sync_start], [[#]line $1 $2])
|
||||
|
||||
|
||||
@@ -417,23 +440,38 @@ m4_define([b4_case],
|
||||
$2
|
||||
break;])
|
||||
|
||||
# b4_symbol_actions(FILENAME, LINENO,
|
||||
# SYMBOL-TAG, SYMBOL-NUM,
|
||||
# SYMBOL-ACTION, SYMBOL-TYPENAME)
|
||||
# -------------------------------------------------
|
||||
m4_define([b4_symbol_actions],
|
||||
[m4_pushdef([b4_dollar_dollar],
|
||||
[m4_ifval([$6], [(yyvaluep->$6)], [(*yyvaluep)])])dnl
|
||||
m4_pushdef([b4_at_dollar], [(*yylocationp)])dnl
|
||||
# _b4_symbol_actions(FILENAME, LINENO,
|
||||
# SYMBOL-TAG, SYMBOL-NUM,
|
||||
# SYMBOL-ACTION, SYMBOL-TYPENAME)
|
||||
# --------------------------------------------------
|
||||
# Issue the code for a symbol action (e.g., %printer).
|
||||
#
|
||||
# Define b4_dollar_dollar([TYPE-NAME]), and b4_at_dollar, which are
|
||||
# invoked where $<TYPE-NAME>$ and @$ were specified by the user.
|
||||
m4_define([_b4_symbol_actions],
|
||||
[b4_dollar_pushdef([(*yyvaluep)], [$6], [(*yylocationp)])dnl
|
||||
case $4: /* $3 */
|
||||
b4_syncline([$2], [$1])
|
||||
$5;
|
||||
$5;
|
||||
b4_syncline([@oline@], [@ofile@])
|
||||
break;
|
||||
m4_popdef([b4_at_dollar])dnl
|
||||
m4_popdef([b4_dollar_dollar])dnl
|
||||
break;
|
||||
b4_dollar_popdef[]dnl
|
||||
])
|
||||
|
||||
# b4_symbol_actions(KIND)
|
||||
# -----------------------
|
||||
# Emit the symbol actions for KIND ("printers" or "destructors").
|
||||
# Dispatch on "yytype".
|
||||
m4_define([b4_symbol_actions],
|
||||
[m4_ifval(m4_defn([b4_symbol_$1]),
|
||||
[[switch (yytype)
|
||||
{
|
||||
]m4_map([_b4_symbol_actions], m4_defn([b4_symbol_$1]))[
|
||||
default:
|
||||
break;
|
||||
}]],
|
||||
[YYUSE (yytype);])])
|
||||
|
||||
|
||||
# b4_yydestruct_generate(FUNCTION-DECLARATOR)
|
||||
# -------------------------------------------
|
||||
@@ -463,12 +501,7 @@ b4_parse_param_use[]dnl
|
||||
yymsg = "Deleting";
|
||||
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
|
||||
|
||||
switch (yytype)
|
||||
{
|
||||
]m4_map([b4_symbol_actions], m4_defn([b4_symbol_destructors]))[
|
||||
default:
|
||||
break;
|
||||
}
|
||||
]b4_symbol_actions([destructors])[
|
||||
}]dnl
|
||||
])
|
||||
|
||||
@@ -487,9 +520,9 @@ m4_define_default([b4_yy_symbol_print_generate],
|
||||
/*ARGSUSED*/
|
||||
]$1([yy_symbol_value_print],
|
||||
[static void],
|
||||
[[FILE *yyoutput], [yyoutput]],
|
||||
[[int yytype], [yytype]],
|
||||
[[YYSTYPE const * const yyvaluep], [yyvaluep]][]dnl
|
||||
[[FILE *yyoutput], [yyoutput]],
|
||||
[[int yytype], [yytype]],
|
||||
[[YYSTYPE const * const yyvaluep], [yyvaluep]][]dnl
|
||||
b4_locations_if([, [[YYLTYPE const * const yylocationp], [yylocationp]]])[]dnl
|
||||
m4_ifset([b4_parse_param], [, b4_parse_param]))[
|
||||
{
|
||||
@@ -506,12 +539,7 @@ b4_parse_param_use[]dnl
|
||||
# else
|
||||
YYUSE (yyoutput);
|
||||
# endif
|
||||
switch (yytype)
|
||||
{
|
||||
]m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl
|
||||
[ default:
|
||||
break;
|
||||
}
|
||||
]b4_symbol_actions([printers])[
|
||||
}
|
||||
|
||||
|
||||
@@ -521,9 +549,9 @@ b4_parse_param_use[]dnl
|
||||
|
||||
]$1([yy_symbol_print],
|
||||
[static void],
|
||||
[[FILE *yyoutput], [yyoutput]],
|
||||
[[int yytype], [yytype]],
|
||||
[[YYSTYPE const * const yyvaluep], [yyvaluep]][]dnl
|
||||
[[FILE *yyoutput], [yyoutput]],
|
||||
[[int yytype], [yytype]],
|
||||
[[YYSTYPE const * const yyvaluep], [yyvaluep]][]dnl
|
||||
b4_locations_if([, [[YYLTYPE const * const yylocationp], [yylocationp]]])[]dnl
|
||||
m4_ifset([b4_parse_param], [, b4_parse_param]))[
|
||||
{
|
||||
@@ -598,7 +626,7 @@ m4_define([b4_YYDEBUG_define],
|
||||
# endif
|
||||
# else /* ! defined YYDEBUG */
|
||||
# define ]b4_api_PREFIX[DEBUG ]b4_debug_flag[
|
||||
# endif /* ! defined ]b4_api_PREFIX[DEBUG */
|
||||
# endif /* ! defined YYDEBUG */
|
||||
#endif /* ! defined ]b4_api_PREFIX[DEBUG */]])[]dnl
|
||||
])
|
||||
|
||||
@@ -639,3 +667,72 @@ m4_define([b4_yylloc_default_define],
|
||||
while (YYID (0))
|
||||
#endif
|
||||
]])
|
||||
|
||||
# b4_yy_location_print_define
|
||||
# ---------------------------
|
||||
# Define YY_LOCATION_PRINT.
|
||||
m4_define([b4_yy_location_print_define],
|
||||
[b4_locations_if([[
|
||||
/* YY_LOCATION_PRINT -- Print the location on the stream.
|
||||
This macro was not mandated originally: define only if we know
|
||||
we won't break user code: when these are the locations we know. */
|
||||
|
||||
#ifndef YY_LOCATION_PRINT
|
||||
# if defined ]b4_api_PREFIX[LTYPE_IS_TRIVIAL && ]b4_api_PREFIX[LTYPE_IS_TRIVIAL
|
||||
|
||||
/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
|
||||
|
||||
__attribute__((__unused__))
|
||||
]b4_c_function_def([yy_location_print_],
|
||||
[static unsigned],
|
||||
[[FILE *yyo], [yyo]],
|
||||
[[YYLTYPE const * const yylocp], [yylocp]])[
|
||||
{
|
||||
unsigned res = 0;
|
||||
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
|
||||
if (0 <= yylocp->first_line)
|
||||
{
|
||||
res += fprintf (yyo, "%d", yylocp->first_line);
|
||||
if (0 <= yylocp->first_column)
|
||||
res += fprintf (yyo, ".%d", yylocp->first_column);
|
||||
}
|
||||
if (0 <= yylocp->last_line)
|
||||
{
|
||||
if (yylocp->first_line < yylocp->last_line)
|
||||
{
|
||||
res += fprintf (yyo, "-%d", yylocp->last_line);
|
||||
if (0 <= end_col)
|
||||
res += fprintf (yyo, ".%d", end_col);
|
||||
}
|
||||
else if (0 <= end_col && yylocp->first_column < end_col)
|
||||
res += fprintf (yyo, "-%d", end_col);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
# define YY_LOCATION_PRINT(File, Loc) \
|
||||
yy_location_print_ (File, &(Loc))
|
||||
|
||||
# else
|
||||
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
|
||||
# endif
|
||||
#endif]],
|
||||
[[/* This macro is provided for backward compatibility. */
|
||||
#ifndef YY_LOCATION_PRINT
|
||||
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
|
||||
#endif]])
|
||||
])
|
||||
|
||||
# b4_yyloc_default
|
||||
# ----------------
|
||||
# Expand to a possible default value for yylloc.
|
||||
m4_define([b4_yyloc_default],
|
||||
[[
|
||||
# if defined ]b4_api_PREFIX[LTYPE_IS_TRIVIAL && ]b4_api_PREFIX[LTYPE_IS_TRIVIAL
|
||||
= { ]m4_join([, ],
|
||||
m4_defn([b4_location_initial_line]),
|
||||
m4_defn([b4_location_initial_column]),
|
||||
m4_defn([b4_location_initial_line]),
|
||||
m4_defn([b4_location_initial_column]))[ }
|
||||
# endif
|
||||
]])
|
||||
|
||||
+49
-97
@@ -2,7 +2,7 @@
|
||||
|
||||
# GLR skeleton for Bison
|
||||
|
||||
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -179,13 +179,10 @@ m4_define([b4_shared_declarations],
|
||||
## Output files. ##
|
||||
## -------------- ##
|
||||
|
||||
# We do want M4 expansion after # for CPP macros.
|
||||
m4_changecom()
|
||||
m4_divert_push(0)dnl
|
||||
@output(b4_parser_file_name@)@
|
||||
b4_output_begin([b4_parser_file_name])
|
||||
b4_copyright([Skeleton implementation for Bison GLR parsers in C],
|
||||
[2002-2012])
|
||||
[
|
||||
[2002-2013])[
|
||||
|
||||
/* C GLR parser skeleton written by Paul Hilfinger. */
|
||||
|
||||
]b4_identification
|
||||
@@ -223,11 +220,11 @@ b4_percent_code_get([[top]])[
|
||||
#endif
|
||||
|
||||
/* Default (constant) value used for initialization for null
|
||||
right-hand sides. Unlike the standard yacc.c template,
|
||||
here we set the default value of $$ to a zeroed-out value.
|
||||
Since the default value is undefined, this behavior is
|
||||
technically correct. */
|
||||
static YYSTYPE yyval_default;
|
||||
right-hand sides. Unlike the standard yacc.c template, here we set
|
||||
the default value of $$ to a zeroed-out value. Since the default
|
||||
value is undefined, this behavior is technically correct. */
|
||||
static YYSTYPE yyval_default;]b4_locations_if([[
|
||||
static YYLTYPE yyloc_default][]b4_yyloc_default;])[
|
||||
|
||||
/* Copy the second part of user declarations. */
|
||||
]b4_user_post_prologue
|
||||
@@ -241,24 +238,17 @@ b4_percent_code_get[]dnl
|
||||
# if defined YYENABLE_NLS && YYENABLE_NLS
|
||||
# if ENABLE_NLS
|
||||
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
||||
# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
|
||||
# endif
|
||||
# endif
|
||||
# ifndef YY_
|
||||
# define YY_(msgid) msgid
|
||||
# define YY_(Msgid) Msgid
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Suppress unused-variable warnings by "using" E. */
|
||||
#if ! defined lint || defined __GNUC__
|
||||
# define YYUSE(e) ((void) (e))
|
||||
#else
|
||||
# define YYUSE(e) /* empty */
|
||||
#endif
|
||||
|
||||
/* Identity function, used to suppress warnings about constant conditions. */
|
||||
#ifndef lint
|
||||
# define YYID(n) (n)
|
||||
# define YYID(N) (N)
|
||||
#else
|
||||
]b4_c_function_def([YYID], [static int], [[int i], [i]])[
|
||||
{
|
||||
@@ -289,31 +279,15 @@ b4_percent_code_get[]dnl
|
||||
#ifndef YYSETJMP
|
||||
# include <setjmp.h>
|
||||
# define YYJMP_BUF jmp_buf
|
||||
# define YYSETJMP(env) setjmp (env)
|
||||
# define YYLONGJMP(env, val) longjmp (env, val)
|
||||
# define YYSETJMP(Env) setjmp (Env)
|
||||
/* Pacify clang. */
|
||||
# define YYLONGJMP(Env, Val) (longjmp (Env, Val), YYASSERT (0))
|
||||
#endif
|
||||
|
||||
/*-----------------.
|
||||
| GCC extensions. |
|
||||
`-----------------*/
|
||||
|
||||
#ifndef __attribute__
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
# if (! defined __GNUC__ || __GNUC__ < 2 \
|
||||
|| (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
|
||||
# define __attribute__(Spec) /* empty */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
]b4_locations_if([#define YYOPTIONAL_LOC(Name) Name],[
|
||||
#ifdef __cplusplus
|
||||
# define YYOPTIONAL_LOC(Name) /* empty */
|
||||
#else
|
||||
# define YYOPTIONAL_LOC(Name) Name __attribute__ ((__unused__))
|
||||
#endif])[
|
||||
]b4_attribute_define[
|
||||
|
||||
#ifndef YYASSERT
|
||||
# define YYASSERT(condition) ((void) ((condition) || (abort (), 0)))
|
||||
# define YYASSERT(Condition) ((void) ((Condition) || (abort (), 0)))
|
||||
#endif
|
||||
|
||||
/* YYFINAL -- State number of the termination state. */
|
||||
@@ -474,28 +448,10 @@ static const ]b4_int_type_for([b4_stos])[ yystos[] =
|
||||
#define YYTERROR 1
|
||||
|
||||
]b4_locations_if([[
|
||||
#ifndef YYLLOC_DEFAULT
|
||||
]b4_yylloc_default_define[
|
||||
# define YYRHSLOC(Rhs, K) ((Rhs)[K].yystate.yyloc)
|
||||
|
||||
/* YY_LOCATION_PRINT -- Print the location on the stream.
|
||||
This macro was not mandated originally: define only if we know
|
||||
we won't break user code: when these are the locations we know. */
|
||||
|
||||
# define YY_LOCATION_PRINT(File, Loc) \
|
||||
fprintf (File, "%d.%d-%d.%d", \
|
||||
(Loc).first_line, (Loc).first_column, \
|
||||
(Loc).last_line, (Loc).last_column)
|
||||
#endif
|
||||
]],[
|
||||
#ifndef YYLLOC_DEFAULT
|
||||
# define YYLLOC_DEFAULT(Current, Rhs, N) ((void) 0)
|
||||
#endif
|
||||
])[
|
||||
|
||||
#ifndef YY_LOCATION_PRINT
|
||||
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
|
||||
#endif
|
||||
]])[
|
||||
]b4_yy_location_print_define[
|
||||
|
||||
/* YYLEX -- calling `yylex' with the right arguments. */
|
||||
#define YYLEX ]b4_c_function_call([yylex], [int], b4_lex_param)[
|
||||
@@ -972,8 +928,8 @@ yylhsNonterm (yyRuleNum yyrule)
|
||||
return yyr1[yyrule];
|
||||
}
|
||||
|
||||
#define yypact_value_is_default(yystate) \
|
||||
]b4_table_value_equals([[pact]], [[yystate]], [b4_pact_ninf])[
|
||||
#define yypact_value_is_default(Yystate) \
|
||||
]b4_table_value_equals([[pact]], [[Yystate]], [b4_pact_ninf])[
|
||||
|
||||
/** True iff LR state STATE has only a default reduction (regardless
|
||||
* of token). */
|
||||
@@ -990,8 +946,8 @@ yydefaultAction (yyStateNum yystate)
|
||||
return yydefact[yystate];
|
||||
}
|
||||
|
||||
#define yytable_value_is_error(yytable_value) \
|
||||
]b4_table_value_equals([[table]], [[yytable_value]], [b4_table_ninf])[
|
||||
#define yytable_value_is_error(Yytable_value) \
|
||||
]b4_table_value_equals([[table]], [[Yytable_value]], [b4_table_ninf])[
|
||||
|
||||
/** Set *YYACTION to the action to take in YYSTATE on seeing YYTOKEN.
|
||||
* Result R means
|
||||
@@ -2040,10 +1996,10 @@ yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
|
||||
#if ! YYERROR_VERBOSE
|
||||
yyerror (]b4_lyyerror_args[YY_("syntax error"));
|
||||
#else
|
||||
{
|
||||
yySymbol yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
|
||||
size_t yysize0 = yytnamerr (YY_NULL, yytokenName (yytoken));
|
||||
size_t yysize = yysize0;
|
||||
size_t yysize1;
|
||||
yybool yysize_overflow = yyfalse;
|
||||
char* yymsg = YY_NULL;
|
||||
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
||||
@@ -2103,9 +2059,11 @@ yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
|
||||
break;
|
||||
}
|
||||
yyarg[yycount++] = yytokenName (yyx);
|
||||
yysize1 = yysize + yytnamerr (YY_NULL, yytokenName (yyx));
|
||||
yysize_overflow |= yysize1 < yysize;
|
||||
yysize = yysize1;
|
||||
{
|
||||
size_t yysz = yysize + yytnamerr (YY_NULL, yytokenName (yyx));
|
||||
yysize_overflow |= yysz < yysize;
|
||||
yysize = yysz;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2125,9 +2083,11 @@ yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
|
||||
#undef YYCASE_
|
||||
}
|
||||
|
||||
yysize1 = yysize + strlen (yyformat);
|
||||
yysize_overflow |= yysize1 < yysize;
|
||||
yysize = yysize1;
|
||||
{
|
||||
size_t yysz = yysize + strlen (yyformat);
|
||||
yysize_overflow |= yysz < yysize;
|
||||
yysize = yysz;
|
||||
}
|
||||
|
||||
if (!yysize_overflow)
|
||||
yymsg = (char *) YYMALLOC (yysize);
|
||||
@@ -2157,6 +2117,7 @@ yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
|
||||
yyerror (]b4_lyyerror_args[YY_("syntax error"));
|
||||
yyMemoryExhausted (yystackp);
|
||||
}
|
||||
}
|
||||
#endif /* YYERROR_VERBOSE */
|
||||
yynerrs += 1;
|
||||
}
|
||||
@@ -2294,20 +2255,13 @@ yyrecoverSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
|
||||
YYDPRINTF ((stderr, "Starting parse\n"));
|
||||
|
||||
yychar = YYEMPTY;
|
||||
yylval = yyval_default;
|
||||
]b4_locations_if([
|
||||
#if defined ]b4_api_PREFIX[LTYPE_IS_TRIVIAL && ]b4_api_PREFIX[LTYPE_IS_TRIVIAL
|
||||
yylloc.first_line = yylloc.last_line = ]b4_location_initial_line[;
|
||||
yylloc.first_column = yylloc.last_column = ]b4_location_initial_column[;
|
||||
#endif
|
||||
])
|
||||
m4_ifdef([b4_initial_action], [
|
||||
m4_pushdef([b4_at_dollar], [yylloc])dnl
|
||||
m4_pushdef([b4_dollar_dollar], [yylval])dnl
|
||||
/* User initialization code. */
|
||||
b4_user_initial_action
|
||||
m4_popdef([b4_dollar_dollar])dnl
|
||||
m4_popdef([b4_at_dollar])])dnl
|
||||
yylval = yyval_default;]b4_locations_if([
|
||||
yylloc = yyloc_default;])[
|
||||
]m4_ifdef([b4_initial_action], [
|
||||
b4_dollar_pushdef([yylval], [], [yylloc])dnl
|
||||
/* User initialization code. */
|
||||
b4_user_initial_action
|
||||
b4_dollar_popdef])[]dnl
|
||||
[
|
||||
if (! yyinitGLRStack (yystackp, YYINITDEPTH))
|
||||
goto yyexhaustedlab;
|
||||
@@ -2601,20 +2555,18 @@ yypdumpstack (yyGLRStack* yystackp)
|
||||
YYFPRINTF (stderr, "\n");
|
||||
}
|
||||
#endif
|
||||
]
|
||||
]b4_epilogue[]dnl
|
||||
b4_output_end()
|
||||
|
||||
b4_epilogue
|
||||
dnl
|
||||
dnl glr.cc produces its own header.
|
||||
dnl
|
||||
# glr.cc produces its own header.
|
||||
m4_if(b4_skeleton, ["glr.c"],
|
||||
[b4_defines_if(
|
||||
[@output(b4_spec_defines_file@)@
|
||||
[b4_output_begin([b4_spec_defines_file])
|
||||
b4_copyright([Skeleton interface for Bison GLR parsers in C],
|
||||
[2002-2012])[
|
||||
[2002-2013])[
|
||||
|
||||
]b4_cpp_guard_open([b4_spec_defines_file])[
|
||||
]b4_shared_declarations[
|
||||
]b4_cpp_guard_close([b4_spec_defines_file])[
|
||||
]])])
|
||||
m4_divert_pop(0)
|
||||
]b4_output_end()
|
||||
])])
|
||||
|
||||
+21
-23
@@ -2,7 +2,7 @@
|
||||
|
||||
# C++ GLR skeleton for Bison
|
||||
|
||||
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -54,7 +54,7 @@ b4_defines_if([],
|
||||
[b4_fatal([b4_skeleton[: using %%defines is mandatory]])])
|
||||
|
||||
m4_include(b4_pkgdatadir/[c++.m4])
|
||||
b4_percent_define_ifdef([[location_type]], [],
|
||||
b4_percent_define_ifdef([[api.location.type]], [],
|
||||
[m4_include(b4_pkgdatadir/[location.cc])])
|
||||
|
||||
m4_define([b4_parser_class_name],
|
||||
@@ -87,12 +87,17 @@ m4_define([b4_yy_symbol_print_generate],
|
||||
]b4_parse_param_use[]dnl
|
||||
[ yyparser.yy_symbol_print_ (yytype, yyvaluep]b4_locations_if([, yylocationp])[);
|
||||
}
|
||||
]])
|
||||
]])[
|
||||
|
||||
# Hijack the initial action to initialize the locations.
|
||||
]b4_locations_if([b4_percent_define_ifdef([[api.location.type]], [],
|
||||
[m4_define([b4_initial_action],
|
||||
[yylloc.initialize ();]m4_ifdef([b4_initial_action], [
|
||||
m4_defn([b4_initial_action])]))])])[
|
||||
|
||||
# Hijack the post prologue to insert early definition of YYLLOC_DEFAULT
|
||||
# and declaration of yyerror.
|
||||
m4_append([b4_post_prologue],
|
||||
]m4_append([b4_post_prologue],
|
||||
[b4_syncline([@oline@], [@ofile@])[
|
||||
]b4_yylloc_default_define[
|
||||
#define YYRHSLOC(Rhs, K) ((Rhs)[K].yystate.yyloc)
|
||||
@@ -131,7 +136,7 @@ m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
|
||||
]b4_parser_class_name::b4_parser_class_name[ (]b4_parse_param_decl[)]m4_ifset([b4_parse_param], [
|
||||
:])[
|
||||
#if ]b4_api_PREFIX[DEBUG
|
||||
]m4_ifset([b4_parse_param], [ ], [ :])[yydebug_ (false),
|
||||
]m4_ifset([b4_parse_param], [ ], [ :])[
|
||||
yycdebug_ (&std::cerr)]m4_ifset([b4_parse_param], [,])[
|
||||
#endif]b4_parse_param_cons[
|
||||
{
|
||||
@@ -162,12 +167,7 @@ m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
|
||||
std::ostream& yyoutput = debug_stream ();
|
||||
std::ostream& yyo = yyoutput;
|
||||
YYUSE (yyo);
|
||||
switch (yytype)
|
||||
{
|
||||
]m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl
|
||||
[ default:
|
||||
break;
|
||||
}
|
||||
]b4_symbol_actions([printers])[
|
||||
}
|
||||
|
||||
|
||||
@@ -199,20 +199,20 @@ m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
|
||||
]b4_parser_class_name[::debug_level_type
|
||||
]b4_parser_class_name[::debug_level () const
|
||||
{
|
||||
return yydebug_;
|
||||
return yydebug;
|
||||
}
|
||||
|
||||
void
|
||||
]b4_parser_class_name[::set_debug_level (debug_level_type l)
|
||||
{
|
||||
yydebug_ = l;
|
||||
// Actually, it is yydebug which is really used.
|
||||
yydebug = l;
|
||||
}
|
||||
|
||||
#endif
|
||||
]m4_popdef([b4_parse_param])dnl
|
||||
b4_namespace_close[
|
||||
|
||||
]])
|
||||
b4_namespace_close
|
||||
])
|
||||
|
||||
|
||||
# Let glr.c believe that the user arguments include the parser itself.
|
||||
@@ -226,10 +226,9 @@ m4_defn([b4_parse_param]))],
|
||||
m4_include(b4_pkgdatadir/[glr.c])
|
||||
m4_popdef([b4_parse_param])
|
||||
|
||||
m4_divert_push(0)
|
||||
@output(b4_spec_defines_file@)@
|
||||
b4_output_begin([b4_spec_defines_file])
|
||||
b4_copyright([Skeleton interface for Bison GLR parsers in C++],
|
||||
[2002-2006, 2009-2012])[
|
||||
[2002-2006, 2009-2013])[
|
||||
|
||||
/* C++ GLR parser skeleton written by Akim Demaille. */
|
||||
|
||||
@@ -239,7 +238,7 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C++],
|
||||
|
||||
# include <string>
|
||||
# include <iostream>
|
||||
]b4_percent_define_ifdef([[location_type]], [],
|
||||
]b4_percent_define_ifdef([[api.location.type]], [],
|
||||
[[# include "location.hh"]])[
|
||||
|
||||
]b4_YYDEBUG_define[
|
||||
@@ -263,7 +262,7 @@ b4_user_stype
|
||||
typedef ]b4_api_PREFIX[STYPE semantic_type;
|
||||
# endif
|
||||
/// Symbol locations.
|
||||
typedef ]b4_percent_define_get([[location_type]],
|
||||
typedef ]b4_percent_define_get([[api.location.type]],
|
||||
[[location]])[ location_type;
|
||||
/// Tokens.
|
||||
struct token
|
||||
@@ -320,7 +319,6 @@ b4_user_stype
|
||||
const location_type* yylocationp);
|
||||
private:
|
||||
/* Debugging. */
|
||||
int yydebug_;
|
||||
std::ostream* yycdebug_;
|
||||
# endif
|
||||
|
||||
@@ -341,4 +339,4 @@ b4_percent_define_flag_if([[global_tokens_and_yystype]],
|
||||
]b4_namespace_close[
|
||||
]b4_percent_code_get([[provides]])[
|
||||
]b4_cpp_guard_close([b4_spec_defines_file])[
|
||||
]m4_divert_pop(0)
|
||||
]b4_output_end()
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
# Java skeleton dispatching for Bison.
|
||||
|
||||
# Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+13
-12
@@ -2,7 +2,7 @@
|
||||
|
||||
# Java language support for Bison
|
||||
|
||||
# Copyright (C) 2007-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -17,6 +17,7 @@
|
||||
# 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_include(b4_pkgdatadir/[c-like.m4])
|
||||
|
||||
# b4_comment(TEXT)
|
||||
# ----------------
|
||||
@@ -154,25 +155,25 @@ m4_define([b4_case], [ case $1:
|
||||
## ---------------- ##
|
||||
|
||||
m4_define([b4_yystype], [b4_percent_define_get([[stype]])])
|
||||
b4_percent_define_default([[stype]], [[Object]])])
|
||||
b4_percent_define_default([[stype]], [[Object]])
|
||||
|
||||
# %name-prefix
|
||||
m4_define_default([b4_prefix], [[YY]])
|
||||
|
||||
b4_percent_define_default([[parser_class_name]], [b4_prefix[]Parser])])
|
||||
b4_percent_define_default([[parser_class_name]], [b4_prefix[]Parser])
|
||||
m4_define([b4_parser_class_name], [b4_percent_define_get([[parser_class_name]])])
|
||||
|
||||
b4_percent_define_default([[lex_throws]], [[java.io.IOException]])])
|
||||
b4_percent_define_default([[lex_throws]], [[java.io.IOException]])
|
||||
m4_define([b4_lex_throws], [b4_percent_define_get([[lex_throws]])])
|
||||
|
||||
b4_percent_define_default([[throws]], [])])
|
||||
b4_percent_define_default([[throws]], [])
|
||||
m4_define([b4_throws], [b4_percent_define_get([[throws]])])
|
||||
|
||||
b4_percent_define_default([[location_type]], [Location])])
|
||||
m4_define([b4_location_type], [b4_percent_define_get([[location_type]])])
|
||||
b4_percent_define_default([[api.location.type]], [Location])
|
||||
m4_define([b4_location_type], [b4_percent_define_get([[api.location.type]])])
|
||||
|
||||
b4_percent_define_default([[position_type]], [Position])])
|
||||
m4_define([b4_position_type], [b4_percent_define_get([[position_type]])])
|
||||
b4_percent_define_default([[api.position.type]], [Position])
|
||||
m4_define([b4_position_type], [b4_percent_define_get([[api.position.type]])])
|
||||
|
||||
|
||||
## ----------------- ##
|
||||
@@ -218,9 +219,9 @@ m4_define([b4_rhs_location],
|
||||
# it to be single quoted. Same for b4_parse_param.
|
||||
|
||||
# TODO: should be in bison.m4
|
||||
m4_define_default([b4_lex_param], [[]]))
|
||||
m4_define([b4_lex_param], b4_lex_param))
|
||||
m4_define([b4_parse_param], b4_parse_param))
|
||||
m4_define_default([b4_lex_param], [[]])
|
||||
m4_define([b4_lex_param], b4_lex_param)
|
||||
m4_define([b4_parse_param], b4_parse_param)
|
||||
|
||||
# b4_lex_param_decl
|
||||
# -------------------
|
||||
|
||||
+97
-70
@@ -1,6 +1,6 @@
|
||||
# C++ skeleton for Bison
|
||||
|
||||
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -24,19 +24,16 @@ m4_define([b4_parser_class_name],
|
||||
b4_defines_if([],
|
||||
[b4_fatal([b4_skeleton[: using %%defines is mandatory]])])
|
||||
|
||||
b4_percent_define_ifdef([[location_type]], [],
|
||||
b4_percent_define_ifdef([[api.location.type]], [],
|
||||
[# Backward compatibility.
|
||||
m4_define([b4_location_constructors])
|
||||
m4_include(b4_pkgdatadir/[location.cc])])
|
||||
m4_include(b4_pkgdatadir/[stack.hh])
|
||||
|
||||
# We do want M4 expansion after # for CPP macros.
|
||||
m4_changecom()
|
||||
m4_divert_push(0)dnl
|
||||
b4_defines_if(
|
||||
[@output(b4_spec_defines_file@)@
|
||||
[b4_output_begin([b4_spec_defines_file])
|
||||
b4_copyright([Skeleton interface for Bison LALR(1) parsers in C++],
|
||||
[2002-2012])
|
||||
[2002-2013])
|
||||
[
|
||||
/**
|
||||
** \file ]b4_spec_defines_file[
|
||||
@@ -52,7 +49,7 @@ b4_copyright([Skeleton interface for Bison LALR(1) parsers in C++],
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include "stack.hh"
|
||||
]b4_percent_define_ifdef([[location_type]], [],
|
||||
]b4_percent_define_ifdef([[api.location.type]], [],
|
||||
[[#include "location.hh"]])[
|
||||
|
||||
]b4_YYDEBUG_define[
|
||||
@@ -77,7 +74,7 @@ b4_user_stype
|
||||
typedef ]b4_api_PREFIX[STYPE semantic_type;
|
||||
#endif
|
||||
/// Symbol locations.
|
||||
typedef ]b4_percent_define_get([[location_type]],
|
||||
typedef ]b4_percent_define_get([[api.location.type]],
|
||||
[[location]])[ location_type;
|
||||
/// Tokens.
|
||||
struct token
|
||||
@@ -110,6 +107,10 @@ b4_user_stype
|
||||
#endif
|
||||
|
||||
private:
|
||||
/// This class is not copyable.
|
||||
]b4_parser_class_name[ (const ]b4_parser_class_name[&);
|
||||
]b4_parser_class_name[& operator= (const ]b4_parser_class_name[&);
|
||||
|
||||
/// Report a syntax error.
|
||||
/// \param loc where the syntax error is found.
|
||||
/// \param msg a description of the syntax error.
|
||||
@@ -227,6 +228,7 @@ b4_user_stype
|
||||
|
||||
/// \brief Reclaim the memory associated to a symbol.
|
||||
/// \param yymsg Why this token is reclaimed.
|
||||
/// If null, do not display the symbol, just free it.
|
||||
/// \param yytype The symbol type.
|
||||
/// \param yyvaluep Its semantic value.
|
||||
/// \param yylocationp Its location.
|
||||
@@ -264,10 +266,13 @@ b4_user_stype
|
||||
])[
|
||||
]b4_percent_code_get([[provides]])[
|
||||
]b4_cpp_guard_close([b4_spec_defines_file])
|
||||
])dnl
|
||||
@output(b4_parser_file_name@)@
|
||||
b4_output_end()
|
||||
])
|
||||
|
||||
|
||||
b4_output_begin([b4_parser_file_name])
|
||||
b4_copyright([Skeleton implementation for Bison LALR(1) parsers in C++],
|
||||
[2002-2012])
|
||||
[2002-2013])
|
||||
b4_percent_code_get([[top]])[]dnl
|
||||
m4_if(b4_prefix, [yy], [],
|
||||
[
|
||||
@@ -335,9 +340,9 @@ do { \
|
||||
#else /* !]b4_api_PREFIX[DEBUG */
|
||||
|
||||
# define YYCDEBUG if (false) std::cerr
|
||||
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
|
||||
# define YY_REDUCE_PRINT(Rule)
|
||||
# define YY_STACK_PRINT()
|
||||
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) YYUSE(Type)
|
||||
# define YY_REDUCE_PRINT(Rule) static_cast<void>(0)
|
||||
# define YY_STACK_PRINT() static_cast<void>(0)
|
||||
|
||||
#endif /* !]b4_api_PREFIX[DEBUG */
|
||||
|
||||
@@ -417,12 +422,7 @@ do { \
|
||||
std::ostream& yyo = debug_stream ();
|
||||
std::ostream& yyoutput = yyo;
|
||||
YYUSE (yyoutput);
|
||||
switch (yytype)
|
||||
{
|
||||
]m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl
|
||||
[ default:
|
||||
break;
|
||||
}
|
||||
]b4_symbol_actions([printers])[
|
||||
}
|
||||
|
||||
|
||||
@@ -446,14 +446,10 @@ do { \
|
||||
YYUSE (yymsg);
|
||||
YYUSE (yyvaluep);
|
||||
|
||||
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
|
||||
if (yymsg)
|
||||
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
|
||||
|
||||
switch (yytype)
|
||||
{
|
||||
]m4_map([b4_symbol_actions], m4_defn([b4_symbol_destructors]))[
|
||||
default:
|
||||
break;
|
||||
}
|
||||
]b4_symbol_actions([destructors])[
|
||||
}
|
||||
|
||||
void
|
||||
@@ -510,17 +506,18 @@ do { \
|
||||
int yychar = yyempty_;
|
||||
int yytoken = 0;
|
||||
|
||||
/* State. */
|
||||
// State.
|
||||
int yyn;
|
||||
int yylen = 0;
|
||||
int yystate = 0;
|
||||
|
||||
/* Error handling. */
|
||||
// Error handling.
|
||||
int yynerrs_ = 0;
|
||||
int yyerrstatus_ = 0;
|
||||
|
||||
/// Semantic value of the lookahead.
|
||||
semantic_type yylval;
|
||||
static semantic_type yyval_default;
|
||||
semantic_type yylval = yyval_default;
|
||||
/// Location of the lookahead.
|
||||
location_type yylloc;
|
||||
/// The locations where the error started and ended.
|
||||
@@ -533,23 +530,25 @@ do { \
|
||||
|
||||
int yyresult;
|
||||
|
||||
// FIXME: This shoud be completely indented. It is not yet to
|
||||
// avoid gratuitous conflicts when merging into the master branch.
|
||||
try
|
||||
{
|
||||
YYCDEBUG << "Starting parse" << std::endl;
|
||||
|
||||
]m4_ifdef([b4_initial_action], [
|
||||
m4_pushdef([b4_at_dollar], [yylloc])dnl
|
||||
m4_pushdef([b4_dollar_dollar], [yylval])dnl
|
||||
/* User initialization code. */
|
||||
b4_user_initial_action
|
||||
m4_popdef([b4_dollar_dollar])dnl
|
||||
m4_popdef([b4_at_dollar])])dnl
|
||||
b4_dollar_pushdef([yylval], [], [yylloc])dnl
|
||||
/* User initialization code. */
|
||||
b4_user_initial_action
|
||||
b4_dollar_popdef])[]dnl
|
||||
|
||||
[ /* Initialize the stacks. The initial state will be pushed in
|
||||
yynewstate, since the latter expects the semantical and the
|
||||
location values to have been already stored, initialize these
|
||||
stacks with a primary value. */
|
||||
yystate_stack_ = state_stack_type (0);
|
||||
yysemantic_stack_ = semantic_stack_type (0);
|
||||
yylocation_stack_ = location_stack_type (0);
|
||||
yystate_stack_.clear ();
|
||||
yysemantic_stack_.clear ();
|
||||
yylocation_stack_.clear ();
|
||||
yysemantic_stack_.push (yylval);
|
||||
yylocation_stack_.push (yylloc);
|
||||
|
||||
@@ -575,14 +574,13 @@ m4_popdef([b4_at_dollar])])dnl
|
||||
/* Read a lookahead token. */
|
||||
if (yychar == yyempty_)
|
||||
{
|
||||
YYCDEBUG << "Reading a token: ";
|
||||
yychar = ]b4_c_function_call([yylex], [int],
|
||||
[b4_api_PREFIX[STYPE*], [&yylval]][]dnl
|
||||
YYCDEBUG << "Reading a token: ";
|
||||
yychar = ]b4_c_function_call([yylex], [int],
|
||||
[b4_api_PREFIX[STYPE*], [&yylval]][]dnl
|
||||
b4_locations_if([, [[location*], [&yylloc]]])dnl
|
||||
m4_ifdef([b4_lex_param], [, ]b4_lex_param))[;
|
||||
}
|
||||
|
||||
|
||||
/* Convert token to internal form. */
|
||||
if (yychar <= yyeof_)
|
||||
{
|
||||
@@ -653,17 +651,21 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param))[;
|
||||
else
|
||||
yyval = yysemantic_stack_[0];
|
||||
|
||||
// Compute the default @@$.
|
||||
{
|
||||
slice<location_type, location_stack_type> slice (yylocation_stack_, yylen);
|
||||
YYLLOC_DEFAULT (yyloc, slice, yylen);
|
||||
}
|
||||
|
||||
// Perform the reduction.
|
||||
YY_REDUCE_PRINT (yyn);
|
||||
switch (yyn)
|
||||
{
|
||||
]b4_user_actions[
|
||||
default:
|
||||
break;
|
||||
]b4_user_actions[
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* User semantic actions sometimes alter yychar, and that requires
|
||||
that yytoken be updated with the new translation. We take the
|
||||
approach of translating immediately before every use of yytoken.
|
||||
@@ -714,20 +716,19 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param))[;
|
||||
yyerror_range[1] = yylloc;
|
||||
if (yyerrstatus_ == 3)
|
||||
{
|
||||
/* If just tried and failed to reuse lookahead token after an
|
||||
error, discard it. */
|
||||
|
||||
if (yychar <= yyeof_)
|
||||
{
|
||||
/* Return failure if at end of input. */
|
||||
if (yychar == yyeof_)
|
||||
YYABORT;
|
||||
}
|
||||
else
|
||||
{
|
||||
yydestruct_ ("Error: discarding", yytoken, &yylval, &yylloc);
|
||||
yychar = yyempty_;
|
||||
}
|
||||
/* If just tried and failed to reuse lookahead token after an
|
||||
error, discard it. */
|
||||
if (yychar <= yyeof_)
|
||||
{
|
||||
/* Return failure if at end of input. */
|
||||
if (yychar == yyeof_)
|
||||
YYABORT;
|
||||
}
|
||||
else
|
||||
{
|
||||
yydestruct_ ("Error: discarding", yytoken, &yylval, &yylloc);
|
||||
yychar = yyempty_;
|
||||
}
|
||||
}
|
||||
|
||||
/* Else will try to reuse lookahead token after shifting the error
|
||||
@@ -776,7 +777,7 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param))[;
|
||||
|
||||
/* Pop the current state because it cannot handle the error token. */
|
||||
if (yystate_stack_.height () == 1)
|
||||
YYABORT;
|
||||
YYABORT;
|
||||
|
||||
yyerror_range[1] = yylocation_stack_[0];
|
||||
yydestruct_ ("Error: popping",
|
||||
@@ -824,16 +825,42 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param))[;
|
||||
/* Do not reclaim the symbols of the rule which action triggered
|
||||
this YYABORT or YYACCEPT. */
|
||||
yypop_ (yylen);
|
||||
while (yystate_stack_.height () != 1)
|
||||
while (1 < yystate_stack_.height ())
|
||||
{
|
||||
yydestruct_ ("Cleanup: popping",
|
||||
yystos_[yystate_stack_[0]],
|
||||
&yysemantic_stack_[0],
|
||||
&yylocation_stack_[0]);
|
||||
yypop_ ();
|
||||
yydestruct_ ("Cleanup: popping",
|
||||
yystos_[yystate_stack_[0]],
|
||||
&yysemantic_stack_[0],
|
||||
&yylocation_stack_[0]);
|
||||
yypop_ ();
|
||||
}
|
||||
|
||||
return yyresult;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
YYCDEBUG << "Exception caught: cleaning lookahead and stack"
|
||||
<< std::endl;
|
||||
// Do not try to display the values of the reclaimed symbols,
|
||||
// as their printer might throw an exception.
|
||||
if (yychar != yyempty_)
|
||||
{
|
||||
/* Make sure we have latest lookahead translation. See
|
||||
comments at user semantic actions for why this is
|
||||
necessary. */
|
||||
yytoken = yytranslate_ (yychar);
|
||||
yydestruct_ (YY_NULL, yytoken, &yylval, &yylloc);
|
||||
}
|
||||
|
||||
while (1 < yystate_stack_.height ())
|
||||
{
|
||||
yydestruct_ (YY_NULL,
|
||||
yystos_[yystate_stack_[0]],
|
||||
&yysemantic_stack_[0],
|
||||
&yylocation_stack_[0]);
|
||||
yypop_ ();
|
||||
}
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
// Generate an error message.
|
||||
@@ -1106,5 +1133,5 @@ b4_error_verbose_if([int yystate, int yytoken],
|
||||
const ]b4_parser_class_name[::token_number_type ]b4_parser_class_name[::yyundef_token_ = ]b4_undef_token_number[;
|
||||
|
||||
]b4_namespace_close[
|
||||
]b4_epilogue
|
||||
m4_divert_pop(0)
|
||||
]b4_epilogue[]dnl
|
||||
b4_output_end()
|
||||
|
||||
+8
-11
@@ -1,6 +1,6 @@
|
||||
# Java skeleton for Bison -*- autoconf -*-
|
||||
|
||||
# Copyright (C) 2007-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -22,10 +22,9 @@ m4_ifval(m4_defn([b4_symbol_destructors]),
|
||||
[b4_fatal([%s: %%destructor does not make sense in Java], [b4_skeleton])],
|
||||
[])
|
||||
|
||||
m4_divert_push(0)dnl
|
||||
@output(b4_parser_file_name@)@
|
||||
b4_output_begin([b4_parser_file_name])
|
||||
b4_copyright([Skeleton implementation for Bison LALR(1) parsers in Java],
|
||||
[2007-2012])
|
||||
[2007-2013])
|
||||
|
||||
b4_percent_define_ifdef([package], [package b4_percent_define_get([package]);
|
||||
])[/* First part of user declarations. */
|
||||
@@ -458,12 +457,10 @@ b4_lexer_if([[
|
||||
yyerrstatus_ = 0;
|
||||
|
||||
]m4_ifdef([b4_initial_action], [
|
||||
m4_pushdef([b4_at_dollar], [yylloc])dnl
|
||||
m4_pushdef([b4_dollar_dollar], [yylval])dnl
|
||||
/* User initialization code. */
|
||||
b4_user_initial_action
|
||||
m4_popdef([b4_dollar_dollar])dnl
|
||||
m4_popdef([b4_at_dollar])])dnl
|
||||
b4_dollar_pushdef([yylval], [], [yylloc])dnl
|
||||
/* User initialization code. */
|
||||
b4_user_initial_action
|
||||
b4_dollar_popdef])[]dnl
|
||||
|
||||
[ /* Initialize the stack. */
|
||||
yystack.push (yystate, yylval]b4_locations_if([, yylloc])[);
|
||||
@@ -927,4 +924,4 @@ b4_percent_code_get[]dnl
|
||||
}
|
||||
|
||||
b4_epilogue
|
||||
m4_divert_pop(0)dnl
|
||||
b4_output_end()
|
||||
|
||||
+19
-18
@@ -1,6 +1,6 @@
|
||||
# C++ skeleton for Bison
|
||||
|
||||
# Copyright (C) 2002-2007, 2009-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002-2007, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -15,12 +15,10 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# We do want M4 expansion after # for CPP macros.
|
||||
m4_changecom()
|
||||
m4_divert_push(0)dnl
|
||||
@output(b4_dir_prefix[]position.hh@)@
|
||||
|
||||
b4_output_begin([b4_dir_prefix[]position.hh])
|
||||
b4_copyright([Positions for Bison parsers in C++],
|
||||
[2002-2007, 2009-2012])[
|
||||
[2002-2007, 2009-2013])[
|
||||
|
||||
/**
|
||||
** \file ]b4_dir_prefix[position.hh
|
||||
@@ -30,7 +28,7 @@ b4_copyright([Positions for Bison parsers in C++],
|
||||
]b4_cpp_guard_open([b4_dir_prefix[]position.hh])[
|
||||
|
||||
# include <algorithm> // std::max
|
||||
# include <iosfwd>
|
||||
# include <iostream>
|
||||
# include <string>
|
||||
|
||||
]b4_null_define[
|
||||
@@ -87,7 +85,7 @@ b4_copyright([Positions for Bison parsers in C++],
|
||||
};
|
||||
|
||||
/// Add and assign a position.
|
||||
inline const position&
|
||||
inline position&
|
||||
operator+= (position& res, const int width)
|
||||
{
|
||||
res.columns (width);
|
||||
@@ -103,7 +101,7 @@ b4_copyright([Positions for Bison parsers in C++],
|
||||
}
|
||||
|
||||
/// Add and assign a position.
|
||||
inline const position&
|
||||
inline position&
|
||||
operator-= (position& res, const int width)
|
||||
{
|
||||
return res += -width;
|
||||
@@ -138,8 +136,9 @@ b4_copyright([Positions for Bison parsers in C++],
|
||||
** \param ostr the destination output stream
|
||||
** \param pos a reference to the position to redirect
|
||||
*/
|
||||
inline std::ostream&
|
||||
operator<< (std::ostream& ostr, const position& pos)
|
||||
template <typename YYChar>
|
||||
inline std::basic_ostream<YYChar>&
|
||||
operator<< (std::basic_ostream<YYChar>& ostr, const position& pos)
|
||||
{
|
||||
if (pos.filename)
|
||||
ostr << *pos.filename << ':';
|
||||
@@ -148,9 +147,12 @@ b4_copyright([Positions for Bison parsers in C++],
|
||||
|
||||
]b4_namespace_close[
|
||||
]b4_cpp_guard_close([b4_dir_prefix[]position.hh])
|
||||
@output(b4_dir_prefix[]location.hh@)@
|
||||
b4_output_end()
|
||||
|
||||
|
||||
b4_output_begin([b4_dir_prefix[]location.hh])
|
||||
b4_copyright([Locations for Bison parsers in C++],
|
||||
[2002-2007, 2009-2012])[
|
||||
[2002-2007, 2009-2013])[
|
||||
|
||||
/**
|
||||
** \file ]b4_dir_prefix[location.hh
|
||||
@@ -159,8 +161,6 @@ b4_copyright([Locations for Bison parsers in C++],
|
||||
|
||||
]b4_cpp_guard_open([b4_dir_prefix[]location.hh])[
|
||||
|
||||
# include <iostream>
|
||||
# include <string>
|
||||
# include "position.hh"
|
||||
|
||||
]b4_namespace_open[
|
||||
@@ -276,7 +276,9 @@ b4_copyright([Locations for Bison parsers in C++],
|
||||
**
|
||||
** Avoid duplicate information.
|
||||
*/
|
||||
inline std::ostream& operator<< (std::ostream& ostr, const location& loc)
|
||||
template <typename YYChar>
|
||||
inline std::basic_ostream<YYChar>&
|
||||
operator<< (std::basic_ostream<YYChar>& ostr, const location& loc)
|
||||
{
|
||||
position last = loc.end - 1;
|
||||
ostr << loc.begin;
|
||||
@@ -294,5 +296,4 @@ b4_copyright([Locations for Bison parsers in C++],
|
||||
]b4_namespace_close[
|
||||
|
||||
]b4_cpp_guard_close([b4_dir_prefix[]location.hh])
|
||||
m4_divert_pop(0)
|
||||
m4_changecom([#])
|
||||
b4_output_end()
|
||||
|
||||
+15
-10
@@ -1,6 +1,6 @@
|
||||
# C++ skeleton for Bison
|
||||
|
||||
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -16,14 +16,11 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
m4_pushdef([b4_copyright_years],
|
||||
[2002-2012])
|
||||
[2002-2013])
|
||||
|
||||
# We do want M4 expansion after # for CPP macros.
|
||||
m4_changecom()
|
||||
m4_divert_push(0)dnl
|
||||
@output(b4_dir_prefix[]stack.hh@)@
|
||||
b4_output_begin([b4_dir_prefix[]stack.hh])
|
||||
b4_copyright([Stack handling for Bison parsers in C++],
|
||||
[2002-2012])[
|
||||
[2002-2013])[
|
||||
|
||||
/**
|
||||
** \file ]b4_dir_prefix[stack.hh
|
||||
@@ -80,6 +77,12 @@ b4_copyright([Stack handling for Bison parsers in C++],
|
||||
seq_.pop_front ();
|
||||
}
|
||||
|
||||
void
|
||||
clear ()
|
||||
{
|
||||
seq_.clear ();
|
||||
}
|
||||
|
||||
inline
|
||||
unsigned int
|
||||
height () const
|
||||
@@ -91,6 +94,8 @@ b4_copyright([Stack handling for Bison parsers in C++],
|
||||
inline const_iterator end () const { return seq_.rend (); }
|
||||
|
||||
private:
|
||||
stack (const stack&);
|
||||
stack& operator= (const stack&);
|
||||
S seq_;
|
||||
};
|
||||
|
||||
@@ -119,6 +124,6 @@ b4_copyright([Stack handling for Bison parsers in C++],
|
||||
]b4_namespace_close[
|
||||
|
||||
]b4_cpp_guard_close([b4_dir_prefix[]stack.hh])
|
||||
m4_divert_pop(0)
|
||||
m4_popdef([b4_copyright_years])dnl
|
||||
m4_changecom([#])
|
||||
b4_output_end()
|
||||
|
||||
m4_popdef([b4_copyright_years])
|
||||
|
||||
+13
-1
@@ -3,7 +3,7 @@
|
||||
<!--
|
||||
bison.xsl - common templates for Bison XSLT.
|
||||
|
||||
Copyright (C) 2007-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
@@ -90,4 +90,16 @@
|
||||
<xsl:value-of select="string-length(translate($conflict-data, 's', ''))"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="space">
|
||||
<xsl:param name="repeat">0</xsl:param>
|
||||
<xsl:param name="fill" select="' '"/>
|
||||
<xsl:if test="number($repeat) >= 1">
|
||||
<xsl:call-template name="space">
|
||||
<xsl:with-param name="repeat" select="$repeat - 1"/>
|
||||
<xsl:with-param name="fill" select="$fill"/>
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="$fill"/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
||||
+183
-8
@@ -3,7 +3,7 @@
|
||||
<!--
|
||||
xml2dot.xsl - transform Bison XML Report into DOT.
|
||||
|
||||
Copyright (C) 2007-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
@@ -55,7 +55,11 @@
|
||||
<xsl:call-template name="escape">
|
||||
<xsl:with-param name="subject" select="$filename"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>" { </xsl:text>
|
||||
<xsl:text>" {
|
||||
node [fontname = courier, shape = box, colorscheme = paired6]
|
||||
edge [fontname = courier]
|
||||
|
||||
</xsl:text>
|
||||
<xsl:apply-templates select="state"/>
|
||||
<xsl:text>} </xsl:text>
|
||||
</xsl:template>
|
||||
@@ -64,11 +68,87 @@
|
||||
<xsl:call-template name="output-node">
|
||||
<xsl:with-param name="number" select="@number"/>
|
||||
<xsl:with-param name="label">
|
||||
<xsl:value-of select="@number"/>
|
||||
<xsl:apply-templates select="itemset/item"/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:apply-templates select="actions/transitions"/>
|
||||
<xsl:apply-templates select="actions/reductions">
|
||||
<xsl:with-param name="staten">
|
||||
<xsl:value-of select="@number"/>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="actions/reductions">
|
||||
<xsl:param name="staten"/>
|
||||
<xsl:for-each select='reduction'>
|
||||
<!-- These variables are needed because the current context can't be
|
||||
refered to directly in XPath expressions. -->
|
||||
<xsl:variable name="rul">
|
||||
<xsl:value-of select="@rule"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="ena">
|
||||
<xsl:value-of select="@enabled"/>
|
||||
</xsl:variable>
|
||||
<!-- The foreach's body is protected by this, so that we are actually
|
||||
going to iterate once per reduction rule, and not per lookahead. -->
|
||||
<xsl:if test='not(preceding-sibling::*[@rule=$rul and @enabled=$ena])'>
|
||||
<xsl:variable name="rule">
|
||||
<xsl:choose>
|
||||
<!-- The acceptation state is refered to as 'accept' in the XML, but
|
||||
just as '0' in the DOT. -->
|
||||
<xsl:when test="@rule='accept'">
|
||||
<xsl:text>0</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="@rule"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- The edge's beginning -->
|
||||
<xsl:call-template name="reduction-edge-start">
|
||||
<xsl:with-param name="state" select="$staten"/>
|
||||
<xsl:with-param name="rule" select="$rule"/>
|
||||
<xsl:with-param name="enabled" select="@enabled"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<!-- The edge's tokens -->
|
||||
<!-- Don't show labels for the default action. In other cases, there will
|
||||
always be at least one token, so 'label="[]"' will not occur. -->
|
||||
<xsl:if test='$rule!=0 and not(../reduction[@enabled=$ena and @rule=$rule and @symbol="$default"])'>
|
||||
<xsl:text>label="[</xsl:text>
|
||||
<xsl:for-each select='../reduction[@enabled=$ena and @rule=$rule]'>
|
||||
<xsl:call-template name="escape">
|
||||
<xsl:with-param name="subject" select="@symbol"/>
|
||||
</xsl:call-template>
|
||||
<xsl:if test="position() != last ()">
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:text>]", </xsl:text>
|
||||
</xsl:if>
|
||||
|
||||
<!-- The edge's end -->
|
||||
<xsl:text>style=solid] </xsl:text>
|
||||
|
||||
<!-- The diamond representing the reduction -->
|
||||
<xsl:call-template name="reduction-node">
|
||||
<xsl:with-param name="state" select="$staten"/>
|
||||
<xsl:with-param name="rule" select="$rule"/>
|
||||
<xsl:with-param name="color">
|
||||
<xsl:choose>
|
||||
<xsl:when test='@enabled="true"'>
|
||||
<xsl:text>3</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>5</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="actions/transitions">
|
||||
@@ -76,17 +156,48 @@
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item">
|
||||
<xsl:param name="prev-rule-number"
|
||||
select="preceding-sibling::item[1]/@rule-number"/>
|
||||
<xsl:apply-templates select="key('bison:ruleByNumber', @rule-number)">
|
||||
<xsl:with-param name="point" select="@point"/>
|
||||
<xsl:with-param name="num" select="@rule-number"/>
|
||||
<xsl:with-param name="prev-lhs"
|
||||
select="key('bison:ruleByNumber', $prev-rule-number)/lhs[text()]"
|
||||
/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:apply-templates select="lookaheads"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="rule">
|
||||
<xsl:param name="point"/>
|
||||
<xsl:param name="num"/>
|
||||
<xsl:param name="prev-lhs"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="lhs"/>
|
||||
<xsl:text> -></xsl:text>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$num < 10">
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$num < 100">
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:value-of select="$num"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$prev-lhs = lhs[text()]">
|
||||
<xsl:call-template name="lpad">
|
||||
<xsl:with-param name="str" select="'|'"/>
|
||||
<xsl:with-param name="pad" select="number(string-length(lhs[text()])) + 1"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="lhs"/>
|
||||
<xsl:text>:</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="$point = 0">
|
||||
<xsl:text> .</xsl:text>
|
||||
</xsl:if>
|
||||
@@ -106,7 +217,7 @@
|
||||
<xsl:template match="empty"/>
|
||||
|
||||
<xsl:template match="lookaheads">
|
||||
<xsl:text>[</xsl:text>
|
||||
<xsl:text> [</xsl:text>
|
||||
<xsl:apply-templates select="symbol"/>
|
||||
<xsl:text>]</xsl:text>
|
||||
</xsl:template>
|
||||
@@ -118,6 +229,50 @@
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="reduction-edge-start">
|
||||
<xsl:param name="state"/>
|
||||
<xsl:param name="rule"/>
|
||||
<xsl:param name="enabled"/>
|
||||
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="$state"/>
|
||||
<xsl:text> -> "</xsl:text>
|
||||
<xsl:value-of select="$state"/>
|
||||
<xsl:text>R</xsl:text>
|
||||
<xsl:value-of select="$rule"/>
|
||||
<xsl:if test='$enabled = "false"'>
|
||||
<xsl:text>d</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>" [</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="reduction-node">
|
||||
<xsl:param name="state"/>
|
||||
<xsl:param name="rule"/>
|
||||
<xsl:param name="color"/>
|
||||
|
||||
<xsl:text> "</xsl:text>
|
||||
<xsl:value-of select="$state"/>
|
||||
<xsl:text>R</xsl:text>
|
||||
<xsl:value-of select="$rule"/>
|
||||
<xsl:if test="$color = 5">
|
||||
<xsl:text>d</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>" [label="</xsl:text>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$rule = 0">
|
||||
<xsl:text>Acc", fillcolor=1</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>R</xsl:text>
|
||||
<xsl:value-of select="$rule"/>
|
||||
<xsl:text>", fillcolor=</xsl:text>
|
||||
<xsl:value-of select="$color"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text>, shape=diamond, style=filled] </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="transition">
|
||||
<xsl:call-template name="output-edge">
|
||||
<xsl:with-param name="src" select="../../../@number"/>
|
||||
@@ -149,10 +304,13 @@
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="$number"/>
|
||||
<xsl:text> [label="</xsl:text>
|
||||
<xsl:text>State </xsl:text>
|
||||
<xsl:value-of select="$number"/>
|
||||
<xsl:text>\n</xsl:text>
|
||||
<xsl:call-template name="escape">
|
||||
<xsl:with-param name="subject" select="$label"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>"] </xsl:text>
|
||||
<xsl:text>\l"] </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="output-edge">
|
||||
@@ -193,7 +351,7 @@
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="search" select="' '"/>
|
||||
<xsl:with-param name="replace" select="'\n'"/>
|
||||
<xsl:with-param name="replace" select="'\l'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
@@ -219,4 +377,21 @@
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="lpad">
|
||||
<xsl:param name="str" select="''"/>
|
||||
<xsl:param name="pad" select="0"/>
|
||||
<xsl:variable name="diff" select="$pad - string-length($str)" />
|
||||
<xsl:choose>
|
||||
<xsl:when test="$diff < 0">
|
||||
<xsl:value-of select="$str"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="space">
|
||||
<xsl:with-param name="repeat" select="$diff"/>
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="$str"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
||||
+2
-14
@@ -3,7 +3,7 @@
|
||||
<!--
|
||||
xml2text.xsl - transform Bison XML Report into plain text.
|
||||
|
||||
Copyright (C) 2007-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
@@ -230,7 +230,7 @@
|
||||
<xsl:template match="automaton/state">
|
||||
<xsl:param name="pad"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:text>state </xsl:text>
|
||||
<xsl:text>State </xsl:text>
|
||||
<xsl:value-of select="@number"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="itemset/item">
|
||||
@@ -522,18 +522,6 @@
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="space">
|
||||
<xsl:param name="repeat">0</xsl:param>
|
||||
<xsl:param name="fill" select="' '"/>
|
||||
<xsl:if test="number($repeat) >= 1">
|
||||
<xsl:call-template name="space">
|
||||
<xsl:with-param name="repeat" select="$repeat - 1"/>
|
||||
<xsl:with-param name="fill" select="$fill"/>
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="$fill"/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="line-wrap">
|
||||
<xsl:param name="line-length"/> <!-- required -->
|
||||
<xsl:param name="first-line-length" select="$line-length"/>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!--
|
||||
xml2html.xsl - transform Bison XML Report into XHTML.
|
||||
|
||||
Copyright (C) 2007-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
+110
-107
@@ -2,7 +2,7 @@
|
||||
|
||||
# Yacc compatible skeleton for Bison
|
||||
|
||||
# Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation,
|
||||
# Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation,
|
||||
# Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
@@ -65,24 +65,36 @@ m4_define_default([b4_stack_depth_init], [200])
|
||||
## ------------------------ ##
|
||||
|
||||
b4_percent_define_default([[api.pure]], [[false]])
|
||||
b4_define_flag_if([pure])
|
||||
m4_define([b4_pure_flag],
|
||||
[b4_percent_define_flag_if([[api.pure]], [[1]], [[0]])])
|
||||
b4_percent_define_check_values([[[[api.pure]],
|
||||
[[false]], [[true]], [[]], [[full]]]])
|
||||
|
||||
# b4_yacc_pure_if(IF-TRUE, IF-FALSE)
|
||||
# ----------------------------------
|
||||
# Expand IF-TRUE, if %pure-parser and %parse-param, IF-FALSE otherwise.
|
||||
m4_define([b4_yacc_pure_if],
|
||||
[b4_pure_if([m4_ifset([b4_parse_param],
|
||||
[$1], [$2])],
|
||||
[$2])])
|
||||
m4_define([b4_pure_flag], [[0]])
|
||||
m4_case(b4_percent_define_get([[api.pure]]),
|
||||
[false], [m4_define([b4_pure_flag], [[0]])],
|
||||
[true], [m4_define([b4_pure_flag], [[1]])],
|
||||
[], [m4_define([b4_pure_flag], [[1]])],
|
||||
[full], [m4_define([b4_pure_flag], [[2]])])
|
||||
|
||||
m4_define([b4_pure_if],
|
||||
[m4_case(b4_pure_flag,
|
||||
[0], [$2],
|
||||
[1], [$1],
|
||||
[2], [$1])])
|
||||
[m4_fatal([invalid api.pure value: ]$1)])])
|
||||
|
||||
# b4_yyerror_arg_loc_if(ARG)
|
||||
# --------------------------
|
||||
# Expand ARG iff yyerror is to be given a location as argument.
|
||||
m4_define([b4_yyerror_arg_loc_if],
|
||||
[b4_locations_if([m4_case(b4_pure_flag,
|
||||
[1], [m4_ifset([b4_parse_param], [$1])],
|
||||
[2], [$1])])])
|
||||
|
||||
# b4_yyerror_args
|
||||
# ---------------
|
||||
# Arguments passed to yyerror: user args plus yylloc.
|
||||
m4_define([b4_yyerror_args],
|
||||
[b4_yacc_pure_if([b4_locations_if([&yylloc, ])])dnl
|
||||
[b4_yyerror_arg_loc_if([&yylloc, ])dnl
|
||||
m4_ifset([b4_parse_param], [b4_c_args(b4_parse_param), ])])
|
||||
|
||||
|
||||
@@ -170,11 +182,36 @@ m4_define([b4_declare_scanner_communication_variables], [[
|
||||
/* The lookahead symbol. */
|
||||
int yychar;
|
||||
|
||||
]b4_pure_if([[
|
||||
#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
|
||||
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
|
||||
_Pragma ("GCC diagnostic push") \
|
||||
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
|
||||
_Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
|
||||
_Pragma ("GCC diagnostic pop")
|
||||
#else
|
||||
/* Default value used for initialization, for pacifying older GCCs
|
||||
or non-GCC compilers. */
|
||||
static YYSTYPE yyval_default;
|
||||
# define YY_INITIAL_VALUE(Value) = Value
|
||||
#endif]b4_locations_if([[
|
||||
static YYLTYPE yyloc_default][]b4_yyloc_default[;]])])[
|
||||
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
|
||||
#endif
|
||||
#ifndef YY_INITIAL_VALUE
|
||||
# define YY_INITIAL_VALUE(Value) /* Nothing. */
|
||||
#endif
|
||||
|
||||
/* The semantic value of the lookahead symbol. */
|
||||
YYSTYPE yylval;]b4_locations_if([[
|
||||
YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);]b4_locations_if([[
|
||||
|
||||
/* Location data for the lookahead symbol. */
|
||||
YYLTYPE yylloc;]])b4_pure_if([], [[
|
||||
YYLTYPE yylloc]b4_pure_if([ = yyloc_default], [b4_yyloc_default])[;
|
||||
]])b4_pure_if([], [[
|
||||
|
||||
/* Number of syntax errors so far. */
|
||||
int yynerrs;]])])
|
||||
@@ -242,7 +279,7 @@ typedef struct ]b4_prefix[pstate ]b4_prefix[pstate;
|
||||
[[b4_prefix[pstate *ps]], [[ps]]]b4_pure_if([,
|
||||
[[[int pushed_char]], [[pushed_char]]],
|
||||
[[b4_api_PREFIX[STYPE const *pushed_val]], [[pushed_val]]]b4_locations_if([,
|
||||
[[b4_api_PREFIX[LTYPE const *pushed_loc]], [[pushed_loc]]]])])m4_ifset([b4_parse_param], [,
|
||||
[[b4_api_PREFIX[LTYPE *pushed_loc]], [[pushed_loc]]]])])m4_ifset([b4_parse_param], [,
|
||||
b4_parse_param]))
|
||||
b4_pull_if([b4_c_function_decl([b4_prefix[pull_parse]], [[int]],
|
||||
[[b4_prefix[pstate *ps]], [[ps]]]m4_ifset([b4_parse_param], [,
|
||||
@@ -289,16 +326,14 @@ m4_define([b4_shared_declarations],
|
||||
]b4_cpp_guard_close([b4_spec_defines_file])[]dnl
|
||||
])
|
||||
|
||||
|
||||
## -------------- ##
|
||||
## Output files. ##
|
||||
## -------------- ##
|
||||
|
||||
# We do want M4 expansion after # for CPP macros.
|
||||
m4_changecom()
|
||||
m4_divert_push(0)dnl
|
||||
@output(b4_parser_file_name@)@
|
||||
b4_output_begin([b4_parser_file_name])
|
||||
b4_copyright([Bison implementation for Yacc-like parsers in C],
|
||||
[1984, 1989-1990, 2000-2012])[
|
||||
[1984, 1989-1990, 2000-2013])[
|
||||
|
||||
/* C LALR(1) parser skeleton written by Richard Stallman, by
|
||||
simplifying the original so-called "semantic" parser. */
|
||||
@@ -345,9 +380,11 @@ m4_if(b4_api_prefix, [yy], [],
|
||||
# define YYERROR_VERBOSE ]b4_error_verbose_flag[
|
||||
#endif
|
||||
|
||||
/* In a future release of Bison, this section will be replaced
|
||||
]m4_ifval(m4_quote(b4_spec_defines_file),
|
||||
[[/* In a future release of Bison, this section will be replaced
|
||||
by #include "@basename(]b4_spec_defines_file[@)". */
|
||||
]b4_shared_declarations[
|
||||
]])dnl
|
||||
b4_shared_declarations[
|
||||
|
||||
/* Copy the second part of user declarations. */
|
||||
]b4_user_post_prologue
|
||||
@@ -402,24 +439,19 @@ typedef short int yytype_int16;
|
||||
# if defined YYENABLE_NLS && YYENABLE_NLS
|
||||
# if ENABLE_NLS
|
||||
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
||||
# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
|
||||
# endif
|
||||
# endif
|
||||
# ifndef YY_
|
||||
# define YY_(msgid) msgid
|
||||
# define YY_(Msgid) Msgid
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Suppress unused-variable warnings by "using" E. */
|
||||
#if ! defined lint || defined __GNUC__
|
||||
# define YYUSE(e) ((void) (e))
|
||||
#else
|
||||
# define YYUSE(e) /* empty */
|
||||
#endif
|
||||
]b4_attribute_define[
|
||||
|
||||
/* Identity function, used to suppress warnings about constant conditions. */
|
||||
#ifndef lint
|
||||
# define YYID(n) (n)
|
||||
# define YYID(N) (N)
|
||||
#else
|
||||
]b4_c_function_def([YYID], [static int], [[int yyi], [yyi]])[
|
||||
{
|
||||
@@ -678,11 +710,11 @@ static const ]b4_int_type_for([b4_table])[ yytable[] =
|
||||
]b4_table[
|
||||
};
|
||||
|
||||
#define yypact_value_is_default(yystate) \
|
||||
]b4_table_value_equals([[pact]], [[yystate]], [b4_pact_ninf])[
|
||||
#define yypact_value_is_default(Yystate) \
|
||||
]b4_table_value_equals([[pact]], [[Yystate]], [b4_pact_ninf])[
|
||||
|
||||
#define yytable_value_is_error(yytable_value) \
|
||||
]b4_table_value_equals([[table]], [[yytable_value]], [b4_table_ninf])[
|
||||
#define yytable_value_is_error(Yytable_value) \
|
||||
]b4_table_value_equals([[table]], [[Yytable_value]], [b4_table_ninf])[
|
||||
|
||||
static const ]b4_int_type_for([b4_check])[ yycheck[] =
|
||||
{
|
||||
@@ -741,40 +773,17 @@ do \
|
||||
} \
|
||||
while (YYID (0))
|
||||
|
||||
|
||||
/* Error token number */
|
||||
#define YYTERROR 1
|
||||
#define YYERRCODE 256
|
||||
|
||||
]b4_locations_if([[
|
||||
]b4_yylloc_default_define[
|
||||
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
|
||||
]b4_locations_if([[
|
||||
|
||||
|
||||
/* YY_LOCATION_PRINT -- Print the location on the stream.
|
||||
This macro was not mandated originally: define only if we know
|
||||
we won't break user code: when these are the locations we know. */
|
||||
|
||||
#ifndef YY_LOCATION_PRINT
|
||||
# if defined ]b4_api_PREFIX[LTYPE_IS_TRIVIAL && ]b4_api_PREFIX[LTYPE_IS_TRIVIAL
|
||||
# define YY_LOCATION_PRINT(File, Loc) \
|
||||
fprintf (File, "%d.%d-%d.%d", \
|
||||
(Loc).first_line, (Loc).first_column, \
|
||||
(Loc).last_line, (Loc).last_column)
|
||||
# else
|
||||
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
|
||||
# endif
|
||||
#endif]], [[
|
||||
|
||||
|
||||
/* This macro is provided for backward compatibility. */
|
||||
|
||||
#ifndef YY_LOCATION_PRINT
|
||||
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
|
||||
#endif]])[
|
||||
|
||||
]])[
|
||||
]b4_yy_location_print_define[
|
||||
|
||||
/* YYLEX -- calling `yylex' with the right arguments. */
|
||||
|
||||
#ifdef YYLEX_PARAM
|
||||
# define YYLEX yylex (]b4_pure_if([&yylval[]b4_locations_if([, &yylloc]), ])[YYLEX_PARAM)
|
||||
#else
|
||||
@@ -1233,7 +1242,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
{
|
||||
YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
|
||||
YYSIZE_T yysize = yysize0;
|
||||
YYSIZE_T yysize1;
|
||||
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
||||
/* Internationalized format string. */
|
||||
const char *yyformat = YY_NULL;
|
||||
@@ -1314,11 +1322,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
break;
|
||||
}
|
||||
yyarg[yycount++] = yytname[yyx];
|
||||
yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
|
||||
if (! (yysize <= yysize1
|
||||
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
{
|
||||
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
|
||||
if (! (yysize <= yysize1
|
||||
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
}
|
||||
}
|
||||
}]b4_lac_if([[
|
||||
# if ]b4_api_PREFIX[DEBUG
|
||||
@@ -1342,10 +1352,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
# undef YYCASE_
|
||||
}
|
||||
|
||||
yysize1 = yysize + yystrlen (yyformat);
|
||||
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
{
|
||||
YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
|
||||
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
}
|
||||
|
||||
if (*yymsg_alloc < yysize)
|
||||
{
|
||||
@@ -1407,7 +1419,8 @@ b4_c_function_def([[yyparse]], [[int]], b4_parse_param)[
|
||||
yypstate *yyps_local;]b4_pure_if([[
|
||||
int yychar;
|
||||
YYSTYPE yylval;]b4_locations_if([[
|
||||
YYLTYPE yylloc;]])])[
|
||||
static YYLTYPE yyloc_default][]b4_yyloc_default[;
|
||||
YYLTYPE yylloc = yyloc_default;]])])[
|
||||
if (yyps)
|
||||
yyps_local = yyps;
|
||||
else
|
||||
@@ -1487,7 +1500,7 @@ b4_c_function_def([[yyparse]], [[int]], b4_parse_param)[
|
||||
[[[yypstate *yyps]], [[yyps]]]b4_pure_if([,
|
||||
[[[int yypushed_char]], [[yypushed_char]]],
|
||||
[[[YYSTYPE const *yypushed_val]], [[yypushed_val]]]b4_locations_if([,
|
||||
[[[YYLTYPE const *yypushed_loc]], [[yypushed_loc]]]])])m4_ifset([b4_parse_param], [,
|
||||
[[[YYLTYPE *yypushed_loc]], [[yypushed_loc]]]])])m4_ifset([b4_parse_param], [,
|
||||
b4_parse_param]))], [[
|
||||
|
||||
|
||||
@@ -1513,7 +1526,7 @@ b4_c_function_def([[yyparse]], [[int]], b4_parse_param)[
|
||||
int yyn;
|
||||
int yyresult;
|
||||
/* Lookahead token as an internal (translated) token number. */
|
||||
int yytoken;
|
||||
int yytoken = 0;
|
||||
/* The variables used to return semantic value and location from the
|
||||
action routines. */
|
||||
YYSTYPE yyval;]b4_locations_if([[
|
||||
@@ -1538,10 +1551,9 @@ b4_c_function_def([[yyparse]], [[int]], b4_parse_param)[
|
||||
goto yyread_pushed_token;
|
||||
}]])[
|
||||
|
||||
yytoken = 0;
|
||||
yyss = yyssa;
|
||||
yyvs = yyvsa;]b4_locations_if([[
|
||||
yyls = yylsa;]])[
|
||||
yyssp = yyss = yyssa;
|
||||
yyvsp = yyvs = yyvsa;]b4_locations_if([[
|
||||
yylsp = yyls = yylsa;]])[
|
||||
yystacksize = YYINITDEPTH;]b4_lac_if([[
|
||||
|
||||
yyes = yyesa;
|
||||
@@ -1555,32 +1567,17 @@ b4_c_function_def([[yyparse]], [[int]], b4_parse_param)[
|
||||
yyerrstatus = 0;
|
||||
yynerrs = 0;
|
||||
yychar = YYEMPTY; /* Cause a token to be read. */
|
||||
|
||||
/* Initialize stack pointers.
|
||||
Waste one element of value and location stack
|
||||
so that they stay on the same level as the state stack.
|
||||
The wasted elements are never initialized. */
|
||||
yyssp = yyss;
|
||||
yyvsp = yyvs;]b4_locations_if([[
|
||||
yylsp = yyls;
|
||||
|
||||
#if defined ]b4_api_PREFIX[LTYPE_IS_TRIVIAL && ]b4_api_PREFIX[LTYPE_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[;
|
||||
#endif]])
|
||||
m4_ifdef([b4_initial_action],[
|
||||
m4_pushdef([b4_at_dollar], [m4_define([b4_at_dollar_used])yylloc])dnl
|
||||
m4_pushdef([b4_dollar_dollar], [m4_define([b4_dollar_dollar_used])yylval])dnl
|
||||
]m4_ifdef([b4_initial_action], [
|
||||
b4_dollar_pushdef([m4_define([b4_dollar_dollar_used])yylval], [],
|
||||
[b4_push_if([b4_pure_if([*])yypushed_loc], [yylloc])])dnl
|
||||
/* User initialization code. */
|
||||
b4_user_initial_action
|
||||
m4_popdef([b4_dollar_dollar])dnl
|
||||
m4_popdef([b4_at_dollar])])dnl
|
||||
b4_dollar_popdef[]dnl
|
||||
m4_ifdef([b4_dollar_dollar_used],[[ yyvsp[0] = yylval;
|
||||
]])])dnl
|
||||
b4_locations_if([[ yylsp[0] = ]b4_push_if([b4_pure_if([*])yypushed_loc], [yylloc])[;
|
||||
]])dnl
|
||||
m4_ifdef([b4_at_dollar_used], [[ yylsp[0] = yylloc;
|
||||
]])[
|
||||
goto yysetstate;
|
||||
[ goto yysetstate;
|
||||
|
||||
/*------------------------------------------------------------.
|
||||
| yynewstate -- Push a new state, which is found in yystate. |
|
||||
@@ -1750,7 +1747,9 @@ yyread_pushed_token:]])[
|
||||
YY_LAC_DISCARD ("shift");]])[
|
||||
|
||||
yystate = yyn;
|
||||
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
||||
*++yyvsp = yylval;
|
||||
YY_IGNORE_MAYBE_UNINITIALIZED_END
|
||||
]b4_locations_if([ *++yylsp = yylloc;])[
|
||||
goto yynewstate;
|
||||
|
||||
@@ -1970,7 +1969,9 @@ yyerrlab1:
|
||||
current lookahead token, the shift below will for sure. */
|
||||
YY_LAC_DISCARD ("error recovery");]])[
|
||||
|
||||
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
||||
*++yyvsp = yylval;
|
||||
YY_IGNORE_MAYBE_UNINITIALIZED_END
|
||||
]b4_locations_if([[
|
||||
yyerror_range[2] = yylloc;
|
||||
/* Using YYLLOC is tempting, but would change the location of
|
||||
@@ -2046,12 +2047,14 @@ yypushreturn:]])[
|
||||
}
|
||||
|
||||
|
||||
]b4_epilogue
|
||||
]b4_epilogue[]dnl
|
||||
b4_output_end()
|
||||
|
||||
b4_defines_if(
|
||||
[@output(b4_spec_defines_file@)@
|
||||
b4_copyright([Bison interface for Yacc-like parsers in C],
|
||||
[1984, 1989-1990, 2000-2012])[
|
||||
[b4_output_begin([b4_spec_defines_file])[
|
||||
]b4_copyright([Bison interface for Yacc-like parsers in C],
|
||||
[1984, 1989-1990, 2000-2013])[
|
||||
|
||||
]b4_shared_declarations[
|
||||
]])dnl b4_defines_if
|
||||
m4_divert_pop(0)
|
||||
]b4_output_end()
|
||||
])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# DJGPP Maintainer's Makefile -*-Makefile-*-
|
||||
# Requires GNU sed
|
||||
|
||||
## Copyright (C) 2005-2012 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
This is a port of GNU Bison @VERSION@ to MSDOS/DJGPP.
|
||||
|
||||
Copyright (C) 2005-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ Rem Configure Bison for DJGPP.
|
||||
Rem WARNING WARNING WARNING: This file needs to have DOS CRLF end-of-line
|
||||
Rem format, or else stock DOS/Windows shells will refuse to run it.
|
||||
|
||||
Rem Copyright (C) 2005-2012 Free Software Foundation, Inc.
|
||||
Rem Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
||||
|
||||
Rem This program is free software: you can redistribute it and/or modify
|
||||
Rem it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
# Sed script for additional DJGPP specific editing
|
||||
# of the configure script generated by autoconf 2.62.
|
||||
|
||||
# Copyright (C) 2005-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
# This is the config.site file for configuring GNU packages
|
||||
# which are to be built with DJGPP tools.
|
||||
|
||||
# Copyright (C) 2005-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# sed script for DJGPP specific editing of config.hin
|
||||
|
||||
# Copyright (C) 2005-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ Rem This batch file unpacks the Bison distribution while simultaneously
|
||||
Rem renaming some of the files whose names are invalid on DOS or conflict
|
||||
Rem with other file names after truncation to DOS 8+3 namespace.
|
||||
Rem
|
||||
Rem Copyright (C) 2005-2012 Free Software Foundation, Inc.
|
||||
Rem Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
||||
Rem
|
||||
Rem This program is free software: you can redistribute it and/or modify
|
||||
Rem it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Subprocesses with pipes.
|
||||
|
||||
Copyright (C) 2005-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Subprocesses with pipes.
|
||||
|
||||
Copyright (C) 2005-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
# Sed script for additional DJGPP specific editing
|
||||
# of the testsuite script generated by autoconf 2.61.
|
||||
|
||||
# Copyright (C) 2007-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,4 +1,3 @@
|
||||
/*.info*
|
||||
/*~
|
||||
/.dirstamp
|
||||
/Makefile
|
||||
@@ -10,6 +9,7 @@
|
||||
/bison.dvi
|
||||
/bison.fn
|
||||
/bison.html
|
||||
/bison.info
|
||||
/bison.ky
|
||||
/bison.log
|
||||
/bison.pdf
|
||||
|
||||
+1
-1
@@ -940,7 +940,7 @@ EXTERNAL_GROUPS = YES
|
||||
# The PERL_PATH should be the absolute path and name of the perl script
|
||||
# interpreter (i.e. the result of `which perl').
|
||||
|
||||
PERL_PATH = /usr/bin/perl
|
||||
PERL_PATH = @PERL@
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
|
||||
+33
-2
@@ -1,6 +1,6 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
|
||||
## Copyright (C) 2001-2003, 2005-2012 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2001-2003, 2005-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -30,7 +30,7 @@ $(srcdir)/cross-options.texi: $(top_srcdir)/src/getargs.c $(CROSS_OPTIONS_PL)
|
||||
$(AM_V_at)rm -f $@.tmp
|
||||
$(AM_V_at)cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) bison
|
||||
$(AM_V_at)$(top_builddir)/src/bison --help \
|
||||
| perl $(CROSS_OPTIONS_PL) $(top_srcdir)/src/scan-gram.l >$@.tmp
|
||||
| $(PERL) $(CROSS_OPTIONS_PL) $(top_srcdir)/src/scan-gram.l >$@.tmp
|
||||
$(AM_V_at)diff -u $@~ $@.tmp || true
|
||||
$(AM_V_at)mv $@.tmp $@
|
||||
MAINTAINERCLEANFILES = $(srcdir)/cross-options.texi
|
||||
@@ -96,6 +96,37 @@ PREPATH = $(top_builddir)/src
|
||||
|
||||
nodist_man_MANS = yacc.1
|
||||
|
||||
## ------------------------------ ##
|
||||
## Graphviz examples generation. ##
|
||||
## ------------------------------ ##
|
||||
|
||||
CLEANDIRS += figs
|
||||
FIGS_DOT = figs/example.dot figs/example-reduce.dot figs/example-shift.dot
|
||||
EXTRA_DIST += \
|
||||
figs/example.y \
|
||||
$(FIGS_DOT) \
|
||||
$(FIGS_DOT:.dot=.eps) $(FIGS_DOT:.dot=.pdf) $(FIGS_DOT:.dot=.png)
|
||||
SUFFIXES += .dot .eps .pdf .png
|
||||
|
||||
bison.dvi: $(FIGS_DOT:.dot=.eps)
|
||||
bison.html: $(FIGS_DOT:.dot=.png)
|
||||
bison.pdf: $(FIGS_DOT:.dot=.pdf)
|
||||
|
||||
.dot.eps:
|
||||
$(AM_V_GEN) $(MKDIR_P) `echo "./$@" | sed -e 's,/[^/]*$$,,'`
|
||||
$(AM_V_at) $(DOT) -Gmargin=0 -Teps $< >$@.tmp
|
||||
$(AM_V_at) mv $@.tmp $@
|
||||
|
||||
.dot.pdf:
|
||||
$(AM_V_GEN) $(MKDIR_P) `echo "./$@" | sed -e 's,/[^/]*$$,,'`
|
||||
$(AM_V_at) $(DOT) -Gmargin=0 -Tpdf $< >$@.tmp
|
||||
$(AM_V_at) mv $@.tmp $@
|
||||
|
||||
.dot.png:
|
||||
$(AM_V_GEN) $(MKDIR_P) `echo "./$@" | sed -e 's,/[^/]*$$,,'`
|
||||
$(AM_V_at) $(DOT) -Gmargin=0 -Tpng $< >$@.tmp
|
||||
$(AM_V_at) mv $@.tmp $@
|
||||
|
||||
## -------------- ##
|
||||
## Doxygenation. ##
|
||||
## -------------- ##
|
||||
|
||||
+817
-224
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
||||
digraph "reduce.y"
|
||||
{
|
||||
node [fontname=courier shape=box]
|
||||
edge [fontname=courier]
|
||||
|
||||
1 [label="State 1\n 3 a: \"0\" . [\".\"]\l 4 b: \"0\" . [\";\"]\l"]
|
||||
1 -> "1R3" [label="" style=solid]
|
||||
"1R3" [style=filled shape=diamond fillcolor=yellowgreen label="R3"]
|
||||
1 -> "1R4" [label="[\";\"]" style=solid]
|
||||
"1R4" [style=filled shape=diamond fillcolor=yellowgreen label="R4"]
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
.------------------.
|
||||
| State 1 |
|
||||
| 3 a: "0" . [";"] |
|
||||
| 4 b: "0" . ["."] |
|
||||
`------------------'
|
||||
/ \
|
||||
/ \ ["."]
|
||||
/ \
|
||||
v v
|
||||
/ \ / \
|
||||
/ R \ / R \
|
||||
(green) \ 3 / \ 4 / (green)
|
||||
\ / \ /
|
||||
@@ -0,0 +1,9 @@
|
||||
digraph "shift.y"
|
||||
{
|
||||
node [fontname=courier shape=box]
|
||||
edge [fontname=courier]
|
||||
|
||||
3 [label="State 3\n 1 exp: a . \".\"\l"]
|
||||
3 -> 6 [style=solid label="\".\""]
|
||||
6 [label="State 6\n 1 exp: a \".\" .\l"]
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
.----------------.
|
||||
| State 3 |
|
||||
| 1 exp: a . ";" |
|
||||
`----------------'
|
||||
|
|
||||
| ";"
|
||||
|
|
||||
v
|
||||
.----------------.
|
||||
| State 6 |
|
||||
| 1 exp: a ";" . |
|
||||
`----------------'
|
||||
@@ -0,0 +1,35 @@
|
||||
// Generated by GNU Bison 2.6.90.
|
||||
// Report bugs to <[email protected]>.
|
||||
// Home page: <http://www.gnu.org/software/bison/>.
|
||||
|
||||
digraph "/tmp/fo.y"
|
||||
{
|
||||
node [fontname = courier, shape = box, colorscheme = paired6]
|
||||
edge [fontname = courier]
|
||||
|
||||
0 [label="State 0\n\l 0 $accept: . exp $end\l 1 exp: . a \";\"\l 2 | . b \".\"\l 3 a: . \"0\"\l 4 b: . \"0\"\l"]
|
||||
0 -> 1 [style=solid label="\"0\""]
|
||||
0 -> 2 [style=dashed label="exp"]
|
||||
0 -> 3 [style=dashed label="a"]
|
||||
0 -> 4 [style=dashed label="b"]
|
||||
1 [label="State 1\n\l 3 a: \"0\" . [\";\"]\l 4 b: \"0\" . [\".\"]\l"]
|
||||
1 -> "1R3" [style=solid]
|
||||
"1R3" [label="R3", fillcolor=3, shape=diamond, style=filled]
|
||||
1 -> "1R4" [label="[\".\"]", style=solid]
|
||||
"1R4" [label="R4", fillcolor=3, shape=diamond, style=filled]
|
||||
2 [label="State 2\n\l 0 $accept: exp . $end\l"]
|
||||
2 -> 5 [style=solid label="$end"]
|
||||
3 [label="State 3\n\l 1 exp: a . \";\"\l"]
|
||||
3 -> 6 [style=solid label="\";\""]
|
||||
4 [label="State 4\n\l 2 exp: b . \".\"\l"]
|
||||
4 -> 7 [style=solid label="\".\""]
|
||||
5 [label="State 5\n\l 0 $accept: exp $end .\l"]
|
||||
5 -> "5R0" [style=solid]
|
||||
"5R0" [label="Acc", fillcolor=1, shape=diamond, style=filled]
|
||||
6 [label="State 6\n\l 1 exp: a \";\" .\l"]
|
||||
6 -> "6R1" [style=solid]
|
||||
"6R1" [label="R1", fillcolor=3, shape=diamond, style=filled]
|
||||
7 [label="State 7\n\l 2 exp: b \".\" .\l"]
|
||||
7 -> "7R2" [style=solid]
|
||||
"7R2" [label="R2", fillcolor=3, shape=diamond, style=filled]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
%%
|
||||
exp: a ";" | b ".";
|
||||
a: "0";
|
||||
b: "0";
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
\def\finalout{\overfullrule=0pt}
|
||||
%\finalout
|
||||
|
||||
% Copyright (c) 1998, 2001, 2009-2012 Free Software Foundation, Inc.
|
||||
% Copyright (c) 1998, 2001, 2009-2013 Free Software Foundation, Inc.
|
||||
%
|
||||
% This file is part of Bison.
|
||||
%
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
## Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ straightforward use of _build/src/bison would.)
|
||||
|
||||
--
|
||||
|
||||
Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
#! /usr/bin/perl -w
|
||||
|
||||
# Copyright (C) 2006, 2008-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006, 2008-2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of Bison, the GNU Compiler Compiler.
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
## Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2005, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
## Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2005-2006, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Copyright (C) 2005-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
# This file is part of GNU Bison
|
||||
|
||||
# Copyright (C) 1992, 2000-2001, 2005-2006, 2009-2012 Free Software
|
||||
# Copyright (C) 1992, 2000-2001, 2005-2006, 2009-2013 Free Software
|
||||
# Foundation, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
external: gnulib
|
||||
+1
-1
Submodule gnulib updated: cabce6b8f2...076ac82d1d
@@ -268,3 +268,14 @@
|
||||
/xmemdup0.c
|
||||
/xmemdup0.h
|
||||
/sys_types.in.h
|
||||
/obstack_printf.c
|
||||
/binary-io.c
|
||||
/mbuiter.c
|
||||
/xsize.c
|
||||
/bitrotate.c
|
||||
/math.c
|
||||
/sig-handler.c
|
||||
/unistd.c
|
||||
/wctype-h.c
|
||||
/getdelim.c
|
||||
/getline.c
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# Make bison/lib.
|
||||
|
||||
# Copyright (C) 2001-2004, 2006, 2008-2012 Free Software Foundation,
|
||||
# Copyright (C) 2001-2004, 2006, 2008-2013 Free Software Foundation,
|
||||
# Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Array bitsets.
|
||||
|
||||
Copyright (C) 2002-2003, 2006, 2009-2012 Free Software Foundation,
|
||||
Copyright (C) 2002-2003, 2006, 2009-2013 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Functions to support abitsets.
|
||||
|
||||
Copyright (C) 2002, 2004, 2009-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Base bitset stuff.
|
||||
|
||||
Copyright (C) 2002-2004, 2006, 2009-2012 Free Software Foundation,
|
||||
Copyright (C) 2002-2004, 2006, 2009-2013 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* General bitsets.
|
||||
|
||||
Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2006, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Generic bitsets.
|
||||
|
||||
Copyright (C) 2002-2004, 2009-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2004, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Bitset statistics.
|
||||
|
||||
Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2006, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Functions to support bitset statistics.
|
||||
|
||||
Copyright (C) 2002-2004, 2009-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2004, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Bitset vectors.
|
||||
|
||||
Copyright (C) 2001-2002, 2004, 2006, 2009-2012 Free Software
|
||||
Copyright (C) 2001-2002, 2004, 2006, 2009-2013 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Bitset vectors.
|
||||
|
||||
Copyright (C) 2002, 2004, 2009-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Akim Demaille (akim@freefriends.org).
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Bitset vectors.
|
||||
|
||||
Copyright (C) 2001-2002, 2004-2006, 2009-2012 Free Software
|
||||
Copyright (C) 2001-2002, 2004-2006, 2009-2013 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Bitset vectors.
|
||||
|
||||
Copyright (C) 2002, 2004, 2009-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Functions to support expandable bitsets.
|
||||
|
||||
Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2006, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Functions to support ebitsets.
|
||||
|
||||
Copyright (C) 2002, 2004, 2009-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* get-errno.c - get and set errno.
|
||||
|
||||
Copyright (C) 2002, 2006, 2009-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2006, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* get-errno.h - get and set errno.
|
||||
|
||||
Copyright (C) 2002, 2009-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Functions to support link list bitsets.
|
||||
|
||||
Copyright (C) 2002-2004, 2006, 2009-2012 Free Software Foundation,
|
||||
Copyright (C) 2002-2004, 2006, 2009-2013 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Functions to support lbitsets.
|
||||
|
||||
Copyright (C) 2002, 2004, 2009-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Fake libiberty.h for Bison.
|
||||
|
||||
Copyright (C) 2002-2004, 2009-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2004, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Yacc library main function.
|
||||
|
||||
Copyright (C) 2002, 2009-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Timing variables for measuring compiler performance.
|
||||
|
||||
Copyright (C) 2000, 2002, 2004, 2006, 2009-2012 Free Software
|
||||
Copyright (C) 2000, 2002, 2004, 2006, 2009-2013 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
Contributed by Alex Samuel <samuel@codesourcery.com>
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/* This file contains the definitions for timing variables used to -*- C -*-
|
||||
measure run-time performance of the compiler.
|
||||
|
||||
Copyright (C) 2002, 2007, 2009-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2007, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Akim Demaille <akim@freefriends.org>.
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Timing variables for measuring compiler performance.
|
||||
|
||||
Copyright (C) 2000, 2002, 2004, 2009-2012 Free Software Foundation,
|
||||
Copyright (C) 2000, 2002, 2004, 2009-2013 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
Contributed by Alex Samuel <samuel@codesourcery.com>
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Variable array bitsets.
|
||||
|
||||
Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2006, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Functions to support vbitsets.
|
||||
|
||||
Copyright (C) 2002, 2004, 2009-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
|
||||
+3
-1
@@ -1,6 +1,6 @@
|
||||
/* Yacc library error-printing function.
|
||||
|
||||
Copyright (C) 2002, 2009-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int yyerror (char const *);
|
||||
|
||||
+4
-1
@@ -48,7 +48,6 @@
|
||||
/hash.m4
|
||||
/iconv.m4
|
||||
/include_next.m4
|
||||
/inline.m4
|
||||
/intdiv0.m4
|
||||
/intl.m4
|
||||
/intldir.m4
|
||||
@@ -179,3 +178,7 @@
|
||||
/xalloc.m4
|
||||
/xsize.m4
|
||||
/xstrndup.m4
|
||||
/obstack-printf.m4
|
||||
/extern-inline.m4
|
||||
/getdelim.m4
|
||||
/getline.m4
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user