mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-08-08 18:25:13 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 | ||
|
|
1505e8bb78 | ||
|
|
58c7e5ee2c | ||
|
|
ad6b775fc5 | ||
|
|
5d614dfa8c | ||
|
|
858c700fc0 | ||
|
|
c30717cafa | ||
|
|
0e98a81e00 | ||
|
|
d5c20d1a36 | ||
|
|
e6ae99fe75 | ||
|
|
bcbbf65486 | ||
|
|
1aa9fa823b | ||
|
|
321b8117a6 | ||
|
|
e4828e2384 | ||
|
|
a122efad8a | ||
|
|
15ffba51b0 | ||
|
|
ea6a2d96db | ||
|
|
ae63f0e8e2 | ||
|
|
41c11ce484 | ||
|
|
a59a6ddef4 | ||
|
|
aca4ddc75d | ||
|
|
47977a7e74 | ||
|
|
813f7d3482 | ||
|
|
7a9e6d65ea | ||
|
|
916f26b65a | ||
|
|
32ae07efde | ||
|
|
ad60e80f3d | ||
|
|
2a824fae30 | ||
|
|
c242519127 | ||
|
|
e358222ba8 | ||
|
|
9dcb193aeb | ||
|
|
faff3bef5b | ||
|
|
53ab797db7 | ||
|
|
426903aa75 | ||
|
|
9104636b03 | ||
|
|
1168b32295 | ||
|
|
771dc64324 | ||
|
|
a7385a21ce | ||
|
|
b142cfd128 | ||
|
|
5f108727a1 | ||
|
|
242cc08e8d | ||
|
|
4b3847c3c0 | ||
|
|
087dcd7868 | ||
|
|
95361618de | ||
|
|
694af10cb7 | ||
|
|
258cddbc36 | ||
|
|
9bcffa0c13 | ||
|
|
a32a2d57a5 | ||
|
|
8d6c1b5e85 | ||
|
|
77519a7d18 | ||
|
|
0e16927b48 | ||
|
|
91ce0b3a66 | ||
|
|
837b769659 | ||
|
|
5e01579ec0 | ||
|
|
55d1006fce | ||
|
|
230a3db428 | ||
|
|
6d55954743 | ||
|
|
7490994123 | ||
|
|
eb46d61f4d | ||
|
|
05a7b6ec80 | ||
|
|
290a8ff2c0 | ||
|
|
6e2d7b0974 | ||
|
|
2d40532bf5 | ||
|
|
756257ee86 | ||
|
|
18ad57b384 | ||
|
|
da402d1cae | ||
|
|
e29f0771d7 | ||
|
|
71c7e24f2e | ||
|
|
5f7f1e210b | ||
|
|
eb83259dc1 | ||
|
|
55f48c4831 | ||
|
|
34d867d7d2 | ||
|
|
363bf73276 | ||
|
|
c8c220d19a | ||
|
|
56ca3d8fce | ||
|
|
c3e9f08f93 | ||
|
|
6aef2e01a4 | ||
|
|
3d8082ad27 | ||
|
|
9d67a52ad6 | ||
|
|
0f11eec272 | ||
|
|
ae6bdabbf6 | ||
|
|
c0828abf9d | ||
|
|
e9807a7934 | ||
|
|
02287ec650 | ||
|
|
6537c71fcc | ||
|
|
6733d02476 | ||
|
|
cc9fb4f6b6 | ||
|
|
f763e6ef67 | ||
|
|
c4576b484a | ||
|
|
91aadcc7a9 | ||
|
|
dfaac27242 | ||
|
|
ed7658fe17 | ||
|
|
4d4777c786 | ||
|
|
cbdb6d9145 | ||
|
|
6a4f5c6ea0 | ||
|
|
3cd7c0bfce | ||
|
|
188867ac65 | ||
|
|
3f32a0d287 | ||
|
|
22172d4731 | ||
|
|
a19728cbb5 | ||
|
|
03f1b545b9 | ||
|
|
a9b67b5b1e | ||
|
|
e4ab12542b | ||
|
|
08f6341c01 | ||
|
|
86b08b49b3 | ||
|
|
7fb72c6e53 | ||
|
|
1ef57c947d | ||
|
|
035810ed2e | ||
|
|
5192fd5d50 | ||
|
|
7f7fdba418 | ||
|
|
7e3510e6dd | ||
|
|
b2c4c25d4a | ||
|
|
91fd2b60b6 | ||
|
|
08ab0101bd | ||
|
|
aebb55eb92 | ||
|
|
a0cd287e64 | ||
|
|
dc584206f9 | ||
|
|
7de42e52bf | ||
|
|
0b7fba1335 | ||
|
|
e2eb03d4e9 | ||
|
|
db0054f7e6 | ||
|
|
45aab21d77 | ||
|
|
e54ec80c0c | ||
|
|
85557aa1cb | ||
|
|
47dcfd5a5c | ||
|
|
355e5a7255 | ||
|
|
9c883a6bb0 | ||
|
|
60457f308d | ||
|
|
bb3b912b0a | ||
|
|
7020e5f050 | ||
|
|
dd8d335174 | ||
|
|
021a7cfb3e | ||
|
|
30bc96ceca | ||
|
|
78ab351c4f | ||
|
|
15cd62c2c1 | ||
|
|
95e343fea3 | ||
|
|
2ba031129a | ||
|
|
fbca8023ed | ||
|
|
8ef26c2aa7 | ||
|
|
7e508a2b2d | ||
|
|
68fff38a09 | ||
|
|
56d60c1947 | ||
|
|
a703b669b4 | ||
|
|
10232af808 | ||
|
|
0d49053a75 | ||
|
|
a4e4295ad2 | ||
|
|
22cd137bc9 | ||
|
|
3d05bae83a | ||
|
|
d834eca014 | ||
|
|
debe2c03c4 | ||
|
|
7beac80814 | ||
|
|
ff1b7a1333 | ||
|
|
163bb3698f | ||
|
|
466b4cf201 | ||
|
|
34a41a93c7 | ||
|
|
4a11b85249 | ||
|
|
6557bcce8b | ||
|
|
681dda24ba | ||
|
|
059736b7b5 | ||
|
|
936c88d178 | ||
|
|
2091988f7e | ||
|
|
2a1bd0d7fe | ||
|
|
769a8ef9bc | ||
|
|
ef51bfa744 | ||
|
|
e85056ef5f | ||
|
|
62e5fc6ac9 | ||
|
|
37e884cd9a | ||
|
|
041308d0c0 | ||
|
|
e34e97bcd7 | ||
|
|
bbaf618c3e | ||
|
|
c84134b644 | ||
|
|
84c1cdc71d | ||
|
|
56da1e5288 | ||
|
|
0765d39396 | ||
|
|
6528a99151 | ||
|
|
de6be119ca | ||
|
|
ea118b7262 | ||
|
|
2c0f97066e | ||
|
|
d13d14ccb2 | ||
|
|
05061eca7c | ||
|
|
06e0e52ca4 | ||
|
|
f0f62c8c4d | ||
|
|
c14ceb55b9 | ||
|
|
ab8932bfd9 | ||
|
|
6c6f6f4b23 | ||
|
|
da209f943b | ||
|
|
71cbc1ac1a | ||
|
|
98842516e1 | ||
|
|
14f4455e43 | ||
|
|
43e9e2a113 | ||
|
|
a055b2f07d | ||
|
|
95f14eb228 | ||
|
|
e0e2b93355 | ||
|
|
f95faa25ae | ||
|
|
bd65f25570 | ||
|
|
7880130e3e | ||
|
|
fe40b679d7 | ||
|
|
dd5611579b | ||
|
|
24bb5f8fb7 | ||
|
|
6487c0b370 | ||
|
|
1cd5bad9b8 | ||
|
|
3f3e78dc89 | ||
|
|
4e8ec90f24 | ||
|
|
a34e8b242e | ||
|
|
b2577f024b | ||
|
|
4c787a31df | ||
|
|
270ff8be14 | ||
|
|
6e40b8d825 | ||
|
|
0802356481 | ||
|
|
e187b40d31 | ||
|
|
ec94982bec | ||
|
|
94556574b5 | ||
|
|
7aadf26359 | ||
|
|
48c4bf30fd | ||
|
|
ed2e77eae6 | ||
|
|
8ed97fd2b2 | ||
|
|
e6070f227e | ||
|
|
7a709ad88d | ||
|
|
c373ab641b | ||
|
|
b359704747 | ||
|
|
abf3f74b21 | ||
|
|
9874f80b2e | ||
|
|
14594e38ad | ||
|
|
ee7e9e3b66 | ||
|
|
81c5003f91 | ||
|
|
792aeb0017 | ||
|
|
b6d4f2a27d | ||
|
|
b5e7f274a5 | ||
|
|
d6864e191b | ||
|
|
10c4beb7ea | ||
|
|
2d48e62447 | ||
|
|
8cc3c80e8a | ||
|
|
77315a51c1 | ||
|
|
e6062fb6da | ||
|
|
3bce8ffc3d | ||
|
|
eba83258a3 | ||
|
|
c932d6135c | ||
|
|
e4caef0ead | ||
|
|
33a1fa4e81 | ||
|
|
847480ae0f | ||
|
|
5422d56a71 | ||
|
|
7451638148 | ||
|
|
845346b3bb | ||
|
|
abd189e8dc | ||
|
|
8348436580 | ||
|
|
7404cdf3a1 | ||
|
|
ce24f7f59b | ||
|
|
7d31f09289 | ||
|
|
908c8647de | ||
|
|
90dcd4156c | ||
|
|
b2bc8a1ba0 | ||
|
|
77bb73e7af | ||
|
|
9d6af15318 | ||
|
|
441735026b |
+1
-1
@@ -1 +1 @@
|
||||
ChangeLog merge=merge-changelog
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,3 @@
|
||||
|
||||
/*.cache
|
||||
/*.flc
|
||||
/*.prj
|
||||
@@ -7,10 +6,12 @@
|
||||
/.version
|
||||
/ABOUT-NLS
|
||||
/COPYING
|
||||
/ChangeLog
|
||||
/GNUmakefile
|
||||
/INSTALL
|
||||
/Makefile
|
||||
/Makefile.in
|
||||
/README-release
|
||||
/_*
|
||||
/a.exe
|
||||
/a.out
|
||||
@@ -31,4 +32,3 @@
|
||||
/patches
|
||||
/releases
|
||||
/stamp-h*
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
2.3b
|
||||
2.6.90
|
||||
|
||||
@@ -5,4 +5,38 @@ Bison was written primarily by Robert Corbett.
|
||||
Richard Stallman made it Yacc-compatible.
|
||||
|
||||
Wilfred Hansen of Carnegie Mellon University added multicharacter
|
||||
string literals and other features.
|
||||
string literals and other features (Bison 1.25, 1995).
|
||||
|
||||
Akim Demaille rewrote the parser in Bison, and changed the back end to
|
||||
use M4 (1.50, 2002).
|
||||
|
||||
Paul Hilfinger added GLR support (Bison 1.50, 2002).
|
||||
|
||||
Joel E. Denny contributed canonical-LR support, and invented and added
|
||||
IELR and LAC (Lookahead Correction) support (Bison 2.5, 2011).
|
||||
|
||||
Paolo Bonzini contributed Java support (Bison 2.4, 2008).
|
||||
|
||||
Alex Rozenman added named reference support (Bison 2.5, 2011).
|
||||
|
||||
Paul Eggert fixed a million portability issues, arbitrary limitations,
|
||||
and nasty bugs.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 1998-2012 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
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/>.
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
1996-05-12 Jim Meyering <[email protected]>
|
||||
|
||||
* src/bison.simple (__yy_memcpy) [__cplusplus]: Reorder declarations
|
||||
of variables f and t.
|
||||
of variables f and t.
|
||||
|
||||
1996-05-11 Richard Stallman <[email protected]>
|
||||
|
||||
+199
-7
@@ -1,3 +1,195 @@
|
||||
2012-01-15 Jim Meyering <[email protected]>
|
||||
|
||||
maint: get fdl.texi from gnulib
|
||||
* bootstrap.conf (gnulib_modules): Add fdl.
|
||||
* doc/fdl.texi: Remove file.
|
||||
* doc/.gitignore: Add it here.
|
||||
|
||||
2012-01-15 Jim Meyering <[email protected]>
|
||||
|
||||
maint: spell "file system" as two separate words
|
||||
* doc/Doxyfile.in: Spell it "file system", to avoid a
|
||||
"make syntax-check" failure.
|
||||
|
||||
2012-01-15 Jim Meyering <[email protected]>
|
||||
|
||||
maint: avoid "the the"
|
||||
* djgpp/README.in: s/the the/the/
|
||||
* src/parse-gram.c (lloc_default): Likewise.
|
||||
* src/parse-gram.y (lloc_default): Likewise, and remove a
|
||||
trailing space.
|
||||
|
||||
2012-01-13 Jim Meyering <[email protected]>
|
||||
|
||||
build: avoid warning from coverity about lbitset_elt_find
|
||||
* lib/lbitset.c (lbitset_elt_find): Remove unnecessary test of "elt",
|
||||
at a point where we know it is non-NULL, due to prior dereference.
|
||||
|
||||
2012-01-13 Akim Demaille <[email protected]>
|
||||
|
||||
maint: factor copyright year.
|
||||
* configure.ac: Use $PACKAGE_COPYRIGHT_YEAR instead of repeating it.
|
||||
|
||||
2012-01-13 Akim Demaille <[email protected]>
|
||||
|
||||
maint: catch missing gnulib macros.
|
||||
* configure.ac: Add m4_pattern_forbid.
|
||||
|
||||
2012-01-11 Tim Landscheidt <[email protected]>
|
||||
|
||||
java: remove used variable.
|
||||
* data/lalr1.java (yyresult): remove, unused.
|
||||
|
||||
2012-01-11 Akim Demaille <[email protected]>
|
||||
|
||||
scanner: fix typo.
|
||||
* src/scan-skel.l (@`): s/emtpy/empty/.
|
||||
Reported by Tim Landscheidt.
|
||||
|
||||
2012-01-06 Jim Meyering <[email protected]>
|
||||
|
||||
build: avoid warnings about set-but-not-used variables
|
||||
* lib/bitset_stats.c (bitset_stats_list): Remove declaration
|
||||
and set of unused local, "type".
|
||||
* lib/ebitset.c (ebitset_init): Likewise, for "size".
|
||||
* lib/lbitset.c (lbitset_not): Likewise, for "elt".
|
||||
|
||||
2011-08-21 Joel E. Denny <[email protected]>
|
||||
|
||||
tests: add -pedantic for --enable-gcc-warnings.
|
||||
This should help to avoid some portability problems. For example,
|
||||
it would have revealed the empty unions fixed by the last patch
|
||||
* configure.ac (WARN_CFLAGS_TESTS, WARN_CXXFLAGS_TEST): Implement.
|
||||
* tests/synclines.at (AT_TEST_SYNCLINE): Avoid -pedantic warning
|
||||
about an empty translation unit.
|
||||
|
||||
2011-08-21 Joel E. Denny <[email protected]>
|
||||
|
||||
tests: fix empty unions.
|
||||
Empty unions are not accepted by the ISO C99 grammar or by at
|
||||
least some versions of Sun Studio. Reported by Wolfgang S. Kechel
|
||||
at
|
||||
<http://lists.gnu.org/archive/html/bug-bison/2011-08/msg00003.html>.
|
||||
* NEWS (2.5.1): Document fix.
|
||||
* THANKS (Wolfgang S. Kechel): Add.
|
||||
* tests/existing.at (GNU Cim Grammar)
|
||||
(GNU pic (Groff 1.18.1) Grammar.): Remove empty %union.
|
||||
|
||||
2011-07-10 Joel E. Denny <[email protected]>
|
||||
|
||||
build: avoid YACC typo inherited from Autoconf.
|
||||
The typo shows up in the `configure --help' output. Reported by
|
||||
W.C.A. Wijngaards and Paul Eggert at
|
||||
<http://lists.gnu.org/archive/html/bug-bison/2011-07/msg00000.html>.
|
||||
* README-hacking (Release Procedure): Remind about updating
|
||||
maintainer tools before a release.
|
||||
* THANKS (W.C.A. Wijngaards): Add.
|
||||
* configure.ac (AC_PREREQ): Set to 2.68, which fixes the YACC
|
||||
typo.
|
||||
|
||||
2011-07-10 Joel E. Denny <[email protected]>
|
||||
|
||||
build: create xz instead of bzip2 tarballs.
|
||||
Suggested by Jim Meyering at
|
||||
<http://lists.gnu.org/archive/html/bug-bison/2011-06/msg00012.html>.
|
||||
* README-hacking (Release Procedure): Update example.
|
||||
* configure.ac (AM_INIT_AUTOMAKE): Replace dist-bzip2 with
|
||||
dist-xz.
|
||||
|
||||
2011-05-29 Joel E. Denny <[email protected]>
|
||||
|
||||
doc: clean up references to `Locations Overview'.
|
||||
* doc/bison.texinfo (Locations Overview): Rename node to...
|
||||
(Locations): ... this, which is its section name. Update menus to
|
||||
match that and not to use the title `Tracking Locations', which is
|
||||
a different section.
|
||||
|
||||
2011-05-29 Joel E. Denny <[email protected]>
|
||||
|
||||
doc: clean up references to `Tracking Locations'.
|
||||
* doc/bison.texinfo (Locations): Rename node to...
|
||||
(Tracking Locations): ... this, which is its section name, and
|
||||
update all cross references. The trouble is that there is another
|
||||
node about locations. Its section name is `Locations', which was
|
||||
easily confused with the node name of this node. Moreover, its
|
||||
node name is `Locations Overview', which was mistakenly used to
|
||||
label some cross references to this node.
|
||||
|
||||
2011-05-29 Joel E. Denny <[email protected]>
|
||||
|
||||
doc: clean up `Named References' a little.
|
||||
* doc/bison.texinfo (Named References): Rename section to match
|
||||
the node name, and update all cross references. Don't use the
|
||||
acronyms RHS and LHS given that we don't expand them anywhere in
|
||||
the manual. Try to use @samp and @code properly. Mention that
|
||||
named references are experimental as we've already stated in NEWS.
|
||||
(Destructor Decl): Expand the only remaining use of RHS or LHS.
|
||||
|
||||
2011-05-29 Joel E. Denny <[email protected]>
|
||||
|
||||
doc: motivate named references.
|
||||
Suggested by Hans Aberg at
|
||||
<http://lists.gnu.org/archive/html/bug-bison/2011-05/msg00008.html>.
|
||||
* doc/bison.texinfo (Named References): Explain briefly how
|
||||
they're better than the traditional positional references.
|
||||
|
||||
2011-05-29 Joel E. Denny <[email protected]>
|
||||
|
||||
doc: discuss named references after locations.
|
||||
Reported by Hans Aberg at
|
||||
<http://lists.gnu.org/archive/html/bug-bison/2011-05/msg00008.html>.
|
||||
* NEWS (2.5.1): Document.
|
||||
* doc/bison.texinfo (Named References): Because it discusses
|
||||
locations in addition to semantic values, move this subsection out
|
||||
of the section `Defining Language Semantics', where locations have
|
||||
not yet been introduced, to be a new section after the following
|
||||
section, `Tracking Locations'.
|
||||
|
||||
2011-05-29 Joel E. Denny <[email protected]>
|
||||
|
||||
Prepare for the possibility of a 2.5.1 release.
|
||||
* NEWS (2.5.1): New heading.
|
||||
|
||||
2011-05-14 Joel E. Denny <[email protected]>
|
||||
|
||||
Version 2.5.
|
||||
* NEWS (2.5): Set date.
|
||||
|
||||
2011-05-14 Joel E. Denny <[email protected]>
|
||||
|
||||
Don't use IF_LINT in Bison sources.
|
||||
It creates unnecessary differences between the sources that Bison
|
||||
maintainers build and test (given that maintainers normally
|
||||
configure with --enable-gcc-warnings) and the sources that Bison
|
||||
users build. Instead, use PACIFY_CC, which doesn't. This change
|
||||
fixes compiler warnings reported by Tys Lefering at
|
||||
<http://lists.gnu.org/archive/html/bison-patches/2011-05/msg00004.html>.
|
||||
* configure.ac: Don't AC_DEFINE lint regardless of the configure
|
||||
options. This change affects imported gnulib sources, where
|
||||
IF_LINT still appears and depends on lint.
|
||||
* src/scan-gram.l, src/scan-skel.l: Replace uses of IF_LINT with
|
||||
PACIFY_CC.
|
||||
* src/system.h (IF_LINT): Remove cpp macro.
|
||||
(PACIFY_CC): New cpp macro.
|
||||
|
||||
2011-05-01 Joel E. Denny <[email protected]>
|
||||
|
||||
Fix precedence for end token.
|
||||
Since Bison 2.3b, which restored the ability of precedence
|
||||
directives to assign user token numbers, doing so for user token
|
||||
number 0 has produced an assertion failure.
|
||||
* NEWS (2.5): Document fix.
|
||||
* src/symtab.c (symbol_user_token_number_set): In the case of the
|
||||
end token, don't decrement ntokens if it was never incremented.
|
||||
* tests/regression.at (Token number in precedence declaration):
|
||||
Extend.
|
||||
|
||||
2011-05-01 Joel E. Denny <[email protected]>
|
||||
|
||||
Prepare for 2.5 release.
|
||||
* NEWS (2.5_rc1): Rename back to...
|
||||
(2.5): ... this, and unset date.
|
||||
|
||||
2011-05-01 Joel E. Denny <[email protected]>
|
||||
|
||||
Version 2.5_rc1.
|
||||
@@ -8004,7 +8196,7 @@
|
||||
(PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
|
||||
which is now, again, a separate token.
|
||||
Adjust all dependencies.
|
||||
Whereever actions with $ and @ are used, use translate_code.
|
||||
Wherever actions with $ and @ are used, use translate_code.
|
||||
(action): Remove this nonterminal which is now useless.
|
||||
* src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
|
||||
(grammar_current_rule_action_append): Use translate_code.
|
||||
@@ -9190,10 +9382,10 @@
|
||||
|
||||
* Makefile.am: DJGPP specific files added to EXTRA_DIST.
|
||||
* djgpp/Makefile.maint: Fix PACKAGE variable computation.
|
||||
* djgpp/config.bat: Replace every occurence of the file name
|
||||
* djgpp/config.bat: Replace every occurrence of the file name
|
||||
scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
|
||||
c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
|
||||
* djgpp/config.sed: Replace every occurence of the file name
|
||||
* djgpp/config.sed: Replace every occurrence of the file name
|
||||
scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
|
||||
c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
|
||||
* djgpp/djunpack.bat: DJGPP specific file.
|
||||
@@ -12466,7 +12658,7 @@
|
||||
(YYERROR): Goto to yyerrorlab, not yyerrlab1.
|
||||
(yyerrlab1): Remove, but where it used to be (now the bottom part of
|
||||
yyerrlab), when hitting EOF, pop the whole stack here instead of
|
||||
merely falling thru the default error handling mechanism.
|
||||
merely falling through the default error handling mechanism.
|
||||
(yyerrorlab): New label, with the old contents of YYERROR,
|
||||
plus the following change: pop the stack of rhs corresponding
|
||||
to the production that invoked YYERROR. That is how Yacc
|
||||
@@ -16188,7 +16380,7 @@
|
||||
|
||||
2002-07-30 Akim Demaille <[email protected]>
|
||||
|
||||
`stage' was accidently included in a previous patch.
|
||||
`stage' was accidentally included in a previous patch.
|
||||
Initiate its autoconfiscation.
|
||||
|
||||
* configure.in: Look for malloc.h and sys/times.h.
|
||||
@@ -19191,7 +19383,7 @@
|
||||
(insert_accepting_state, augment_automaton): Remove, since now
|
||||
these states are automatically computed from the initial state.
|
||||
(generate_states): Adjust.
|
||||
* src/print.c: When reporting a rule number to the user, substract
|
||||
* src/print.c: When reporting a rule number to the user, subtract
|
||||
1, so that the axiom rule is rule 0, and the first user rule is 1.
|
||||
* src/reduce.c: Likewise.
|
||||
* src/print_graph.c (print_core): For the time being, just as for
|
||||
@@ -24094,7 +24286,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
|
||||
Copyright (C) 1987-1988, 1991-2012 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
+33
-21
@@ -1,6 +1,6 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
|
||||
## Copyright (C) 2001-2011 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2001-2012 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -23,25 +23,21 @@ SUBDIRS = build-aux po runtime-po lib data src doc examples tests etc
|
||||
aclocaldir = @aclocaldir@
|
||||
aclocal_DATA = m4/bison-i18n.m4
|
||||
|
||||
EXTRA_DIST = .prev-version .version cfg.mk \
|
||||
OChangeLog PACKAGING \
|
||||
EXTRA_DIST = .prev-version .version \
|
||||
cfg.mk ChangeLog-1998 ChangeLog-2012 PACKAGING \
|
||||
djgpp/Makefile.maint djgpp/README.in djgpp/config.bat \
|
||||
djgpp/config.sed djgpp/config.site djgpp/config_h.sed \
|
||||
djgpp/subpipe.c djgpp/subpipe.h djgpp/djunpack.bat \
|
||||
djgpp/fnchange.lst djgpp/testsuite.sed
|
||||
|
||||
|
||||
.PHONY: maintainer-check
|
||||
maintainer-check:
|
||||
cd tests && $(MAKE) $(AM_MAKEFLAGS) $@
|
||||
|
||||
.PHONY: maintainer-push-check
|
||||
maintainer-push-check:
|
||||
cd tests && $(MAKE) $(AM_MAKEFLAGS) $@
|
||||
|
||||
.PHONY: maintainer-xml-check
|
||||
maintainer-xml-check:
|
||||
cd tests && $(MAKE) $(AM_MAKEFLAGS) $@
|
||||
MAINTAINER_CHECKS = \
|
||||
maintainer-check \
|
||||
maintainer-push-check \
|
||||
maintainer-xml-check \
|
||||
maintainer-release-check
|
||||
.PHONY: $(MAINTAINER_CHECKS)
|
||||
$(MAINTAINER_CHECKS):
|
||||
$(AM_V_GEN)cd tests && $(MAKE) $(AM_MAKEFLAGS) $@
|
||||
|
||||
# See comments in build-aux/git-version-gen. However, we make .version depend
|
||||
# on configure so that .version and VERSION/PACKAGE_VERSION stay in sync in the
|
||||
@@ -54,15 +50,31 @@ maintainer-xml-check:
|
||||
# pass incorrectly.
|
||||
BUILT_SOURCES = $(top_srcdir)/.version
|
||||
$(top_srcdir)/.version: configure
|
||||
echo $(VERSION) > $@-t && mv $@-t $@
|
||||
dist-hook:
|
||||
echo $(VERSION) > $(distdir)/.tarball-version
|
||||
$(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
|
||||
dist-hook: gen-ChangeLog
|
||||
$(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
|
||||
|
||||
.PHONY: update-b4-copyright update-package-copyright-year
|
||||
update-b4-copyright:
|
||||
find data -type f \
|
||||
| grep -v -E '^data/bison.m4$$' \
|
||||
$(AM_V_GEN) find data -type f \
|
||||
| grep -v -E '^data/bison.m4$$' \
|
||||
| xargs $(build_aux)/$@
|
||||
@echo 'warning: src/parse-gram.[hc] may need to be regenerated.'
|
||||
update-package-copyright-year:
|
||||
$(build_aux)/$@ configure.ac
|
||||
$(AM_V_GEN)$(build_aux)/$@ configure.ac
|
||||
|
||||
gen_start_date = 2012-01-16
|
||||
.PHONY: gen-ChangeLog
|
||||
gen-ChangeLog:
|
||||
$(AM_V_GEN)if test -d $(srcdir)/.git; then \
|
||||
cl=$(distdir)/ChangeLog && \
|
||||
rm -f $$cl.tmp && \
|
||||
$(top_srcdir)/build-aux/gitlog-to-changelog \
|
||||
--strip-tab \
|
||||
--strip-cherry-pick \
|
||||
--no-cluster \
|
||||
--amend=$(srcdir)/build-aux/git-log-fix \
|
||||
--srcdir=$(srcdir) \
|
||||
--since=$(gen_start_date) > $$cl.tmp && \
|
||||
mv -f $$cl.tmp $$cl; \
|
||||
fi
|
||||
|
||||
@@ -36,7 +36,7 @@ to the bison package.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002, 2005, 2009-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2005, 2009-2012 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-2011 Free Software
|
||||
Copyright (C) 1992, 1998-1999, 2003-2005, 2008-2012 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-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2009-2012 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bison.
|
||||
|
||||
|
||||
+129
-93
@@ -1,5 +1,3 @@
|
||||
-*- outline -*-
|
||||
|
||||
This file attempts to describe the rules to use when hacking Bison.
|
||||
Don't put this file into the distribution.
|
||||
|
||||
@@ -15,25 +13,16 @@ First, if it is a large change, you must make sure they have signed
|
||||
the appropriate paperwork. Second, be sure to add their name and
|
||||
email address to THANKS.
|
||||
|
||||
** If a change fixes a test, mention the test in the ChangeLog entry.
|
||||
** If a change fixes a test, mention the test in the commit message.
|
||||
|
||||
** Bug reports
|
||||
If somebody reports a new bug, mention his name in the ChangeLog entry
|
||||
If somebody reports a new bug, mention his name in the commit message
|
||||
and in the test case you write. Put him into THANKS.
|
||||
|
||||
The correct response to most actual bugs is to write a new test case
|
||||
which demonstrates the bug. Then fix the bug, re-run the test suite,
|
||||
and check everything in.
|
||||
|
||||
** You may find it useful to install the git-merge-changelog merge driver:
|
||||
|
||||
http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/git-merge-changelog.c
|
||||
|
||||
When following the generic installation instructions there, keep in mind that
|
||||
your clone of Bison's git repository already contains appropriate
|
||||
.gitattributes files, and running Bison's bootstrap script will make the
|
||||
necessary changes to .git/config.
|
||||
|
||||
|
||||
* Hacking
|
||||
|
||||
@@ -54,33 +43,35 @@ 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/>
|
||||
- Tar <http://www.gnu.org/software/tar/>
|
||||
|
||||
Valgrind <http://valgrind.org/> is also highly recommended, if
|
||||
Valgrind supports your architecture.
|
||||
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.
|
||||
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
|
||||
|
||||
@@ -127,14 +118,14 @@ explicitly by the user.
|
||||
|
||||
*** Updating Bison
|
||||
|
||||
If you pull a newer version of a branch, say via `git pull', you might
|
||||
import requests for updated submodules. A simple `git diff' will
|
||||
If you pull a newer version of a branch, say via "git pull", you might
|
||||
import requests for updated submodules. A simple "git diff" will
|
||||
reveal if the current version of the submodule (i.e., the actual
|
||||
contents of the gnulib directory) and the current request from the
|
||||
subscriber (i.e., the reference of the version of gnulib that the
|
||||
Bison reporitory requests) differ. To upgrade the submodules (i.e.,
|
||||
Bison repository requests) differ. To upgrade the submodules (i.e.,
|
||||
to check out the version that is actually requested by the subscriber,
|
||||
run `git submodule update'.
|
||||
run "git submodule update".
|
||||
|
||||
$ git pull
|
||||
$ git submodule update
|
||||
@@ -163,13 +154,13 @@ formal release, see the ChangeLog in the latest gnulib snapshot at:
|
||||
|
||||
http://erislabs.net/ianb/projects/gnulib/
|
||||
|
||||
The autoconf files we use are currently:
|
||||
The Autoconf files we use are currently:
|
||||
|
||||
m4/m4.m4
|
||||
lib/m4sugar/m4sugar.m4
|
||||
lib/m4sugar/foreach.m4
|
||||
|
||||
These files don't change very often in autoconf, so it should be
|
||||
These files don't change very often in Autoconf, so it should be
|
||||
relatively straight-forward to examine the differences in order to
|
||||
decide whether to update.
|
||||
|
||||
@@ -178,6 +169,36 @@ 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.
|
||||
|
||||
This is not mature on Mac OS X. First, Valgrind does support the way bison
|
||||
calls m4, so Valgrind cannot be used to check bison on Mac OS X.
|
||||
|
||||
Second, there are many errors that come from the platform itself, not from
|
||||
bison. build-aux/darwin11.4.0.valgrind addresses some of them.
|
||||
|
||||
Third, valgrind issues warnings such as:
|
||||
|
||||
--99312:0:syswrap- WARNING: Ignoring sigreturn( ..., UC_RESET_ALT_STACK );
|
||||
|
||||
which cause the test to fail uselessly. It is hard to ignore these errors
|
||||
with a major overhaul of the way instrumentation is performed in the test
|
||||
suite. So currently, do not try to run valgrind on Mac OS X.
|
||||
|
||||
** Release checks
|
||||
Try to run the test suite with more severe conditions before a
|
||||
release:
|
||||
@@ -186,36 +207,48 @@ release:
|
||||
that 1. Bison compiles cleanly, 2. the parsers it produces compile
|
||||
cleanly too.
|
||||
|
||||
- Build with -DGNULIB_POSIXCHECK. It suggests gnulib modules that can
|
||||
fix portability issues.
|
||||
- Maybe build with -DGNULIB_POSIXCHECK, which suggests gnulib modules
|
||||
that can fix portability issues. See if you really want to pay
|
||||
attention to its warnings; there's no need to obey blindly to it
|
||||
(<http://lists.gnu.org/archive/html/bison-patches/2012-05/msg00057.html>).
|
||||
|
||||
- run `make maintainer-check' which:
|
||||
- runs `valgrind -q bison' to run Bison under Valgrind.
|
||||
- Check with "make syntax-check" if there are issues diagnosed by
|
||||
gnulib.
|
||||
|
||||
- run "make maintainer-check" which:
|
||||
- runs "valgrind -q bison" to run Bison under Valgrind.
|
||||
- runs the parsers under Valgrind.
|
||||
- runs the test suite with G++ as C compiler...
|
||||
|
||||
- run `make maintainer-push-check', which runs `make maintainer-check'
|
||||
- run "make maintainer-push-check", which runs "make maintainer-check"
|
||||
while activating the push implementation and its pull interface wrappers
|
||||
in many test cases that were originally written to exercise only the
|
||||
pull implementation. This makes certain the push implementation can
|
||||
perform every task the pull implementation can.
|
||||
|
||||
- run `make maintainer-xml-check', which runs `make maintainer-check'
|
||||
- run "make maintainer-xml-check", which runs "make maintainer-check"
|
||||
while checking Bison's XML automaton report for every working grammar
|
||||
passed to Bison in the test suite. The check just diffs the output of
|
||||
Bison's included XSLT style sheets with the output of --report=all and
|
||||
--graph.
|
||||
|
||||
- running "make maintainer-release-check" takes care of running
|
||||
maintainer-check, maintainer-push-check and maintainer-xml-check.
|
||||
|
||||
- Change tests/atlocal/CFLAGS to add your preferred options. For
|
||||
instance, `-traditional' to check that the parsers are K&R. Note
|
||||
that it does not make sense for glr.c, which should be ANSI,
|
||||
but currently is actually GNU C, nor for lalr1.cc.
|
||||
instance, "-traditional" to check that the parsers are K&R. Note
|
||||
that it does not make sense for glr.c, which should be ANSI, but
|
||||
currently is actually GNU C, nor for lalr1.cc.
|
||||
|
||||
|
||||
* Release Procedure
|
||||
This section needs to be updated to take into account features from
|
||||
gnulib. In particular, be sure to read README-release.
|
||||
|
||||
** Update the submodules. See above.
|
||||
|
||||
** Update maintainer tools, such as Autoconf. See above.
|
||||
|
||||
** Try to get the *.pot files to the Translation Project at least one
|
||||
week before a stable release, to give them time to translate them.
|
||||
Before generating the *.pot files, make sure that po/POTFILES.in and
|
||||
@@ -226,7 +259,7 @@ This helps: grep -l '\<_(' *
|
||||
See above.
|
||||
|
||||
** Update the foreign files
|
||||
Running `./bootstrap' in the top level should update them all for you.
|
||||
Running "./bootstrap" in the top level should update them all for you.
|
||||
This covers PO files too. Sometimes a PO file contains problems that
|
||||
causes it to be rejected by recent Gettext releases; please report
|
||||
these to the Translation Project.
|
||||
@@ -238,65 +271,56 @@ Bison sources.
|
||||
|
||||
** Check copyright years.
|
||||
We update years in copyright statements throughout Bison once at the
|
||||
start of every year by running `make update-copyright'. However, before
|
||||
start of every year by running "make update-copyright". However, before
|
||||
a release, it's good to verify that it's actually been run. Besides the
|
||||
copyright statement for each Bison file, check the copyright statements
|
||||
that the skeletons insert into generated parsers, and check all
|
||||
occurrences of PACKAGE_COPYRIGHT_YEAR in configure.ac.
|
||||
|
||||
** Update NEWS
|
||||
The version number, *and* the date of the release (including for
|
||||
betas).
|
||||
** Update NEWS, commit and tag.
|
||||
See do-release-commit-and-tag in README-release. For a while, we used
|
||||
beta names such as "2.6_rc1". Now that we use gnulib in the release
|
||||
procedure, we must use "2.5.90", which has the additional benefit of
|
||||
being properly sorted in "git tag -l".
|
||||
|
||||
** Update ChangeLog
|
||||
Should have an entry similar to `Version 1.49b.'.
|
||||
|
||||
** Tag the release
|
||||
Before Bison will build with the right version number, you must tag the release
|
||||
in git. Do this after all other changes. The command is similar to:
|
||||
|
||||
git tag -a v2.3b
|
||||
|
||||
The log message can be simply:
|
||||
|
||||
Bison 2.3b
|
||||
|
||||
** Push
|
||||
Once `make distcheck' passes, push your changes and the tag.
|
||||
`git push' without arguments will not push the tag.
|
||||
|
||||
** make alpha
|
||||
FIXME: `make alpha' is not maintained and is broken. These
|
||||
instructions need to be replaced or removed.
|
||||
|
||||
Running `make alpha' is absolutely perfect for beta releases: it makes
|
||||
the tarballs, the xdeltas, and prepares (in /tmp/) a proto
|
||||
announcement. It is so neat, that that's what I use anyway for
|
||||
genuine releases, but adjusting things by hand (e.g., the urls in the
|
||||
announcement file, the ChangeLog which is not needed etc.).
|
||||
|
||||
If it fails, you're on your own...
|
||||
|
||||
It requires GNU Make.
|
||||
** make alpha, beta, or stable
|
||||
See README-release.
|
||||
|
||||
** Upload
|
||||
The generic GNU upload procedure is at:
|
||||
There are two ways to upload the tarballs to the GNU servers: using
|
||||
gnupload (from gnulib), or by hand. Obviously prefer the former. But
|
||||
in either case, be sure to read the following paragraph.
|
||||
|
||||
http://www.gnu.org/prep/maintain/maintain.html#Automated-FTP-Uploads
|
||||
*** Setup
|
||||
You need "gnupg".
|
||||
|
||||
Follow the instructions there to register your information so you're permitted
|
||||
to upload. Make sure your public key has been uploaded at least to
|
||||
Make sure your public key has been uploaded at least to
|
||||
keys.gnupg.net. You can upload it with:
|
||||
|
||||
gpg --keyserver keys.gnupg.net --send-keys F125BDF3
|
||||
|
||||
where F125BDF3 should be replaced with your key ID.
|
||||
|
||||
*** Using gnupload
|
||||
You need "ncftp".
|
||||
|
||||
At the end "make stable" (or alpha/beta) will display the procedure to
|
||||
run. Just copy and paste it in your shell.
|
||||
|
||||
*** By hand
|
||||
|
||||
The generic GNU upload procedure is at:
|
||||
|
||||
http://www.gnu.org/prep/maintain/maintain.html#Automated-FTP-Uploads
|
||||
|
||||
Follow the instructions there to register your information so you're permitted
|
||||
to upload.
|
||||
|
||||
Here's a brief reminder of how to roll the tarballs and upload them:
|
||||
|
||||
*** make distcheck
|
||||
*** gpg -b bison-2.3b.tar.gz
|
||||
*** In a file named `bison-2.3b.tar.gz.directive', type:
|
||||
*** In a file named "bison-2.3b.tar.gz.directive", type:
|
||||
|
||||
version: 1.1
|
||||
directory: bison
|
||||
@@ -308,7 +332,7 @@ Here's a brief reminder of how to roll the tarballs and upload them:
|
||||
*** put bison-2.3b.tar.gz # This can take a while.
|
||||
*** put bison-2.3b.tar.gz.sig
|
||||
*** put bison-2.3b.tar.gz.directive.asc
|
||||
*** Repeat all these steps for bison-2.3b.tar.bz2.
|
||||
*** Repeat all these steps for bison-2.3b.tar.xz.
|
||||
|
||||
** Update Bison manual on www.gnu.org.
|
||||
|
||||
@@ -352,7 +376,8 @@ function 'index', once for the table of contents); you can ignore this
|
||||
issue.
|
||||
|
||||
** Announce
|
||||
To generate a template announcement file:
|
||||
The "make stable" (or alpha/beta) command just created a template,
|
||||
$HOME/announce-bison-X.Y. Otherwise, to generate it, run:
|
||||
|
||||
make RELEASE_TYPE=alpha gpg_key_ID=F125BDF3 announcement
|
||||
|
||||
@@ -362,28 +387,28 @@ replaced with your key ID.
|
||||
Complete/fix the announcement file. The generated list of recipients
|
||||
([email protected], [email protected], [email protected],
|
||||
[email protected], and [email protected]) is
|
||||
appropriate for a stable release or a ``serious beta''. For any other
|
||||
release, drop at least [email protected]. For an example of how to fill
|
||||
out the rest of the template, search the mailing list archives for the
|
||||
most recent release announcement.
|
||||
appropriate for a stable release or a "serious beta". For any other
|
||||
release, drop at least [email protected]. For an example of how to
|
||||
fill out the rest of the template, search the mailing list archives
|
||||
for the most recent release announcement.
|
||||
|
||||
For a stable release, send the same announcement on the comp.compilers
|
||||
newsgroup by sending email to [email protected]. Do not make any Cc as
|
||||
the moderator will throw away anything cross-posted or Cc'ed. It really
|
||||
needs to be a separate message.
|
||||
|
||||
** Bump the version number
|
||||
In configure.ac. Run `make'. So that developers don't accidentally add new
|
||||
items to the old NEWS entry, create a new empty NEWS entry something like:
|
||||
** Prepare NEWS
|
||||
So that developers don't accidentally add new items to the old NEWS
|
||||
entry, create a new empty entry in line 3 (without the two leading
|
||||
spaces):
|
||||
|
||||
Changes in version ?.? (????-??-??):
|
||||
* Noteworthy changes in release ?.? (????-??-??) [?]
|
||||
|
||||
Push these changes.
|
||||
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002-2005, 2007-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2005, 2007-2012 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bison.
|
||||
|
||||
@@ -399,3 +424,14 @@ 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/>.
|
||||
|
||||
LocalWords: Automake Autoconf Gettext Gzip Rsync Valgrind gnulib submodules
|
||||
LocalWords: submodule init cd distcheck checkin ChangeLog valgrind sigreturn
|
||||
LocalWords: UC gcc DGNULIB POSIXCHECK xml XSLT glr lalr README po runtime rc
|
||||
LocalWords: gnupload gnupg gpg keyserver BDF ncftp filename clearsign cvs dir
|
||||
LocalWords: symlinks vti html lt POSIX Cc'ed
|
||||
|
||||
Local Variables:
|
||||
mode: outline
|
||||
fill-column: 76
|
||||
End:
|
||||
|
||||
@@ -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]
|
||||
@@ -29,6 +31,8 @@ Csaba Raduly [email protected]
|
||||
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]
|
||||
@@ -42,6 +46,7 @@ Frank Heckenbach [email protected]
|
||||
Frans Englich [email protected]
|
||||
Georg Sauthoff [email protected]
|
||||
George Neuner [email protected]
|
||||
Gilles Espinasse [email protected]
|
||||
Goran Uddeborg [email protected]
|
||||
Guido Trentalancia [email protected]
|
||||
H. Merijn Brand [email protected]
|
||||
@@ -53,13 +58,17 @@ 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]
|
||||
Keith Browne [email protected]
|
||||
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]
|
||||
@@ -76,36 +85,47 @@ 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]
|
||||
Satya Kiran Popuri [email protected]
|
||||
Sebastian Setzer [email protected]
|
||||
Sebastien Fricker [email protected]
|
||||
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]
|
||||
Tim Van Holder [email protected]
|
||||
Tom Lane [email protected]
|
||||
Tom Tromey [email protected]
|
||||
Tommy Nordgren [email protected]
|
||||
Troy A. Johnson [email protected]
|
||||
Tys Lefering twlevo@gmail.com
|
||||
Tys Lefering gccbison@gmail.com
|
||||
Vin Shelton [email protected]
|
||||
W.C.A. Wijngaards [email protected]
|
||||
Wayne Green [email protected]
|
||||
Wei Song [email protected]
|
||||
Wolfgang S. Kechel [email protected]
|
||||
Wolfram Wagner [email protected]
|
||||
Wwp [email protected]
|
||||
Zack Weinberg [email protected]
|
||||
@@ -115,4 +135,24 @@ 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.
|
||||
|
||||
This file is part of Bison, the GNU Parser Generator.
|
||||
|
||||
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/>.
|
||||
|
||||
@@ -1,29 +1,153 @@
|
||||
-*- outline -*-
|
||||
* 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.
|
||||
|
||||
* Header guards
|
||||
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
|
||||
|
||||
From Franc,ois: should we keep the directory part in the CPP guard?
|
||||
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'?
|
||||
|
||||
** Use b4_symbol in all the skeleton
|
||||
Move its definition in the more standard places and deploy it in other
|
||||
skeletons. Then remove the older system, including the tables
|
||||
generated by output.c
|
||||
|
||||
** Update the documentation on gnu.org
|
||||
|
||||
** Get rid of fake #lines [Bison: ...]
|
||||
Possibly as simple as checking whether the column number is nonnegative.
|
||||
|
||||
I have seen messages like the following from GCC.
|
||||
|
||||
<built-in>:0: fatal error: opening dependency file .deps/libltdl/argz.Tpo: No such file or directory
|
||||
|
||||
|
||||
* Yacc.c: CPP Macros
|
||||
** Discuss about %printer/%destroy in the case of C++.
|
||||
It would be very nice to provide the symbol classes with an operator<<
|
||||
and a destructor. Unfortunately the syntax we have chosen for
|
||||
%destroy and %printer make them hard to reuse. For instance, the user
|
||||
is invited to write something like
|
||||
|
||||
Do some people use YYPURE, YYLSP_NEEDED like we do in the test suite?
|
||||
They should not: it is not documented. But if they need to, let's
|
||||
find something clean (not like YYLSP_NEEDED...).
|
||||
%printer { debug_stream() << $$; } <my_type>;
|
||||
|
||||
which is hard to reuse elsewhere since it wants to use
|
||||
"debug_stream()" to find the stream to use. The same applies to
|
||||
%destroy: we told the user she could use the members of the Parser
|
||||
class in the printers/destructors, which is not good for an operator<<
|
||||
since it is no longer bound to a particular parser, it's just a
|
||||
(standalone symbol).
|
||||
|
||||
** Rename LR0.cc
|
||||
as lr0.cc, why upper case?
|
||||
|
||||
** bench several bisons.
|
||||
Enhance bench.pl with %b to run different bisons.
|
||||
|
||||
* Various
|
||||
** Warnings
|
||||
Warnings about type tags that are used in printer and dtors, but not
|
||||
for symbols?
|
||||
|
||||
** YYERRCODE
|
||||
Defined to 256, but not used, not documented. Probably the token
|
||||
number for the error token, which POSIX wants to be 256, but which
|
||||
Bison might renumber if the user used number 256. Keep fix and doc?
|
||||
Throw away?
|
||||
|
||||
Also, why don't we output the token name of the error token in the
|
||||
output? It is explicitly skipped:
|
||||
|
||||
/* Skip error token and tokens without identifier. */
|
||||
if (sym != errtoken && id)
|
||||
|
||||
Of course there are issues with name spaces, but if we disable we have
|
||||
something which seems to be more simpler and more consistent instead
|
||||
of the special case YYERRCODE.
|
||||
|
||||
enum yytokentype {
|
||||
error = 256,
|
||||
// ...
|
||||
};
|
||||
|
||||
|
||||
* Installation
|
||||
We could (should?) also treat the case of the undef_token, which is
|
||||
numbered 257 for yylex, and 2 internal. Both appear for instance in
|
||||
toknum:
|
||||
|
||||
* Documentation
|
||||
Before releasing, make sure the documentation ("Understanding your
|
||||
parser") refers to the current `output' format.
|
||||
const unsigned short int
|
||||
parser::yytoken_number_[] =
|
||||
{
|
||||
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
|
||||
|
||||
while here
|
||||
|
||||
enum yytokentype {
|
||||
TOK_EOF = 0,
|
||||
TOK_EQ = 258,
|
||||
|
||||
so both 256 and 257 are "mysterious".
|
||||
|
||||
const char*
|
||||
const parser::yytname_[] =
|
||||
{
|
||||
"\"end of command\"", "error", "$undefined", "\"=\"", "\"break\"",
|
||||
|
||||
|
||||
** YYFAIL
|
||||
It is seems to be *really* obsolete now, shall we remove it?
|
||||
|
||||
** yychar == yyempty_
|
||||
The code in yyerrlab reads:
|
||||
|
||||
if (yychar <= YYEOF)
|
||||
{
|
||||
/* Return failure if at end of input. */
|
||||
if (yychar == YYEOF)
|
||||
YYABORT;
|
||||
}
|
||||
|
||||
There are only two yychar that can be <= YYEOF: YYEMPTY and YYEOF.
|
||||
But I can't produce the situation where yychar is YYEMPTY here, is it
|
||||
really possible? The test suite does not exercise this case.
|
||||
|
||||
This shows that it would be interesting to manage to install skeleton
|
||||
coverage analysis to the test suite.
|
||||
|
||||
** Table definitions
|
||||
It should be very easy to factor the definition of the various tables,
|
||||
including the separation bw declaration and definition. See for
|
||||
instance b4_table_define in lalr1.cc. This way, we could even factor
|
||||
C vs. C++ definitions.
|
||||
|
||||
* From lalr1.cc to yacc.c
|
||||
** Single stack
|
||||
Merging the three stacks in lalr1.cc simplified the code, prompted for
|
||||
other improvements and also made it faster (probably because memory
|
||||
management is performed once instead of three times). I suggest that
|
||||
we do the same in yacc.c.
|
||||
|
||||
** yysyntax_error
|
||||
The code bw glr.c and yacc.c is really alike, we can certainly factor
|
||||
some parts.
|
||||
|
||||
* lalr1.cc
|
||||
** vector
|
||||
Move to using vector, drop stack.hh.
|
||||
|
||||
* Report
|
||||
|
||||
** Figures
|
||||
Some statistics about the grammar and the parser would be useful,
|
||||
especially when asking the user to send some information about the
|
||||
grammars she is working on. We should probably also include some
|
||||
information about the variables (I'm not sure for instance we even
|
||||
specify what LR variant was used).
|
||||
|
||||
** GLR
|
||||
How would Paul like to display the conflicted actions? In particular,
|
||||
what when two reductions are possible on a given lookahead token, but one is
|
||||
@@ -52,36 +176,11 @@ DeRemer and Penello: they already provide the algorithm.
|
||||
|
||||
* Extensions
|
||||
|
||||
** Labeling the symbols
|
||||
Have a look at the Lemon parser generator: instead of $1, $2 etc. they
|
||||
can name the values. This is much more pleasant. For instance:
|
||||
|
||||
exp (res): exp (a) '+' exp (b) { $res = $a + $b; };
|
||||
|
||||
I love this. I have been bitten too often by the removal of the
|
||||
symbol, and forgetting to shift all the $n to $n-1. If you are
|
||||
unlucky, it compiles...
|
||||
|
||||
But instead of using $a etc., we can use regular variables. And
|
||||
instead of using (), I propose to use `:' (again). Paul suggests
|
||||
supporting `->' in addition to `:' to separate LHS and RHS. In other
|
||||
words:
|
||||
|
||||
r:exp -> a:exp '+' b:exp { r = a + b; };
|
||||
|
||||
That requires an significant improvement of the grammar parser. Using
|
||||
GLR would be nice. It also requires that Bison know the type of the
|
||||
symbols (which will be useful for %include anyway). So we have some
|
||||
time before...
|
||||
|
||||
Note that there remains the problem of locations: `@r'?
|
||||
|
||||
|
||||
** $-1
|
||||
We should find a means to provide an access to values deep in the
|
||||
stack. For instance, instead of
|
||||
|
||||
baz: qux { $$ = $<foo>-1 + $<bar>0 + $1; }
|
||||
baz: qux { $$ = $<foo>-1 + $<bar>0 + $1; }
|
||||
|
||||
we should be able to have:
|
||||
|
||||
@@ -96,9 +195,6 @@ must be in the scanner: we must not parse what is in a switched off
|
||||
part of %if. Akim Demaille thinks it should be in the parser, so as
|
||||
to avoid falling into another CPP mistake.
|
||||
|
||||
** -D, --define-muscle NAME=VALUE
|
||||
To define muscles via cli. Or maybe support directly NAME=VALUE?
|
||||
|
||||
** XML Output
|
||||
There are couple of available extensions of Bison targeting some XML
|
||||
output. Some day we should consider including them. One issue is
|
||||
@@ -117,13 +213,13 @@ XML output for GNU Bison
|
||||
* Unit rules
|
||||
Maybe we could expand unit rules, i.e., transform
|
||||
|
||||
exp: arith | bool;
|
||||
arith: exp '+' exp;
|
||||
bool: exp '&' exp;
|
||||
exp: arith | bool;
|
||||
arith: exp '+' exp;
|
||||
bool: exp '&' exp;
|
||||
|
||||
into
|
||||
|
||||
exp: exp '+' exp | exp '&' exp;
|
||||
exp: exp '+' exp | exp '&' exp;
|
||||
|
||||
when there are no actions. This can significantly speed up some
|
||||
grammars. I can't find the papers. In particular the book `LR
|
||||
@@ -139,27 +235,22 @@ this issue. Does anybody have it?
|
||||
Some history of Bison and some bibliography would be most welcome.
|
||||
Are there any Texinfo standards for bibliography?
|
||||
|
||||
|
||||
|
||||
* Java, Fortran, etc.
|
||||
|
||||
|
||||
* Coding system independence
|
||||
Paul notes:
|
||||
|
||||
Currently Bison assumes 8-bit bytes (i.e. that UCHAR_MAX is
|
||||
255). It also assumes that the 8-bit character encoding is
|
||||
the same for the invocation of 'bison' as it is for the
|
||||
invocation of 'cc', but this is not necessarily true when
|
||||
people run bison on an ASCII host and then use cc on an EBCDIC
|
||||
host. I don't think these topics are worth our time
|
||||
addressing (unless we find a gung-ho volunteer for EBCDIC or
|
||||
PDP-10 ports :-) but they should probably be documented
|
||||
somewhere.
|
||||
Currently Bison assumes 8-bit bytes (i.e. that UCHAR_MAX is
|
||||
255). It also assumes that the 8-bit character encoding is
|
||||
the same for the invocation of 'bison' as it is for the
|
||||
invocation of 'cc', but this is not necessarily true when
|
||||
people run bison on an ASCII host and then use cc on an EBCDIC
|
||||
host. I don't think these topics are worth our time
|
||||
addressing (unless we find a gung-ho volunteer for EBCDIC or
|
||||
PDP-10 ports :-) but they should probably be documented
|
||||
somewhere.
|
||||
|
||||
More importantly, Bison does not currently allow NUL bytes in
|
||||
tokens, either via escapes (e.g., "x\0y") or via a NUL byte in
|
||||
the source code. This should get fixed.
|
||||
More importantly, Bison does not currently allow NUL bytes in
|
||||
tokens, either via escapes (e.g., "x\0y") or via a NUL byte in
|
||||
the source code. This should get fixed.
|
||||
|
||||
* --graph
|
||||
Show reductions.
|
||||
@@ -169,33 +260,6 @@ Show reductions.
|
||||
** Skeleton strategy
|
||||
Must we keep %token-table?
|
||||
|
||||
* src/print_graph.c
|
||||
Find the best graph parameters.
|
||||
|
||||
* BTYacc
|
||||
See if we can integrate backtracking in Bison. Charles-Henri de
|
||||
Boysson <[email protected]> is working on this, and already has some
|
||||
results. Vadim Maslow, the maintainer of BTYacc was contacted, and we
|
||||
stay in touch with him. Adjusting the Bison grammar parser will be
|
||||
needed to support some extra BTYacc features. This is less urgent.
|
||||
|
||||
** Keeping the conflicted actions
|
||||
First, analyze the differences between byacc and btyacc (I'm referring
|
||||
to the executables). Find where the conflicts are preserved.
|
||||
|
||||
** Compare with the GLR tables
|
||||
See how isomorphic the way BTYacc and the way the GLR adjustments in
|
||||
Bison are compatible. *As much as possible* one should try to use the
|
||||
same implementation in the Bison executables. I insist: it should be
|
||||
very feasible to use the very same conflict tables.
|
||||
|
||||
** Adjust the skeletons
|
||||
Import the skeletons for C and C++.
|
||||
|
||||
** Improve the skeletons
|
||||
Have them support yysymprint, yydestruct and so forth.
|
||||
|
||||
|
||||
* Precedence
|
||||
|
||||
** Partial order
|
||||
@@ -203,15 +267,6 @@ It is unfortunate that there is a total order for precedence. It
|
||||
makes it impossible to have modular precedence information. We should
|
||||
move to partial orders (sounds like series/parallel orders to me).
|
||||
|
||||
** Correlation b/w precedence and associativity
|
||||
Also, I fail to understand why we have to assign the same
|
||||
associativity to operators with the same precedence. For instance,
|
||||
why can't I decide that the precedence of * and / is the same, but the
|
||||
latter is nonassoc?
|
||||
|
||||
If there is really no profound motivation, we should find a new syntax
|
||||
to allow specifying this.
|
||||
|
||||
** RR conflicts
|
||||
See if we can use precedence between rules to solve RR conflicts. See
|
||||
what POSIX says.
|
||||
@@ -240,20 +295,6 @@ $<type_name>$ = $<type_name>1. I therefore think that one should implement
|
||||
a Bison option where every typed default rule is explicitly written out
|
||||
(same typed ruled can of course be grouped together).
|
||||
|
||||
Note: Robert Anisko handles this. He knows how to do it.
|
||||
|
||||
|
||||
* Warnings
|
||||
It would be nice to have warning support. See how Autoconf handles
|
||||
them, it is fairly well described there. It would be very nice to
|
||||
implement this in such a way that other programs could use
|
||||
lib/warnings.[ch].
|
||||
|
||||
Don't work on this without first announcing you do, as I already have
|
||||
thought about it, and know many of the components that can be used to
|
||||
implement it.
|
||||
|
||||
|
||||
* Pre and post actions.
|
||||
From: Florian Krohm <[email protected]>
|
||||
Subject: YYACT_EPILOGUE
|
||||
@@ -285,9 +326,32 @@ to bison. If you're interested, I'll work on a patch.
|
||||
* Better graphics
|
||||
Equip the parser with a means to create the (visual) parse tree.
|
||||
|
||||
* Complaint submessage indentation.
|
||||
We already have an implementation that works fairly well for named
|
||||
reference messages, but it would be nice to use it consistently for all
|
||||
submessages from Bison. For example, the "previous definition"
|
||||
submessage or the list of correct values for a %define variable might
|
||||
look better with indentation.
|
||||
|
||||
However, the current implementation makes the assumption that the
|
||||
location printed on the first line is not usually much shorter than the
|
||||
locations printed on the submessage lines that follow. That assumption
|
||||
may not hold true as often for some kinds of submessages especially if
|
||||
we ever support multiple grammar files.
|
||||
|
||||
Here's a proposal for how a new implementation might look:
|
||||
|
||||
http://lists.gnu.org/archive/html/bison-patches/2009-09/msg00086.html
|
||||
|
||||
|
||||
Local Variables:
|
||||
mode: outline
|
||||
coding: utf-8
|
||||
End:
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2001-2004, 2006, 2008-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2001-2004, 2006, 2008-2012 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=2011-04-05.18; # UTC
|
||||
scriptversion=2012-07-19.14; # UTC
|
||||
|
||||
# Bootstrap this package from checked-out sources.
|
||||
|
||||
# Copyright (C) 2003-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003-2012 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -36,12 +36,12 @@ nl='
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
|
||||
# Ensure that CDPATH is not set. Otherwise, the output from cd
|
||||
# would cause trouble in at least one use below.
|
||||
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
|
||||
|
||||
local_gl_dir=gl
|
||||
|
||||
# Temporary directory names.
|
||||
bt='._bootmp'
|
||||
bt_regex=`echo "$bt"| sed 's/\./[.]/g'`
|
||||
bt2=${bt}2
|
||||
me=$0
|
||||
|
||||
usage() {
|
||||
@@ -77,6 +77,33 @@ Running without arguments will suffice in most cases.
|
||||
EOF
|
||||
}
|
||||
|
||||
# warnf_ FORMAT-STRING ARG1...
|
||||
warnf_ ()
|
||||
{
|
||||
warnf_format_=$1
|
||||
shift
|
||||
nl='
|
||||
'
|
||||
case $* in
|
||||
*$nl*) me_=$(printf "$me"|tr "$nl|" '??')
|
||||
printf "$warnf_format_" "$@" | sed "s|^|$me_: |" ;;
|
||||
*) printf "$me: $warnf_format_" "$@" ;;
|
||||
esac >&2
|
||||
}
|
||||
|
||||
# warn_ WORD1...
|
||||
warn_ ()
|
||||
{
|
||||
# If IFS does not start with ' ', set it and emit the warning in a subshell.
|
||||
case $IFS in
|
||||
' '*) warnf_ '%s\n' "$*";;
|
||||
*) (IFS=' '; warn_ "$@");;
|
||||
esac
|
||||
}
|
||||
|
||||
# die WORD1...
|
||||
die() { warn_ "$@"; exit 1; }
|
||||
|
||||
# Configuration.
|
||||
|
||||
# Name of the Makefile.am
|
||||
@@ -88,9 +115,12 @@ gnulib_modules=
|
||||
# Any gnulib files needed that are not in modules.
|
||||
gnulib_files=
|
||||
|
||||
# A function to be called to edit gnulib.mk right after it's created.
|
||||
: ${AUTOPOINT=autopoint}
|
||||
: ${AUTORECONF=autoreconf}
|
||||
|
||||
# A function to be called right after gnulib-tool is run.
|
||||
# Override it via your own definition in bootstrap.conf.
|
||||
gnulib_mk_hook() { :; }
|
||||
bootstrap_post_import_hook() { :; }
|
||||
|
||||
# A function to be called after everything else in this script.
|
||||
# Override it via your own definition in bootstrap.conf.
|
||||
@@ -105,6 +135,11 @@ po_download_command_format=\
|
||||
"rsync --delete --exclude '*.s1' -Lrtvz \
|
||||
'translationproject.org::tp/latest/%s/' '%s'"
|
||||
|
||||
# Fallback for downloading .po files (if rsync fails).
|
||||
po_download_command_format2=\
|
||||
"wget --mirror -nd -q -np -A.po -P '%s' \
|
||||
http://translationproject.org/latest/%s/"
|
||||
|
||||
extract_package_name='
|
||||
/^AC_INIT(/{
|
||||
/.*,.*,.*, */{
|
||||
@@ -122,7 +157,8 @@ extract_package_name='
|
||||
p
|
||||
}
|
||||
'
|
||||
package=`sed -n "$extract_package_name" configure.ac` || exit
|
||||
package=$(sed -n "$extract_package_name" configure.ac) \
|
||||
|| die 'cannot find package name in configure.ac'
|
||||
gnulib_name=lib$package
|
||||
|
||||
build_aux=build-aux
|
||||
@@ -178,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
|
||||
@@ -195,19 +233,15 @@ find_tool ()
|
||||
else
|
||||
find_tool_error_prefix="\$$find_tool_envvar: "
|
||||
fi
|
||||
if test x"$find_tool_res" = x; then
|
||||
echo >&2 "$me: one of these is required: $find_tool_names"
|
||||
exit 1
|
||||
fi
|
||||
($find_tool_res --version </dev/null) >/dev/null 2>&1 || {
|
||||
echo >&2 "$me: ${find_tool_error_prefix}cannot run $find_tool_res --version"
|
||||
exit 1
|
||||
}
|
||||
test x"$find_tool_res" != x \
|
||||
|| die "one of these is required: $find_tool_names"
|
||||
($find_tool_res --version </dev/null) >/dev/null 2>&1 \
|
||||
|| die "${find_tool_error_prefix}cannot run $find_tool_res --version"
|
||||
eval "$find_tool_envvar=\$find_tool_res"
|
||||
eval "export $find_tool_envvar"
|
||||
}
|
||||
|
||||
# Find sha1sum, named gsha1sum on MacPorts, and shasum on MacOS 10.6.
|
||||
# Find sha1sum, named gsha1sum on MacPorts, and shasum on Mac OS X 10.6.
|
||||
find_tool SHA1SUM sha1sum gsha1sum shasum
|
||||
|
||||
# Override the default configuration, if necessary.
|
||||
@@ -222,7 +256,6 @@ esac
|
||||
test -z "${gnulib_extra_files}" && \
|
||||
gnulib_extra_files="
|
||||
$build_aux/install-sh
|
||||
$build_aux/missing
|
||||
$build_aux/mdate-sh
|
||||
$build_aux/texinfo.tex
|
||||
$build_aux/depcomp
|
||||
@@ -248,7 +281,7 @@ do
|
||||
usage
|
||||
exit;;
|
||||
--gnulib-srcdir=*)
|
||||
GNULIB_SRCDIR=`expr "X$option" : 'X--gnulib-srcdir=\(.*\)'`;;
|
||||
GNULIB_SRCDIR=${option#--gnulib-srcdir=};;
|
||||
--skip-po)
|
||||
SKIP_PO=t;;
|
||||
--force)
|
||||
@@ -262,21 +295,15 @@ do
|
||||
--no-git)
|
||||
use_git=false;;
|
||||
*)
|
||||
echo >&2 "$0: $option: unknown option"
|
||||
exit 1;;
|
||||
die "$option: unknown option";;
|
||||
esac
|
||||
done
|
||||
|
||||
if $use_git || test -d "$GNULIB_SRCDIR"; then
|
||||
:
|
||||
else
|
||||
echo "$0: Error: --no-git requires --gnulib-srcdir" >&2
|
||||
exit 1
|
||||
fi
|
||||
$use_git || test -d "$GNULIB_SRCDIR" \
|
||||
|| die "Error: --no-git requires --gnulib-srcdir"
|
||||
|
||||
if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
|
||||
echo "$0: Bootstrapping from a non-checked-out distribution is risky." >&2
|
||||
exit 1
|
||||
die "Bootstrapping from a non-checked-out distribution is risky."
|
||||
fi
|
||||
|
||||
# Ensure that lines starting with ! sort last, per gitignore conventions
|
||||
@@ -290,7 +317,7 @@ sort_patterns() {
|
||||
P
|
||||
x
|
||||
s/^\n//
|
||||
}'
|
||||
}' | sed '/^$/d'
|
||||
}
|
||||
|
||||
# If $STR is not already on a line by itself in $FILE, insert it,
|
||||
@@ -299,10 +326,10 @@ insert_sorted_if_absent() {
|
||||
file=$1
|
||||
str=$2
|
||||
test -f $file || touch $file
|
||||
echo "$str" | sort_patterns - $file | cmp - $file > /dev/null \
|
||||
echo "$str" | sort_patterns - $file | cmp -s - $file > /dev/null \
|
||||
|| { echo "$str" | sort_patterns - $file > $file.bak \
|
||||
&& mv $file.bak $file; } \
|
||||
|| exit 1
|
||||
|| die "insert_sorted_if_absent $file $str: failed"
|
||||
}
|
||||
|
||||
# Adjust $PATTERN for $VC_IGNORE_FILE and insert it with
|
||||
@@ -312,10 +339,10 @@ insert_vc_ignore() {
|
||||
pattern="$2"
|
||||
case $vc_ignore_file in
|
||||
*.gitignore)
|
||||
# A .gitignore entry that does not start with `/' applies
|
||||
# recursively to subdirectories, so prepend `/' to every
|
||||
# A .gitignore entry that does not start with '/' applies
|
||||
# recursively to subdirectories, so prepend '/' to every
|
||||
# .gitignore entry.
|
||||
pattern=`echo "$pattern" | sed s,^,/,`;;
|
||||
pattern=$(echo "$pattern" | sed s,^,/,);;
|
||||
esac
|
||||
insert_sorted_if_absent "$vc_ignore_file" "$pattern"
|
||||
}
|
||||
@@ -326,11 +353,8 @@ grep '^[ ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'\])' configure.ac \
|
||||
>/dev/null && found_aux_dir=yes
|
||||
grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \
|
||||
>/dev/null && found_aux_dir=yes
|
||||
if test $found_aux_dir = no; then
|
||||
echo "$0: expected line not found in configure.ac. Add the following:" >&2
|
||||
echo " AC_CONFIG_AUX_DIR([$build_aux])" >&2
|
||||
exit 1
|
||||
fi
|
||||
test $found_aux_dir = yes \
|
||||
|| die "configure.ac lacks 'AC_CONFIG_AUX_DIR([$build_aux])'; add it"
|
||||
|
||||
# If $build_aux doesn't exist, create it now, otherwise some bits
|
||||
# below will malfunction. If creating it, also mark it as ignored.
|
||||
@@ -419,20 +443,51 @@ check_versions() {
|
||||
$use_git || continue
|
||||
fi
|
||||
# Honor $APP variables ($TAR, $AUTOCONF, etc.)
|
||||
appvar=`echo $app | tr '[a-z]-' '[A-Z]_'`
|
||||
appvar=$(echo $app | LC_ALL=C tr '[a-z]-' '[A-Z]_')
|
||||
test "$appvar" = TAR && appvar=AMTAR
|
||||
eval "app=\${$appvar-$app}"
|
||||
inst_ver=$(get_version $app)
|
||||
if [ ! "$inst_ver" ]; then
|
||||
echo "$me: Error: '$app' not found" >&2
|
||||
ret=1
|
||||
elif [ ! "$req_ver" = "-" ]; then
|
||||
latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2)
|
||||
if [ ! "$latest_ver" = "$inst_ver" ]; then
|
||||
echo "$me: Error: '$app' version == $inst_ver is too old" >&2
|
||||
echo " '$app' version >= $req_ver is required" >&2
|
||||
case $appvar in
|
||||
GZIP) ;; # Do not use $GZIP: it contains gzip options.
|
||||
*) eval "app=\${$appvar-$app}" ;;
|
||||
esac
|
||||
|
||||
# Handle the still-experimental Automake-NG programs specially.
|
||||
# They remain named as the mainstream Automake programs ("automake",
|
||||
# and "aclocal") to avoid gratuitous incompatibilities with
|
||||
# pre-existing usages (by, say, autoreconf, or custom autogen.sh
|
||||
# scripts), but correctly identify themselves (as being part of
|
||||
# "GNU automake-ng") when asked their version.
|
||||
case $app in
|
||||
automake-ng|aclocal-ng)
|
||||
app=${app%-ng}
|
||||
($app --version | grep '(GNU automake-ng)') >/dev/null 2>&1 || {
|
||||
warn_ "Error: '$app' not found or not from Automake-NG"
|
||||
ret=1
|
||||
continue
|
||||
} ;;
|
||||
esac
|
||||
if [ "$req_ver" = "-" ]; then
|
||||
# Merely require app to exist; not all prereq apps are well-behaved
|
||||
# so we have to rely on $? rather than get_version.
|
||||
$app --version >/dev/null 2>&1
|
||||
if [ 126 -le $? ]; then
|
||||
warn_ "Error: '$app' not found"
|
||||
ret=1
|
||||
fi
|
||||
else
|
||||
# Require app to produce a new enough version string.
|
||||
inst_ver=$(get_version $app)
|
||||
if [ ! "$inst_ver" ]; then
|
||||
warn_ "Error: '$app' not found"
|
||||
ret=1
|
||||
else
|
||||
latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2)
|
||||
if [ ! "$latest_ver" = "$inst_ver" ]; then
|
||||
warnf_ '%s\n' \
|
||||
"Error: '$app' version == $inst_ver is too old" \
|
||||
" '$app' version >= $req_ver is required"
|
||||
ret=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -459,14 +514,37 @@ if test $use_libtool = 1; then
|
||||
find_tool LIBTOOLIZE glibtoolize libtoolize
|
||||
fi
|
||||
|
||||
# gnulib-tool requires at least automake and autoconf.
|
||||
# If either is not listed, add it (with minimum version) as a prerequisite.
|
||||
case $buildreq in
|
||||
*automake*) ;;
|
||||
*) buildreq="automake 1.9
|
||||
$buildreq" ;;
|
||||
esac
|
||||
case $buildreq in
|
||||
*autoconf*) ;;
|
||||
*) buildreq="autoconf 2.59
|
||||
$buildreq" ;;
|
||||
esac
|
||||
|
||||
# When we can deduce that gnulib-tool will require patch,
|
||||
# and when patch is not already listed as a prerequisite, add it, too.
|
||||
if test -d "$local_gl_dir" \
|
||||
&& ! find "$local_gl_dir" -name '*.diff' -exec false {} +; then
|
||||
case $buildreq in
|
||||
*patch*) ;;
|
||||
*) buildreq="patch -
|
||||
$buildreq" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if ! printf "$buildreq" | check_versions; then
|
||||
echo >&2
|
||||
if test -f README-prereq; then
|
||||
echo "$0: See README-prereq for how to get the prerequisite programs" >&2
|
||||
die "See README-prereq for how to get the prerequisite programs"
|
||||
else
|
||||
echo "$0: Please install the prerequisite programs" >&2
|
||||
die "Please install the prerequisite programs"
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "$0: Bootstrapping from checked-out $package sources..."
|
||||
@@ -495,7 +573,7 @@ git_modules_config () {
|
||||
test -f .gitmodules && git config --file .gitmodules "$@"
|
||||
}
|
||||
|
||||
gnulib_path=`git_modules_config submodule.gnulib.path`
|
||||
gnulib_path=$(git_modules_config submodule.gnulib.path)
|
||||
test -z "$gnulib_path" && gnulib_path=gnulib
|
||||
|
||||
# Get gnulib files.
|
||||
@@ -560,7 +638,7 @@ if $bootstrap_sync; then
|
||||
fi
|
||||
|
||||
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
|
||||
<$gnulib_tool || exit
|
||||
<$gnulib_tool || exit $?
|
||||
|
||||
# Get translations.
|
||||
|
||||
@@ -568,7 +646,10 @@ download_po_files() {
|
||||
subdir=$1
|
||||
domain=$2
|
||||
echo "$me: getting translations into $subdir for $domain..."
|
||||
cmd=`printf "$po_download_command_format" "$domain" "$subdir"`
|
||||
cmd=$(printf "$po_download_command_format" "$domain" "$subdir")
|
||||
eval "$cmd" && return
|
||||
# Fallback to HTTP.
|
||||
cmd=$(printf "$po_download_command_format2" "$subdir" "$domain")
|
||||
eval "$cmd"
|
||||
}
|
||||
|
||||
@@ -591,7 +672,7 @@ update_po_files() {
|
||||
&& ls "$ref_po_dir"/*.po 2>/dev/null |
|
||||
sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return
|
||||
|
||||
langs=`cd $ref_po_dir && echo *.po|sed 's/\.po//g'`
|
||||
langs=$(cd $ref_po_dir && echo *.po | sed 's/\.po//g')
|
||||
test "$langs" = '*' && langs=x
|
||||
for po in $langs; do
|
||||
case $po in x) continue;; esac
|
||||
@@ -628,18 +709,18 @@ symlink_to_dir()
|
||||
|
||||
# If the destination directory doesn't exist, create it.
|
||||
# This is required at least for "lib/uniwidth/cjk.h".
|
||||
dst_dir=`dirname "$dst"`
|
||||
dst_dir=$(dirname "$dst")
|
||||
if ! test -d "$dst_dir"; then
|
||||
mkdir -p "$dst_dir"
|
||||
|
||||
# If we've just created a directory like lib/uniwidth,
|
||||
# tell version control system(s) it's ignorable.
|
||||
# FIXME: for now, this does only one level
|
||||
parent=`dirname "$dst_dir"`
|
||||
parent=$(dirname "$dst_dir")
|
||||
for dot_ig in x $vc_ignore; do
|
||||
test $dot_ig = x && continue
|
||||
ig=$parent/$dot_ig
|
||||
insert_vc_ignore $ig `echo "$dst_dir"|sed 's,.*/,,'`
|
||||
insert_vc_ignore $ig "${dst_dir##*/}"
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -656,21 +737,28 @@ symlink_to_dir()
|
||||
cp -fp "$src" "$dst"
|
||||
}
|
||||
else
|
||||
# Leave any existing symlink alone, if it already points to the source,
|
||||
# so that broken build tools that care about symlink times
|
||||
# aren't confused into doing unnecessary builds. Conversely, if the
|
||||
# existing symlink's time stamp is older than the source, make it afresh,
|
||||
# so that broken tools aren't confused into skipping needed builds. See
|
||||
# <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>.
|
||||
test -h "$dst" &&
|
||||
src_ls=`ls -diL "$src" 2>/dev/null` && set $src_ls && src_i=$1 &&
|
||||
dst_ls=`ls -diL "$dst" 2>/dev/null` && set $dst_ls && dst_i=$1 &&
|
||||
test "$src_i" = "$dst_i" || {
|
||||
src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 &&
|
||||
dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 &&
|
||||
test "$src_i" = "$dst_i" &&
|
||||
both_ls=$(ls -dt "$src" "$dst") &&
|
||||
test "X$both_ls" = "X$dst$nl$src" || {
|
||||
dot_dots=
|
||||
case $src in
|
||||
/*) ;;
|
||||
*)
|
||||
case /$dst/ in
|
||||
*//* | */../* | */./* | /*/*/*/*/*/)
|
||||
echo >&2 "$me: invalid symlink calculation: $src -> $dst"
|
||||
exit 1;;
|
||||
/*/*/*/*/) dot_dots=../../../;;
|
||||
/*/*/*/) dot_dots=../../;;
|
||||
/*/*/) dot_dots=../;;
|
||||
die "invalid symlink calculation: $src -> $dst";;
|
||||
/*/*/*/*/) dot_dots=../../../;;
|
||||
/*/*/*/) dot_dots=../../;;
|
||||
/*/*/) dot_dots=../;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
@@ -681,164 +769,94 @@ symlink_to_dir()
|
||||
}
|
||||
}
|
||||
|
||||
cp_mark_as_generated()
|
||||
{
|
||||
cp_src=$1
|
||||
cp_dst=$2
|
||||
|
||||
if cmp -s "$cp_src" "$GNULIB_SRCDIR/$cp_dst"; then
|
||||
symlink_to_dir "$GNULIB_SRCDIR" "$cp_dst"
|
||||
elif cmp -s "$cp_src" "$local_gl_dir/$cp_dst"; then
|
||||
symlink_to_dir $local_gl_dir "$cp_dst"
|
||||
else
|
||||
case $cp_dst in
|
||||
*.[ch]) c1='/* '; c2=' */';;
|
||||
*.texi) c1='@c '; c2= ;;
|
||||
*.m4|*/Make*|Make*) c1='# ' ; c2= ;;
|
||||
*) c1= ; c2= ;;
|
||||
esac
|
||||
|
||||
# If the destination directory doesn't exist, create it.
|
||||
# This is required at least for "lib/uniwidth/cjk.h".
|
||||
dst_dir=`dirname "$cp_dst"`
|
||||
test -d "$dst_dir" || mkdir -p "$dst_dir"
|
||||
|
||||
if test -z "$c1"; then
|
||||
cmp -s "$cp_src" "$cp_dst" || {
|
||||
# Copy the file first to get proper permissions if it
|
||||
# doesn't already exist. Then overwrite the copy.
|
||||
echo "$me: cp -f $cp_src $cp_dst" &&
|
||||
rm -f "$cp_dst" &&
|
||||
cp "$cp_src" "$cp_dst-t" &&
|
||||
sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst-t" &&
|
||||
mv -f "$cp_dst-t" "$cp_dst"
|
||||
}
|
||||
else
|
||||
# Copy the file first to get proper permissions if it
|
||||
# doesn't already exist. Then overwrite the copy.
|
||||
cp "$cp_src" "$cp_dst-t" &&
|
||||
(
|
||||
echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" &&
|
||||
echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" &&
|
||||
sed "s!$bt_regex/!!g" "$cp_src"
|
||||
) > $cp_dst-t &&
|
||||
if cmp -s "$cp_dst-t" "$cp_dst"; then
|
||||
rm -f "$cp_dst-t"
|
||||
else
|
||||
echo "$me: cp $cp_src $cp_dst # with edits" &&
|
||||
mv -f "$cp_dst-t" "$cp_dst"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
version_controlled_file() {
|
||||
dir=$1
|
||||
parent=$1
|
||||
file=$2
|
||||
found=no
|
||||
if test -d CVS; then
|
||||
grep -F "/$file/" $dir/CVS/Entries 2>/dev/null |
|
||||
grep '^/[^/]*/[0-9]' > /dev/null && found=yes
|
||||
elif test -d .git; then
|
||||
git rm -n "$dir/$file" > /dev/null 2>&1 && found=yes
|
||||
if test -d .git; then
|
||||
git rm -n "$file" > /dev/null 2>&1
|
||||
elif test -d .svn; then
|
||||
svn log -r HEAD "$dir/$file" > /dev/null 2>&1 && found=yes
|
||||
svn log -r HEAD "$file" > /dev/null 2>&1
|
||||
elif test -d CVS; then
|
||||
grep -F "/${file##*/}/" "$parent/CVS/Entries" 2>/dev/null |
|
||||
grep '^/[^/]*/[0-9]' > /dev/null
|
||||
else
|
||||
echo "$me: no version control for $dir/$file?" >&2
|
||||
warn_ "no version control for $file?"
|
||||
false
|
||||
fi
|
||||
test $found = yes
|
||||
}
|
||||
|
||||
slurp() {
|
||||
for dir in . `(cd $1 && find * -type d -print)`; do
|
||||
copied=
|
||||
sep=
|
||||
for file in `ls -a $1/$dir`; do
|
||||
case $file in
|
||||
.|..) continue;;
|
||||
# FIXME: should all file names starting with "." be ignored?
|
||||
.*) continue;;
|
||||
esac
|
||||
test -d $1/$dir/$file && continue
|
||||
for excluded_file in $excluded_files; do
|
||||
test "$dir/$file" = "$excluded_file" && continue 2
|
||||
# NOTE: we have to be careful to run both autopoint and libtoolize
|
||||
# before gnulib-tool, since gnulib-tool is likely to provide newer
|
||||
# versions of files "installed" by these two programs.
|
||||
# Then, *after* gnulib-tool (see below), we have to be careful to
|
||||
# run autoreconf in such a way that it does not run either of these
|
||||
# two just-pre-run programs.
|
||||
|
||||
# Import from gettext.
|
||||
with_gettext=yes
|
||||
grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
|
||||
with_gettext=no
|
||||
|
||||
if test $with_gettext = yes || test $use_libtool = 1; then
|
||||
|
||||
tempbase=.bootstrap$$
|
||||
trap "rm -f $tempbase.0 $tempbase.1" 1 2 13 15
|
||||
|
||||
> $tempbase.0 > $tempbase.1 &&
|
||||
find . ! -type d -print | sort > $tempbase.0 || exit
|
||||
|
||||
if test $with_gettext = yes; then
|
||||
# Released autopoint has the tendency to install macros that have been
|
||||
# obsoleted in current gnulib, so run this before gnulib-tool.
|
||||
echo "$0: $AUTOPOINT --force"
|
||||
$AUTOPOINT --force || exit
|
||||
fi
|
||||
|
||||
# Autoreconf runs aclocal before libtoolize, which causes spurious
|
||||
# warnings if the initial aclocal is confused by the libtoolized
|
||||
# (or worse out-of-date) macro directory.
|
||||
# libtoolize 1.9b added the --install option; but we support back
|
||||
# to libtoolize 1.5.22, where the install action was default.
|
||||
if test $use_libtool = 1; then
|
||||
install=
|
||||
case $($LIBTOOLIZE --help) in
|
||||
*--install*) install=--install ;;
|
||||
esac
|
||||
echo "running: $LIBTOOLIZE $install --copy"
|
||||
$LIBTOOLIZE $install --copy
|
||||
fi
|
||||
|
||||
find . ! -type d -print | sort >$tempbase.1
|
||||
old_IFS=$IFS
|
||||
IFS=$nl
|
||||
for file in $(comm -13 $tempbase.0 $tempbase.1); do
|
||||
IFS=$old_IFS
|
||||
parent=${file%/*}
|
||||
version_controlled_file "$parent" "$file" || {
|
||||
for dot_ig in x $vc_ignore; do
|
||||
test $dot_ig = x && continue
|
||||
ig=$parent/$dot_ig
|
||||
insert_vc_ignore "$ig" "${file##*/}"
|
||||
done
|
||||
if test $file = Makefile.am && test "X$gnulib_mk" != XMakefile.am; then
|
||||
copied=$copied${sep}$gnulib_mk; sep=$nl
|
||||
remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
|
||||
sed "$remove_intl" $1/$dir/$file |
|
||||
cmp - $dir/$gnulib_mk > /dev/null || {
|
||||
echo "$me: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
|
||||
rm -f $dir/$gnulib_mk &&
|
||||
sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk &&
|
||||
gnulib_mk_hook $dir/$gnulib_mk
|
||||
}
|
||||
elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
|
||||
version_controlled_file $dir $file; then
|
||||
echo "$me: $dir/$file overrides $1/$dir/$file"
|
||||
else
|
||||
copied=$copied$sep$file; sep=$nl
|
||||
if test $file = gettext.m4; then
|
||||
echo "$me: patching m4/gettext.m4 to remove need for intl/* ..."
|
||||
rm -f $dir/$file
|
||||
sed '
|
||||
/^AC_DEFUN(\[AM_INTL_SUBDIR],/,/^]/c\
|
||||
AC_DEFUN([AM_INTL_SUBDIR], [])
|
||||
/^AC_DEFUN(\[gt_INTL_SUBDIR_CORE],/,/^]/c\
|
||||
AC_DEFUN([gt_INTL_SUBDIR_CORE], [])
|
||||
$a\
|
||||
AC_DEFUN([gl_LOCK_EARLY], [])
|
||||
' $1/$dir/$file >$dir/$file
|
||||
else
|
||||
cp_mark_as_generated $1/$dir/$file $dir/$file
|
||||
fi
|
||||
fi || exit
|
||||
done
|
||||
|
||||
for dot_ig in x $vc_ignore; do
|
||||
test $dot_ig = x && continue
|
||||
ig=$dir/$dot_ig
|
||||
if test -n "$copied"; then
|
||||
insert_vc_ignore $ig "$copied"
|
||||
# If an ignored file name ends with .in.h, then also add
|
||||
# the name with just ".h". Many gnulib headers are generated,
|
||||
# e.g., stdint.in.h -> stdint.h, dirent.in.h ->..., etc.
|
||||
# Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed
|
||||
f=`echo "$copied" |
|
||||
sed '
|
||||
s/\.in\.h$/.h/
|
||||
s/\.sin$/.sed/
|
||||
s/\.y$/.c/
|
||||
s/\.gperf$/.h/
|
||||
'
|
||||
`
|
||||
insert_vc_ignore $ig "$f"
|
||||
|
||||
# For files like sys_stat.in.h and sys_time.in.h, record as
|
||||
# ignorable the directory we might eventually create: sys/.
|
||||
f=`echo "$copied"|sed 's/sys_.*\.in\.h$/sys/'`
|
||||
insert_vc_ignore $ig "$f"
|
||||
fi
|
||||
done
|
||||
}
|
||||
done
|
||||
}
|
||||
IFS=$old_IFS
|
||||
|
||||
|
||||
# Create boot temporary directories to import from gnulib and gettext.
|
||||
rm -fr $bt $bt2 &&
|
||||
mkdir $bt $bt2 || exit
|
||||
rm -f $tempbase.0 $tempbase.1
|
||||
trap - 1 2 13 15
|
||||
fi
|
||||
|
||||
# Import from gnulib.
|
||||
|
||||
gnulib_tool_options="\
|
||||
--import\
|
||||
--no-changelog\
|
||||
--aux-dir $bt/$build_aux\
|
||||
--doc-base $bt/$doc_base\
|
||||
--aux-dir $build_aux\
|
||||
--doc-base $doc_base\
|
||||
--lib $gnulib_name\
|
||||
--m4-base $bt/$m4_base/\
|
||||
--source-base $bt/$source_base/\
|
||||
--tests-base $bt/$tests_base\
|
||||
--m4-base $m4_base/\
|
||||
--source-base $source_base/\
|
||||
--tests-base $tests_base\
|
||||
--local-dir $local_gl_dir\
|
||||
$gnulib_tool_option_extras\
|
||||
"
|
||||
@@ -850,25 +868,14 @@ if test $use_libtool = 1; then
|
||||
fi
|
||||
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
|
||||
$gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
|
||||
slurp $bt || exit
|
||||
|
||||
for file in $gnulib_files; do
|
||||
symlink_to_dir "$GNULIB_SRCDIR" $file || exit
|
||||
symlink_to_dir "$GNULIB_SRCDIR" $file \
|
||||
|| die "failed to symlink $file"
|
||||
done
|
||||
|
||||
|
||||
# Import from gettext.
|
||||
with_gettext=yes
|
||||
grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
|
||||
with_gettext=no
|
||||
|
||||
if test $with_gettext = yes; then
|
||||
echo "$0: (cd $bt2; ${AUTOPOINT-autopoint}) ..."
|
||||
cp configure.ac $bt2 &&
|
||||
(cd $bt2 && ${AUTOPOINT-autopoint} && rm configure.ac) &&
|
||||
slurp $bt2 $bt || exit
|
||||
fi
|
||||
rm -fr $bt $bt2 || exit
|
||||
bootstrap_post_import_hook \
|
||||
|| die "bootstrap_post_import_hook failed"
|
||||
|
||||
# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
|
||||
# gnulib-populated directories. Such .m4 files would cause aclocal to fail.
|
||||
@@ -882,37 +889,31 @@ find "$m4_base" "$source_base" \
|
||||
-depth \( -name '*.m4' -o -name '*.[ch]' \) \
|
||||
-type l -xtype l -delete > /dev/null 2>&1
|
||||
|
||||
# Reconfigure, getting other files.
|
||||
|
||||
# Skip autoheader if it's not needed.
|
||||
grep -E '^[ ]*AC_CONFIG_HEADERS?\>' configure.ac >/dev/null ||
|
||||
AUTOHEADER=true
|
||||
|
||||
for command in \
|
||||
libtool \
|
||||
"${ACLOCAL-aclocal} --force -I '$m4_base' $ACLOCAL_FLAGS" \
|
||||
"${AUTOCONF-autoconf} --force" \
|
||||
"${AUTOHEADER-autoheader} --force" \
|
||||
"${AUTOMAKE-automake} --add-missing --copy --force-missing"
|
||||
do
|
||||
if test "$command" = libtool; then
|
||||
test $use_libtool = 0 \
|
||||
&& continue
|
||||
command="${LIBTOOLIZE-libtoolize} -c -f"
|
||||
fi
|
||||
echo "$0: $command ..."
|
||||
eval "$command" || exit
|
||||
done
|
||||
# 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;;
|
||||
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 \
|
||||
|| die "autoreconf failed"
|
||||
|
||||
# Get some extra files from gnulib, overriding existing files.
|
||||
for file in $gnulib_extra_files; do
|
||||
case $file in
|
||||
*/INSTALL) dst=INSTALL;;
|
||||
build-aux/*) dst=$build_aux/`expr "$file" : 'build-aux/\(.*\)'`;;
|
||||
build-aux/*) dst=$build_aux/${file#build-aux/};;
|
||||
*) dst=$file;;
|
||||
esac
|
||||
symlink_to_dir "$GNULIB_SRCDIR" $file $dst || exit
|
||||
symlink_to_dir "$GNULIB_SRCDIR" $file $dst \
|
||||
|| die "failed to symlink $file"
|
||||
done
|
||||
|
||||
if test $with_gettext = yes; then
|
||||
@@ -928,7 +929,19 @@ if test $with_gettext = yes; then
|
||||
a\
|
||||
'"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+}
|
||||
}
|
||||
' po/Makevars.template >po/Makevars || exit 1
|
||||
' po/Makevars.template >po/Makevars \
|
||||
|| die 'cannot generate po/Makevars'
|
||||
|
||||
# If the 'gettext' module is in use, grab the latest Makefile.in.in.
|
||||
# If only the 'gettext-h' module is in use, assume autopoint already
|
||||
# put the correct version of this file into place.
|
||||
case $gnulib_modules in
|
||||
*gettext-h*) ;;
|
||||
*gettext*)
|
||||
cp $GNULIB_SRCDIR/build-aux/po/Makefile.in.in po/Makefile.in.in \
|
||||
|| die "cannot create po/Makefile.in.in"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -d runtime-po; then
|
||||
# Similarly for runtime-po/Makevars, but not quite the same.
|
||||
@@ -942,7 +955,8 @@ if test $with_gettext = yes; then
|
||||
a\
|
||||
'"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+}
|
||||
}
|
||||
' po/Makevars.template >runtime-po/Makevars || exit 1
|
||||
' po/Makevars.template >runtime-po/Makevars \
|
||||
|| die 'cannot generate runtime-po/Makevars'
|
||||
|
||||
# Copy identical files from po to runtime-po.
|
||||
(cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po)
|
||||
|
||||
+29
-7
@@ -1,6 +1,6 @@
|
||||
# Bootstrap configuration.
|
||||
|
||||
# Copyright (C) 2006-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006-2012 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,14 +17,26 @@
|
||||
|
||||
# gnulib modules used by this package.
|
||||
gnulib_modules='
|
||||
announce-gen argmatch assert calloc-posix close config-h c-strcase
|
||||
configmake dirname error extensions fopen-safer gendocs getopt-gnu
|
||||
gettext git-version-gen hash inttypes isnan javacomp-script
|
||||
javaexec-script ldexpl maintainer-makefile malloc-gnu mbschr mbsrchr
|
||||
mbswidth obstack perror pipe-posix quote quotearg realloc-posix
|
||||
argmatch assert calloc-posix close closeout config-h c-strcase
|
||||
configmake
|
||||
dirname
|
||||
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
|
||||
obstack-printf
|
||||
perror progname
|
||||
quote quotearg
|
||||
readme-release
|
||||
realloc-posix
|
||||
spawn-pipe stdbool stpcpy strdup-posix strerror strtoul strverscmp
|
||||
unistd unistd-safer unlocked-io update-copyright unsetenv verify
|
||||
warnings xalloc xalloc-die xstrndup
|
||||
warnings
|
||||
xalloc xalloc-die xmemdup0 xstrndup
|
||||
|
||||
fprintf-posix printf-posix snprintf-posix sprintf-posix
|
||||
vsnprintf-posix vsprintf-posix
|
||||
@@ -60,11 +72,21 @@ excluded_files='
|
||||
m4/visibility.m4
|
||||
'
|
||||
|
||||
gnulib_tool_option_extras='--symlink --makefile-name=gnulib.mk'
|
||||
|
||||
bootstrap_post_import_hook()
|
||||
{
|
||||
# Ensure that ChangeLog exists, for automake.
|
||||
test -f ChangeLog || touch ChangeLog
|
||||
}
|
||||
|
||||
bootstrap_epilogue()
|
||||
{
|
||||
# Make sure we don't need src/bison, which usually doesn't exist at
|
||||
# the time of a bootstrap.
|
||||
touch src/parse-gram.[ch]
|
||||
|
||||
perl -pi -e "s/\@PACKAGE\@/$package/g" README-release
|
||||
}
|
||||
|
||||
# Keep our bootstrap script in sync with gnulib's. If we ever need to
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
/Makefile
|
||||
/Makefile.in
|
||||
/announce-gen
|
||||
@@ -9,8 +8,12 @@
|
||||
/config.rpath
|
||||
/config.sub
|
||||
/depcomp
|
||||
/do-release-commit-and-tag
|
||||
/gendocs.sh
|
||||
/git-version-gen
|
||||
/gitlog-to-changelog
|
||||
/gnu-web-doc-update
|
||||
/gnupload
|
||||
/install-sh
|
||||
/javacomp.sh.in
|
||||
/javaexec.sh.in
|
||||
@@ -23,4 +26,3 @@
|
||||
/vc-list-files
|
||||
/warn-on-use.h
|
||||
/ylwrap
|
||||
|
||||
|
||||
+20
-2
@@ -1,2 +1,20 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
EXTRA_DIST = prev-version.txt cross-options.pl update-b4-copyright
|
||||
## Copyright (C) 2006, 2009-2012 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/>.
|
||||
|
||||
EXTRA_DIST = \
|
||||
cross-options.pl \
|
||||
darwin11.4.0.valgrind \
|
||||
prev-version.txt \
|
||||
update-b4-copyright
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
# Copyright (C) 2012 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/>.
|
||||
|
||||
# Valgrind suppression file for Bison.
|
||||
|
||||
{
|
||||
Mac OS X initialization
|
||||
Memcheck:Leak
|
||||
fun:?alloc*
|
||||
...
|
||||
fun:*ImageLoader*
|
||||
}
|
||||
|
||||
{
|
||||
Mac OS X initialization
|
||||
Memcheck:Leak
|
||||
fun:?alloc*
|
||||
...
|
||||
fun:*dyld*
|
||||
}
|
||||
|
||||
{
|
||||
Mac OS X initialization
|
||||
Memcheck:Leak
|
||||
fun:?alloc*
|
||||
...
|
||||
fun:__CFInitialize
|
||||
}
|
||||
|
||||
{
|
||||
Mac OS X I/O buffer
|
||||
Memcheck:Leak
|
||||
fun:malloc
|
||||
fun:__smakebuf
|
||||
fun:__swsetup
|
||||
fun:__sfvwrite
|
||||
fun:fwrite
|
||||
}
|
||||
|
||||
{
|
||||
Mac OS X I/O buffer
|
||||
Memcheck:Leak
|
||||
fun:malloc
|
||||
fun:__smakebuf
|
||||
fun:__swsetup
|
||||
fun:__swbuf
|
||||
fun:putchar
|
||||
}
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# End:
|
||||
@@ -0,0 +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/;
|
||||
@@ -0,0 +1,4 @@
|
||||
/_Noreturn.h
|
||||
/arg-nonnull.h
|
||||
/c++defs.h
|
||||
/warn-on-use.h
|
||||
@@ -3,7 +3,7 @@
|
||||
# Update b4_copyright invocations or b4_copyright_years definitions to
|
||||
# include the current year.
|
||||
|
||||
# Copyright (C) 2009-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2009-2012 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-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2010-2012 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,5 @@
|
||||
# Customize maint.mk -*- makefile -*-
|
||||
|
||||
# Copyright (C) 2008-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2008-2012 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,6 +14,18 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Update version, then recompile so that tests/bison --version be
|
||||
# up-to-date, then compile our parser again with our up-to-date bison.
|
||||
.PHONY: regen
|
||||
regen: _version
|
||||
$(MAKE) $(AM_MAKEFLAGS)
|
||||
touch $(srcdir)/src/parse-gram.y
|
||||
$(MAKE) $(AM_MAKEFLAGS)
|
||||
|
||||
# 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,
|
||||
# override the _is-dist-target from GNUmakefile so that maintainer-*check*
|
||||
@@ -22,13 +33,6 @@
|
||||
_is-dist-target = $(filter-out %clean maintainer-check% maintainer-%-check, \
|
||||
$(filter maintainer-% dist% alpha beta major,$(MAKECMDGOALS)))
|
||||
|
||||
# Use alpha.gnu.org for alpha and beta releases.
|
||||
# Use ftp.gnu.org for major releases.
|
||||
gnu_ftp_host-alpha = alpha.gnu.org
|
||||
gnu_ftp_host-beta = alpha.gnu.org
|
||||
gnu_ftp_host-major = ftp.gnu.org
|
||||
gnu_rel_host = $(gnu_ftp_host-$(RELEASE_TYPE))
|
||||
|
||||
url_dir_list = \
|
||||
ftp://$(gnu_rel_host)/gnu/bison
|
||||
|
||||
@@ -36,7 +40,12 @@ url_dir_list = \
|
||||
# Exclude changelog-check here so that there's less churn in ChangeLog
|
||||
# files -- otherwise, you'd need to have the upcoming version number
|
||||
# at the top of the file for each `make distcheck' run.
|
||||
local-checks-to-skip = changelog-check
|
||||
local-checks-to-skip = \
|
||||
changelog-check \
|
||||
sc_immutable_NEWS \
|
||||
sc_prohibit_always_true_header_tests \
|
||||
sc_prohibit_atoi_atof \
|
||||
sc_prohibit_strcmp
|
||||
|
||||
# The local directory containing the checked-out copy of gnulib used in
|
||||
# this release. Used solely to get a date for the "announcement" target.
|
||||
@@ -51,3 +60,34 @@ announcement_Cc_ = \
|
||||
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+=?|^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_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$$|tests/c\+\+\.at$$) \
|
||||
)
|
||||
|
||||
-292
@@ -1,292 +0,0 @@
|
||||
/* config.hin. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c' support on those systems.
|
||||
*/
|
||||
#undef CRAY_STACKSEG_END
|
||||
|
||||
/* Define if using `alloca.c'. */
|
||||
#undef C_ALLOCA
|
||||
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language is requested. */
|
||||
#undef ENABLE_NLS
|
||||
|
||||
/* Define if you have `alloca', as a function or macro. */
|
||||
#undef HAVE_ALLOCA
|
||||
|
||||
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
||||
#undef HAVE_ALLOCA_H
|
||||
|
||||
/* Define if you have the <argz.h> header file. */
|
||||
#undef HAVE_ARGZ_H
|
||||
|
||||
/* Define if you have the <ctype.h> header file. */
|
||||
#undef HAVE_CTYPE_H
|
||||
|
||||
/* Define if backslash-a works in C strings. */
|
||||
#undef HAVE_C_BACKSLASH_A
|
||||
|
||||
/* Define if you have the `dcgettext' function. */
|
||||
#undef HAVE_DCGETTEXT
|
||||
|
||||
/* Define to 1 if you have the declaration of `memchr', and to 0 if you don't.
|
||||
*/
|
||||
#undef HAVE_DECL_MEMCHR
|
||||
|
||||
/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't.
|
||||
*/
|
||||
#undef HAVE_DECL_STPCPY
|
||||
|
||||
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_STRERROR_R
|
||||
|
||||
/* Define to 1 if you have the declaration of `strndup', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_STRNDUP
|
||||
|
||||
/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_STRNLEN
|
||||
|
||||
/* Define if the malloc check has been performed. */
|
||||
#undef HAVE_DONE_WORKING_MALLOC_CHECK
|
||||
|
||||
/* Define if the realloc check has been performed. */
|
||||
#undef HAVE_DONE_WORKING_REALLOC_CHECK
|
||||
|
||||
/* Define if you have the `doprnt' function. */
|
||||
#undef HAVE_DOPRNT
|
||||
|
||||
/* Define if you have the `feof_unlocked' function. */
|
||||
#undef HAVE_FEOF_UNLOCKED
|
||||
|
||||
/* Define if you have the `fgets_unlocked' function. */
|
||||
#undef HAVE_FGETS_UNLOCKED
|
||||
|
||||
/* Define if you have the `getcwd' function. */
|
||||
#undef HAVE_GETCWD
|
||||
|
||||
/* Define if you have the `getegid' function. */
|
||||
#undef HAVE_GETEGID
|
||||
|
||||
/* Define if you have the `geteuid' function. */
|
||||
#undef HAVE_GETEUID
|
||||
|
||||
/* Define if you have the `getgid' function. */
|
||||
#undef HAVE_GETGID
|
||||
|
||||
/* Define if you have the `getpagesize' function. */
|
||||
#undef HAVE_GETPAGESIZE
|
||||
|
||||
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||
#undef HAVE_GETTEXT
|
||||
|
||||
/* Define if you have the `getuid' function. */
|
||||
#undef HAVE_GETUID
|
||||
|
||||
/* Define if you have the iconv() function. */
|
||||
#undef HAVE_ICONV
|
||||
|
||||
/* Define if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define if you have the `isascii' function. */
|
||||
#undef HAVE_ISASCII
|
||||
|
||||
/* Define if you have the `iswprint' function. */
|
||||
#undef HAVE_ISWPRINT
|
||||
|
||||
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
|
||||
#undef HAVE_LANGINFO_CODESET
|
||||
|
||||
/* Define if your <locale.h> file defines LC_MESSAGES. */
|
||||
#undef HAVE_LC_MESSAGES
|
||||
|
||||
/* Define if you have the <limits.h> header file. */
|
||||
#undef HAVE_LIMITS_H
|
||||
|
||||
/* Define if you have the <locale.h> header file. */
|
||||
#undef HAVE_LOCALE_H
|
||||
|
||||
/* Define if you have the <malloc.h> header file. */
|
||||
#undef HAVE_MALLOC_H
|
||||
|
||||
/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
|
||||
#undef HAVE_MBRTOWC
|
||||
|
||||
/* Define if you have the `mbsinit' function. */
|
||||
#undef HAVE_MBSINIT
|
||||
|
||||
/* Define if you have the `memchr' function. */
|
||||
#undef HAVE_MEMCHR
|
||||
|
||||
/* Define if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define if you have the `mempcpy' function. */
|
||||
#undef HAVE_MEMPCPY
|
||||
|
||||
/* Define if you have the `mkstemp' function. */
|
||||
#undef HAVE_MKSTEMP
|
||||
|
||||
/* Define if you have a working `mmap' system call. */
|
||||
#undef HAVE_MMAP
|
||||
|
||||
/* Define if you have the `munmap' function. */
|
||||
#undef HAVE_MUNMAP
|
||||
|
||||
/* Define if you have the <nl_types.h> header file. */
|
||||
#undef HAVE_NL_TYPES_H
|
||||
|
||||
/* Define if you have the `putenv' function. */
|
||||
#undef HAVE_PUTENV
|
||||
|
||||
/* Define if you have the `setenv' function. */
|
||||
#undef HAVE_SETENV
|
||||
|
||||
/* Define if you have the `setlocale' function. */
|
||||
#undef HAVE_SETLOCALE
|
||||
|
||||
/* Define if you have the <stddef.h> header file. */
|
||||
#undef HAVE_STDDEF_H
|
||||
|
||||
/* Define if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define if you have the `stpcpy' function. */
|
||||
#undef HAVE_STPCPY
|
||||
|
||||
/* Define if you have the `strcasecmp' function. */
|
||||
#undef HAVE_STRCASECMP
|
||||
|
||||
/* Define if you have the `strchr' function. */
|
||||
#undef HAVE_STRCHR
|
||||
|
||||
/* Define if you have the `strdup' function. */
|
||||
#undef HAVE_STRDUP
|
||||
|
||||
/* Define if you have the `strerror' function. */
|
||||
#undef HAVE_STRERROR
|
||||
|
||||
/* Define if you have the `strerror_r' function. */
|
||||
#undef HAVE_STRERROR_R
|
||||
|
||||
/* Define if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define if you have the `strndup' function. */
|
||||
#undef HAVE_STRNDUP
|
||||
|
||||
/* Define if you have the `strnlen' function. */
|
||||
#undef HAVE_STRNLEN
|
||||
|
||||
/* Define if you have the `strspn' function. */
|
||||
#undef HAVE_STRSPN
|
||||
|
||||
/* Define if you have the `strtoul' function. */
|
||||
#undef HAVE_STRTOUL
|
||||
|
||||
/* Define if you have the <sys/param.h> header file. */
|
||||
#undef HAVE_SYS_PARAM_H
|
||||
|
||||
/* Define if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define if you have the `tsearch' function. */
|
||||
#undef HAVE_TSEARCH
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define if you have the `vprintf' function. */
|
||||
#undef HAVE_VPRINTF
|
||||
|
||||
/* Define if you have the <wchar.h> header file. */
|
||||
#undef HAVE_WCHAR_H
|
||||
|
||||
/* Define if you have the <wctype.h> header file. */
|
||||
#undef HAVE_WCTYPE_H
|
||||
|
||||
/* Define to 1 if `strerror_r' returns a string. */
|
||||
#undef HAVE_WORKING_STRERROR_R
|
||||
|
||||
/* Define if you have the `__argz_count' function. */
|
||||
#undef HAVE___ARGZ_COUNT
|
||||
|
||||
/* Define if you have the `__argz_next' function. */
|
||||
#undef HAVE___ARGZ_NEXT
|
||||
|
||||
/* Define if you have the `__argz_stringify' function. */
|
||||
#undef HAVE___ARGZ_STRINGIFY
|
||||
|
||||
/* Define as const if the declaration of iconv() needs const. */
|
||||
#undef ICONV_CONST
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define if compiler has function prototypes */
|
||||
#undef PROTOTYPES
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
#undef STACK_DIRECTION
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define if using the dmalloc debugging malloc package */
|
||||
#undef WITH_DMALLOC
|
||||
|
||||
/* Define to 1 for GNU C library extensions. */
|
||||
#undef _GNU_SOURCE
|
||||
|
||||
/* Define if on MINIX. */
|
||||
#undef _MINIX
|
||||
|
||||
/* Define if the system does not provide POSIX.1 features except with this
|
||||
defined. */
|
||||
#undef _POSIX_1_SOURCE
|
||||
|
||||
/* Define if you need to in order for `stat' and other things to work. */
|
||||
#undef _POSIX_SOURCE
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
|
||||
if it is not supported. */
|
||||
#undef inline
|
||||
|
||||
/* Define to rpl_malloc if the replacement function should be used. */
|
||||
#undef malloc
|
||||
|
||||
/* Define to a type if <wchar.h> does not define. */
|
||||
#undef mbstate_t
|
||||
|
||||
/* Define to `long' if <sys/types.h> does not define. */
|
||||
#undef off_t
|
||||
|
||||
/* Define to rpl_realloc if the replacement function should be used. */
|
||||
#undef realloc
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
+100
-39
@@ -1,6 +1,6 @@
|
||||
# Configure template for GNU Bison. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2001-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2012 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,15 +17,18 @@
|
||||
|
||||
# In order for some versions of Sun Studio to compile our C++ test cases
|
||||
# correctly, we need Autoconf 2.64 or better to handle the restrict
|
||||
# keyword in at least string.h from gnulib.
|
||||
AC_PREREQ(2.64)
|
||||
# keyword in at least string.h from gnulib. We need Autoconf 2.68 or
|
||||
# better to avoid a typo in the `configure --help' entry for the YACC
|
||||
# environment variable.
|
||||
AC_PREREQ([2.68])
|
||||
m4_pattern_forbid([^gl_[A-Z]])
|
||||
|
||||
AC_INIT([GNU Bison],
|
||||
m4_esyscmd([build-aux/git-version-gen .tarball-version]),
|
||||
[[email protected]])
|
||||
AC_DEFINE([PACKAGE_COPYRIGHT_YEAR], [2011],
|
||||
[The copyright year for this package])
|
||||
AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2011])
|
||||
AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2012])
|
||||
AC_DEFINE_UNQUOTED([PACKAGE_COPYRIGHT_YEAR], [$PACKAGE_COPYRIGHT_YEAR],
|
||||
[The copyright year for this package])
|
||||
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
@@ -42,52 +45,99 @@ AC_CONFIG_MACRO_DIR([m4])
|
||||
# releases, we want to be able run make dist without being required to
|
||||
# add a bogus NEWS entry. In that case, the version string
|
||||
# automatically contains a dash, which we also let disable gnits.
|
||||
AM_INIT_AUTOMAKE([1.11.1 dist-bzip2]
|
||||
AM_INIT_AUTOMAKE([1.11.1 dist-xz silent-rules]
|
||||
m4_bmatch(m4_defn([AC_PACKAGE_VERSION]), [[-_]],
|
||||
[gnu], [gnits]))
|
||||
AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])
|
||||
AM_SILENT_RULES([yes])
|
||||
AC_CONFIG_HEADERS([lib/config.h:lib/config.in.h])
|
||||
|
||||
# Checks for the compiler.
|
||||
AC_PROG_CC_STDC
|
||||
AC_PROG_CXX
|
||||
|
||||
# Gnulib (early checks).
|
||||
gl_EARLY
|
||||
|
||||
AC_ARG_ENABLE(gcc-warnings,
|
||||
# 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 "${enableval}" in
|
||||
[case $enable_gcc_warnings in
|
||||
yes|no) ;;
|
||||
*) AC_MSG_ERROR([bad value ${enableval} for gcc-warnings option]) ;;
|
||||
*) AC_MSG_ERROR([invalid value for --gcc-warnings: $enable_gcc_warnings]);;
|
||||
esac],
|
||||
[enableval=no])
|
||||
if test "${enableval}" = yes; then
|
||||
[enable_gcc_warnings=no])
|
||||
if test "$enable_gcc_warnings" = yes; then
|
||||
warn_common='-Wall -Wextra -Wno-sign-compare -Wcast-align
|
||||
-Wformat -Wpointer-arith -Wwrite-strings'
|
||||
warn_c='-Wbad-function-cast -Wshadow -Wstrict-prototypes'
|
||||
warn_cxx='-Wnoexcept'
|
||||
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])
|
||||
AC_SUBST([WERROR_CFLAGS])
|
||||
gl_WARN_ADD([-Wall])
|
||||
gl_WARN_ADD([-Wextra -Wno-sign-compare])
|
||||
gl_WARN_ADD([-Wcast-align])
|
||||
gl_WARN_ADD([-Wcast-qual])
|
||||
gl_WARN_ADD([-Wformat])
|
||||
gl_WARN_ADD([-Wpointer-arith])
|
||||
gl_WARN_ADD([-Wwrite-strings])
|
||||
AC_SUBST([WARN_CXXFLAGS], [$WARN_CFLAGS])
|
||||
# The following warnings are not suitable for C++.
|
||||
gl_WARN_ADD([-Wbad-function-cast])
|
||||
gl_WARN_ADD([-Wmissing-declarations])
|
||||
gl_WARN_ADD([-Wmissing-prototypes])
|
||||
gl_WARN_ADD([-Wshadow])
|
||||
gl_WARN_ADD([-Wstrict-prototypes])
|
||||
AC_SUBST([WARN_CFLAGS])
|
||||
|
||||
# Warnings for the test suite, 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])
|
||||
WARN_CXXFLAGS_TEST="$WARN_CXXFLAGS $WARN_CFLAGS_TEST"
|
||||
WARN_CFLAGS_TEST="$WARN_CFLAGS $WARN_CFLAGS_TEST"
|
||||
AC_SUBST([WARN_CXXFLAGS_TEST])
|
||||
AC_SUBST([WARN_CFLAGS_TEST])
|
||||
AC_DEFINE([lint], 1, [Define to 1 if the compiler is checking for lint.])
|
||||
gl_WARN_ADD([-pedantic], [WARN_CFLAGS_TEST])
|
||||
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],
|
||||
[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])
|
||||
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],
|
||||
@@ -105,13 +155,19 @@ 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
|
||||
AC_PROG_RANLIB
|
||||
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])
|
||||
@@ -129,7 +185,6 @@ gl_INIT
|
||||
# Checks for library functions.
|
||||
AC_CHECK_FUNCS_ONCE([setlocale])
|
||||
AM_WITH_DMALLOC
|
||||
BISON_PREREQ_SUBPIPE
|
||||
BISON_PREREQ_TIMEVAR
|
||||
|
||||
# Gettext.
|
||||
@@ -153,13 +208,19 @@ AC_CONFIG_TESTDIR(tests)
|
||||
AC_CONFIG_FILES([tests/Makefile tests/atlocal])
|
||||
AC_CONFIG_FILES([tests/bison], [chmod +x tests/bison])
|
||||
AC_CHECK_PROGS([VALGRIND], [valgrind])
|
||||
AC_PROG_CXX
|
||||
BISON_TEST_FOR_WORKING_CXX_COMPILER
|
||||
case $VALGRIND:$host_os in
|
||||
'':*) ;;
|
||||
*:darwin*)
|
||||
# See README-hacking.
|
||||
# VALGRIND+=' --suppressions=$(abs_top_srcdir)/build-aux/darwin11.4.0.valgrind'
|
||||
VALGRIND=;;
|
||||
*:*)
|
||||
AC_SUBST([VALGRIND_PREBISON], ["$VALGRIND -q"]);;
|
||||
esac
|
||||
|
||||
AM_MISSING_PROG([AUTOM4TE], [autom4te])
|
||||
# Needed by tests/atlocal.in.
|
||||
AC_SUBST([GCC])
|
||||
AC_SUBST([O0CFLAGS], [`echo $CFLAGS | sed 's/-O[[0-9]] *//'`])
|
||||
AC_SUBST([O0CXXFLAGS], [`echo $CXXFLAGS | sed 's/-O[[0-9]] *//'`])
|
||||
|
||||
gt_JAVACOMP([1.3])
|
||||
gt_JAVAEXEC
|
||||
|
||||
+3
-2
@@ -1,4 +1,4 @@
|
||||
## Copyright (C) 2002, 2005-2011 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2002, 2005-2012 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,8 +14,9 @@
|
||||
# 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 \
|
||||
c++-skel.m4 c++.m4 location.cc lalr1.cc glr.cc stack.hh \
|
||||
java-skel.m4 java.m4 lalr1.java
|
||||
|
||||
m4sugardir = $(pkgdatadir)/m4sugar
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ into various formats.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002, 2008-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2008-2012 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bison.
|
||||
|
||||
|
||||
+72
-40
@@ -2,7 +2,7 @@
|
||||
|
||||
# Language-independent M4 Macros for Bison.
|
||||
|
||||
# Copyright (C) 2002, 2004-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002, 2004-2012 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. ##
|
||||
## ---------------- ##
|
||||
@@ -85,7 +109,7 @@ m4_if(m4_sysval, [0], [], [m4_fatal([$0: cannot write to stdout])])])
|
||||
#
|
||||
# For example:
|
||||
#
|
||||
# b4_error([[warn]], [[invalid value for `%s': %s]], [[foo]], [[3]])
|
||||
# b4_error([[warn]], [[invalid value for '%s': %s]], [[foo]], [[3]])
|
||||
m4_define([b4_error],
|
||||
[b4_cat([[@]$1[(]$2[]]dnl
|
||||
[m4_if([$#], [2], [],
|
||||
@@ -114,7 +138,7 @@ m4_define([b4_error_at],
|
||||
#
|
||||
# For example:
|
||||
#
|
||||
# b4_warn([[invalid value for `%s': %s]], [[foo]], [[3]])
|
||||
# b4_warn([[invalid value for '%s': %s]], [[foo]], [[3]])
|
||||
#
|
||||
# As a simple test suite, this:
|
||||
#
|
||||
@@ -183,21 +207,6 @@ m4_define([b4_fatal_at],
|
||||
m4_exit(1)])
|
||||
|
||||
|
||||
## ---------------- ##
|
||||
## Default values. ##
|
||||
## ---------------- ##
|
||||
|
||||
# m4_define_default([b4_lex_param], []) dnl breaks other skeletons
|
||||
m4_define_default([b4_pre_prologue], [])
|
||||
m4_define_default([b4_post_prologue], [])
|
||||
m4_define_default([b4_epilogue], [])
|
||||
m4_define_default([b4_parse_param], [])
|
||||
|
||||
# The initial column and line.
|
||||
m4_define_default([b4_location_initial_column], [1])
|
||||
m4_define_default([b4_location_initial_line], [1])
|
||||
|
||||
|
||||
## ------------ ##
|
||||
## Data Types. ##
|
||||
## ------------ ##
|
||||
@@ -233,9 +242,9 @@ m4_define([b4_define_flag_if],
|
||||
|
||||
# _b4_define_flag_if($1, $2, FLAG)
|
||||
# --------------------------------
|
||||
# This macro works around the impossibility to define macros
|
||||
# inside macros, because issuing `[$1]' is not possible in M4 :(.
|
||||
# This sucks hard, GNU M4 should really provide M5 like $$1.
|
||||
# Work around the impossibility to define macros inside macros,
|
||||
# because issuing `[$1]' is not possible in M4. GNU M4 should provide
|
||||
# $$1 a la M5/TeX.
|
||||
m4_define([_b4_define_flag_if],
|
||||
[m4_if([$1$2], $[1]$[2], [],
|
||||
[m4_fatal([$0: Invalid arguments: $@])])dnl
|
||||
@@ -246,17 +255,17 @@ m4_define([b4_$3_if],
|
||||
# b4_FLAG_if(IF-TRUE, IF-FALSE)
|
||||
# -----------------------------
|
||||
# Expand IF-TRUE, if FLAG is true, IF-FALSE otherwise.
|
||||
b4_define_flag_if([defines]) # Whether headers are requested.
|
||||
b4_define_flag_if([error_verbose]) # Whether error are verbose.
|
||||
b4_define_flag_if([glr]) # Whether a GLR parser is requested.
|
||||
b4_define_flag_if([locations]) # Whether locations are tracked.
|
||||
b4_define_flag_if([nondeterministic]) # Whether conflicts should be handled.
|
||||
b4_define_flag_if([yacc]) # Whether POSIX Yacc is emulated.
|
||||
b4_define_flag_if([defines]) # Whether headers are requested.
|
||||
b4_define_flag_if([error_verbose]) # Whether error are verbose.
|
||||
b4_define_flag_if([glr]) # Whether a GLR parser is requested.
|
||||
b4_define_flag_if([locations]) # Whether locations are tracked.
|
||||
b4_define_flag_if([nondeterministic]) # Whether conflicts should be handled.
|
||||
b4_define_flag_if([token_table]) # Whether yytoken_table is demanded.
|
||||
b4_define_flag_if([yacc]) # Whether POSIX Yacc is emulated.
|
||||
|
||||
# yytoken_table is needed to support verbose errors.
|
||||
b4_error_verbose_if([m4_define([b4_token_table_flag], [1])])
|
||||
|
||||
## ------------------------- ##
|
||||
## Assigning token numbers. ##
|
||||
## ------------------------- ##
|
||||
|
||||
|
||||
## ----------- ##
|
||||
@@ -274,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])])
|
||||
@@ -354,7 +363,7 @@ m4_pushdef([b4_start], m4_car(m4_shift(b4_occurrence)))dnl
|
||||
m4_pushdef([b4_end], m4_shift(m4_shift(b4_occurrence)))dnl
|
||||
m4_ifndef($3[(]m4_quote(b4_user_name)[)],
|
||||
[b4_complain_at([b4_start], [b4_end],
|
||||
[[%s `%s' is not used]],
|
||||
[[%s '%s' is not used]],
|
||||
[$1], [b4_user_name])])[]dnl
|
||||
m4_popdef([b4_occurrence])dnl
|
||||
m4_popdef([b4_user_name])dnl
|
||||
@@ -412,7 +421,7 @@ m4_define([b4_percent_define_get_loc],
|
||||
[m4_pushdef([b4_loc], m4_indir([b4_percent_define_loc(]$1[)]))dnl
|
||||
b4_loc[]dnl
|
||||
m4_popdef([b4_loc])],
|
||||
[b4_fatal([[undefined %%define variable `%s' passed to b4_percent_define_get_loc]], [$1])])])
|
||||
[b4_fatal([[b4_percent_define_get_loc: undefined %%define variable '%s']], [$1])])])
|
||||
|
||||
# b4_percent_define_get_syncline(VARIABLE)
|
||||
# ----------------------------------------
|
||||
@@ -429,7 +438,7 @@ m4_popdef([b4_loc])],
|
||||
m4_define([b4_percent_define_get_syncline],
|
||||
[m4_ifdef([b4_percent_define_syncline(]$1[)],
|
||||
[m4_indir([b4_percent_define_syncline(]$1[)])],
|
||||
[b4_fatal([[undefined %%define variable `%s' passed to b4_percent_define_get_syncline]], [$1])])])
|
||||
[b4_fatal([[b4_percent_define_get_syncline: undefined %%define variable '%s']], [$1])])])
|
||||
|
||||
# b4_percent_define_ifdef(VARIABLE, IF-TRUE, [IF-FALSE])
|
||||
# ------------------------------------------------------
|
||||
@@ -464,10 +473,10 @@ m4_define([b4_percent_define_flag_if],
|
||||
[m4_case(b4_percent_define_get([$1]),
|
||||
[], [$2], [true], [$2], [false], [$3],
|
||||
[m4_expand_once([b4_complain_at(b4_percent_define_get_loc([$1]),
|
||||
[[invalid value for %%define Boolean variable `%s']],
|
||||
[[invalid value for %%define Boolean variable '%s']],
|
||||
[$1])],
|
||||
[[b4_percent_define_flag_if($1)]])])],
|
||||
[b4_fatal([[undefined %%define variable `%s' passed to b4_percent_define_flag_if]], [$1])])])
|
||||
[b4_fatal([[b4_percent_define_flag_if: undefined %%define variable '%s']], [$1])])])
|
||||
|
||||
# b4_percent_define_default(VARIABLE, DEFAULT)
|
||||
# --------------------------------------------
|
||||
@@ -516,15 +525,15 @@ m4_define([_b4_percent_define_check_values],
|
||||
[m4_define([b4_good_value], [1])])])])dnl
|
||||
m4_if(b4_good_value, [0],
|
||||
[b4_complain_at(b4_percent_define_get_loc([$1]),
|
||||
[[invalid value for %%define variable `%s': `%s']],
|
||||
[[invalid value for %%define variable '%s': '%s']],
|
||||
[$1],
|
||||
m4_dquote(m4_indir([b4_percent_define(]$1[)])))
|
||||
m4_foreach([b4_value], m4_dquote(m4_shift($@)),
|
||||
[b4_complain_at(b4_percent_define_get_loc([$1]),
|
||||
[[accepted value: `%s']],
|
||||
[[accepted value: '%s']],
|
||||
m4_dquote(b4_value))])])dnl
|
||||
m4_popdef([b4_good_value])],
|
||||
[b4_fatal([[undefined %%define variable `%s' passed to b4_percent_define_check_values]], [$1])])])
|
||||
[b4_fatal([[b4_percent_define_check_values: undefined %%define variable '%s']], [$1])])])
|
||||
|
||||
# b4_percent_code_get([QUALIFIER])
|
||||
# --------------------------------
|
||||
@@ -576,3 +585,26 @@ m4_wrap_lifo([
|
||||
b4_check_user_names_wrap([[define]], [[variable]])
|
||||
b4_check_user_names_wrap([[code]], [[qualifier]])
|
||||
])
|
||||
|
||||
|
||||
## ---------------- ##
|
||||
## Default values. ##
|
||||
## ---------------- ##
|
||||
|
||||
# m4_define_default([b4_lex_param], []) dnl breaks other skeletons
|
||||
m4_define_default([b4_pre_prologue], [])
|
||||
m4_define_default([b4_post_prologue], [])
|
||||
m4_define_default([b4_epilogue], [])
|
||||
m4_define_default([b4_parse_param], [])
|
||||
|
||||
# The initial column and line.
|
||||
m4_define_default([b4_location_initial_column], [1])
|
||||
m4_define_default([b4_location_initial_line], [1])
|
||||
|
||||
# Sanity checks.
|
||||
b4_percent_define_ifdef([api.prefix],
|
||||
[m4_ifdef([b4_prefix],
|
||||
[b4_complain_at(b4_percent_define_get_loc([api.prefix]),
|
||||
[['%s' and '%s' cannot be used together]],
|
||||
[%name-prefix],
|
||||
[%define api.prefix])])])
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
# C++ skeleton dispatching for Bison.
|
||||
|
||||
# Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006-2007, 2009-2012 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+33
-2
@@ -2,7 +2,7 @@
|
||||
|
||||
# C++ skeleton for Bison
|
||||
|
||||
# Copyright (C) 2002-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002-2012 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]))
|
||||
@@ -97,6 +97,8 @@ m4_map_sep([ b4_token_enum], [,
|
||||
])
|
||||
|
||||
|
||||
|
||||
|
||||
## ----------------- ##
|
||||
## Semantic Values. ##
|
||||
## ----------------- ##
|
||||
@@ -172,3 +174,32 @@ m4_define([b4_cc_var_decls],
|
||||
], [$@])])
|
||||
m4_define([b4_cc_var_decl],
|
||||
[ $1;])
|
||||
|
||||
|
||||
## ---------##
|
||||
## Values. ##
|
||||
## ---------##
|
||||
|
||||
# b4_yylloc_default_define
|
||||
# ------------------------
|
||||
# Define YYLLOC_DEFAULT.
|
||||
m4_define([b4_yylloc_default_define],
|
||||
[[/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
|
||||
If N is 0, then set CURRENT to the empty location which ends
|
||||
the previous symbol: RHS[0] (always defined). */
|
||||
|
||||
# ifndef YYLLOC_DEFAULT
|
||||
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
||||
do \
|
||||
if (N) \
|
||||
{ \
|
||||
(Current).begin = YYRHSLOC (Rhs, 1).begin; \
|
||||
(Current).end = YYRHSLOC (Rhs, N).end; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
(Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \
|
||||
} \
|
||||
while (/*CONSTCOND*/ false)
|
||||
# endif
|
||||
]])
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
-*- Autoconf -*-
|
||||
|
||||
# Common code for C-like languages (C, C++, Java, etc.)
|
||||
|
||||
# Copyright (C) 2012 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-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006-2007, 2009-2012 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-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002, 2004-2012 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,36 @@
|
||||
# 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)
|
||||
# ----------------
|
||||
# Convert STRING into a valid C macro name.
|
||||
m4_define([b4_tocpp],
|
||||
[m4_toupper(m4_bpatsubst(m4_quote($1), [[^a-zA-Z0-9]+], [_]))])
|
||||
|
||||
|
||||
# b4_cpp_guard(FILE)
|
||||
# ------------------
|
||||
# A valid C macro name to use as a CPP header guard for FILE.
|
||||
m4_define([b4_cpp_guard],
|
||||
[[YY_]b4_tocpp(m4_defn([b4_prefix])/[$1])[_INCLUDED]])
|
||||
|
||||
|
||||
# b4_cpp_guard_open(FILE)
|
||||
# b4_cpp_guard_close(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])])])
|
||||
|
||||
m4_define([b4_cpp_guard_close],
|
||||
[m4_ifval(m4_quote($1),
|
||||
[#endif b4_comment([!b4_cpp_guard([$1])])])])
|
||||
|
||||
|
||||
## ---------------- ##
|
||||
## Identification. ##
|
||||
## ---------------- ##
|
||||
@@ -50,9 +80,6 @@ m4_define([b4_identification],
|
||||
|
||||
/* Pull parsers. */
|
||||
#define YYPULL ]b4_pull_flag])[
|
||||
|
||||
/* Using locations. */
|
||||
#define YYLSP_NEEDED ]b4_locations_flag[
|
||||
]])
|
||||
|
||||
|
||||
@@ -60,11 +87,24 @@ m4_define([b4_identification],
|
||||
## Default values. ##
|
||||
## ---------------- ##
|
||||
|
||||
# If the %union is not named, its name is YYSTYPE.
|
||||
m4_define_default([b4_union_name], [YYSTYPE])
|
||||
# b4_api_prefix, b4_api_PREFIX
|
||||
# ----------------------------
|
||||
# Corresponds to %define api.prefix
|
||||
b4_percent_define_default([[api.prefix]], [[yy]])
|
||||
m4_define([b4_api_prefix],
|
||||
[b4_percent_define_get([[api.prefix]])])
|
||||
m4_define([b4_api_PREFIX],
|
||||
[m4_toupper(b4_api_prefix)])
|
||||
|
||||
|
||||
# b4_prefix
|
||||
# ---------
|
||||
# If the %name-prefix is not given, it is api.prefix.
|
||||
m4_define_default([b4_prefix], [b4_api_prefix])
|
||||
|
||||
# If the %union is not named, its name is YYSTYPE.
|
||||
m4_define_default([b4_union_name], [b4_api_PREFIX[]STYPE])
|
||||
|
||||
# If the %name-prefix is not given, it is yy.
|
||||
m4_define_default([b4_prefix], [yy])
|
||||
|
||||
## ------------------------ ##
|
||||
## Pure/impure interfaces. ##
|
||||
@@ -123,7 +163,7 @@ m4_define([b4_int_type],
|
||||
|
||||
m4_eval([0 <= $1]), [1], [unsigned int],
|
||||
|
||||
[int])])
|
||||
[int])])
|
||||
|
||||
|
||||
# b4_int_type_for(NAME)
|
||||
@@ -144,18 +184,33 @@ 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. ##
|
||||
## ---------##
|
||||
|
||||
# b4_null
|
||||
---------
|
||||
# Return a null pointer constant. NULL infringes on the user name
|
||||
# space in C, so use 0 rather than NULL.
|
||||
m4_define([b4_null], [0])
|
||||
|
||||
# b4_null_define
|
||||
# --------------
|
||||
# Portability issues: define a YY_NULL appropriate for the current
|
||||
# language (C, C++98, or C++11).
|
||||
m4_define([b4_null_define],
|
||||
[# ifndef YY_NULL
|
||||
# if defined __cplusplus && 201103L <= __cplusplus
|
||||
# define YY_NULL nullptr
|
||||
# else
|
||||
# define YY_NULL 0
|
||||
# endif
|
||||
# endif[]dnl
|
||||
])
|
||||
|
||||
|
||||
# b4_null
|
||||
# -------
|
||||
# Return a null pointer constant.
|
||||
m4_define([b4_null], [YY_NULL])
|
||||
|
||||
|
||||
|
||||
@@ -193,18 +248,18 @@ m4_define([b4_token_enum],
|
||||
# Output the definition of the tokens (if there are) as enums.
|
||||
m4_define([b4_token_enums],
|
||||
[m4_if([$#$1], [1], [],
|
||||
[/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
[[/* Tokens. */
|
||||
#ifndef ]b4_api_PREFIX[TOKENTYPE
|
||||
# define ]b4_api_PREFIX[TOKENTYPE
|
||||
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
||||
know about them. */
|
||||
enum yytokentype {
|
||||
m4_map_sep([ b4_token_enum], [,
|
||||
enum ]b4_api_prefix[tokentype {
|
||||
]m4_map_sep([ b4_token_enum], [,
|
||||
],
|
||||
[$@])
|
||||
[$@])[
|
||||
};
|
||||
#endif
|
||||
])])
|
||||
]])])
|
||||
|
||||
|
||||
# b4_token_enums_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
|
||||
@@ -265,7 +320,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])
|
||||
@@ -286,9 +341,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;])
|
||||
@@ -300,9 +355,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($@)
|
||||
@@ -312,15 +376,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. ##
|
||||
@@ -369,17 +424,18 @@ $2
|
||||
# SYMBOL-TAG, SYMBOL-NUM,
|
||||
# SYMBOL-ACTION, SYMBOL-TYPENAME)
|
||||
# -------------------------------------------------
|
||||
# Issue the code for a symbol action (e.g., %printer).
|
||||
#
|
||||
# Define b4_dollar_dollar([TYPE-NAME]), and b4_at_dollar, which are
|
||||
# invoked where $<TYPE-NAME>$ and @$ were specified by the user.
|
||||
m4_define([b4_symbol_actions],
|
||||
[m4_pushdef([b4_dollar_dollar],
|
||||
[m4_ifval([$6], [(yyvaluep->$6)], [(*yyvaluep)])])dnl
|
||||
m4_pushdef([b4_at_dollar], [(*yylocationp)])dnl
|
||||
[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
|
||||
])
|
||||
|
||||
|
||||
@@ -415,7 +471,7 @@ b4_parse_param_use[]dnl
|
||||
{
|
||||
]m4_map([b4_symbol_actions], m4_defn([b4_symbol_destructors]))[
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}]dnl
|
||||
])
|
||||
@@ -435,12 +491,14 @@ 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]))[
|
||||
{
|
||||
FILE *yyo = yyoutput;
|
||||
YYUSE (yyo);
|
||||
if (!yyvaluep)
|
||||
return;
|
||||
]b4_locations_if([ YYUSE (yylocationp);
|
||||
@@ -456,7 +514,7 @@ b4_parse_param_use[]dnl
|
||||
{
|
||||
]m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl
|
||||
[ default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -467,9 +525,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]))[
|
||||
{
|
||||
@@ -486,3 +544,171 @@ b4_locations_if([, yylocationp])[]b4_user_args[);
|
||||
YYFPRINTF (yyoutput, ")");
|
||||
}]dnl
|
||||
])
|
||||
|
||||
## -------------- ##
|
||||
## Declarations. ##
|
||||
## -------------- ##
|
||||
|
||||
# b4_declare_yylstype
|
||||
# -------------------
|
||||
# Declarations that might either go into the header (if --defines) or
|
||||
# in the parser body. Declare YYSTYPE/YYLTYPE, and yylval/yylloc.
|
||||
m4_define([b4_declare_yylstype],
|
||||
[[#if ! defined ]b4_api_PREFIX[STYPE && ! defined ]b4_api_PREFIX[STYPE_IS_DECLARED
|
||||
]m4_ifdef([b4_stype],
|
||||
[[typedef union ]b4_union_name[
|
||||
{
|
||||
]b4_user_stype[
|
||||
} ]b4_api_PREFIX[STYPE;
|
||||
# define ]b4_api_PREFIX[STYPE_IS_TRIVIAL 1]],
|
||||
[m4_if(b4_tag_seen_flag, 0,
|
||||
[[typedef int ]b4_api_PREFIX[STYPE;
|
||||
# define ]b4_api_PREFIX[STYPE_IS_TRIVIAL 1]])])[
|
||||
# define ]b4_api_prefix[stype ]b4_api_PREFIX[STYPE /* obsolescent; will be withdrawn */
|
||||
# define ]b4_api_PREFIX[STYPE_IS_DECLARED 1
|
||||
#endif]b4_locations_if([[
|
||||
|
||||
#if ! defined ]b4_api_PREFIX[LTYPE && ! defined ]b4_api_PREFIX[LTYPE_IS_DECLARED
|
||||
typedef struct ]b4_api_PREFIX[LTYPE
|
||||
{
|
||||
int first_line;
|
||||
int first_column;
|
||||
int last_line;
|
||||
int last_column;
|
||||
} ]b4_api_PREFIX[LTYPE;
|
||||
# define ]b4_api_prefix[ltype ]b4_api_PREFIX[LTYPE /* obsolescent; will be withdrawn */
|
||||
# define ]b4_api_PREFIX[LTYPE_IS_DECLARED 1
|
||||
# define ]b4_api_PREFIX[LTYPE_IS_TRIVIAL 1
|
||||
#endif]])
|
||||
|
||||
b4_pure_if([], [[extern ]b4_api_PREFIX[STYPE ]b4_prefix[lval;
|
||||
]b4_locations_if([[extern ]b4_api_PREFIX[LTYPE ]b4_prefix[lloc;]])])[]dnl
|
||||
])
|
||||
|
||||
# b4_YYDEBUG_define
|
||||
# ------------------
|
||||
m4_define([b4_YYDEBUG_define],
|
||||
[[/* Enabling traces. */
|
||||
]m4_if(b4_api_prefix, [yy],
|
||||
[[#ifndef YYDEBUG
|
||||
# define YYDEBUG ]b4_debug_flag[
|
||||
#endif]],
|
||||
[[#ifndef ]b4_api_PREFIX[DEBUG
|
||||
# if defined YYDEBUG
|
||||
# if YYDEBUG
|
||||
# define ]b4_api_PREFIX[DEBUG 1
|
||||
# else
|
||||
# define ]b4_api_PREFIX[DEBUG 0
|
||||
# endif
|
||||
# else /* ! defined YYDEBUG */
|
||||
# define ]b4_api_PREFIX[DEBUG ]b4_debug_flag[
|
||||
# endif /* ! defined YYDEBUG */
|
||||
#endif /* ! defined ]b4_api_PREFIX[DEBUG */]])[]dnl
|
||||
])
|
||||
|
||||
# b4_declare_yydebug
|
||||
# ------------------
|
||||
m4_define([b4_declare_yydebug],
|
||||
[b4_YYDEBUG_define[
|
||||
#if ]b4_api_PREFIX[DEBUG
|
||||
extern int ]b4_prefix[debug;
|
||||
#endif][]dnl
|
||||
])
|
||||
|
||||
# b4_yylloc_default_define
|
||||
# ------------------------
|
||||
# Define YYLLOC_DEFAULT.
|
||||
m4_define([b4_yylloc_default_define],
|
||||
[[/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
|
||||
If N is 0, then set CURRENT to the empty location which ends
|
||||
the previous symbol: RHS[0] (always defined). */
|
||||
|
||||
#ifndef YYLLOC_DEFAULT
|
||||
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
||||
do \
|
||||
if (YYID (N)) \
|
||||
{ \
|
||||
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
|
||||
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
|
||||
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
|
||||
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
(Current).first_line = (Current).last_line = \
|
||||
YYRHSLOC (Rhs, 0).last_line; \
|
||||
(Current).first_column = (Current).last_column = \
|
||||
YYRHSLOC (Rhs, 0).last_column; \
|
||||
} \
|
||||
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
|
||||
]])
|
||||
|
||||
+838
-927
File diff suppressed because it is too large
Load Diff
+73
-101
@@ -2,7 +2,7 @@
|
||||
|
||||
# C++ GLR skeleton for Bison
|
||||
|
||||
# Copyright (C) 2002-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002-2012 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],
|
||||
@@ -78,30 +78,39 @@ m4_define([b4_yy_symbol_print_generate],
|
||||
[static void],
|
||||
[[FILE *], []],
|
||||
[[int yytype], [yytype]],
|
||||
[[const b4_namespace_ref::b4_parser_class_name::semantic_type *yyvaluep],
|
||||
[yyvaluep]],
|
||||
[[const b4_namespace_ref::b4_parser_class_name::location_type *yylocationp],
|
||||
[yylocationp]],
|
||||
[[const ]b4_namespace_ref::b4_parser_class_name[::semantic_type *yyvaluep],
|
||||
[yyvaluep]],
|
||||
[[const ]b4_namespace_ref::b4_parser_class_name[::location_type *yylocationp],
|
||||
[yylocationp]],
|
||||
b4_parse_param)[
|
||||
{
|
||||
]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])]))])])[
|
||||
|
||||
# Declare yyerror.
|
||||
m4_append([b4_post_prologue],
|
||||
[b4_syncline([@oline@], [@ofile@])
|
||||
|
||||
b4_c_ansi_function_decl([yyerror],
|
||||
# Hijack the post prologue to insert early definition of YYLLOC_DEFAULT
|
||||
# and declaration of yyerror.
|
||||
]m4_append([b4_post_prologue],
|
||||
[b4_syncline([@oline@], [@ofile@])[
|
||||
]b4_yylloc_default_define[
|
||||
#define YYRHSLOC(Rhs, K) ((Rhs)[K].yystate.yyloc)
|
||||
]b4_c_ansi_function_decl([yyerror],
|
||||
[static void],
|
||||
[[b4_namespace_ref::b4_parser_class_name::location_type *yylocationp], [yylocationp]],
|
||||
[[const ]b4_namespace_ref::b4_parser_class_name[::location_type *yylocationp],
|
||||
[yylocationp]],
|
||||
b4_parse_param,
|
||||
[[const char* msg], [msg]])])
|
||||
|
||||
|
||||
# Define yyerror.
|
||||
# Hijack the epilogue to define implementations (yyerror, parser member
|
||||
# functions etc.).
|
||||
m4_append([b4_epilogue],
|
||||
[b4_syncline([@oline@], [@ofile@])[
|
||||
/*------------------.
|
||||
@@ -110,7 +119,8 @@ m4_append([b4_epilogue],
|
||||
|
||||
]b4_c_ansi_function_def([yyerror],
|
||||
[static void],
|
||||
[[b4_namespace_ref::b4_parser_class_name::location_type *yylocationp], [yylocationp]],
|
||||
[[const ]b4_namespace_ref::b4_parser_class_name[::location_type *yylocationp],
|
||||
[yylocationp]],
|
||||
b4_parse_param,
|
||||
[[const char* msg], [msg]])[
|
||||
{
|
||||
@@ -125,8 +135,8 @@ m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
|
||||
[ /// Build a parser object.
|
||||
]b4_parser_class_name::b4_parser_class_name[ (]b4_parse_param_decl[)]m4_ifset([b4_parse_param], [
|
||||
:])[
|
||||
#if YYDEBUG
|
||||
]m4_ifset([b4_parse_param], [ ], [ :])[yydebug_ (false),
|
||||
#if ]b4_api_PREFIX[DEBUG
|
||||
]m4_ifset([b4_parse_param], [ ], [ :])[
|
||||
yycdebug_ (&std::cerr)]m4_ifset([b4_parse_param], [,])[
|
||||
#endif]b4_parse_param_cons[
|
||||
{
|
||||
@@ -142,34 +152,38 @@ m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
|
||||
return ::yyparse (*this]b4_user_args[);
|
||||
}
|
||||
|
||||
#if YYDEBUG
|
||||
#if ]b4_api_PREFIX[DEBUG
|
||||
/*--------------------.
|
||||
| Print this symbol. |
|
||||
`--------------------*/
|
||||
|
||||
inline void
|
||||
]b4_parser_class_name[::yy_symbol_value_print_ (int yytype,
|
||||
const semantic_type* yyvaluep, const location_type* yylocationp)
|
||||
const semantic_type* yyvaluep,
|
||||
const location_type* yylocationp)
|
||||
{
|
||||
/* Pacify ``unused variable'' warnings. */
|
||||
YYUSE (yyvaluep);
|
||||
YYUSE (yylocationp);
|
||||
YYUSE (yyvaluep);
|
||||
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;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
]b4_parser_class_name[::yy_symbol_print_ (int yytype,
|
||||
const semantic_type* yyvaluep, const location_type* yylocationp)
|
||||
const semantic_type* yyvaluep,
|
||||
const location_type* yylocationp)
|
||||
{
|
||||
*yycdebug_ << (yytype < YYNTOKENS ? "token" : "nterm")
|
||||
<< ' ' << yytname[yytype] << " ("
|
||||
<< *yylocationp << ": ";
|
||||
<< ' ' << yytname[yytype] << " ("
|
||||
<< *yylocationp << ": ";
|
||||
yy_symbol_value_print_ (yytype, yyvaluep, yylocationp);
|
||||
*yycdebug_ << ')';
|
||||
}
|
||||
@@ -190,76 +204,48 @@ 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.
|
||||
m4_ifset([b4_parse_param],
|
||||
[m4_pushdef([b4_parse_param],
|
||||
m4_dquote([[[b4_namespace_ref::b4_parser_class_name& yyparser], [[yyparser]]],]
|
||||
m4_defn([b4_parse_param])))],
|
||||
[[b4_namespace_ref::b4_parser_class_name[& yyparser], [[yyparser]]],]
|
||||
m4_defn([b4_parse_param]))],
|
||||
[m4_pushdef([b4_parse_param],
|
||||
[[[[b4_namespace_ref::b4_parser_class_name& yyparser], [[yyparser]]]]])
|
||||
[[b4_namespace_ref::b4_parser_class_name[& yyparser], [[yyparser]]]])
|
||||
])
|
||||
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-2011])[
|
||||
[2002-2006, 2009-2012])[
|
||||
|
||||
/* C++ GLR parser skeleton written by Akim Demaille. */
|
||||
|
||||
#ifndef PARSER_HEADER_H
|
||||
# define PARSER_HEADER_H
|
||||
]b4_cpp_guard_open([b4_spec_defines_file])[
|
||||
|
||||
]b4_percent_code_get([[requires]])[
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
]b4_percent_define_ifdef([[location_type]], [],
|
||||
[[#include "location.hh"]])[
|
||||
# include <string>
|
||||
# include <iostream>
|
||||
]b4_percent_define_ifdef([[api.location.type]], [],
|
||||
[[# include "location.hh"]])[
|
||||
|
||||
/* Using locations. */
|
||||
#define YYLSP_NEEDED ]b4_locations_flag[
|
||||
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG ]b4_debug_flag[
|
||||
#endif
|
||||
|
||||
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
|
||||
If N is 0, then set CURRENT to the empty location which ends
|
||||
the previous symbol: RHS[0] (always defined). */
|
||||
|
||||
#ifndef YYLLOC_DEFAULT
|
||||
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
||||
do \
|
||||
if (N) \
|
||||
{ \
|
||||
(Current).begin = YYRHSLOC (Rhs, 1).begin; \
|
||||
(Current).end = YYRHSLOC (Rhs, N).end; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
(Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \
|
||||
} \
|
||||
while (/*CONSTCOND*/ 0)
|
||||
#endif
|
||||
]b4_YYDEBUG_define[
|
||||
|
||||
]b4_namespace_open[
|
||||
/// A Bison parser.
|
||||
@@ -267,7 +253,7 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C++],
|
||||
{
|
||||
public:
|
||||
/// Symbol semantic values.
|
||||
#ifndef YYSTYPE
|
||||
# ifndef ]b4_api_PREFIX[STYPE
|
||||
]m4_ifdef([b4_stype],
|
||||
[ union semantic_type
|
||||
{
|
||||
@@ -275,12 +261,12 @@ b4_user_stype
|
||||
};],
|
||||
[m4_if(b4_tag_seen_flag, 0,
|
||||
[[ typedef int semantic_type;]],
|
||||
[[ typedef YYSTYPE semantic_type;]])])[
|
||||
#else
|
||||
typedef YYSTYPE semantic_type;
|
||||
#endif
|
||||
[[ typedef ]b4_api_PREFIX[STYPE semantic_type;]])])[
|
||||
# else
|
||||
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
|
||||
@@ -319,38 +305,26 @@ b4_user_stype
|
||||
virtual void error (const location_type& loc, const std::string& msg);
|
||||
private:
|
||||
|
||||
#if YYDEBUG
|
||||
# if ]b4_api_PREFIX[DEBUG
|
||||
public:
|
||||
/// \brief Report a symbol value on the debug stream.
|
||||
/// \param yytype The token type.
|
||||
/// \param yyvaluep Its semantic value.
|
||||
/// \param yylocationp Its location.
|
||||
virtual void yy_symbol_value_print_ (int yytype,
|
||||
const semantic_type* yyvaluep,
|
||||
const location_type* yylocationp);
|
||||
const semantic_type* yyvaluep,
|
||||
const location_type* yylocationp);
|
||||
/// \brief Report a symbol on the debug stream.
|
||||
/// \param yytype The token type.
|
||||
/// \param yyvaluep Its semantic value.
|
||||
/// \param yylocationp Its location.
|
||||
virtual void yy_symbol_print_ (int yytype,
|
||||
const semantic_type* yyvaluep,
|
||||
const location_type* yylocationp);
|
||||
const semantic_type* yyvaluep,
|
||||
const location_type* yylocationp);
|
||||
private:
|
||||
/* Debugging. */
|
||||
int yydebug_;
|
||||
std::ostream* yycdebug_;
|
||||
#endif
|
||||
|
||||
|
||||
/// \brief Reclaim the memory associated to a symbol.
|
||||
/// \param yymsg Why this token is reclaimed.
|
||||
/// \param yytype The symbol type.
|
||||
/// \param yyvaluep Its semantic value.
|
||||
/// \param yylocationp Its location.
|
||||
inline void yydestruct_ (const char* yymsg,
|
||||
int yytype,
|
||||
semantic_type* yyvaluep,
|
||||
location_type* yylocationp);
|
||||
# endif
|
||||
|
||||
]b4_parse_param_vars[
|
||||
};
|
||||
@@ -359,16 +333,14 @@ b4_user_stype
|
||||
b4_percent_define_flag_if([[global_tokens_and_yystype]],
|
||||
[b4_token_defines(b4_tokens)])
|
||||
[
|
||||
#ifndef YYSTYPE
|
||||
# define YYSTYPE ]b4_namespace_ref[::]b4_parser_class_name[::semantic_type
|
||||
#ifndef ]b4_api_PREFIX[STYPE
|
||||
# define ]b4_api_PREFIX[STYPE ]b4_namespace_ref[::]b4_parser_class_name[::semantic_type
|
||||
#endif
|
||||
#ifndef YYLTYPE
|
||||
# define YYLTYPE ]b4_namespace_ref[::]b4_parser_class_name[::location_type
|
||||
#ifndef ]b4_api_PREFIX[LTYPE
|
||||
# define ]b4_api_PREFIX[LTYPE ]b4_namespace_ref[::]b4_parser_class_name[::location_type
|
||||
#endif
|
||||
|
||||
]b4_namespace_close[
|
||||
|
||||
]b4_percent_code_get([[provides]])[]dnl
|
||||
|
||||
[#endif /* ! defined PARSER_HEADER_H */]
|
||||
m4_divert_pop(0)
|
||||
]b4_percent_code_get([[provides]])[
|
||||
]b4_cpp_guard_close([b4_spec_defines_file])[
|
||||
]b4_output_end()
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
# Java skeleton dispatching for Bison.
|
||||
|
||||
# Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2007, 2009-2012 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-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2007-2012 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
|
||||
# -------------------
|
||||
|
||||
+131
-227
@@ -1,6 +1,6 @@
|
||||
# C++ skeleton for Bison
|
||||
|
||||
# Copyright (C) 2002-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002-2012 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,50 +24,35 @@ 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-2011])
|
||||
dnl FIXME: This is wrong, we want computed header guards.
|
||||
[2002-2012])
|
||||
[
|
||||
/**
|
||||
** \file ]b4_spec_defines_file[
|
||||
** Define the ]b4_namespace_ref[::parser class.
|
||||
*/
|
||||
|
||||
/* C++ LALR(1) parser skeleton written by Akim Demaille. */
|
||||
|
||||
#ifndef PARSER_HEADER_H
|
||||
# define PARSER_HEADER_H
|
||||
]b4_cpp_guard_open([b4_spec_defines_file])[
|
||||
|
||||
]b4_percent_code_get([[requires]])[
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include "stack.hh"
|
||||
]b4_percent_define_ifdef([[location_type]], [],
|
||||
]b4_percent_define_ifdef([[api.location.type]], [],
|
||||
[[#include "location.hh"]])[
|
||||
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG ]b4_debug_flag[
|
||||
#endif
|
||||
|
||||
/* Enabling verbose error messages. */
|
||||
#ifdef YYERROR_VERBOSE
|
||||
# undef YYERROR_VERBOSE
|
||||
# define YYERROR_VERBOSE 1
|
||||
#else
|
||||
# define YYERROR_VERBOSE ]b4_error_verbose_flag[
|
||||
#endif
|
||||
|
||||
/* Enabling the token table. */
|
||||
#ifndef YYTOKEN_TABLE
|
||||
# define YYTOKEN_TABLE ]b4_token_table[
|
||||
#endif
|
||||
]b4_YYDEBUG_define[
|
||||
|
||||
]b4_namespace_open[
|
||||
|
||||
@@ -76,7 +61,7 @@ dnl FIXME: This is wrong, we want computed header guards.
|
||||
{
|
||||
public:
|
||||
/// Symbol semantic values.
|
||||
#ifndef YYSTYPE
|
||||
#ifndef ]b4_api_PREFIX[STYPE
|
||||
]m4_ifdef([b4_stype],
|
||||
[ union semantic_type
|
||||
{
|
||||
@@ -84,12 +69,12 @@ b4_user_stype
|
||||
};],
|
||||
[m4_if(b4_tag_seen_flag, 0,
|
||||
[[ typedef int semantic_type;]],
|
||||
[[ typedef YYSTYPE semantic_type;]])])[
|
||||
[[ typedef ]b4_api_PREFIX[STYPE semantic_type;]])])[
|
||||
#else
|
||||
typedef YYSTYPE semantic_type;
|
||||
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
|
||||
@@ -107,7 +92,7 @@ b4_user_stype
|
||||
/// \returns 0 iff parsing succeeded.
|
||||
virtual int parse ();
|
||||
|
||||
#if YYDEBUG
|
||||
#if ]b4_api_PREFIX[DEBUG
|
||||
/// The current debugging stream.
|
||||
std::ostream& debug_stream () const;
|
||||
/// Set the current debugging stream.
|
||||
@@ -132,7 +117,7 @@ b4_user_stype
|
||||
/// \param tok the lookahead token.
|
||||
virtual std::string yysyntax_error_ (int yystate, int tok);
|
||||
|
||||
#if YYDEBUG
|
||||
#if ]b4_api_PREFIX[DEBUG
|
||||
/// \brief Report a symbol value on the debug stream.
|
||||
/// \param yytype The token type.
|
||||
/// \param yyvaluep Its semantic value.
|
||||
@@ -205,17 +190,15 @@ b4_user_stype
|
||||
/// For a rule, its LHS.
|
||||
static const ]b4_int_type_for([b4_r1])[ yyr1_[];
|
||||
/// For a rule, its RHS length.
|
||||
static const ]b4_int_type_for([b4_r2])[ yyr2_[];
|
||||
|
||||
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
|
||||
/// For a symbol, its name in clear.
|
||||
static const char* const yytname_[];
|
||||
#endif]b4_error_verbose_if([
|
||||
static const ]b4_int_type_for([b4_r2])[ yyr2_[]; ]b4_error_verbose_if([
|
||||
|
||||
/// Convert the symbol name \a n to a form suitable for a diagnostic.
|
||||
static std::string yytnamerr_ (const char *n);])[
|
||||
|
||||
#if YYDEBUG
|
||||
]b4_token_table_if([], [[#if ]b4_api_PREFIX[DEBUG]])[
|
||||
/// For a symbol, its name in clear.
|
||||
static const char* const yytname_[];
|
||||
]b4_token_table_if([[#if ]b4_api_PREFIX[DEBUG]])[
|
||||
/// A type to store symbol numbers and -1.
|
||||
typedef ]b4_int_type_for([b4_rhs])[ rhs_number_type;
|
||||
/// A `-1'-separated list of the rules' RHS.
|
||||
@@ -241,6 +224,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.
|
||||
@@ -271,18 +255,20 @@ b4_user_stype
|
||||
]b4_percent_define_flag_if([[global_tokens_and_yystype]],
|
||||
[b4_token_defines(b4_tokens)
|
||||
|
||||
#ifndef YYSTYPE
|
||||
#ifndef ]b4_api_PREFIX[STYPE
|
||||
/* Redirection for backward compatibility. */
|
||||
# define YYSTYPE b4_namespace_ref::b4_parser_class_name::semantic_type
|
||||
# define ]b4_api_PREFIX[STYPE b4_namespace_ref::b4_parser_class_name::semantic_type
|
||||
#endif
|
||||
])[
|
||||
]b4_percent_code_get([[provides]])[
|
||||
]b4_cpp_guard_close([b4_spec_defines_file])
|
||||
b4_output_end()
|
||||
])
|
||||
b4_percent_code_get([[provides]])[]dnl
|
||||
|
||||
[#endif /* ! defined PARSER_HEADER_H */]
|
||||
])dnl
|
||||
@output(b4_parser_file_name@)@
|
||||
|
||||
b4_output_begin([b4_parser_file_name])
|
||||
b4_copyright([Skeleton implementation for Bison LALR(1) parsers in C++],
|
||||
[2002-2011])
|
||||
[2002-2012])
|
||||
b4_percent_code_get([[top]])[]dnl
|
||||
m4_if(b4_prefix, [yy], [],
|
||||
[
|
||||
@@ -290,16 +276,18 @@ m4_if(b4_prefix, [yy], [],
|
||||
#define yylex b4_prefix[]lex])[
|
||||
|
||||
/* First part of user declarations. */
|
||||
]b4_user_pre_prologue
|
||||
]b4_user_pre_prologue[
|
||||
|
||||
b4_defines_if([[
|
||||
]b4_defines_if([[
|
||||
#include "@basename(]b4_spec_defines_file[@)"]])[
|
||||
|
||||
/* User implementation prologue. */
|
||||
]b4_user_post_prologue
|
||||
b4_percent_code_get[]dnl
|
||||
]b4_user_post_prologue[
|
||||
]b4_percent_code_get[
|
||||
|
||||
[#ifndef YY_
|
||||
]b4_null_define[
|
||||
|
||||
#ifndef YY_
|
||||
# if defined YYENABLE_NLS && YYENABLE_NLS
|
||||
# if ENABLE_NLS
|
||||
# include <libintl.h> /* FIXME: INFRINGES ON USER NAME SPACE */
|
||||
@@ -311,31 +299,14 @@ b4_percent_code_get[]dnl
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
|
||||
If N is 0, then set CURRENT to the empty location which ends
|
||||
the previous symbol: RHS[0] (always defined). */
|
||||
|
||||
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
|
||||
#ifndef YYLLOC_DEFAULT
|
||||
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
||||
do \
|
||||
if (N) \
|
||||
{ \
|
||||
(Current).begin = YYRHSLOC (Rhs, 1).begin; \
|
||||
(Current).end = YYRHSLOC (Rhs, N).end; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
(Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \
|
||||
} \
|
||||
while (false)
|
||||
#endif
|
||||
]b4_yylloc_default_define[
|
||||
|
||||
/* Suppress unused-variable warnings by "using" E. */
|
||||
#define YYUSE(e) ((void) (e))
|
||||
|
||||
/* Enable debugging if requested. */
|
||||
#if YYDEBUG
|
||||
#if ]b4_api_PREFIX[DEBUG
|
||||
|
||||
/* A pseudo ostream that takes yydebug_ into account. */
|
||||
# define YYCDEBUG if (yydebug_) (*yycdebug_)
|
||||
@@ -362,14 +333,14 @@ do { \
|
||||
yystack_print_ (); \
|
||||
} while (false)
|
||||
|
||||
#else /* !YYDEBUG */
|
||||
#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 /* !YYDEBUG */
|
||||
#endif /* !]b4_api_PREFIX[DEBUG */
|
||||
|
||||
#define yyerrok (yyerrstatus_ = 0)
|
||||
#define yyclearin (yychar = yyempty_)
|
||||
@@ -422,7 +393,7 @@ do { \
|
||||
/// Build a parser object.
|
||||
]b4_parser_class_name::b4_parser_class_name[ (]b4_parse_param_decl[)]m4_ifset([b4_parse_param], [
|
||||
:])[
|
||||
#if YYDEBUG
|
||||
#if ]b4_api_PREFIX[DEBUG
|
||||
]m4_ifset([b4_parse_param], [ ], [ :])[yydebug_ (false),
|
||||
yycdebug_ (&std::cerr)]m4_ifset([b4_parse_param], [,])[
|
||||
#endif]b4_parse_param_cons[
|
||||
@@ -433,7 +404,7 @@ do { \
|
||||
{
|
||||
}
|
||||
|
||||
#if YYDEBUG
|
||||
#if ]b4_api_PREFIX[DEBUG
|
||||
/*--------------------------------.
|
||||
| Print this symbol on YYOUTPUT. |
|
||||
`--------------------------------*/
|
||||
@@ -444,6 +415,9 @@ do { \
|
||||
{
|
||||
YYUSE (yylocationp);
|
||||
YYUSE (yyvaluep);
|
||||
std::ostream& yyo = debug_stream ();
|
||||
std::ostream& yyoutput = yyo;
|
||||
YYUSE (yyoutput);
|
||||
switch (yytype)
|
||||
{
|
||||
]m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl
|
||||
@@ -473,7 +447,8 @@ do { \
|
||||
YYUSE (yymsg);
|
||||
YYUSE (yyvaluep);
|
||||
|
||||
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
|
||||
if (yymsg)
|
||||
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
|
||||
|
||||
switch (yytype)
|
||||
{
|
||||
@@ -491,7 +466,7 @@ do { \
|
||||
yylocation_stack_.pop (n);
|
||||
}
|
||||
|
||||
#if YYDEBUG
|
||||
#if ]b4_api_PREFIX[DEBUG
|
||||
std::ostream&
|
||||
]b4_parser_class_name[::debug_stream () const
|
||||
{
|
||||
@@ -537,17 +512,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.
|
||||
@@ -560,15 +536,17 @@ 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
|
||||
@@ -602,14 +580,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],
|
||||
[[YYSTYPE*], [&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_)
|
||||
{
|
||||
@@ -680,17 +657,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.
|
||||
@@ -741,20 +722,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
|
||||
@@ -803,7 +783,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",
|
||||
@@ -851,16 +831,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.
|
||||
@@ -931,7 +937,7 @@ b4_error_verbose_if([int yystate, int yytoken],
|
||||
}
|
||||
}
|
||||
|
||||
char const* yyformat = 0;
|
||||
char const* yyformat = YY_NULL;
|
||||
switch (yycount)
|
||||
{
|
||||
#define YYCASE_(N, S) \
|
||||
@@ -1019,7 +1025,7 @@ b4_error_verbose_if([int yystate, int yytoken],
|
||||
]b4_stos[
|
||||
};
|
||||
|
||||
#if YYDEBUG
|
||||
#if ]b4_api_PREFIX[DEBUG
|
||||
/* TOKEN_NUMBER_[YYLEX-NUM] -- Internal symbol number corresponding
|
||||
to YYLEX-NUM. */
|
||||
const ]b4_int_type_for([b4_toknum])[
|
||||
@@ -1043,7 +1049,7 @@ b4_error_verbose_if([int yystate, int yytoken],
|
||||
]b4_r2[
|
||||
};
|
||||
|
||||
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
|
||||
]b4_token_table_if([], [[#if ]b4_api_PREFIX[DEBUG]])[
|
||||
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
|
||||
First, the terminals, then, starting at \a yyntokens_, nonterminals. */
|
||||
const char*
|
||||
@@ -1051,9 +1057,8 @@ b4_error_verbose_if([int yystate, int yytoken],
|
||||
{
|
||||
]b4_tname[
|
||||
};
|
||||
#endif
|
||||
|
||||
#if YYDEBUG
|
||||
]b4_token_table_if([[#if ]b4_api_PREFIX[DEBUG]])[
|
||||
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
|
||||
const ]b4_parser_class_name[::rhs_number_type
|
||||
]b4_parser_class_name[::yyrhs_[] =
|
||||
@@ -1103,7 +1108,7 @@ b4_error_verbose_if([int yystate, int yytoken],
|
||||
&]b4_rhs_value(yynrhs, yyi + 1)[,
|
||||
&]b4_rhs_location(yynrhs, yyi + 1)[);
|
||||
}
|
||||
#endif // YYDEBUG
|
||||
#endif // ]b4_api_PREFIX[DEBUG
|
||||
|
||||
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
|
||||
]b4_parser_class_name[::token_number_type
|
||||
@@ -1134,106 +1139,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
|
||||
dnl
|
||||
@output(b4_dir_prefix[]stack.hh@)@
|
||||
b4_copyright([Stack handling for Bison parsers in C++],
|
||||
[2002-2011])[
|
||||
|
||||
#ifndef BISON_STACK_HH
|
||||
# define BISON_STACK_HH
|
||||
|
||||
#include <deque>
|
||||
|
||||
]b4_namespace_open[
|
||||
template <class T, class S = std::deque<T> >
|
||||
class stack
|
||||
{
|
||||
public:
|
||||
|
||||
// Hide our reversed order.
|
||||
typedef typename S::reverse_iterator iterator;
|
||||
typedef typename S::const_reverse_iterator const_iterator;
|
||||
|
||||
stack () : seq_ ()
|
||||
{
|
||||
}
|
||||
|
||||
stack (unsigned int n) : seq_ (n)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
T&
|
||||
operator [] (unsigned int i)
|
||||
{
|
||||
return seq_[i];
|
||||
}
|
||||
|
||||
inline
|
||||
const T&
|
||||
operator [] (unsigned int i) const
|
||||
{
|
||||
return seq_[i];
|
||||
}
|
||||
|
||||
inline
|
||||
void
|
||||
push (const T& t)
|
||||
{
|
||||
seq_.push_front (t);
|
||||
}
|
||||
|
||||
inline
|
||||
void
|
||||
pop (unsigned int n = 1)
|
||||
{
|
||||
for (; n; --n)
|
||||
seq_.pop_front ();
|
||||
}
|
||||
|
||||
inline
|
||||
unsigned int
|
||||
height () const
|
||||
{
|
||||
return seq_.size ();
|
||||
}
|
||||
|
||||
inline const_iterator begin () const { return seq_.rbegin (); }
|
||||
inline const_iterator end () const { return seq_.rend (); }
|
||||
|
||||
private:
|
||||
|
||||
S seq_;
|
||||
};
|
||||
|
||||
/// Present a slice of the top of a stack.
|
||||
template <class T, class S = stack<T> >
|
||||
class slice
|
||||
{
|
||||
public:
|
||||
|
||||
slice (const S& stack,
|
||||
unsigned int range) : stack_ (stack),
|
||||
range_ (range)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
const T&
|
||||
operator [] (unsigned int i) const
|
||||
{
|
||||
return stack_[range_ - i];
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
const S& stack_;
|
||||
unsigned int range_;
|
||||
};
|
||||
]b4_namespace_close[
|
||||
|
||||
#endif // not BISON_STACK_HH[]dnl
|
||||
]
|
||||
m4_divert_pop(0)
|
||||
]b4_epilogue[]dnl
|
||||
b4_output_end()
|
||||
|
||||
+9
-14
@@ -1,6 +1,6 @@
|
||||
# Java skeleton for Bison -*- autoconf -*-
|
||||
|
||||
# Copyright (C) 2007-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2007-2012 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-2011])
|
||||
[2007-2012])
|
||||
|
||||
b4_percent_define_ifdef([package], [package b4_percent_define_get([package]);
|
||||
])[/* First part of user declarations. */
|
||||
@@ -454,18 +453,14 @@ b4_lexer_if([[
|
||||
/// Semantic value of the lookahead.
|
||||
b4_yystype[ yylval = null;
|
||||
|
||||
int yyresult;
|
||||
|
||||
yycdebug ("Starting parse\n");
|
||||
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])[);
|
||||
@@ -644,7 +639,7 @@ m4_popdef([b4_at_dollar])])dnl
|
||||
}
|
||||
|
||||
/* Pop the current state because it cannot handle the error token. */
|
||||
if (yystack.height == 1)
|
||||
if (yystack.height == 0)
|
||||
return false;
|
||||
|
||||
]b4_locations_if([yyerrloc = yystack.locationAt (0);])[
|
||||
@@ -929,4 +924,4 @@ b4_percent_code_get[]dnl
|
||||
}
|
||||
|
||||
b4_epilogue
|
||||
m4_divert_pop(0)dnl
|
||||
b4_output_end()
|
||||
|
||||
+70
-46
@@ -1,6 +1,6 @@
|
||||
# C++ skeleton for Bison
|
||||
|
||||
# Copyright (C) 2002-2007, 2009-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002-2007, 2009-2012 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,64 +15,67 @@
|
||||
# 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-2011])[
|
||||
[2002-2007, 2009-2012])[
|
||||
|
||||
/**
|
||||
** \file position.hh
|
||||
** \file ]b4_dir_prefix[position.hh
|
||||
** Define the ]b4_namespace_ref[::position class.
|
||||
*/
|
||||
|
||||
#ifndef BISON_POSITION_HH
|
||||
# define BISON_POSITION_HH
|
||||
]b4_cpp_guard_open([b4_dir_prefix[]position.hh])[
|
||||
|
||||
# include <algorithm> // std::max
|
||||
# include <iostream>
|
||||
# include <string>
|
||||
# include <algorithm>
|
||||
|
||||
]b4_null_define[
|
||||
|
||||
]b4_namespace_open[
|
||||
/// Abstract a position.
|
||||
class position
|
||||
{
|
||||
public:
|
||||
]m4_ifdef([b4_location_constructors], [
|
||||
]m4_ifdef([b4_location_constructors], [[
|
||||
/// Construct a position.
|
||||
position ()
|
||||
: filename (0), line (]b4_location_initial_line[), column (]b4_location_initial_column[)
|
||||
explicit position (]b4_percent_define_get([[filename_type]])[* f = YY_NULL,
|
||||
unsigned int l = ]b4_location_initial_line[u,
|
||||
unsigned int c = ]b4_location_initial_column[u)
|
||||
: filename (f)
|
||||
, line (l)
|
||||
, column (c)
|
||||
{
|
||||
}
|
||||
|
||||
])[
|
||||
]])[
|
||||
/// Initialization.
|
||||
inline void initialize (]b4_percent_define_get([[filename_type]])[* fn)
|
||||
void initialize (]b4_percent_define_get([[filename_type]])[* fn = YY_NULL,
|
||||
unsigned int l = ]b4_location_initial_line[u,
|
||||
unsigned int c = ]b4_location_initial_column[u)
|
||||
{
|
||||
filename = fn;
|
||||
line = ]b4_location_initial_line[;
|
||||
column = ]b4_location_initial_column[;
|
||||
line = l;
|
||||
column = c;
|
||||
}
|
||||
|
||||
/** \name Line and Column related manipulators
|
||||
** \{ */
|
||||
public:
|
||||
/// (line related) Advance to the COUNT next lines.
|
||||
inline void lines (int count = 1)
|
||||
void lines (int count = 1)
|
||||
{
|
||||
column = ]b4_location_initial_column[;
|
||||
column = ]b4_location_initial_column[u;
|
||||
line += count;
|
||||
}
|
||||
|
||||
/// (column related) Advance to the COUNT next columns.
|
||||
inline void columns (int count = 1)
|
||||
void columns (int count = 1)
|
||||
{
|
||||
column = std::max (]b4_location_initial_column[u, column + count);
|
||||
}
|
||||
/** \} */
|
||||
|
||||
public:
|
||||
/// File name to which this position refers.
|
||||
]b4_percent_define_get([[filename_type]])[* filename;
|
||||
/// Current line number.
|
||||
@@ -82,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);
|
||||
@@ -98,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;
|
||||
@@ -133,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 << ':';
|
||||
@@ -142,21 +146,21 @@ b4_copyright([Positions for Bison parsers in C++],
|
||||
}
|
||||
|
||||
]b4_namespace_close[
|
||||
#endif // not BISON_POSITION_HH]
|
||||
@output(b4_dir_prefix[]location.hh@)@
|
||||
]b4_cpp_guard_close([b4_dir_prefix[]position.hh])
|
||||
b4_output_end()
|
||||
|
||||
|
||||
b4_output_begin([b4_dir_prefix[]location.hh])
|
||||
b4_copyright([Locations for Bison parsers in C++],
|
||||
[2002-2007, 2009-2011])[
|
||||
[2002-2007, 2009-2012])[
|
||||
|
||||
/**
|
||||
** \file location.hh
|
||||
** \file ]b4_dir_prefix[location.hh
|
||||
** Define the ]b4_namespace_ref[::location class.
|
||||
*/
|
||||
|
||||
#ifndef BISON_LOCATION_HH
|
||||
# define BISON_LOCATION_HH
|
||||
]b4_cpp_guard_open([b4_dir_prefix[]location.hh])[
|
||||
|
||||
# include <iostream>
|
||||
# include <string>
|
||||
# include "position.hh"
|
||||
|
||||
]b4_namespace_open[
|
||||
@@ -166,17 +170,36 @@ b4_copyright([Locations for Bison parsers in C++],
|
||||
{
|
||||
public:
|
||||
]m4_ifdef([b4_location_constructors], [
|
||||
/// Construct a location.
|
||||
location ()
|
||||
: begin (), end ()
|
||||
/// Construct a location from \a b to \a e.
|
||||
location (const position& b, const position& e)
|
||||
: begin (b)
|
||||
, end (e)
|
||||
{
|
||||
}
|
||||
|
||||
/// Construct a 0-width location in \a p.
|
||||
explicit location (const position& p = position ())
|
||||
: begin (p)
|
||||
, end (p)
|
||||
{
|
||||
}
|
||||
|
||||
/// Construct a 0-width location in \a f, \a l, \a c.
|
||||
explicit location (]b4_percent_define_get([[filename_type]])[* f,
|
||||
unsigned int l = ]b4_location_initial_line[u,
|
||||
unsigned int c = ]b4_location_initial_column[u)
|
||||
: begin (f, l, c)
|
||||
, end (f, l, c)
|
||||
{
|
||||
}
|
||||
|
||||
])[
|
||||
/// Initialization.
|
||||
inline void initialize (]b4_percent_define_get([[filename_type]])[* fn)
|
||||
void initialize (]b4_percent_define_get([[filename_type]])[* f = YY_NULL,
|
||||
unsigned int l = ]b4_location_initial_line[u,
|
||||
unsigned int c = ]b4_location_initial_column[u)
|
||||
{
|
||||
begin.initialize (fn);
|
||||
begin.initialize (f, l, c);
|
||||
end = begin;
|
||||
}
|
||||
|
||||
@@ -184,19 +207,19 @@ b4_copyright([Locations for Bison parsers in C++],
|
||||
** \{ */
|
||||
public:
|
||||
/// Reset initial location to final location.
|
||||
inline void step ()
|
||||
void step ()
|
||||
{
|
||||
begin = end;
|
||||
}
|
||||
|
||||
/// Extend the current location to the COUNT next columns.
|
||||
inline void columns (unsigned int count = 1)
|
||||
void columns (unsigned int count = 1)
|
||||
{
|
||||
end += count;
|
||||
}
|
||||
|
||||
/// Extend the current location to the COUNT next lines.
|
||||
inline void lines (unsigned int count = 1)
|
||||
void lines (unsigned int count = 1)
|
||||
{
|
||||
end.lines (count);
|
||||
}
|
||||
@@ -253,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;
|
||||
@@ -270,6 +295,5 @@ b4_copyright([Locations for Bison parsers in C++],
|
||||
|
||||
]b4_namespace_close[
|
||||
|
||||
#endif // not BISON_LOCATION_HH]
|
||||
m4_divert_pop(0)
|
||||
m4_changecom([#])
|
||||
]b4_cpp_guard_close([b4_dir_prefix[]location.hh])
|
||||
b4_output_end()
|
||||
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
# C++ skeleton for Bison
|
||||
|
||||
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
m4_pushdef([b4_copyright_years],
|
||||
[2002-2012])
|
||||
|
||||
b4_output_begin([b4_dir_prefix[]stack.hh])
|
||||
b4_copyright([Stack handling for Bison parsers in C++],
|
||||
[2002-2012])[
|
||||
|
||||
/**
|
||||
** \file ]b4_dir_prefix[stack.hh
|
||||
** Define the ]b4_namespace_ref[::stack class.
|
||||
*/
|
||||
|
||||
]b4_cpp_guard_open([b4_dir_prefix[]stack.hh])[
|
||||
|
||||
# include <deque>
|
||||
|
||||
]b4_namespace_open[
|
||||
template <class T, class S = std::deque<T> >
|
||||
class stack
|
||||
{
|
||||
public:
|
||||
// Hide our reversed order.
|
||||
typedef typename S::reverse_iterator iterator;
|
||||
typedef typename S::const_reverse_iterator const_iterator;
|
||||
|
||||
stack () : seq_ ()
|
||||
{
|
||||
}
|
||||
|
||||
stack (unsigned int n) : seq_ (n)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
T&
|
||||
operator [] (unsigned int i)
|
||||
{
|
||||
return seq_[i];
|
||||
}
|
||||
|
||||
inline
|
||||
const T&
|
||||
operator [] (unsigned int i) const
|
||||
{
|
||||
return seq_[i];
|
||||
}
|
||||
|
||||
inline
|
||||
void
|
||||
push (const T& t)
|
||||
{
|
||||
seq_.push_front (t);
|
||||
}
|
||||
|
||||
inline
|
||||
void
|
||||
pop (unsigned int n = 1)
|
||||
{
|
||||
for (; n; --n)
|
||||
seq_.pop_front ();
|
||||
}
|
||||
|
||||
inline
|
||||
unsigned int
|
||||
height () const
|
||||
{
|
||||
return seq_.size ();
|
||||
}
|
||||
|
||||
inline const_iterator begin () const { return seq_.rbegin (); }
|
||||
inline const_iterator end () const { return seq_.rend (); }
|
||||
|
||||
private:
|
||||
S seq_;
|
||||
};
|
||||
|
||||
/// Present a slice of the top of a stack.
|
||||
template <class T, class S = stack<T> >
|
||||
class slice
|
||||
{
|
||||
public:
|
||||
slice (const S& stack, unsigned int range)
|
||||
: stack_ (stack)
|
||||
, range_ (range)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
const T&
|
||||
operator [] (unsigned int i) const
|
||||
{
|
||||
return stack_[range_ - i];
|
||||
}
|
||||
|
||||
private:
|
||||
const S& stack_;
|
||||
unsigned int range_;
|
||||
};
|
||||
]b4_namespace_close[
|
||||
|
||||
]b4_cpp_guard_close([b4_dir_prefix[]stack.hh])
|
||||
b4_output_end()
|
||||
|
||||
m4_popdef([b4_copyright_years])
|
||||
+13
-1
@@ -3,7 +3,7 @@
|
||||
<!--
|
||||
bison.xsl - common templates for Bison XSLT.
|
||||
|
||||
Copyright (C) 2007-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2007-2012 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-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2007-2012 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-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2007-2012 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-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2007-2012 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
+240
-308
@@ -2,7 +2,7 @@
|
||||
|
||||
# Yacc compatible skeleton for Bison
|
||||
|
||||
# Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation,
|
||||
# Copyright (C) 1984, 1989-1990, 2000-2012 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), ])])
|
||||
|
||||
|
||||
@@ -158,9 +170,9 @@ m4_define([b4_rhs_location],
|
||||
[(yylsp@{($2) - ($1)@})])
|
||||
|
||||
|
||||
## ------------------ ##
|
||||
## Parser variables. ##
|
||||
## ------------------ ##
|
||||
## -------------- ##
|
||||
## Declarations. ##
|
||||
## -------------- ##
|
||||
|
||||
# b4_declare_scanner_communication_variables
|
||||
# ------------------------------------------
|
||||
@@ -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;]])])
|
||||
@@ -197,7 +234,7 @@ m4_define([b4_declare_parser_state_variables], [b4_pure_if([[
|
||||
`yyvs': related to semantic values.]b4_locations_if([[
|
||||
`yyls': related to locations.]])[
|
||||
|
||||
Refer to the stacks thru separate pointers, to allow yyoverflow
|
||||
Refer to the stacks through separate pointers, to allow yyoverflow
|
||||
to reallocate them elsewhere. */
|
||||
|
||||
/* The state stack. */
|
||||
@@ -225,16 +262,78 @@ m4_define([b4_declare_parser_state_variables], [b4_pure_if([[
|
||||
YYSIZE_T yyes_capacity;]])])
|
||||
|
||||
|
||||
## --------------------------------------------------------- ##
|
||||
## Defining symbol actions, e.g., printers and destructors. ##
|
||||
## --------------------------------------------------------- ##
|
||||
# b4_declare_yyparse_push_
|
||||
# ------------------------
|
||||
# Declaration of yyparse (and dependencies) when using the push parser
|
||||
# (including in pull mode).
|
||||
m4_define([b4_declare_yyparse_push_],
|
||||
[[#ifndef YYPUSH_MORE_DEFINED
|
||||
# define YYPUSH_MORE_DEFINED
|
||||
enum { YYPUSH_MORE = 4 };
|
||||
#endif
|
||||
|
||||
# We do want M4 expansion after # for CPP macros.
|
||||
m4_changecom()
|
||||
m4_divert_push(0)dnl
|
||||
@output(b4_parser_file_name@)@
|
||||
typedef struct ]b4_prefix[pstate ]b4_prefix[pstate;
|
||||
|
||||
]b4_pull_if([b4_c_function_decl([b4_prefix[parse]], [[int]], b4_parse_param)
|
||||
])b4_c_function_decl([b4_prefix[push_parse]], [[int]],
|
||||
[[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 *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], [,
|
||||
b4_parse_param]))])
|
||||
b4_c_function_decl([b4_prefix[pstate_new]], [b4_prefix[pstate *]],
|
||||
[[[void]], []])
|
||||
b4_c_function_decl([b4_prefix[pstate_delete]], [[void]],
|
||||
[[b4_prefix[pstate *ps]], [[ps]]])dnl
|
||||
])
|
||||
|
||||
# b4_declare_yyparse_
|
||||
# -------------------
|
||||
# When not the push parser.
|
||||
m4_define([b4_declare_yyparse_],
|
||||
[[#ifdef YYPARSE_PARAM
|
||||
]b4_c_function_decl(b4_prefix[parse], [int],
|
||||
[[void *YYPARSE_PARAM], [YYPARSE_PARAM]])[
|
||||
#else /* ! YYPARSE_PARAM */
|
||||
]b4_c_function_decl(b4_prefix[parse], [int], b4_parse_param)[
|
||||
#endif /* ! YYPARSE_PARAM */]dnl
|
||||
])
|
||||
|
||||
|
||||
# b4_declare_yyparse
|
||||
# ------------------
|
||||
m4_define([b4_declare_yyparse],
|
||||
[b4_push_if([b4_declare_yyparse_push_],
|
||||
[b4_declare_yyparse_])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# b4_shared_declarations
|
||||
# ----------------------
|
||||
# Declaration that might either go into the header (if --defines)
|
||||
# or open coded in the parser body.
|
||||
m4_define([b4_shared_declarations],
|
||||
[b4_cpp_guard_open([b4_spec_defines_file])[
|
||||
]b4_declare_yydebug[
|
||||
]b4_percent_code_get([[requires]])[
|
||||
]b4_token_enums_defines(b4_tokens)[
|
||||
]b4_declare_yylstype[
|
||||
]b4_declare_yyparse[
|
||||
]b4_percent_code_get([[provides]])[
|
||||
]b4_cpp_guard_close([b4_spec_defines_file])[]dnl
|
||||
])
|
||||
|
||||
|
||||
## -------------- ##
|
||||
## Output files. ##
|
||||
## -------------- ##
|
||||
|
||||
b4_output_begin([b4_parser_file_name])
|
||||
b4_copyright([Bison implementation for Yacc-like parsers in C],
|
||||
[1984, 1989-1990, 2000-2011])[
|
||||
[1984, 1989-1990, 2000-2012])[
|
||||
|
||||
/* C LALR(1) parser skeleton written by Richard Stallman, by
|
||||
simplifying the original so-called "semantic" parser. */
|
||||
@@ -248,7 +347,11 @@ b4_copyright([Bison implementation for Yacc-like parsers in C],
|
||||
|
||||
]b4_identification
|
||||
b4_percent_code_get([[top]])[]dnl
|
||||
m4_if(b4_prefix, [yy], [],
|
||||
m4_if(b4_api_prefix, [yy], [],
|
||||
[[/* Substitute the type names. */
|
||||
#define YYSTYPE ]b4_api_PREFIX[STYPE]b4_locations_if([[
|
||||
#define YYLTYPE ]b4_api_PREFIX[LTYPE]])])[
|
||||
]m4_if(b4_prefix, [yy], [],
|
||||
[[/* Substitute the variable and function names. */]b4_pull_if([[
|
||||
#define yyparse ]b4_prefix[parse]])b4_push_if([[
|
||||
#define yypush_parse ]b4_prefix[push_parse]b4_pull_if([[
|
||||
@@ -261,16 +364,13 @@ m4_if(b4_prefix, [yy], [],
|
||||
#define yylval ]b4_prefix[lval
|
||||
#define yychar ]b4_prefix[char
|
||||
#define yydebug ]b4_prefix[debug
|
||||
#define yynerrs ]b4_prefix[nerrs
|
||||
]b4_locations_if([[#define yylloc ]b4_prefix[lloc]])])[
|
||||
#define yynerrs ]b4_prefix[nerrs]b4_locations_if([[
|
||||
#define yylloc ]b4_prefix[lloc]])])[
|
||||
|
||||
/* Copy the first part of user declarations. */
|
||||
]b4_user_pre_prologue[
|
||||
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG ]b4_debug_flag[
|
||||
#endif
|
||||
]b4_null_define[
|
||||
|
||||
/* Enabling verbose error messages. */
|
||||
#ifdef YYERROR_VERBOSE
|
||||
@@ -280,66 +380,13 @@ m4_if(b4_prefix, [yy], [],
|
||||
# define YYERROR_VERBOSE ]b4_error_verbose_flag[
|
||||
#endif
|
||||
|
||||
/* Enabling the token table. */
|
||||
#ifndef YYTOKEN_TABLE
|
||||
# define YYTOKEN_TABLE ]b4_token_table[
|
||||
#endif
|
||||
]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[@)". */
|
||||
]])dnl
|
||||
b4_shared_declarations[
|
||||
|
||||
]b4_percent_code_get([[requires]])[]dnl
|
||||
|
||||
b4_token_enums_defines(b4_tokens)[
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
]m4_ifdef([b4_stype],
|
||||
[[typedef union ]b4_union_name[
|
||||
{
|
||||
]b4_user_stype[
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1]],
|
||||
[m4_if(b4_tag_seen_flag, 0,
|
||||
[[typedef int YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1]])])[
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
#endif]b4_locations_if([[
|
||||
|
||||
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
|
||||
typedef struct YYLTYPE
|
||||
{
|
||||
int first_line;
|
||||
int first_column;
|
||||
int last_line;
|
||||
int last_column;
|
||||
} YYLTYPE;
|
||||
# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYLTYPE_IS_DECLARED 1
|
||||
# define YYLTYPE_IS_TRIVIAL 1
|
||||
#endif]])b4_push_if([[
|
||||
|
||||
#ifndef YYPUSH_DECLS
|
||||
# define YYPUSH_DECLS
|
||||
struct yypstate;
|
||||
typedef struct yypstate yypstate;
|
||||
enum { YYPUSH_MORE = 4 };
|
||||
|
||||
]b4_pull_if([b4_c_function_decl([[yyparse]], [[int]], b4_parse_param)
|
||||
])b4_c_function_decl([[yypush_parse]], [[int]],
|
||||
[[[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], [,
|
||||
b4_parse_param]))
|
||||
b4_pull_if([b4_c_function_decl([[yypull_parse]], [[int]],
|
||||
[[[yypstate *yyps]], [[yyps]]]m4_ifset([b4_parse_param], [,
|
||||
b4_parse_param]))])
|
||||
b4_c_function_decl([[yypstate_new]], [[yypstate *]], [[[void]], []])
|
||||
b4_c_function_decl([[yypstate_delete]], [[void]],
|
||||
[[[yypstate *yyps]], [[yyps]]])[
|
||||
#endif]])
|
||||
|
||||
b4_percent_code_get([[provides]])[]dnl
|
||||
|
||||
[/* Copy the second part of user declarations. */
|
||||
/* Copy the second part of user declarations. */
|
||||
]b4_user_post_prologue
|
||||
b4_percent_code_get[]dnl
|
||||
|
||||
@@ -392,24 +439,24 @@ 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))
|
||||
# define YYUSE(E) ((void) (E))
|
||||
#else
|
||||
# define YYUSE(e) /* empty */
|
||||
# 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 yyi], [yyi]])[
|
||||
{
|
||||
@@ -437,6 +484,7 @@ b4_push_if([], [b4_lac_if([], [[
|
||||
# define YYSTACK_ALLOC alloca
|
||||
# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && ]b4_c_modern[
|
||||
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
||||
/* Use EXIT_SUCCESS as a witness for stdlib.h. */
|
||||
# ifndef EXIT_SUCCESS
|
||||
# define EXIT_SUCCESS 0
|
||||
# endif
|
||||
@@ -488,8 +536,8 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
|
||||
|
||||
#if (! defined yyoverflow \
|
||||
&& (! defined __cplusplus \
|
||||
|| (]b4_locations_if([[defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
|
||||
&& ]])[defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
|
||||
|| (]b4_locations_if([[defined ]b4_api_PREFIX[LTYPE_IS_TRIVIAL && ]b4_api_PREFIX[LTYPE_IS_TRIVIAL \
|
||||
&& ]])[defined ]b4_api_PREFIX[STYPE_IS_TRIVIAL && ]b4_api_PREFIX[STYPE_IS_TRIVIAL)))
|
||||
|
||||
/* A type that is properly aligned for any stack member. */
|
||||
union yyalloc
|
||||
@@ -533,20 +581,20 @@ union yyalloc
|
||||
#endif
|
||||
|
||||
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
|
||||
/* Copy COUNT objects from FROM to TO. The source and destination do
|
||||
/* Copy COUNT objects from SRC to DST. The source and destination do
|
||||
not overlap. */
|
||||
# ifndef YYCOPY
|
||||
# if defined __GNUC__ && 1 < __GNUC__
|
||||
# define YYCOPY(To, From, Count) \
|
||||
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
|
||||
# define YYCOPY(Dst, Src, Count) \
|
||||
__builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
|
||||
# else
|
||||
# define YYCOPY(To, From, Count) \
|
||||
do \
|
||||
{ \
|
||||
YYSIZE_T yyi; \
|
||||
for (yyi = 0; yyi < (Count); yyi++) \
|
||||
(To)[yyi] = (From)[yyi]; \
|
||||
} \
|
||||
# define YYCOPY(Dst, Src, Count) \
|
||||
do \
|
||||
{ \
|
||||
YYSIZE_T yyi; \
|
||||
for (yyi = 0; yyi < (Count); yyi++) \
|
||||
(Dst)[yyi] = (Src)[yyi]; \
|
||||
} \
|
||||
while (YYID (0))
|
||||
# endif
|
||||
# endif
|
||||
@@ -579,7 +627,7 @@ static const ]b4_int_type_for([b4_translate])[ yytranslate[] =
|
||||
]b4_translate[
|
||||
};
|
||||
|
||||
#if YYDEBUG
|
||||
#if ]b4_api_PREFIX[DEBUG
|
||||
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
|
||||
YYRHS. */
|
||||
static const ]b4_int_type_for([b4_prhs])[ yyprhs[] =
|
||||
@@ -600,7 +648,7 @@ static const ]b4_int_type_for([b4_rline])[ yyrline[] =
|
||||
};
|
||||
#endif
|
||||
|
||||
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
|
||||
#if ]b4_api_PREFIX[DEBUG || YYERROR_VERBOSE || ]b4_token_table_flag[
|
||||
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
|
||||
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
|
||||
static const char *const yytname[] =
|
||||
@@ -667,11 +715,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[] =
|
||||
{
|
||||
@@ -712,79 +760,35 @@ static const ]b4_int_type_for([b4_stos])[ yystos[] =
|
||||
|
||||
#define YYRECOVERING() (!!yyerrstatus)
|
||||
|
||||
#define YYBACKUP(Token, Value) \
|
||||
do \
|
||||
if (yychar == YYEMPTY && yylen == 1) \
|
||||
{ \
|
||||
yychar = (Token); \
|
||||
yylval = (Value); \
|
||||
YYPOPSTACK (1); \]b4_lac_if([[
|
||||
YY_LAC_DISCARD ("YYBACKUP"); \]])[
|
||||
goto yybackup; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
#define YYBACKUP(Token, Value) \
|
||||
do \
|
||||
if (yychar == YYEMPTY) \
|
||||
{ \
|
||||
yychar = (Token); \
|
||||
yylval = (Value); \
|
||||
YYPOPSTACK (yylen); \
|
||||
yystate = *yyssp; \]b4_lac_if([[
|
||||
YY_LAC_DISCARD ("YYBACKUP"); \]])[
|
||||
goto yybackup; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
yyerror (]b4_yyerror_args[YY_("syntax error: cannot back up")); \
|
||||
YYERROR; \
|
||||
} \
|
||||
while (YYID (0))
|
||||
|
||||
|
||||
/* Error token number */
|
||||
#define YYTERROR 1
|
||||
#define YYERRCODE 256
|
||||
|
||||
|
||||
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
|
||||
If N is 0, then set CURRENT to the empty location which ends
|
||||
the previous symbol: RHS[0] (always defined). */
|
||||
|
||||
]b4_locations_if([[
|
||||
]b4_yylloc_default_define[
|
||||
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
|
||||
#ifndef YYLLOC_DEFAULT
|
||||
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
||||
do \
|
||||
if (YYID (N)) \
|
||||
{ \
|
||||
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
|
||||
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
|
||||
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
|
||||
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
(Current).first_line = (Current).last_line = \
|
||||
YYRHSLOC (Rhs, 0).last_line; \
|
||||
(Current).first_column = (Current).last_column = \
|
||||
YYRHSLOC (Rhs, 0).last_column; \
|
||||
} \
|
||||
while (YYID (0))
|
||||
#endif]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 YYLTYPE_IS_TRIVIAL && YYLTYPE_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
|
||||
@@ -792,7 +796,7 @@ while (YYID (0))
|
||||
#endif
|
||||
|
||||
/* Enable debugging if requested. */
|
||||
#if YYDEBUG
|
||||
#if ]b4_api_PREFIX[DEBUG
|
||||
|
||||
# ifndef YYFPRINTF
|
||||
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
|
||||
@@ -879,12 +883,12 @@ do { \
|
||||
/* Nonzero means print parse trace. It is left uninitialized so that
|
||||
multiple parsers can coexist. */
|
||||
int yydebug;
|
||||
#else /* !YYDEBUG */
|
||||
#else /* !]b4_api_PREFIX[DEBUG */
|
||||
# define YYDPRINTF(Args)
|
||||
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
|
||||
# define YY_STACK_PRINT(Bottom, Top)
|
||||
# define YY_REDUCE_PRINT(Rule)
|
||||
#endif /* !YYDEBUG */
|
||||
#endif /* !]b4_api_PREFIX[DEBUG */
|
||||
|
||||
|
||||
/* YYINITDEPTH -- initial size of the parser's stacks. */
|
||||
@@ -915,7 +919,7 @@ int yydebug;
|
||||
required. Return 1 if memory is exhausted. */
|
||||
static int
|
||||
yy_lac_stack_realloc (YYSIZE_T *yycapacity, YYSIZE_T yyadd,
|
||||
#if YYDEBUG
|
||||
#if ]b4_api_PREFIX[DEBUG
|
||||
char const *yydebug_prefix,
|
||||
char const *yydebug_suffix,
|
||||
#endif
|
||||
@@ -1021,7 +1025,7 @@ do { \
|
||||
the parser stacks to try to find a new initial context in which the
|
||||
current lookahead is syntactically acceptable. If it fails to find
|
||||
such a context, it discards the lookahead. */
|
||||
#if YYDEBUG
|
||||
#if ]b4_api_PREFIX[DEBUG
|
||||
# define YY_LAC_DISCARD(Event) \
|
||||
do { \
|
||||
if (yy_lac_established) \
|
||||
@@ -1124,7 +1128,7 @@ yy_lac (yytype_int16 *yyesa, yytype_int16 **yyes,
|
||||
else
|
||||
{
|
||||
if (yy_lac_stack_realloc (yyes_capacity, 1,
|
||||
#if YYDEBUG
|
||||
#if ]b4_api_PREFIX[DEBUG
|
||||
" (", ")",
|
||||
#endif
|
||||
yyes, yyesa, &yyesp, yyes_prev))
|
||||
@@ -1241,12 +1245,11 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
]b4_lac_if([[yytype_int16 *yyesa, yytype_int16 **yyes,
|
||||
YYSIZE_T *yyes_capacity, ]])[yytype_int16 *yyssp, int yytoken)
|
||||
{
|
||||
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
|
||||
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 = 0;
|
||||
const char *yyformat = YY_NULL;
|
||||
/* Arguments of yyformat. */
|
||||
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
|
||||
/* Number of reported tokens (one for the "unexpected", one per
|
||||
@@ -1324,14 +1327,16 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
break;
|
||||
}
|
||||
yyarg[yycount++] = yytname[yyx];
|
||||
yysize1 = yysize + yytnamerr (0, 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 YYDEBUG
|
||||
# if ]b4_api_PREFIX[DEBUG
|
||||
else if (yydebug)
|
||||
YYFPRINTF (stderr, "No expected tokens.\n");
|
||||
# endif]])[
|
||||
@@ -1352,10 +1357,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)
|
||||
{
|
||||
@@ -1388,20 +1395,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
}
|
||||
#endif /* YYERROR_VERBOSE */
|
||||
|
||||
]b4_yydestruct_generate([b4_c_function_def])b4_push_if([], [[
|
||||
]b4_yydestruct_generate([b4_c_function_def])[
|
||||
|
||||
|
||||
/* Prevent warnings from -Wmissing-prototypes. */
|
||||
#ifdef YYPARSE_PARAM
|
||||
]b4_c_function_decl([yyparse], [int],
|
||||
[[void *YYPARSE_PARAM], [YYPARSE_PARAM]])[
|
||||
#else /* ! YYPARSE_PARAM */
|
||||
]b4_c_function_decl([yyparse], [int], b4_parse_param)[
|
||||
#endif /* ! YYPARSE_PARAM */]])b4_pure_if([], [
|
||||
]b4_pure_if([], [
|
||||
|
||||
b4_declare_scanner_communication_variables])[]b4_push_if([[
|
||||
|
||||
|
||||
struct yypstate
|
||||
{]b4_declare_parser_state_variables[
|
||||
/* Used to determine if this is the first time this instance has
|
||||
@@ -1413,7 +1412,7 @@ static char yypstate_allocated = 0;]])b4_pull_if([
|
||||
|
||||
b4_c_function_def([[yyparse]], [[int]], b4_parse_param)[
|
||||
{
|
||||
return yypull_parse (0]m4_ifset([b4_parse_param],
|
||||
return yypull_parse (YY_NULL]m4_ifset([b4_parse_param],
|
||||
[[, ]b4_c_args(b4_parse_param)])[);
|
||||
}
|
||||
|
||||
@@ -1425,8 +1424,11 @@ b4_c_function_def([[yyparse]], [[int]], b4_parse_param)[
|
||||
yypstate *yyps_local;]b4_pure_if([[
|
||||
int yychar;
|
||||
YYSTYPE yylval;]b4_locations_if([[
|
||||
YYLTYPE yylloc;]])])[
|
||||
if (yyps == 0)
|
||||
static YYLTYPE yyloc_default][]b4_yyloc_default[;
|
||||
YYLTYPE yylloc = yyloc_default;]])])[
|
||||
if (yyps)
|
||||
yyps_local = yyps;
|
||||
else
|
||||
{
|
||||
yyps_local = yypstate_new ();
|
||||
if (!yyps_local)
|
||||
@@ -1437,14 +1439,12 @@ b4_c_function_def([[yyparse]], [[int]], b4_parse_param)[
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
else
|
||||
yyps_local = yyps;
|
||||
do {
|
||||
yychar = YYLEX;
|
||||
yystatus =
|
||||
yypush_parse (yyps_local]b4_pure_if([[, yychar, &yylval]b4_locations_if([[, &yylloc]])])m4_ifset([b4_parse_param], [, b4_c_args(b4_parse_param)])[);
|
||||
} while (yystatus == YYPUSH_MORE);
|
||||
if (yyps == 0)
|
||||
if (!yyps)
|
||||
yypstate_delete (yyps_local);
|
||||
return yystatus;
|
||||
}]])[
|
||||
@@ -1454,10 +1454,10 @@ b4_c_function_def([[yyparse]], [[int]], b4_parse_param)[
|
||||
{
|
||||
yypstate *yyps;]b4_pure_if([], [[
|
||||
if (yypstate_allocated)
|
||||
return 0;]])[
|
||||
return YY_NULL;]])[
|
||||
yyps = (yypstate *) malloc (sizeof *yyps);
|
||||
if (!yyps)
|
||||
return 0;
|
||||
return YY_NULL;
|
||||
yyps->yynew = 1;]b4_pure_if([], [[
|
||||
yypstate_allocated = 1;]])[
|
||||
return yyps;
|
||||
@@ -1505,7 +1505,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]))], [[
|
||||
|
||||
|
||||
@@ -1531,7 +1531,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([[
|
||||
@@ -1556,10 +1556,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;
|
||||
@@ -1573,32 +1572,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 YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||
/* Initialize the default location before parsing starts. */
|
||||
yylloc.first_line = yylloc.last_line = ]b4_location_initial_line[;
|
||||
yylloc.first_column = yylloc.last_column = ]b4_location_initial_column[;
|
||||
#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. |
|
||||
@@ -1768,7 +1752,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;
|
||||
|
||||
@@ -1988,7 +1974,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
|
||||
@@ -2017,7 +2005,7 @@ yyabortlab:
|
||||
yyresult = 1;
|
||||
goto yyreturn;
|
||||
|
||||
#if ]b4_lac_if([[1]], [[!defined(yyoverflow) || YYERROR_VERBOSE]])[
|
||||
#if ]b4_lac_if([[1]], [[!defined yyoverflow || YYERROR_VERBOSE]])[
|
||||
/*-------------------------------------------------.
|
||||
| yyexhaustedlab -- memory exhaustion comes here. |
|
||||
`-------------------------------------------------*/
|
||||
@@ -2064,70 +2052,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-2011])
|
||||
[b4_output_begin([b4_spec_defines_file])[
|
||||
]b4_copyright([Bison interface for Yacc-like parsers in C],
|
||||
[1984, 1989-1990, 2000-2012])[
|
||||
|
||||
b4_percent_code_get([[requires]])[]dnl
|
||||
|
||||
b4_token_enums_defines(b4_tokens)
|
||||
|
||||
[#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
]m4_ifdef([b4_stype],
|
||||
[[typedef union ]b4_union_name[
|
||||
{
|
||||
]b4_user_stype[
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1]],
|
||||
[m4_if(b4_tag_seen_flag, 0,
|
||||
[[typedef int YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1]])])[
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
#endif
|
||||
|
||||
]b4_pure_if([], [[extern YYSTYPE ]b4_prefix[lval;]])
|
||||
|
||||
b4_locations_if(
|
||||
[#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
|
||||
typedef struct YYLTYPE
|
||||
{
|
||||
int first_line;
|
||||
int first_column;
|
||||
int last_line;
|
||||
int last_column;
|
||||
} YYLTYPE;
|
||||
# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYLTYPE_IS_DECLARED 1
|
||||
# define YYLTYPE_IS_TRIVIAL 1
|
||||
#endif
|
||||
|
||||
]b4_pure_if([], [[extern YYLTYPE ]b4_prefix[lloc;]])
|
||||
)dnl b4_locations_if
|
||||
b4_push_if([[
|
||||
#ifndef YYPUSH_DECLS
|
||||
# define YYPUSH_DECLS
|
||||
struct ]b4_prefix[pstate;
|
||||
typedef struct ]b4_prefix[pstate ]b4_prefix[pstate;
|
||||
enum { YYPUSH_MORE = 4 };
|
||||
]b4_pull_if([b4_c_function_decl([b4_prefix[parse]], [[int]], b4_parse_param)
|
||||
])b4_c_function_decl([b4_prefix[push_parse]], [[int]],
|
||||
[[b4_prefix[pstate *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], [,
|
||||
b4_parse_param]))
|
||||
b4_pull_if([b4_c_function_decl([b4_prefix[pull_parse]], [[int]],
|
||||
[[b4_prefix[pstate *yyps]], [[yyps]]]m4_ifset([b4_parse_param], [,
|
||||
b4_parse_param]))])
|
||||
b4_c_function_decl([b4_prefix[pstate_new]], [b4_prefix[pstate *]],
|
||||
[[[void]], []])
|
||||
b4_c_function_decl([b4_prefix[pstate_delete]], [[void]],
|
||||
[[b4_prefix[pstate *yyps]], [[yyps]]])[
|
||||
#endif
|
||||
]])
|
||||
b4_percent_code_get([[provides]])[]dnl
|
||||
])dnl b4_defines_if
|
||||
m4_divert_pop(0)
|
||||
]b4_shared_declarations[
|
||||
]b4_output_end()
|
||||
])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# DJGPP Maintainer's Makefile -*-Makefile-*-
|
||||
# Requires GNU sed
|
||||
|
||||
## Copyright (C) 2005-2011 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2005-2012 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
This is a port of GNU Bison @VERSION@ to MSDOS/DJGPP.
|
||||
|
||||
Copyright (C) 2005-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005-2012 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -84,7 +84,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
some more work to unpack, if LFN support is not available. If LFN is
|
||||
available then you can extract the source files from the archive with
|
||||
any unzip program and proceed to the paragraph 3.3, below. Any file
|
||||
name issue will be handled by the the DJGPP configuration files.
|
||||
name issue will be handled by the DJGPP configuration files.
|
||||
To unpack the source distribution on SFN systems, first, you MUST use
|
||||
the `djunpack' batch file to unzip the package. That is because some
|
||||
file names in the official distributions need to be changed to avoid
|
||||
@@ -179,7 +179,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
This will install the products into your DJGPP installation tree given
|
||||
by the default prefix "/dev/env/DJDIR". If you prefer to install them
|
||||
into some other directory you will have to set prefix to the appropiate
|
||||
into some other directory you will have to set prefix to the appropriate
|
||||
value:
|
||||
make install prefix=z:/some/other/place
|
||||
|
||||
|
||||
+2
-2
@@ -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-2011 Free Software Foundation, Inc.
|
||||
Rem Copyright (C) 2005-2012 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
|
||||
@@ -471,7 +471,7 @@ redir -e /dev/null rm %XSRC%/po/stamp-cat-id
|
||||
|
||||
Rem Update the arguments file for the configure script.
|
||||
Rem We prefer without-included-gettext because libintl.a from gettext package
|
||||
Rem is the only one that is garanteed to have been ported to DJGPP.
|
||||
Rem is the only one that is guaranteed to have been ported to DJGPP.
|
||||
echo --enable-nls --without-included-gettext >> args
|
||||
goto ConfigurePackage
|
||||
|
||||
|
||||
+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-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2005-2012 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-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2005-2012 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-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2005-2012 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-2011 Free Software Foundation, Inc.
|
||||
Rem Copyright (C) 2005-2012 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
|
||||
|
||||
+8
-8
@@ -1,6 +1,6 @@
|
||||
/* Subprocesses with pipes.
|
||||
|
||||
Copyright (C) 2005-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005-2012 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
|
||||
@@ -60,7 +60,7 @@ static char tmp_file_name[2][L_tmpnam];
|
||||
do { \
|
||||
close ((fd)); \
|
||||
if (unlink ((name))) \
|
||||
error (EXIT_FAILURE, 0, _("removing of `%s' failed"), (name)); \
|
||||
error (EXIT_FAILURE, 0, _("removing of '%s' failed"), (name)); \
|
||||
} while (0)
|
||||
|
||||
|
||||
@@ -231,17 +231,17 @@ end_of_output_subpipe(pid_t pid, int fd[2])
|
||||
{
|
||||
remove_tmp_file(STDIN_FILENO, tmp_file_name[0]);
|
||||
remove_tmp_file(STDOUT_FILENO, tmp_file_name[1]);
|
||||
error(EXIT_FAILURE, 0, _("subsidiary program `%s' interrupted"), program);
|
||||
error(EXIT_FAILURE, 0, _("subsidiary program '%s' interrupted"), program);
|
||||
}
|
||||
if (status)
|
||||
{
|
||||
remove_tmp_file(STDIN_FILENO, tmp_file_name[0]);
|
||||
remove_tmp_file(STDOUT_FILENO, tmp_file_name[1]);
|
||||
error(EXIT_FAILURE, 0, _(errno == ENOENT
|
||||
? "subsidiary program `%s' not found"
|
||||
? "subsidiary program '%s' not found"
|
||||
: status < 1
|
||||
? "subsidiary program `%s' failed"
|
||||
: "subsidiary program `%s' failed (status=%i, errno=%i)"), program, status, errno);
|
||||
? "subsidiary program '%s' failed"
|
||||
: "subsidiary program '%s' failed (status=%i, errno=%i)"), program, status, errno);
|
||||
}
|
||||
|
||||
|
||||
@@ -283,9 +283,9 @@ reap_subpipe(pid_t pid, char const *program)
|
||||
free(arguments);
|
||||
|
||||
if (unlink(tmp_file_name[0]))
|
||||
error(EXIT_FAILURE, 0, _("removing of `%s' failed"), tmp_file_name[0]);
|
||||
error(EXIT_FAILURE, 0, _("removing of '%s' failed"), tmp_file_name[0]);
|
||||
if (unlink(tmp_file_name[1]))
|
||||
error(EXIT_FAILURE, 0, _("removing of `%s' failed"), tmp_file_name[1]);
|
||||
error(EXIT_FAILURE, 0, _("removing of '%s' failed"), tmp_file_name[1]);
|
||||
|
||||
if (dup2(old_stdin, STDIN_FILENO) < 0)
|
||||
error(EXIT_FAILURE, 0, "restore of bison's stdin failed");
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Subprocesses with pipes.
|
||||
|
||||
Copyright (C) 2005-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005-2012 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-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2007-2012 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+3
-3
@@ -1,5 +1,3 @@
|
||||
|
||||
/*.info*
|
||||
/*~
|
||||
/.dirstamp
|
||||
/Makefile
|
||||
@@ -11,6 +9,7 @@
|
||||
/bison.dvi
|
||||
/bison.fn
|
||||
/bison.html
|
||||
/bison.info
|
||||
/bison.ky
|
||||
/bison.log
|
||||
/bison.pdf
|
||||
@@ -20,11 +19,12 @@
|
||||
/bison.tp
|
||||
/bison.vr
|
||||
/cross-options.texi
|
||||
/fdl.texi
|
||||
/gendocs_template
|
||||
/gpl-3.0.texi
|
||||
/refcard.dvi
|
||||
/refcard.log
|
||||
/refcard.ps
|
||||
/stamp-vti
|
||||
/version.texi
|
||||
/yacc.1
|
||||
|
||||
|
||||
+3
-3
@@ -391,7 +391,7 @@ EXCLUDE = @top_srcdir@/src/scan-gram.c \
|
||||
@top_builddir@/src/parse-*.[ch]
|
||||
|
||||
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
|
||||
# directories that are symbolic links (a Unix filesystem feature) are
|
||||
# directories that are symbolic links (a Unix file system feature) are
|
||||
# excluded from the input.
|
||||
|
||||
EXCLUDE_SYMLINKS = YES
|
||||
@@ -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
|
||||
@@ -982,7 +982,7 @@ CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = YES
|
||||
|
||||
# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
|
||||
# collaboration diagrams in a style similiar to the OMG's Unified Modeling
|
||||
# collaboration diagrams in a style similar to the OMG's Unified Modeling
|
||||
# Language.
|
||||
|
||||
UML_LOOK = NO
|
||||
|
||||
+46
-16
@@ -1,6 +1,6 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
|
||||
## Copyright (C) 2001-2003, 2005-2011 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2001-2003, 2005-2012 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -16,7 +16,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
AM_MAKEINFOFLAGS = --no-split
|
||||
info_TEXINFOS = bison.texinfo
|
||||
info_TEXINFOS = bison.texi
|
||||
bison_TEXINFOS = $(srcdir)/cross-options.texi gpl-3.0.texi fdl.texi
|
||||
|
||||
CLEANFILES = bison.fns
|
||||
@@ -26,13 +26,13 @@ clean-local:
|
||||
|
||||
CROSS_OPTIONS_PL = $(top_srcdir)/build-aux/cross-options.pl
|
||||
$(srcdir)/cross-options.texi: $(top_srcdir)/src/getargs.c $(CROSS_OPTIONS_PL)
|
||||
mv -f $@ $@~ || : >$@~
|
||||
-rm -f $@.tmp
|
||||
cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) bison
|
||||
$(top_builddir)/src/bison --help \
|
||||
| perl $(CROSS_OPTIONS_PL) $(top_srcdir)/src/scan-gram.l >$@.tmp
|
||||
diff -u $@~ $@.tmp || true
|
||||
mv $@.tmp $@
|
||||
$(AM_V_GEN)mv -f $@ $@~ || : >$@~
|
||||
$(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
|
||||
$(AM_V_at)diff -u $@~ $@.tmp || true
|
||||
$(AM_V_at)mv $@.tmp $@
|
||||
MAINTAINERCLEANFILES = $(srcdir)/cross-options.texi
|
||||
|
||||
## ---------- ##
|
||||
@@ -43,7 +43,7 @@ EXTRA_DIST = refcard.tex
|
||||
CLEANFILES += refcard.dvi refcard.log refcard.ps
|
||||
|
||||
refcard.dvi: refcard.tex
|
||||
tex refcard.tex
|
||||
$(AM_V_GEN)tex refcard.tex
|
||||
|
||||
refcard.ps: refcard.dvi
|
||||
|
||||
@@ -72,7 +72,7 @@ SUFFIXES = .x .1
|
||||
|
||||
PREPATH = $(top_builddir)/src
|
||||
.x.1:
|
||||
@program=`expr "/$*" : '.*/\(.*\)'` && \
|
||||
$(AM_V_GEN)program=`expr "/$*" : '.*/\(.*\)'` && \
|
||||
save_IFS=$IFS; \
|
||||
IFS=$(PATH_SEPARATOR); \
|
||||
for dir in $(PREPATH); do \
|
||||
@@ -80,23 +80,53 @@ PREPATH = $(top_builddir)/src
|
||||
echo cd $$dir '&&' $(MAKE) $(AM_MAKEFLAGS) $$program && \
|
||||
(cd $$dir && $(MAKE) $(AM_MAKEFLAGS) $$program) || exit; \
|
||||
done
|
||||
@echo "Updating man page $@"
|
||||
PATH="$(PREPATH)$(PATH_SEPARATOR)$$PATH"; \
|
||||
$(AM_V_at)PATH="$(PREPATH)$(PATH_SEPARATOR)$$PATH"; \
|
||||
export PATH; \
|
||||
$(HELP2MAN) \
|
||||
--include=$*.x \
|
||||
--include=$(srcdir)/common.x \
|
||||
--output=$@.t `echo '$*' | sed 's,.*/,,'`
|
||||
if $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \
|
||||
$(AM_V_at)if $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \
|
||||
$(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \
|
||||
touch $@; \
|
||||
else \
|
||||
mv $@.t $@; \
|
||||
fi
|
||||
rm -f $@*.t
|
||||
$(AM_V_at)rm -f $@*.t
|
||||
|
||||
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. ##
|
||||
## -------------- ##
|
||||
@@ -120,6 +150,6 @@ CLEANFILES += Doxyfile
|
||||
# Sed is used to generate Doxyfile from Doxyfile.in instead of
|
||||
# configure, because the former is way faster than the latter.
|
||||
Doxyfile: $(srcdir)/Doxyfile.in
|
||||
$(edit) $(srcdir)/Doxyfile.in >Doxyfile
|
||||
$(AM_V_GEN)$(edit) $(srcdir)/Doxyfile.in >Doxyfile
|
||||
|
||||
CLEANDIRS += html latex
|
||||
|
||||
+2349
-1164
File diff suppressed because it is too large
Load Diff
-506
@@ -1,506 +0,0 @@
|
||||
@c The GNU Free Documentation License.
|
||||
@center Version 1.3, 3 November 2008
|
||||
|
||||
@c This file is intended to be included within another document,
|
||||
@c hence no sectioning command or @node.
|
||||
|
||||
@display
|
||||
Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
|
||||
@uref{http://fsf.org/}
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
@end display
|
||||
|
||||
@enumerate 0
|
||||
@item
|
||||
PREAMBLE
|
||||
|
||||
The purpose of this License is to make a manual, textbook, or other
|
||||
functional and useful document @dfn{free} in the sense of freedom: to
|
||||
assure everyone the effective freedom to copy and redistribute it,
|
||||
with or without modifying it, either commercially or noncommercially.
|
||||
Secondarily, this License preserves for the author and publisher a way
|
||||
to get credit for their work, while not being considered responsible
|
||||
for modifications made by others.
|
||||
|
||||
This License is a kind of ``copyleft'', which means that derivative
|
||||
works of the document must themselves be free in the same sense. It
|
||||
complements the GNU General Public License, which is a copyleft
|
||||
license designed for free software.
|
||||
|
||||
We have designed this License in order to use it for manuals for free
|
||||
software, because free software needs free documentation: a free
|
||||
program should come with manuals providing the same freedoms that the
|
||||
software does. But this License is not limited to software manuals;
|
||||
it can be used for any textual work, regardless of subject matter or
|
||||
whether it is published as a printed book. We recommend this License
|
||||
principally for works whose purpose is instruction or reference.
|
||||
|
||||
@item
|
||||
APPLICABILITY AND DEFINITIONS
|
||||
|
||||
This License applies to any manual or other work, in any medium, that
|
||||
contains a notice placed by the copyright holder saying it can be
|
||||
distributed under the terms of this License. Such a notice grants a
|
||||
world-wide, royalty-free license, unlimited in duration, to use that
|
||||
work under the conditions stated herein. The ``Document'', below,
|
||||
refers to any such manual or work. Any member of the public is a
|
||||
licensee, and is addressed as ``you''. You accept the license if you
|
||||
copy, modify or distribute the work in a way requiring permission
|
||||
under copyright law.
|
||||
|
||||
A ``Modified Version'' of the Document means any work containing the
|
||||
Document or a portion of it, either copied verbatim, or with
|
||||
modifications and/or translated into another language.
|
||||
|
||||
A ``Secondary Section'' is a named appendix or a front-matter section
|
||||
of the Document that deals exclusively with the relationship of the
|
||||
publishers or authors of the Document to the Document's overall
|
||||
subject (or to related matters) and contains nothing that could fall
|
||||
directly within that overall subject. (Thus, if the Document is in
|
||||
part a textbook of mathematics, a Secondary Section may not explain
|
||||
any mathematics.) The relationship could be a matter of historical
|
||||
connection with the subject or with related matters, or of legal,
|
||||
commercial, philosophical, ethical or political position regarding
|
||||
them.
|
||||
|
||||
The ``Invariant Sections'' are certain Secondary Sections whose titles
|
||||
are designated, as being those of Invariant Sections, in the notice
|
||||
that says that the Document is released under this License. If a
|
||||
section does not fit the above definition of Secondary then it is not
|
||||
allowed to be designated as Invariant. The Document may contain zero
|
||||
Invariant Sections. If the Document does not identify any Invariant
|
||||
Sections then there are none.
|
||||
|
||||
The ``Cover Texts'' are certain short passages of text that are listed,
|
||||
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
|
||||
the Document is released under this License. A Front-Cover Text may
|
||||
be at most 5 words, and a Back-Cover Text may be at most 25 words.
|
||||
|
||||
A ``Transparent'' copy of the Document means a machine-readable copy,
|
||||
represented in a format whose specification is available to the
|
||||
general public, that is suitable for revising the document
|
||||
straightforwardly with generic text editors or (for images composed of
|
||||
pixels) generic paint programs or (for drawings) some widely available
|
||||
drawing editor, and that is suitable for input to text formatters or
|
||||
for automatic translation to a variety of formats suitable for input
|
||||
to text formatters. A copy made in an otherwise Transparent file
|
||||
format whose markup, or absence of markup, has been arranged to thwart
|
||||
or discourage subsequent modification by readers is not Transparent.
|
||||
An image format is not Transparent if used for any substantial amount
|
||||
of text. A copy that is not ``Transparent'' is called ``Opaque''.
|
||||
|
||||
Examples of suitable formats for Transparent copies include plain
|
||||
@sc{ascii} without markup, Texinfo input format, La@TeX{} input
|
||||
format, @acronym{SGML} or @acronym{XML} using a publicly available
|
||||
@acronym{DTD}, and standard-conforming simple @acronym{HTML},
|
||||
PostScript or @acronym{PDF} designed for human modification. Examples
|
||||
of transparent image formats include @acronym{PNG}, @acronym{XCF} and
|
||||
@acronym{JPG}. Opaque formats include proprietary formats that can be
|
||||
read and edited only by proprietary word processors, @acronym{SGML} or
|
||||
@acronym{XML} for which the @acronym{DTD} and/or processing tools are
|
||||
not generally available, and the machine-generated @acronym{HTML},
|
||||
PostScript or @acronym{PDF} produced by some word processors for
|
||||
output purposes only.
|
||||
|
||||
The ``Title Page'' means, for a printed book, the title page itself,
|
||||
plus such following pages as are needed to hold, legibly, the material
|
||||
this License requires to appear in the title page. For works in
|
||||
formats which do not have any title page as such, ``Title Page'' means
|
||||
the text near the most prominent appearance of the work's title,
|
||||
preceding the beginning of the body of the text.
|
||||
|
||||
The ``publisher'' means any person or entity that distributes copies
|
||||
of the Document to the public.
|
||||
|
||||
A section ``Entitled XYZ'' means a named subunit of the Document whose
|
||||
title either is precisely XYZ or contains XYZ in parentheses following
|
||||
text that translates XYZ in another language. (Here XYZ stands for a
|
||||
specific section name mentioned below, such as ``Acknowledgements'',
|
||||
``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
|
||||
of such a section when you modify the Document means that it remains a
|
||||
section ``Entitled XYZ'' according to this definition.
|
||||
|
||||
The Document may include Warranty Disclaimers next to the notice which
|
||||
states that this License applies to the Document. These Warranty
|
||||
Disclaimers are considered to be included by reference in this
|
||||
License, but only as regards disclaiming warranties: any other
|
||||
implication that these Warranty Disclaimers may have is void and has
|
||||
no effect on the meaning of this License.
|
||||
|
||||
@item
|
||||
VERBATIM COPYING
|
||||
|
||||
You may copy and distribute the Document in any medium, either
|
||||
commercially or noncommercially, provided that this License, the
|
||||
copyright notices, and the license notice saying this License applies
|
||||
to the Document are reproduced in all copies, and that you add no other
|
||||
conditions whatsoever to those of this License. You may not use
|
||||
technical measures to obstruct or control the reading or further
|
||||
copying of the copies you make or distribute. However, you may accept
|
||||
compensation in exchange for copies. If you distribute a large enough
|
||||
number of copies you must also follow the conditions in section 3.
|
||||
|
||||
You may also lend copies, under the same conditions stated above, and
|
||||
you may publicly display copies.
|
||||
|
||||
@item
|
||||
COPYING IN QUANTITY
|
||||
|
||||
If you publish printed copies (or copies in media that commonly have
|
||||
printed covers) of the Document, numbering more than 100, and the
|
||||
Document's license notice requires Cover Texts, you must enclose the
|
||||
copies in covers that carry, clearly and legibly, all these Cover
|
||||
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
|
||||
the back cover. Both covers must also clearly and legibly identify
|
||||
you as the publisher of these copies. The front cover must present
|
||||
the full title with all words of the title equally prominent and
|
||||
visible. You may add other material on the covers in addition.
|
||||
Copying with changes limited to the covers, as long as they preserve
|
||||
the title of the Document and satisfy these conditions, can be treated
|
||||
as verbatim copying in other respects.
|
||||
|
||||
If the required texts for either cover are too voluminous to fit
|
||||
legibly, you should put the first ones listed (as many as fit
|
||||
reasonably) on the actual cover, and continue the rest onto adjacent
|
||||
pages.
|
||||
|
||||
If you publish or distribute Opaque copies of the Document numbering
|
||||
more than 100, you must either include a machine-readable Transparent
|
||||
copy along with each Opaque copy, or state in or with each Opaque copy
|
||||
a computer-network location from which the general network-using
|
||||
public has access to download using public-standard network protocols
|
||||
a complete Transparent copy of the Document, free of added material.
|
||||
If you use the latter option, you must take reasonably prudent steps,
|
||||
when you begin distribution of Opaque copies in quantity, to ensure
|
||||
that this Transparent copy will remain thus accessible at the stated
|
||||
location until at least one year after the last time you distribute an
|
||||
Opaque copy (directly or through your agents or retailers) of that
|
||||
edition to the public.
|
||||
|
||||
It is requested, but not required, that you contact the authors of the
|
||||
Document well before redistributing any large number of copies, to give
|
||||
them a chance to provide you with an updated version of the Document.
|
||||
|
||||
@item
|
||||
MODIFICATIONS
|
||||
|
||||
You may copy and distribute a Modified Version of the Document under
|
||||
the conditions of sections 2 and 3 above, provided that you release
|
||||
the Modified Version under precisely this License, with the Modified
|
||||
Version filling the role of the Document, thus licensing distribution
|
||||
and modification of the Modified Version to whoever possesses a copy
|
||||
of it. In addition, you must do these things in the Modified Version:
|
||||
|
||||
@enumerate A
|
||||
@item
|
||||
Use in the Title Page (and on the covers, if any) a title distinct
|
||||
from that of the Document, and from those of previous versions
|
||||
(which should, if there were any, be listed in the History section
|
||||
of the Document). You may use the same title as a previous version
|
||||
if the original publisher of that version gives permission.
|
||||
|
||||
@item
|
||||
List on the Title Page, as authors, one or more persons or entities
|
||||
responsible for authorship of the modifications in the Modified
|
||||
Version, together with at least five of the principal authors of the
|
||||
Document (all of its principal authors, if it has fewer than five),
|
||||
unless they release you from this requirement.
|
||||
|
||||
@item
|
||||
State on the Title page the name of the publisher of the
|
||||
Modified Version, as the publisher.
|
||||
|
||||
@item
|
||||
Preserve all the copyright notices of the Document.
|
||||
|
||||
@item
|
||||
Add an appropriate copyright notice for your modifications
|
||||
adjacent to the other copyright notices.
|
||||
|
||||
@item
|
||||
Include, immediately after the copyright notices, a license notice
|
||||
giving the public permission to use the Modified Version under the
|
||||
terms of this License, in the form shown in the Addendum below.
|
||||
|
||||
@item
|
||||
Preserve in that license notice the full lists of Invariant Sections
|
||||
and required Cover Texts given in the Document's license notice.
|
||||
|
||||
@item
|
||||
Include an unaltered copy of this License.
|
||||
|
||||
@item
|
||||
Preserve the section Entitled ``History'', Preserve its Title, and add
|
||||
to it an item stating at least the title, year, new authors, and
|
||||
publisher of the Modified Version as given on the Title Page. If
|
||||
there is no section Entitled ``History'' in the Document, create one
|
||||
stating the title, year, authors, and publisher of the Document as
|
||||
given on its Title Page, then add an item describing the Modified
|
||||
Version as stated in the previous sentence.
|
||||
|
||||
@item
|
||||
Preserve the network location, if any, given in the Document for
|
||||
public access to a Transparent copy of the Document, and likewise
|
||||
the network locations given in the Document for previous versions
|
||||
it was based on. These may be placed in the ``History'' section.
|
||||
You may omit a network location for a work that was published at
|
||||
least four years before the Document itself, or if the original
|
||||
publisher of the version it refers to gives permission.
|
||||
|
||||
@item
|
||||
For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
|
||||
the Title of the section, and preserve in the section all the
|
||||
substance and tone of each of the contributor acknowledgements and/or
|
||||
dedications given therein.
|
||||
|
||||
@item
|
||||
Preserve all the Invariant Sections of the Document,
|
||||
unaltered in their text and in their titles. Section numbers
|
||||
or the equivalent are not considered part of the section titles.
|
||||
|
||||
@item
|
||||
Delete any section Entitled ``Endorsements''. Such a section
|
||||
may not be included in the Modified Version.
|
||||
|
||||
@item
|
||||
Do not retitle any existing section to be Entitled ``Endorsements'' or
|
||||
to conflict in title with any Invariant Section.
|
||||
|
||||
@item
|
||||
Preserve any Warranty Disclaimers.
|
||||
@end enumerate
|
||||
|
||||
If the Modified Version includes new front-matter sections or
|
||||
appendices that qualify as Secondary Sections and contain no material
|
||||
copied from the Document, you may at your option designate some or all
|
||||
of these sections as invariant. To do this, add their titles to the
|
||||
list of Invariant Sections in the Modified Version's license notice.
|
||||
These titles must be distinct from any other section titles.
|
||||
|
||||
You may add a section Entitled ``Endorsements'', provided it contains
|
||||
nothing but endorsements of your Modified Version by various
|
||||
parties---for example, statements of peer review or that the text has
|
||||
been approved by an organization as the authoritative definition of a
|
||||
standard.
|
||||
|
||||
You may add a passage of up to five words as a Front-Cover Text, and a
|
||||
passage of up to 25 words as a Back-Cover Text, to the end of the list
|
||||
of Cover Texts in the Modified Version. Only one passage of
|
||||
Front-Cover Text and one of Back-Cover Text may be added by (or
|
||||
through arrangements made by) any one entity. If the Document already
|
||||
includes a cover text for the same cover, previously added by you or
|
||||
by arrangement made by the same entity you are acting on behalf of,
|
||||
you may not add another; but you may replace the old one, on explicit
|
||||
permission from the previous publisher that added the old one.
|
||||
|
||||
The author(s) and publisher(s) of the Document do not by this License
|
||||
give permission to use their names for publicity for or to assert or
|
||||
imply endorsement of any Modified Version.
|
||||
|
||||
@item
|
||||
COMBINING DOCUMENTS
|
||||
|
||||
You may combine the Document with other documents released under this
|
||||
License, under the terms defined in section 4 above for modified
|
||||
versions, provided that you include in the combination all of the
|
||||
Invariant Sections of all of the original documents, unmodified, and
|
||||
list them all as Invariant Sections of your combined work in its
|
||||
license notice, and that you preserve all their Warranty Disclaimers.
|
||||
|
||||
The combined work need only contain one copy of this License, and
|
||||
multiple identical Invariant Sections may be replaced with a single
|
||||
copy. If there are multiple Invariant Sections with the same name but
|
||||
different contents, make the title of each such section unique by
|
||||
adding at the end of it, in parentheses, the name of the original
|
||||
author or publisher of that section if known, or else a unique number.
|
||||
Make the same adjustment to the section titles in the list of
|
||||
Invariant Sections in the license notice of the combined work.
|
||||
|
||||
In the combination, you must combine any sections Entitled ``History''
|
||||
in the various original documents, forming one section Entitled
|
||||
``History''; likewise combine any sections Entitled ``Acknowledgements'',
|
||||
and any sections Entitled ``Dedications''. You must delete all
|
||||
sections Entitled ``Endorsements.''
|
||||
|
||||
@item
|
||||
COLLECTIONS OF DOCUMENTS
|
||||
|
||||
You may make a collection consisting of the Document and other documents
|
||||
released under this License, and replace the individual copies of this
|
||||
License in the various documents with a single copy that is included in
|
||||
the collection, provided that you follow the rules of this License for
|
||||
verbatim copying of each of the documents in all other respects.
|
||||
|
||||
You may extract a single document from such a collection, and distribute
|
||||
it individually under this License, provided you insert a copy of this
|
||||
License into the extracted document, and follow this License in all
|
||||
other respects regarding verbatim copying of that document.
|
||||
|
||||
@item
|
||||
AGGREGATION WITH INDEPENDENT WORKS
|
||||
|
||||
A compilation of the Document or its derivatives with other separate
|
||||
and independent documents or works, in or on a volume of a storage or
|
||||
distribution medium, is called an ``aggregate'' if the copyright
|
||||
resulting from the compilation is not used to limit the legal rights
|
||||
of the compilation's users beyond what the individual works permit.
|
||||
When the Document is included in an aggregate, this License does not
|
||||
apply to the other works in the aggregate which are not themselves
|
||||
derivative works of the Document.
|
||||
|
||||
If the Cover Text requirement of section 3 is applicable to these
|
||||
copies of the Document, then if the Document is less than one half of
|
||||
the entire aggregate, the Document's Cover Texts may be placed on
|
||||
covers that bracket the Document within the aggregate, or the
|
||||
electronic equivalent of covers if the Document is in electronic form.
|
||||
Otherwise they must appear on printed covers that bracket the whole
|
||||
aggregate.
|
||||
|
||||
@item
|
||||
TRANSLATION
|
||||
|
||||
Translation is considered a kind of modification, so you may
|
||||
distribute translations of the Document under the terms of section 4.
|
||||
Replacing Invariant Sections with translations requires special
|
||||
permission from their copyright holders, but you may include
|
||||
translations of some or all Invariant Sections in addition to the
|
||||
original versions of these Invariant Sections. You may include a
|
||||
translation of this License, and all the license notices in the
|
||||
Document, and any Warranty Disclaimers, provided that you also include
|
||||
the original English version of this License and the original versions
|
||||
of those notices and disclaimers. In case of a disagreement between
|
||||
the translation and the original version of this License or a notice
|
||||
or disclaimer, the original version will prevail.
|
||||
|
||||
If a section in the Document is Entitled ``Acknowledgements'',
|
||||
``Dedications'', or ``History'', the requirement (section 4) to Preserve
|
||||
its Title (section 1) will typically require changing the actual
|
||||
title.
|
||||
|
||||
@item
|
||||
TERMINATION
|
||||
|
||||
You may not copy, modify, sublicense, or distribute the Document
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense, or distribute it is void, and
|
||||
will automatically terminate your rights under this License.
|
||||
|
||||
However, if you cease all violation of this License, then your license
|
||||
from a particular copyright holder is reinstated (a) provisionally,
|
||||
unless and until the copyright holder explicitly and finally
|
||||
terminates your license, and (b) permanently, if the copyright holder
|
||||
fails to notify you of the violation by some reasonable means prior to
|
||||
60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, receipt of a copy of some or all of the same material does
|
||||
not give you any rights to use it.
|
||||
|
||||
@item
|
||||
FUTURE REVISIONS OF THIS LICENSE
|
||||
|
||||
The Free Software Foundation may publish new, revised versions
|
||||
of the GNU Free Documentation License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns. See
|
||||
@uref{http://www.gnu.org/copyleft/}.
|
||||
|
||||
Each version of the License is given a distinguishing version number.
|
||||
If the Document specifies that a particular numbered version of this
|
||||
License ``or any later version'' applies to it, you have the option of
|
||||
following the terms and conditions either of that specified version or
|
||||
of any later version that has been published (not as a draft) by the
|
||||
Free Software Foundation. If the Document does not specify a version
|
||||
number of this License, you may choose any version ever published (not
|
||||
as a draft) by the Free Software Foundation. If the Document
|
||||
specifies that a proxy can decide which future versions of this
|
||||
License can be used, that proxy's public statement of acceptance of a
|
||||
version permanently authorizes you to choose that version for the
|
||||
Document.
|
||||
|
||||
@item
|
||||
RELICENSING
|
||||
|
||||
``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
|
||||
World Wide Web server that publishes copyrightable works and also
|
||||
provides prominent facilities for anybody to edit those works. A
|
||||
public wiki that anybody can edit is an example of such a server. A
|
||||
``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
|
||||
site means any set of copyrightable works thus published on the MMC
|
||||
site.
|
||||
|
||||
``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
|
||||
license published by Creative Commons Corporation, a not-for-profit
|
||||
corporation with a principal place of business in San Francisco,
|
||||
California, as well as future copyleft versions of that license
|
||||
published by that same organization.
|
||||
|
||||
``Incorporate'' means to publish or republish a Document, in whole or
|
||||
in part, as part of another Document.
|
||||
|
||||
An MMC is ``eligible for relicensing'' if it is licensed under this
|
||||
License, and if all works that were first published under this License
|
||||
somewhere other than this MMC, and subsequently incorporated in whole
|
||||
or in part into the MMC, (1) had no cover texts or invariant sections,
|
||||
and (2) were thus incorporated prior to November 1, 2008.
|
||||
|
||||
The operator of an MMC Site may republish an MMC contained in the site
|
||||
under CC-BY-SA on the same site at any time before August 1, 2009,
|
||||
provided the MMC is eligible for relicensing.
|
||||
|
||||
@end enumerate
|
||||
|
||||
@page
|
||||
@heading ADDENDUM: How to use this License for your documents
|
||||
|
||||
To use this License in a document you have written, include a copy of
|
||||
the License in the document and put the following copyright and
|
||||
license notices just after the title page:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
Copyright (C) @var{year} @var{your name}.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
||||
Texts. A copy of the license is included in the section entitled ``GNU
|
||||
Free Documentation License''.
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
|
||||
replace the ``with@dots{}Texts.'' line with this:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
with the Invariant Sections being @var{list their titles}, with
|
||||
the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
|
||||
being @var{list}.
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
If you have Invariant Sections without Cover Texts, or some other
|
||||
combination of the three, merge those two alternatives to suit the
|
||||
situation.
|
||||
|
||||
If your document contains nontrivial examples of program code, we
|
||||
recommend releasing these examples in parallel under your choice of
|
||||
free software license, such as the GNU General Public License,
|
||||
to permit their use in free software.
|
||||
|
||||
@c Local Variables:
|
||||
@c ispell-local-pdict: "ispell-dict"
|
||||
@c End:
|
||||
|
||||
@@ -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,717 +0,0 @@
|
||||
@c The GNU General Public License.
|
||||
@center Version 3, 29 June 2007
|
||||
|
||||
@c This file is intended to be included within another document,
|
||||
@c hence no sectioning command or @node.
|
||||
|
||||
@display
|
||||
Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{http://fsf.org/}
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
@end display
|
||||
|
||||
@heading Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom
|
||||
to share and change all versions of a program---to make sure it remains
|
||||
free software for all its users. We, the Free Software Foundation,
|
||||
use the GNU General Public License for most of our software; it
|
||||
applies also to any other work released this way by its authors. You
|
||||
can apply it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you
|
||||
have certain responsibilities if you distribute copies of the
|
||||
software, or if you modify it: responsibilities to respect the freedom
|
||||
of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too,
|
||||
receive or can get the source code. And you must show them these
|
||||
terms so they know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the
|
||||
manufacturer can do so. This is fundamentally incompatible with the
|
||||
aim of protecting users' freedom to change the software. The
|
||||
systematic pattern of such abuse occurs in the area of products for
|
||||
individuals to use, which is precisely where it is most unacceptable.
|
||||
Therefore, we have designed this version of the GPL to prohibit the
|
||||
practice for those products. If such problems arise substantially in
|
||||
other domains, we stand ready to extend this provision to those
|
||||
domains in future versions of the GPL, as needed to protect the
|
||||
freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish
|
||||
to avoid the special danger that patents applied to a free program
|
||||
could make it effectively proprietary. To prevent this, the GPL
|
||||
assures that patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
@heading TERMS AND CONDITIONS
|
||||
|
||||
@enumerate 0
|
||||
@item Definitions.
|
||||
|
||||
``This License'' refers to version 3 of the GNU General Public License.
|
||||
|
||||
``Copyright'' also means copyright-like laws that apply to other kinds
|
||||
of works, such as semiconductor masks.
|
||||
|
||||
``The Program'' refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as ``you''. ``Licensees'' and
|
||||
``recipients'' may be individuals or organizations.
|
||||
|
||||
To ``modify'' a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of
|
||||
an exact copy. The resulting work is called a ``modified version'' of
|
||||
the earlier work or a work ``based on'' the earlier work.
|
||||
|
||||
A ``covered work'' means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To ``propagate'' a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To ``convey'' a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user
|
||||
through a computer network, with no transfer of a copy, is not
|
||||
conveying.
|
||||
|
||||
An interactive user interface displays ``Appropriate Legal Notices'' to
|
||||
the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
@item Source Code.
|
||||
|
||||
The ``source code'' for a work means the preferred form of the work for
|
||||
making modifications to it. ``Object code'' means any non-source form
|
||||
of a work.
|
||||
|
||||
A ``Standard Interface'' means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The ``System Libraries'' of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
``Major Component'', in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The ``Corresponding Source'' for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users can
|
||||
regenerate automatically from other parts of the Corresponding Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that same
|
||||
work.
|
||||
|
||||
@item Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not convey,
|
||||
without conditions so long as your license otherwise remains in force.
|
||||
You may convey covered works to others for the sole purpose of having
|
||||
them make modifications exclusively for you, or provide you with
|
||||
facilities for running those works, provided that you comply with the
|
||||
terms of this License in conveying all material for which you do not
|
||||
control copyright. Those thus making or running the covered works for
|
||||
you must do so exclusively on your behalf, under your direction and
|
||||
control, on terms that prohibit them from making any copies of your
|
||||
copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under the
|
||||
conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
@item Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such
|
||||
circumvention is effected by exercising rights under this License with
|
||||
respect to the covered work, and you disclaim any intention to limit
|
||||
operation or modification of the work as a means of enforcing, against
|
||||
the work's users, your or third parties' legal rights to forbid
|
||||
circumvention of technological measures.
|
||||
|
||||
@item Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
@item Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these
|
||||
conditions:
|
||||
|
||||
@enumerate a
|
||||
@item
|
||||
The work must carry prominent notices stating that you modified it,
|
||||
and giving a relevant date.
|
||||
|
||||
@item
|
||||
The work must carry prominent notices stating that it is released
|
||||
under this License and any conditions added under section 7. This
|
||||
requirement modifies the requirement in section 4 to ``keep intact all
|
||||
notices''.
|
||||
|
||||
@item
|
||||
You must license the entire work, as a whole, under this License to
|
||||
anyone who comes into possession of a copy. This License will
|
||||
therefore apply, along with any applicable section 7 additional terms,
|
||||
to the whole of the work, and all its parts, regardless of how they
|
||||
are packaged. This License gives no permission to license the work in
|
||||
any other way, but it does not invalidate such permission if you have
|
||||
separately received it.
|
||||
|
||||
@item
|
||||
If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your work
|
||||
need not make them do so.
|
||||
@end enumerate
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
``aggregate'' if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
@item Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms of
|
||||
sections 4 and 5, provided that you also convey the machine-readable
|
||||
Corresponding Source under the terms of this License, in one of these
|
||||
ways:
|
||||
|
||||
@enumerate a
|
||||
@item
|
||||
Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium customarily
|
||||
used for software interchange.
|
||||
|
||||
@item
|
||||
Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a written
|
||||
offer, valid for at least three years and valid for as long as you
|
||||
offer spare parts or customer support for that product model, to give
|
||||
anyone who possesses the object code either (1) a copy of the
|
||||
Corresponding Source for all the software in the product that is
|
||||
covered by this License, on a durable physical medium customarily used
|
||||
for software interchange, for a price no more than your reasonable
|
||||
cost of physically performing this conveying of source, or (2) access
|
||||
to copy the Corresponding Source from a network server at no charge.
|
||||
|
||||
@item
|
||||
Convey individual copies of the object code with a copy of the written
|
||||
offer to provide the Corresponding Source. This alternative is
|
||||
allowed only occasionally and noncommercially, and only if you
|
||||
received the object code with such an offer, in accord with subsection
|
||||
6b.
|
||||
|
||||
@item
|
||||
Convey the object code by offering access from a designated place
|
||||
(gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to copy
|
||||
the object code is a network server, the Corresponding Source may be
|
||||
on a different server (operated by you or a third party) that supports
|
||||
equivalent copying facilities, provided you maintain clear directions
|
||||
next to the object code saying where to find the Corresponding Source.
|
||||
Regardless of what server hosts the Corresponding Source, you remain
|
||||
obligated to ensure that it is available for as long as needed to
|
||||
satisfy these requirements.
|
||||
|
||||
@item
|
||||
Convey the object code using peer-to-peer transmission, provided you
|
||||
inform other peers where the object code and Corresponding Source of
|
||||
the work are being offered to the general public at no charge under
|
||||
subsection 6d.
|
||||
|
||||
@end enumerate
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A ``User Product'' is either (1) a ``consumer product'', which means any
|
||||
tangible personal property which is normally used for personal,
|
||||
family, or household purposes, or (2) anything designed or sold for
|
||||
incorporation into a dwelling. In determining whether a product is a
|
||||
consumer product, doubtful cases shall be resolved in favor of
|
||||
coverage. For a particular product received by a particular user,
|
||||
``normally used'' refers to a typical or common use of that class of
|
||||
product, regardless of the status of the particular user or of the way
|
||||
in which the particular user actually uses, or expects or is expected
|
||||
to use, the product. A product is a consumer product regardless of
|
||||
whether the product has substantial commercial, industrial or
|
||||
non-consumer uses, unless such uses represent the only significant
|
||||
mode of use of the product.
|
||||
|
||||
``Installation Information'' for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to
|
||||
install and execute modified versions of a covered work in that User
|
||||
Product from a modified version of its Corresponding Source. The
|
||||
information must suffice to ensure that the continued functioning of
|
||||
the modified object code is in no case prevented or interfered with
|
||||
solely because modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or
|
||||
updates for a work that has been modified or installed by the
|
||||
recipient, or for the User Product in which it has been modified or
|
||||
installed. Access to a network may be denied when the modification
|
||||
itself materially and adversely affects the operation of the network
|
||||
or violates the rules and protocols for communication across the
|
||||
network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
@item Additional Terms.
|
||||
|
||||
``Additional permissions'' are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders
|
||||
of that material) supplement the terms of this License with terms:
|
||||
|
||||
@enumerate a
|
||||
@item
|
||||
Disclaiming warranty or limiting liability differently from the terms
|
||||
of sections 15 and 16 of this License; or
|
||||
|
||||
@item
|
||||
Requiring preservation of specified reasonable legal notices or author
|
||||
attributions in that material or in the Appropriate Legal Notices
|
||||
displayed by works containing it; or
|
||||
|
||||
@item
|
||||
Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
@item
|
||||
Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
@item
|
||||
Declining to grant rights under trademark law for use of some trade
|
||||
names, trademarks, or service marks; or
|
||||
|
||||
@item
|
||||
Requiring indemnification of licensors and authors of that material by
|
||||
anyone who conveys the material (or modified versions of it) with
|
||||
contractual assumptions of liability to the recipient, for any
|
||||
liability that these contractual assumptions directly impose on those
|
||||
licensors and authors.
|
||||
@end enumerate
|
||||
|
||||
All other non-permissive additional terms are considered ``further
|
||||
restrictions'' within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions; the
|
||||
above requirements apply either way.
|
||||
|
||||
@item Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your license
|
||||
from a particular copyright holder is reinstated (a) provisionally,
|
||||
unless and until the copyright holder explicitly and finally
|
||||
terminates your license, and (b) permanently, if the copyright holder
|
||||
fails to notify you of the violation by some reasonable means prior to
|
||||
60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
@item Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or run
|
||||
a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
@item Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An ``entity transaction'' is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
@item Patents.
|
||||
|
||||
A ``contributor'' is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's ``contributor version''.
|
||||
|
||||
A contributor's ``essential patent claims'' are all patent claims owned
|
||||
or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, ``control'' includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a ``patent license'' is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To ``grant'' such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. ``Knowingly relying'' means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is ``discriminatory'' if it does not include within the
|
||||
scope of its coverage, prohibits the exercise of, or is conditioned on
|
||||
the non-exercise of one or more of the rights that are specifically
|
||||
granted under this License. You may not convey a covered work if you
|
||||
are a party to an arrangement with a third party that is in the
|
||||
business of distributing software, under which you make payment to the
|
||||
third party based on the extent of your activity of conveying the
|
||||
work, and under which the third party grants, to any of the parties
|
||||
who would receive the covered work from you, a discriminatory patent
|
||||
license (a) in connection with copies of the covered work conveyed by
|
||||
you (or copies made from those copies), or (b) primarily for and in
|
||||
connection with specific products or compilations that contain the
|
||||
covered work, unless you entered into that arrangement, or that patent
|
||||
license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
@item No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey
|
||||
a covered work so as to satisfy simultaneously your obligations under
|
||||
this License and any other pertinent obligations, then as a
|
||||
consequence you may not convey it at all. For example, if you agree
|
||||
to terms that obligate you to collect a royalty for further conveying
|
||||
from those to whom you convey the Program, the only way you could
|
||||
satisfy both those terms and this License would be to refrain entirely
|
||||
from conveying the Program.
|
||||
|
||||
@item Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
@item Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies that a certain numbered version of the GNU General Public
|
||||
License ``or any later version'' applies to it, you have the option of
|
||||
following the terms and conditions either of that numbered version or
|
||||
of any later version published by the Free Software Foundation. If
|
||||
the Program does not specify a version number of the GNU General
|
||||
Public License, you may choose any version ever published by the Free
|
||||
Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future versions
|
||||
of the GNU General Public License can be used, that proxy's public
|
||||
statement of acceptance of a version permanently authorizes you to
|
||||
choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
@item Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT
|
||||
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
|
||||
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
|
||||
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
|
||||
CORRECTION.
|
||||
|
||||
@item Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
|
||||
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
|
||||
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
|
||||
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
|
||||
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
|
||||
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
|
||||
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
@item Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
@end enumerate
|
||||
|
||||
@heading END OF TERMS AND CONDITIONS
|
||||
|
||||
@heading How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these
|
||||
terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the ``copyright'' line and a pointer to where the full notice is found.
|
||||
|
||||
@smallexample
|
||||
@var{one line to give the program's name and a brief idea of what it does.}
|
||||
Copyright (C) @var{year} @var{name of author}
|
||||
|
||||
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 @url{http://www.gnu.org/licenses/}.
|
||||
@end smallexample
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
@smallexample
|
||||
@var{program} Copyright (C) @var{year} @var{name of author}
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type @samp{show w}.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type @samp{show c} for details.
|
||||
@end smallexample
|
||||
|
||||
The hypothetical commands @samp{show w} and @samp{show c} should show
|
||||
the appropriate parts of the General Public License. Of course, your
|
||||
program's commands might be different; for a GUI interface, you would
|
||||
use an ``about box''.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a ``copyright disclaimer'' for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
@url{http://www.gnu.org/licenses/}.
|
||||
|
||||
The GNU General Public License does not permit incorporating your
|
||||
program into proprietary programs. If your program is a subroutine
|
||||
library, you may consider it more useful to permit linking proprietary
|
||||
applications with the library. If this is what you want to do, use
|
||||
the GNU Lesser General Public License instead of this License. But
|
||||
first, please read @url{http://www.gnu.org/philosophy/why-not-lgpl.html}.
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
\def\finalout{\overfullrule=0pt}
|
||||
%\finalout
|
||||
|
||||
% Copyright (c) 1998, 2001, 2009-2011 Free Software Foundation, Inc.
|
||||
% Copyright (c) 1998, 2001, 2009-2012 Free Software Foundation, Inc.
|
||||
%
|
||||
% This file is part of Bison.
|
||||
%
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
## Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2006, 2009-2012 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,6 +1,3 @@
|
||||
A directory of tools provided to people using CVS Bison. None of
|
||||
these is distributed.
|
||||
|
||||
* bench.pl
|
||||
A primitive Perl script to run benches. Currently its only bench is
|
||||
the usual calculator: it has a lightweight processing part (but not
|
||||
@@ -19,7 +16,7 @@ straightforward use of _build/src/bison would.)
|
||||
|
||||
--
|
||||
|
||||
Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
+3
-4
@@ -1,6 +1,6 @@
|
||||
#! /usr/bin/perl -w
|
||||
|
||||
# Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006, 2008-2012 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of Bison, the GNU Compiler Compiler.
|
||||
#
|
||||
@@ -134,8 +134,8 @@ sub calc_grammar ($$$)
|
||||
or die;
|
||||
print $out <<EOF;
|
||||
%{
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
@@ -291,9 +291,8 @@ yylex (void)
|
||||
static int
|
||||
power (int base, int exponent)
|
||||
{
|
||||
assert (0 <= exponent);
|
||||
int res = 1;
|
||||
if (exponent < 0)
|
||||
exit (3);
|
||||
for (/* Niente */; exponent; --exponent)
|
||||
res *= base;
|
||||
return res;
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
for dir in . po src doc; do
|
||||
(
|
||||
cd $dir && rcs2log -r -l \
|
||||
-u 'akim Akim Demaille [email protected]' \
|
||||
-u 'djm David J. MacKenzie [email protected]' \
|
||||
-u 'eggert Paul Eggert [email protected]' \
|
||||
-u 'friedman Noah Friedman [email protected]' \
|
||||
-u 'hag Daniel Hagerty [email protected]' \
|
||||
-u 'jthilo Jesse Thilo [email protected]' \
|
||||
-u 'meyering Jim Meyering [email protected]' \
|
||||
-u 'rms Richard Stallman [email protected]' \
|
||||
| sed -e 's,/opt/cvs/bison/bison/,,g' > ChangeLog
|
||||
)
|
||||
done
|
||||
@@ -1,5 +1,5 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
## Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2005, 2009-2012 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
-16
@@ -1,5 +1,5 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
## Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2005-2006, 2009-2012 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,23 +22,23 @@ BISON = $(top_builddir)/tests/bison
|
||||
BISON_IN = $(top_srcdir)/tests/bison.in
|
||||
|
||||
$(BISON): $(BISON_IN)
|
||||
cd $(top_builddir)/tests && $(MAKE) $(AM_MAKEFLAGS) bison
|
||||
$(AM_V_GEN)cd $(top_builddir)/tests && $(MAKE) $(AM_MAKEFLAGS) bison
|
||||
|
||||
## ------------ ##
|
||||
## Extracting. ##
|
||||
## ------------ ##
|
||||
|
||||
doc = $(top_srcdir)/doc/bison.texinfo
|
||||
doc = $(top_srcdir)/doc/bison.texi
|
||||
extexi = $(top_srcdir)/examples/extexi
|
||||
# Extract in src.
|
||||
$(srcdir)/calc.stamp: $(doc) $(extexi)
|
||||
rm -f $@ $@.tmp
|
||||
touch $@.tmp
|
||||
cd $(srcdir) && \
|
||||
$(AM_V_GEN)rm -f $@ $@.tmp
|
||||
$(AM_V_at)touch $@.tmp
|
||||
$(AM_V_at)cd $(srcdir) && \
|
||||
$(AWK) -f ../extexi -v VERSION="$(VERSION)" \
|
||||
../../doc/bison.texinfo -- calc++-parser.yy \
|
||||
../../doc/bison.texi -- calc++-parser.yy \
|
||||
calc++-scanner.ll calc++.cc calc++-driver.hh calc++-driver.cc
|
||||
mv $@.tmp $@
|
||||
$(AM_V_at)mv $@.tmp $@
|
||||
|
||||
$(calc_extracted): $(srcdir)/calc.stamp
|
||||
|
||||
@@ -61,14 +61,14 @@ EXTRA_DIST = \
|
||||
# Don't depend on $(BISON) otherwise we would rebuild these files
|
||||
# in srcdir, including during distcheck, which is forbidden.
|
||||
$(srcdir)/calc++-parser.stamp: $(srcdir)/calc++-parser.yy $(BISON_IN)
|
||||
@rm -f calc++-parser.tmp
|
||||
@touch calc++-parser.tmp
|
||||
$(BISON) -d -ra -S lalr1.cc -o $(srcdir)/calc++-parser.cc \
|
||||
$(AM_V_GEN)rm -f calc++-parser.tmp
|
||||
$(AM_V_at)touch calc++-parser.tmp
|
||||
$(AM_V_at)$(BISON) -d -ra -S lalr1.cc -o $(srcdir)/calc++-parser.cc \
|
||||
$(srcdir)/calc++-parser.yy
|
||||
@mv -f calc++-parser.tmp $@
|
||||
$(AM_V_at)mv -f calc++-parser.tmp $@
|
||||
|
||||
$(calc_sources_generated): $(srcdir)/calc++-parser.stamp
|
||||
@if test -f $@; then :; else \
|
||||
$(AM_V_GEN)if test -f $@; then :; else \
|
||||
rm -f $(srcdir)/calc++-parser.stamp && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(srcdir)/calc++-parser.stamp; \
|
||||
fi
|
||||
@@ -81,11 +81,11 @@ $(calc_sources_generated): $(srcdir)/calc++-parser.stamp
|
||||
check_PROGRAMS = calc++
|
||||
|
||||
calc_sources_extracted = $(srcdir)/calc++-scanner.ll $(srcdir)/calc++.cc \
|
||||
$(srcdir)/calc++-driver.hh $(srcdir)/calc++-driver.cc
|
||||
$(srcdir)/calc++-driver.hh $(srcdir)/calc++-driver.cc
|
||||
calc_extracted = $(calc_sources_extracted) $(srcdir)/calc++-parser.yy
|
||||
calc_sources_generated = \
|
||||
$(srcdir)/stack.hh $(srcdir)/position.hh $(srcdir)/location.hh \
|
||||
$(srcdir)/calc++-parser.hh $(srcdir)/calc++-parser.cc
|
||||
$(srcdir)/stack.hh $(srcdir)/position.hh $(srcdir)/location.hh \
|
||||
$(srcdir)/calc++-parser.hh $(srcdir)/calc++-parser.cc
|
||||
|
||||
calc___SOURCES = $(calc_sources_extracted) $(calc_sources_generated)
|
||||
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Copyright (C) 2005-2012 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/>.
|
||||
|
||||
test -z "$VERBOSE" && {
|
||||
exec > /dev/null 2>&1
|
||||
set -x
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
# This file is part of GNU Bison
|
||||
|
||||
# Copyright (C) 1992, 2000-2001, 2005-2006, 2009-2011 Free Software
|
||||
# Copyright (C) 1992, 2000-2001, 2005-2006, 2009-2012 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: eff4c0360a...4a8c422f31
+41
-4
@@ -1,4 +1,3 @@
|
||||
|
||||
/*.a
|
||||
/*.bak
|
||||
/*.o
|
||||
@@ -23,6 +22,7 @@
|
||||
/c-ctype.h
|
||||
/c-strcase.h
|
||||
/c-strcasecmp.c
|
||||
/c-strcaseeq.h
|
||||
/c-strncasecmp.c
|
||||
/calloc.c
|
||||
/charset.alias
|
||||
@@ -30,10 +30,14 @@
|
||||
/cloexec.h
|
||||
/close-hook.c
|
||||
/close-hook.h
|
||||
/close-stream.c
|
||||
/close-stream.h
|
||||
/close.c
|
||||
/closeout.c
|
||||
/closeout.h
|
||||
/config.charset
|
||||
/config.h
|
||||
/config.hin
|
||||
/config.in.h
|
||||
/configmake.h
|
||||
/dirname-lgpl.c
|
||||
/dirname.c
|
||||
@@ -54,19 +58,25 @@
|
||||
/fcntl.c
|
||||
/fcntl.h
|
||||
/fcntl.in.h
|
||||
/fd-hook.c
|
||||
/fd-hook.h
|
||||
/fd-safer-flag.c
|
||||
/fd-safer.c
|
||||
/float+.h
|
||||
/float.c
|
||||
/float.h
|
||||
/float.in.h
|
||||
/fopen-safer.c
|
||||
/fopen.c
|
||||
/fpending.c
|
||||
/fpending.h
|
||||
/fprintf.c
|
||||
/fpucw.h
|
||||
/frexp.c
|
||||
/frexpl.c
|
||||
/fseterr.c
|
||||
/fseterr.h
|
||||
/fstat.c
|
||||
/getdtablesize.c
|
||||
/getopt.c
|
||||
/getopt.h
|
||||
@@ -89,6 +99,7 @@
|
||||
/isnanl-nolibm.h
|
||||
/isnanl.c
|
||||
/iswblank.c
|
||||
/itold.c
|
||||
/ldexpl.c
|
||||
/localcharset.c
|
||||
/localcharset.h
|
||||
@@ -106,14 +117,18 @@
|
||||
/mbuiter.h
|
||||
/memchr.c
|
||||
/memchr.valgrind
|
||||
/msvc-inval.c
|
||||
/msvc-inval.h
|
||||
/msvc-nothrow.c
|
||||
/msvc-nothrow.h
|
||||
/nonblocking.c
|
||||
/nonblocking.h
|
||||
/obstack.c
|
||||
/obstack.h
|
||||
/open.c
|
||||
/pathmax.h
|
||||
/perror.c
|
||||
/pipe-safer.c
|
||||
/pipe.c
|
||||
/pipe2-safer.c
|
||||
/pipe2.c
|
||||
/printf-args.c
|
||||
@@ -125,10 +140,13 @@
|
||||
/printf-parse.c
|
||||
/printf-parse.h
|
||||
/printf.c
|
||||
/progname.c
|
||||
/progname.h
|
||||
/quote.c
|
||||
/quote.h
|
||||
/quotearg.c
|
||||
/quotearg.h
|
||||
/raise.c
|
||||
/rawmemchr.c
|
||||
/rawmemchr.valgrind
|
||||
/realloc.c
|
||||
@@ -186,7 +204,10 @@
|
||||
/strchrnul.valgrind
|
||||
/strdup.c
|
||||
/streq.h
|
||||
/strerror-override.c
|
||||
/strerror-override.h
|
||||
/strerror.c
|
||||
/strerror_r.c
|
||||
/string.h
|
||||
/string.in.h
|
||||
/stripslash.c
|
||||
@@ -206,6 +227,7 @@
|
||||
/sys_stat.in.h
|
||||
/sys_wait.h
|
||||
/sys_wait.in.h
|
||||
/sysexits.in.h
|
||||
/time.h
|
||||
/time.in.h
|
||||
/unistd--.h
|
||||
@@ -237,9 +259,24 @@
|
||||
/wctype.in.h
|
||||
/wcwidth.c
|
||||
/xalloc-die.c
|
||||
/xalloc-oversized.h
|
||||
/xalloc.h
|
||||
/xmalloc.c
|
||||
/xsize.h
|
||||
/xstrndup.c
|
||||
/xstrndup.h
|
||||
|
||||
/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
|
||||
/stdio.c
|
||||
/unistd.c
|
||||
/wctype-h.c
|
||||
/getdelim.c
|
||||
/getline.c
|
||||
|
||||
+11
-1
@@ -1,6 +1,6 @@
|
||||
# Make bison/lib.
|
||||
|
||||
# Copyright (C) 2001-2004, 2006, 2008-2011 Free Software Foundation,
|
||||
# Copyright (C) 2001-2004, 2006, 2008-2012 Free Software Foundation,
|
||||
# Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
@@ -16,6 +16,16 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
AM_CFLAGS =
|
||||
AM_CPPFLAGS =
|
||||
BUILT_SOURCES =
|
||||
CLEANFILES =
|
||||
EXTRA_DIST =
|
||||
MOSTLYCLEANDIRS =
|
||||
MOSTLYCLEANFILES =
|
||||
SUFFIXES =
|
||||
noinst_LIBRARIES =
|
||||
|
||||
include gnulib.mk
|
||||
|
||||
AM_CFLAGS += $(WARN_CFLAGS)
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Array bitsets.
|
||||
|
||||
Copyright (C) 2002-2003, 2006, 2009-2011 Free Software Foundation,
|
||||
Copyright (C) 2002-2003, 2006, 2009-2012 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-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2009-2012 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-2011 Free Software Foundation,
|
||||
Copyright (C) 2002-2004, 2006, 2009-2012 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-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2006, 2009-2012 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-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2004, 2009-2012 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
|
||||
+13
-15
@@ -1,6 +1,6 @@
|
||||
/* Bitset statistics.
|
||||
|
||||
Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
@@ -253,15 +253,15 @@ bitset_stats_read (const char *file_name)
|
||||
if (file)
|
||||
{
|
||||
if (fread (&bitset_stats_info_data, sizeof (bitset_stats_info_data),
|
||||
1, file) != 1)
|
||||
{
|
||||
if (ferror (file))
|
||||
perror (_("Could not read stats file."));
|
||||
else
|
||||
fprintf (stderr, _("Bad stats file size.\n"));
|
||||
}
|
||||
1, file) != 1)
|
||||
{
|
||||
if (ferror (file))
|
||||
perror (_("cannot read stats file"));
|
||||
else
|
||||
fprintf (stderr, _("bad stats file size\n"));
|
||||
}
|
||||
if (fclose (file) != 0)
|
||||
perror (_("Could not read stats file."));
|
||||
perror (_("cannot read stats file"));
|
||||
}
|
||||
bitset_stats_info_data.runs++;
|
||||
}
|
||||
@@ -283,13 +283,13 @@ bitset_stats_write (const char *file_name)
|
||||
if (file)
|
||||
{
|
||||
if (fwrite (&bitset_stats_info_data, sizeof (bitset_stats_info_data),
|
||||
1, file) != 1)
|
||||
perror (_("Could not write stats file."));
|
||||
1, file) != 1)
|
||||
perror (_("cannot write stats file"));
|
||||
if (fclose (file) != 0)
|
||||
perror (_("Could not write stats file."));
|
||||
perror (_("cannot write stats file"));
|
||||
}
|
||||
else
|
||||
perror (_("Could not open stats file for writing."));
|
||||
perror (_("cannot open stats file for writing"));
|
||||
}
|
||||
|
||||
|
||||
@@ -576,11 +576,9 @@ bitset_stats_list (bitset bset, bitset_bindex *list,
|
||||
bitset_bindex tmp;
|
||||
bitset_bindex size;
|
||||
bitset_bindex i;
|
||||
enum bitset_type type;
|
||||
|
||||
count = BITSET_LIST_ (bset->s.bset, list, num, next);
|
||||
|
||||
type = BITSET_TYPE_ (bset->s.bset);
|
||||
BITSET_STATS_LISTS_INC (bset->s.bset);
|
||||
|
||||
/* Log histogram of number of set bits. */
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Functions to support bitset statistics.
|
||||
|
||||
Copyright (C) 2002-2004, 2009-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2004, 2009-2012 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-2011 Free Software
|
||||
Copyright (C) 2001-2002, 2004, 2006, 2009-2012 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-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2009-2012 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-2011 Free Software
|
||||
Copyright (C) 2001-2002, 2004-2006, 2009-2012 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-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2009-2012 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
|
||||
+1
-6
@@ -1,6 +1,6 @@
|
||||
/* Functions to support expandable bitsets.
|
||||
|
||||
Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
@@ -1335,17 +1335,12 @@ ebitset_bytes (bitset_bindex n_bits ATTRIBUTE_UNUSED)
|
||||
bitset
|
||||
ebitset_init (bitset bset, bitset_bindex n_bits)
|
||||
{
|
||||
bitset_windex size;
|
||||
|
||||
bset->b.vtable = &ebitset_vtable;
|
||||
|
||||
bset->b.csize = EBITSET_ELT_WORDS;
|
||||
|
||||
EBITSET_ZERO_SET (bset);
|
||||
|
||||
size = n_bits ? (n_bits + EBITSET_ELT_BITS - 1) / EBITSET_ELT_BITS
|
||||
: EBITSET_INITIAL_SIZE;
|
||||
|
||||
EBITSET_ASIZE (bset) = 0;
|
||||
EBITSET_ELTS (bset) = 0;
|
||||
ebitset_resize (bset, n_bits);
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Functions to support ebitsets.
|
||||
|
||||
Copyright (C) 2002, 2004, 2009-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2009-2012 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-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2006, 2009-2012 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-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2009-2012 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
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
/lock.c
|
||||
/lock.h
|
||||
/threadlib.c
|
||||
+2
-7
@@ -1,6 +1,6 @@
|
||||
/* Functions to support link list bitsets.
|
||||
|
||||
Copyright (C) 2002-2004, 2006, 2009-2011 Free Software Foundation,
|
||||
Copyright (C) 2002-2004, 2006, 2009-2012 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
@@ -352,7 +352,7 @@ lbitset_elt_find (bitset bset, bitset_windex windex,
|
||||
|
||||
/* ELT is the nearest to the one we want. If it's not the one
|
||||
we want, the one we want does not exist. */
|
||||
if (elt && (windex - elt->index) < LBITSET_ELT_WORDS)
|
||||
if (windex - elt->index < LBITSET_ELT_WORDS)
|
||||
{
|
||||
bset->b.cindex = elt->index;
|
||||
bset->b.csize = LBITSET_ELT_WORDS;
|
||||
@@ -936,17 +936,12 @@ lbitset_ones (bitset dst)
|
||||
static void
|
||||
lbitset_not (bitset dst, bitset src)
|
||||
{
|
||||
lbitset_elt *elt;
|
||||
lbitset_elt *selt;
|
||||
lbitset_elt *delt;
|
||||
bitset_windex i;
|
||||
unsigned int j;
|
||||
bitset_windex windex;
|
||||
|
||||
/* This is another unfriendly operation for a linked list
|
||||
bitset! */
|
||||
elt = LBITSET_TAIL (dst);
|
||||
|
||||
windex = (BITSET_SIZE_ (dst) + BITSET_WORD_BITS - 1) / BITSET_WORD_BITS;
|
||||
|
||||
for (i = 0; i < windex; i += LBITSET_ELT_WORDS)
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Functions to support lbitsets.
|
||||
|
||||
Copyright (C) 2002, 2004, 2009-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2009-2012 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user