Compare commits

..

72 Commits

Author SHA1 Message Date
Qt Submodule Update Bot
9c93bd3195 Updated submodules.
Change-Id: I95817eeedab667ab8616e9d29837b9cbd6e00a87
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-05-15 06:00:48 +02:00
Qt Submodule Update Bot
95817eeeda Updated submodules.
Change-Id: I098f2810c0d459997b54c1691f028d5aa2aed665
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-05-14 06:31:52 +02:00
Qt Submodule Update Bot
098f2810c0 Updated submodules.
Change-Id: I0f8bdff0c13d0a03d85ab2091d75baf6a723cb5a
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-05-13 11:09:03 +02:00
Qt Submodule Update Bot
0f8bdff0c1 Updated submodules.
Change-Id: Ia18c90fec72f217ebdbcf235aa049b4036914413
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-05-11 20:41:46 +02:00
Qt Submodule Update Bot
a18c90fec7 Updated submodules.
Change-Id: I6d2795b28782743dd877e1b6ce386c34e8f82b66
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-05-10 12:15:02 +02:00
Qt Submodule Update Bot
6d2795b287 Updated submodules.
Change-Id: Id75c976860f8b4cc99db1154c624439667553fac
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-05-06 05:36:59 +02:00
Qt Submodule Update Bot
d75c976860 Updated submodules.
Change-Id: I65784f37f1f72c926fe6422130129ee8ec4f080a
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-05-05 06:32:26 +02:00
Qt Submodule Update Bot
65784f37f1 Updated submodules.
Change-Id: I67a89ff55b1caf5d490198c1ea2a8b30145a27af
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-05-01 16:37:10 +02:00
Qt Submodule Update Bot
67a89ff55b Updated submodules.
Change-Id: I17313c94aea51d7b8707970e2a6e549821dd846a
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-04-29 08:25:09 +02:00
Qt Submodule Update Bot
17313c94ae Updated submodules.
Change-Id: Ifd66e42f0d3474efa7e94a4472e2e347ad28d6dd
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-04-25 13:35:08 +02:00
Qt Submodule Update Bot
fd66e42f0d Updated submodules.
Change-Id: I390a93d73b73e4bac9877bc64fa78ff6a12c8204
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-04-24 15:47:08 +02:00
Qt Submodule Update Bot
390a93d73b Updated submodules.
Change-Id: I7a6e062902a3be1c35d9bda9318719a25e953a23
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-04-19 08:53:37 +02:00
Qt Submodule Update Bot
7a6e062902 Updated submodules.
Change-Id: I64e231b697676799cec34c471a8e25612e2aa868
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-04-17 05:54:09 +02:00
Qt Submodule Update Bot
64e231b697 Updated submodules.
Change-Id: I3b579bd45f3cdd03c03a30be24ac5ae230a5fffb
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-04-16 13:59:42 +02:00
Qt Submodule Update Bot
3b579bd45f Updated submodules.
Change-Id: I0c111c681f748cd3d9f9a506094845f06558fa42
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-04-16 05:34:28 +02:00
Qt Submodule Update Bot
0c111c681f Updated submodules.
Change-Id: I055e2822456ad09cc939c628e4a86105eda5dade
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-04-14 07:21:30 +02:00
Oswald Buddenhagen
500c2a725b Merge remote-tracking branch 'gerrit/stable' into release 2014-04-10 11:29:23 +02:00
Oswald Buddenhagen
e1cd7c130b Merge remote-tracking branch 'origin/stable' into release
Conflicts:
	qtxmlpatterns

Change-Id: Ida8491147bce712af45ab55cea7d9bd14ca9b9eb
2014-02-17 11:21:58 +01:00
Qt Submodule Update Bot
17e103bb5d Updated submodules.
Change-Id: Icbb3e6068e906ca3cc08056833895a615bcad01b
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-01-30 12:36:50 +01:00
Qt Submodule Update Bot
cbb3e6068e Updated submodules.
Change-Id: Ia4f6e14fc205dfcf15a8df7f275a1cfefdc41c1a
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-01-28 13:50:13 +01:00
Qt Submodule Update Bot
a4f6e14fc2 Updated submodules.
Change-Id: Ie259fdadce42cfe9e740f99e5b3d4a39473b775c
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-01-27 12:43:12 +01:00
Qt Submodule Update Bot
e259fdadce Updated submodules.
Change-Id: I44e7f5d2e3896dde44822517e0b51f62922645f0
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-01-26 13:05:04 +01:00
Qt Submodule Update Bot
44e7f5d2e3 Updated submodules.
Change-Id: I9710c4f2d2a79e0cdc6af17569914b9f3fa96aa4
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-01-25 17:45:45 +01:00
Qt Submodule Update Bot
9710c4f2d2 Updated submodules.
Change-Id: I1d94d5ec03ccdf4272c6d4bd3e0eefd282464896
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-01-23 07:47:10 +01:00
Qt Submodule Update Bot
1d94d5ec03 Updated submodules.
Change-Id: I7f329372759e1ea21f5812df08b5eb218d09079e
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-01-21 20:12:33 +01:00
Qt Submodule Update Bot
7f32937275 Updated submodules.
Change-Id: If92227236c0b68580bd936c5f9a8cc5ca1f714e0
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-01-19 17:42:41 +01:00
Qt Submodule Update Bot
f92227236c Updated submodules.
Change-Id: Ic8d3a71d7cf7e92224064aa989a9551ee52c9d57
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-01-17 20:34:05 +01:00
Oswald Buddenhagen
563b32ee25 Merge remote-tracking branch 'gerrit/stable' into release
Conflicts:
	qtwebkit-examples

Change-Id: Ifa8735dd8f7ddf3aa74474c983327b94ea2737c5
2014-01-16 14:31:57 +01:00
Qt Submodule Update Bot
02353a4b3e Updated submodules.
Change-Id: Ib5594043bc3bcf735aedfaa1871de2c116bbe715
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
2013-12-08 11:14:18 +01:00
Qt Submodule Update Bot
b5594043bc Updated submodules.
Change-Id: I323825a1dbd75c630644f3b11349c6c3fe6e2e29
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2013-12-06 07:13:17 +01:00
Qt Submodule Update Bot
323825a1db Updated submodules.
Change-Id: Id8f6092efde7a94457986da66e9cd05243ba7e84
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2013-12-05 12:33:11 +01:00
Qt Submodule Update Bot
d8f6092efd Updated submodules.
Change-Id: Ie2d566a72dcdf9cb8e7b8ec3f7050103d08f6261
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2013-12-04 14:29:05 +01:00
Qt Submodule Update Bot
e2d566a72d Updated submodules.
Change-Id: I0ea66cab6e5d390492b80b61e33d9ad3f607e006
Reviewed-by: Antti Kokko <antti.kokko@digia.com>
2013-12-03 14:26:42 +01:00
Qt Submodule Update Bot
0ea66cab6e Updated submodules.
Change-Id: I100c98b9fcbd54f001eed4b7cda91bb9e1fab531
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2013-12-01 15:12:03 +01:00
Qt Submodule Update Bot
100c98b9fc Updated submodules.
Change-Id: I27f8dc93ae7917913c42e6e42f12bc706468fc54
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2013-11-30 21:19:09 +01:00
Qt Submodule Update Bot
27f8dc93ae Updated submodules.
Change-Id: If62385a213d41b12483a95ac0769a82b66897529
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2013-11-30 10:27:04 +01:00
Qt Submodule Update Bot
f62385a213 Updated submodules.
Change-Id: I948ce9ed9e12459be045ec3c1264b19822ba1494
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
2013-11-26 14:43:56 +01:00
Qt Submodule Update Bot
948ce9ed9e Updated submodules.
Change-Id: I284765a1be816913b0d126e863583759adb160b3
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com>
2013-11-25 19:49:39 +01:00
Qt Submodule Update Bot
284765a1be Updated submodules.
Change-Id: Ieda3b9c308665e0379cfa5fa0e1bc65d8208ec64
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-24 21:59:51 +01:00
Qt Submodule Update Bot
eda3b9c308 Updated submodules.
Change-Id: If3f634ae660e77effac660bc624b9a6f986cc398
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-11-22 21:02:25 +01:00
Qt Submodule Update Bot
f3f634ae66 Updated submodules.
Change-Id: Ifbb4041031123eeb5a834c4f465d5e45d73ec9da
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2013-11-22 11:42:53 +01:00
Qt Submodule Update Bot
fbb4041031 Updated submodules.
Change-Id: Ib7081d3f13d00144b11a56271eb39eb5e480c90b
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2013-11-20 21:00:30 +01:00
Qt Submodule Update Bot
b7081d3f13 Updated submodules.
Change-Id: I52a93121007cf19def97b313e34a87ecf5d73c09
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2013-11-20 14:04:14 +01:00
Qt Submodule Update Bot
52a9312100 Updated submodules.
Change-Id: Ifc6f18a589d54f4dc7a4f75131e61e29b8e8cb31
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2013-11-19 16:50:54 +01:00
Qt Submodule Update Bot
fc6f18a589 Updated submodules.
Change-Id: I83768ab76810afa1533e18d4f0e4c1ed56d2fbd5
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
2013-11-19 07:16:15 +01:00
Qt Submodule Update Bot
83768ab768 Updated submodules.
Change-Id: Ie137a789a90bbf3568404ff53d06d536319685d6
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2013-11-14 18:07:58 +01:00
Qt Submodule Update Bot
e137a789a9 Updated submodules.
Change-Id: I7c73e564bd61faa38fdd51947f8d98c03230f104
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2013-11-13 11:36:43 +01:00
Oswald Buddenhagen
0533da6bc1 Merge branch 'stable' into release
this is done with -s ours, throwing away the sha1 updates in this
branch.
2013-11-11 16:29:21 +01:00
Qt Submodule Update Bot
d5cc1add47 Updated submodules.
Change-Id: I33606f80b5eef964e188220d8330c14369af93a1
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-08-24 06:47:24 +02:00
Qt Submodule Update Bot
33606f80b5 Updated submodules.
Change-Id: I056329bd5cea3d9fbe160bc177823d16576d4b83
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-08-20 14:43:01 +02:00
Qt Submodule Update Bot
056329bd5c Updated submodules.
Change-Id: Ic4605dfbf0f061b0388705f1bdb3b23e46a10248
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-08-19 21:34:26 +02:00
Qt Submodule Update Bot
c4605dfbf0 Updated submodules.
Change-Id: I000a215563281c85323a7eb9b2c5ba62f64893a5
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-08-17 10:14:06 +02:00
Qt Submodule Update Bot
000a215563 Updated submodules.
Change-Id: I7b5e4f67b7e5c6701be8827384098401b4e66e57
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-08-15 21:34:30 +02:00
Qt Submodule Update Bot
7b5e4f67b7 Updated submodules.
Change-Id: Ib9a6f134d8e8186af858d148fa1941ce85ae1166
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-08-14 10:07:56 +02:00
Qt Submodule Update Bot
b9a6f134d8 Updated submodules.
Change-Id: I8ec5f763832e10a2a33f598113261a715c873bb2
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-08-12 08:24:27 +02:00
Qt Submodule Update Bot
8ec5f76383 Updated submodules.
Change-Id: I8abcedd5bd3e82aa2b4acc0271e7fba402b8efab
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-08-09 21:13:34 +02:00
Qt Submodule Update Bot
8abcedd5bd Updated submodules.
Change-Id: Ief7a92580221b4c3fe6521abea165f5181d800fb
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-08-09 08:18:36 +02:00
Qt Submodule Update Bot
ef7a925802 Updated submodules.
Change-Id: I36ed7ab38d3b61a01fe2b0989c2cb404e72afc9b
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-08-08 08:56:35 +02:00
Qt Submodule Update Bot
36ed7ab38d Updated submodules.
Change-Id: Ia44fe424bc986bcc308194d4068e9d79d73f1167
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-08-06 14:50:31 +02:00
Qt Submodule Update Bot
a44fe424bc Updated submodules.
Change-Id: Ie1325f4c4c9b1b9b560ccee63171f7adf008df2c
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-08-02 21:36:35 +02:00
Qt Submodule Update Bot
e1325f4c4c Updated submodules.
Change-Id: If243edd33f2018ff92cd27ac1eabfa75ae52f11b
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-07-31 19:52:57 +02:00
Qt Submodule Update Bot
f243edd33f Updated submodules.
Change-Id: Idf81b47f57cdc5b00cbd7d159bec6eabc95f4ac1
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-07-30 18:37:24 +02:00
Qt Submodule Update Bot
df81b47f57 Updated submodules.
Change-Id: I5d1f1f2817d32b93432caf639d508d56a59d9430
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-07-27 21:36:48 +02:00
Qt Submodule Update Bot
5d1f1f2817 Updated submodules.
Change-Id: I1421f888a7be71b786df796772064f8d1b2f0157
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-07-27 11:46:00 +02:00
Qt Submodule Update Bot
1421f888a7 Updated submodules.
Change-Id: I3d55ee3e80b0d03479a88d0272c079bd8c32a890
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-07-26 08:07:43 +02:00
Qt Submodule Update Bot
3d55ee3e80 Updated submodules.
Change-Id: I02567c71ad64d474848263fc6636b243ab5d2665
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-07-25 17:44:21 +02:00
Qt Submodule Update Bot
02567c71ad Updated submodules.
Change-Id: Id6f8db264e59d8b6c5d4f81e030c0943bcfeade3
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-07-24 14:13:14 +02:00
Qt Submodule Update Bot
d6f8db264e Updated submodules.
Change-Id: Iad03e256c0e0ab29e2759579caf7ad93b0a4416e
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-07-22 22:30:31 +02:00
Sergio Ahumada
c21bee55a5 Updated submodules.
Change-Id: I2523a9d712571ec411dde0e547c4a5ad0c17e977
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-01 20:11:45 +02:00
Qt Submodule Update Bot
ad03e256c0 Updated submodules.
Change-Id: I441527d16813cb8c5483f251a2586946f2939c55
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-06-28 19:07:46 +02:00
Qt Submodule Update Bot
441527d168 Updated submodules.
Change-Id: I62187932bef0dc3b8c88e85ae4fcad4628ac3b46
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-06-27 10:09:12 +02:00
Qt Submodule Update Bot
62187932be Updated submodules.
Change-Id: Ie9b62c8c6914428014c30be7e3cf0889372ee0b6
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-06-25 00:58:27 +02:00
163 changed files with 52130 additions and 13627 deletions

View File

@@ -14,7 +14,7 @@
#
# ==[ Please wrap at 72 characters ]===================================|
#
# Remember to read http://wiki.qt.io/Commit_Policy
# Remember to read http://wiki.qt-project.org/Commit_Policy
#
# Change log entry: If this commit adds a significant feature, fixes an
# issue or contains a behavior change that is relevant to others,

1
.gitattributes vendored
View File

@@ -1,6 +1,7 @@
.tag export-subst
.gitignore export-ignore
.gitattributes export-ignore
.gitmodules export-ignore
.commit-template export-ignore
init-repository export-ignore
README.git export-ignore

220
.gitmodules vendored
View File

@@ -1,319 +1,105 @@
[submodule "qtbase"]
path = qtbase
url = ../qtbase.git
branch = 5.8
status = essential
[submodule "qtsvg"]
depends = qtbase
path = qtsvg
url = ../qtsvg.git
branch = 5.8
status = addon
[submodule "qtdeclarative"]
depends = qtbase
recommends = qtsvg qtxmlpatterns
path = qtdeclarative
url = ../qtdeclarative.git
branch = 5.8
status = essential
[submodule "qtactiveqt"]
depends = qtbase
path = qtactiveqt
url = ../qtactiveqt.git
branch = 5.8
status = addon
[submodule "qtscript"]
depends = qtbase
recommends = qttools
path = qtscript
url = ../qtscript.git
branch = 5.8
status = deprecated
[submodule "qtmultimedia"]
depends = qtbase
recommends = qtdeclarative
path = qtmultimedia
url = ../qtmultimedia.git
branch = 5.8
status = essential
[submodule "qttools"]
depends = qtbase
recommends = qtdeclarative qtactiveqt qtwebkit
path = qttools
url = ../qttools.git
branch = 5.8
status = essential
[submodule "qtxmlpatterns"]
depends = qtbase
path = qtxmlpatterns
url = ../qtxmlpatterns.git
branch = 5.8
status = addon
[submodule "qttranslations"]
depends = qttools
path = qttranslations
url = ../qttranslations.git
branch = 5.8
status = essential
priority = 30
[submodule "qtdoc"]
depends = qtdeclarative
path = qtdoc
url = ../qtdoc.git
branch = 5.8
status = essential
priority = 40
[submodule "qtrepotools"]
path = qtrepotools
url = ../qtrepotools.git
branch = master
status = essential
qt = false
[submodule "qtwebkit"]
depends = qtbase
recommends = qtdeclarative qtlocation qtmultimedia qtsensors qtwebchannel qtxmlpatterns
path = qtwebkit
url = ../qtwebkit.git
branch = 5.8
status = obsolete
project = WebKit.pro
priority = 20
[submodule "qtwebkit-examples"]
depends = qtwebkit qttools
path = qtwebkit-examples
url = ../qtwebkit-examples.git
branch = 5.8
status = obsolete
[submodule "qtqa"]
depends = qtbase
path = qtqa
url = ../qtqa.git
branch = master
status = essential
priority = 50
[submodule "qtlocation"]
depends = qtbase
recommends = qtdeclarative qtquickcontrols qtserialport
path = qtlocation
url = ../qtlocation.git
branch = 5.8
status = addon
[submodule "qtsensors"]
depends = qtbase
recommends = qtdeclarative
path = qtsensors
url = ../qtsensors.git
branch = 5.8
status = addon
[submodule "qtsystems"]
depends = qtbase
recommends = qtdeclarative
path = qtsystems
url = ../qtsystems.git
branch = dev
status = ignore
[submodule "qtfeedback"]
depends = qtdeclarative
recommends = qtmultimedia
path = qtfeedback
url = ../qtfeedback.git
branch = master
status = ignore
[submodule "qtdocgallery"]
depends = qtdeclarative
path = qtdocgallery
url = ../qtdocgallery.git
branch = master
status = ignore
[submodule "qtpim"]
depends = qtdeclarative
path = qtpim
url = ../qtpim.git
branch = dev
status = ignore
[submodule "qtconnectivity"]
depends = qtbase
recommends = qtdeclarative qtandroidextras
path = qtconnectivity
url = ../qtconnectivity.git
branch = 5.8
status = addon
[submodule "qtwayland"]
depends = qtbase
recommends = qtdeclarative
path = qtwayland
url = ../qtwayland.git
branch = 5.8
status = addon
[submodule "qtjsondb"]
path = qtjsondb
url = ../qtjsondb.git
[submodule "qt3d"]
depends = qtdeclarative qtimageformats
recommends = qtgamepad
path = qt3d
url = ../qt3d.git
branch = 5.8
status = addon
[submodule "qtimageformats"]
depends = qtbase
path = qtimageformats
url = ../qtimageformats.git
branch = 5.8
status = addon
[submodule "qtquick1"]
depends = qtscript
recommends = qtsvg qtxmlpatterns
path = qtquick1
url = ../qtquick1.git
branch = dev
status = ignore
[submodule "qtgraphicaleffects"]
depends = qtdeclarative
path = qtgraphicaleffects
url = ../qtgraphicaleffects.git
branch = 5.8
status = addon
[submodule "qtquickcontrols"]
depends = qtdeclarative
recommends = qtgraphicaleffects
path = qtquickcontrols
url = ../qtquickcontrols.git
branch = 5.8
status = essential
[submodule "qtserialbus"]
depends = qtserialport
path = qtserialbus
url = ../qtserialbus.git
branch = 5.8
status = addon
[submodule "qtserialport"]
depends = qtbase
path = qtserialport
url = ../qtserialport.git
branch = 5.8
status = addon
[submodule "qtx11extras"]
depends = qtbase
path = qtx11extras
url = ../qtx11extras.git
branch = 5.8
status = addon
[submodule "qtmacextras"]
depends = qtbase
path = qtmacextras
url = ../qtmacextras.git
branch = 5.8
status = addon
[submodule "qtwinextras"]
depends = qtbase
recommends = qtdeclarative qtmultimedia
path = qtwinextras
url = ../qtwinextras.git
branch = 5.8
status = addon
[submodule "qtandroidextras"]
depends = qtbase
path = qtandroidextras
url = ../qtandroidextras.git
branch = 5.8
status = addon
[submodule "qtenginio"]
depends = qtdeclarative
path = qtenginio
url = ../qtenginio.git
branch = dev
status = ignore
[submodule "qtwebsockets"]
depends = qtbase
recommends = qtdeclarative
path = qtwebsockets
url = ../qtwebsockets.git
branch = 5.8
status = addon
[submodule "qtwebchannel"]
depends = qtbase
recommends = qtdeclarative qtwebsockets
path = qtwebchannel
url = ../qtwebchannel.git
branch = 5.8
status = addon
[submodule "qtwebengine"]
depends = qtquickcontrols qtwebchannel
recommends = qtlocation
path = qtwebengine
url = ../qtwebengine.git
branch = 5.8
status = addon
priority = 10
[submodule "qtcanvas3d"]
depends = qtdeclarative
path = qtcanvas3d
url = ../qtcanvas3d.git
branch = 5.8
status = addon
[submodule "qtwebview"]
depends = qtdeclarative
recommends = qtwebengine
path = qtwebview
url = ../qtwebview.git
branch = 5.8
status = addon
[submodule "qtquickcontrols2"]
depends = qtgraphicaleffects
path = qtquickcontrols2
url = ../qtquickcontrols2.git
branch = 5.8
status = addon
[submodule "qtpurchasing"]
depends = qtbase
recommends = qtdeclarative
path = qtpurchasing
url = ../qtpurchasing.git
branch = 5.8
status = addon
[submodule "qtcharts"]
depends = qtbase
recommends = qtdeclarative qtmultimedia
path = qtcharts
url = ../qtcharts.git
branch = 5.8
status = addon
[submodule "qtdatavis3d"]
depends = qtbase
recommends = qtdeclarative qtmultimedia
path = qtdatavis3d
url = ../qtdatavis3d.git
branch = 5.8
status = addon
[submodule "qtvirtualkeyboard"]
depends = qtbase qtdeclarative qtsvg
recommends = qtmultimedia qtquickcontrols
path = qtvirtualkeyboard
url = ../qtvirtualkeyboard.git
branch = 5.8
status = addon
[submodule "qtgamepad"]
depends = qtbase
recommends = qtdeclarative
path = qtgamepad
url = ../qtgamepad
branch = 5.8
status = preview
[submodule "qtscxml"]
depends = qtbase qtdeclarative
path = qtscxml
url = ../qtscxml
branch = 5.8
status = addon
[submodule "qtspeech"]
depends = qtbase
recommends = qtdeclarative qtmultimedia
path = qtspeech
url = ../qtspeech
branch = 5.8
status = preview
[submodule "qtnetworkauth"]
depends = qtbase
recommends = qtwebview
path = qtnetworkauth
url = ../qtnetworkauth
branch = 5.8
status = preview

View File

@@ -1,4 +1,4 @@
The Qt Company Qt LGPL Exception version 1.1
Digia Qt LGPL Exception version 1.1
As an additional permission to the GNU Lesser General Public License version
2.1, the object code form of a "work that uses the Library" may incorporate

View File

@@ -1,15 +1,3 @@
GNU GENERAL PUBLIC LICENSE
The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd.
Contact: http://www.qt.io/licensing/
You may use, distribute and copy the Qt Toolkit under the terms of
GNU Lesser General Public License version 3. That license references
the General Public License version 3, that is displayed below. Other
portions of the Qt Toolkit may be licensed directly under this license.
-------------------------------------------------------------------------
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

View File

@@ -1,292 +0,0 @@
GNU GENERAL PUBLIC LICENSE
The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd.
Contact: http://www.qt.io/licensing/
You may use, distribute and copy the Qt Toolkit under the terms of
GNU General Public License version 2, which is displayed below.
-------------------------------------------------------------------------
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your freedom
to share and change it. By contrast, the GNU General Public License is
intended to guarantee your freedom to share and change free software
--to make sure the software is free for all its users. This General
Public License applies to most of the Free Software Foundation's
software and to any other program whose authors commit to using it.
(Some other Free Software Foundation software is covered by the GNU
Lesser General Public License instead.) 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 this
service 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 make restrictions that forbid anyone
to deny you these rights or to ask you to surrender the rights. These
restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis
or for a fee, you must give the recipients all the rights that you
have. 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.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software patents.
We wish to avoid the danger that redistributors of a free program will
individually obtain patent licenses, in effect making the program
proprietary. To prevent this, we have made it clear that any patent
must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a
notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of running
the Program is not restricted, and the output from the Program is
covered only if its contents constitute a work based on the Program
(independent of having been made by running the Program). Whether that
is true depends on what the Program does.
1. You may copy and distribute 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
and disclaimer of warranty; keep intact all the notices that refer to
this License and to the absence of any warranty; and give any other
recipients of the Program a copy of this License along with the
Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of
it, thus forming a work based on the Program, and copy and distribute
such modifications or work under the terms of Section 1 above, provided
that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but does
not normally print such an announcement, your work based on the
Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of a
storage or distribution medium does not bring the other work under the
scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software
interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your cost
of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to control
compilation and installation of the executable. However, as a special
exception, the source code distributed need not include anything that
is normally distributed (in either source or binary form) with the
major components (compiler, kernel, and so on) of the operating system
on which the executable runs, unless that component itself accompanies
the executable.
If distribution of executable or object code is made by offering access
to copy from a designated place, then offering equivalent access to
copy the source code from the same place counts as distribution of the
source code, even though third parties are not compelled to copy the
source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt otherwise
to copy, modify, sublicense or distribute the Program is void, and will
automatically terminate your rights under this License. However,
parties who have received copies, or rights, from you under this License
will not have their licenses terminated so long as such parties remain
in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further restrictions
on the recipients' exercise of the rights granted herein. You are not
responsible for enforcing compliance by third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
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
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent license
would not permit royalty-free redistribution of the Program by all
those who receive copies directly or indirectly through you, then the
only way you could satisfy both it and this License would be to refrain
entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License may
add an explicit geographical distribution limitation excluding those
countries, so that distribution is permitted only in or among countries
not thus excluded. In such case, this License incorporates the limitation
as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the 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 a version number of this License which applies to it and "any
later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Program does not specify a version
number of this License, you may choose any version ever published by
the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the
author to ask for permission. For software which is copyrighted by
the Free Software Foundation, write to the Free Software Foundation;
we sometimes make exceptions for this. Our decision will be guided by
the two goals of preserving the free status of all derivatives of our
free software and of promoting the sharing and reuse of software
generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
MODIFY AND/OR REDISTRIBUTE 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.
END OF TERMS AND CONDITIONS

View File

@@ -1,15 +1,15 @@
GNU LESSER GENERAL PUBLIC LICENSE
GNU LESSER GENERAL PUBLIC LICENSE
The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd.
Contact: http://www.qt.io/licensing/
The Qt Toolkit is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal
You may use, distribute and copy the Qt Toolkit under the terms of
You may use, distribute and copy the Qt GUI Toolkit under the terms of
GNU Lesser General Public License version 2.1, which is displayed below.
-------------------------------------------------------------------------
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
@@ -20,7 +20,7 @@
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
@@ -122,8 +122,8 @@ modification follow. Pay close attention to the difference between a
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
@@ -156,7 +156,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
@@ -442,7 +442,7 @@ decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
@@ -465,7 +465,7 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries

View File

@@ -1,175 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd.
Contact: http://www.qt.io/licensing/
You may use, distribute and copy the Qt Toolkit under the terms of
GNU Lesser General Public License version 3, which is displayed below.
This license makes reference to the version 3 of the GNU General
Public License, which you can find in the LICENSE.GPLv3 file.
-------------------------------------------------------------------------
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this
licensedocument, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, “this License” refers to version 3 of the GNU Lesser
General Public License, and the “GNU GPL” refers to version 3 of the
GNU General Public License.
“The Library” refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An “Application” is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A “Combined Work” is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the “Linked
Version”.
The “Minimal Corresponding Source” for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The “Corresponding Application Code” for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort
to ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this
license document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that, taken
together, effectively do not restrict modification of the portions of
the Library contained in the Combined Work and reverse engineering for
debugging such modifications, if you also do each of the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this
license document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of
this License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with
the Library. A suitable mechanism is one that (a) uses at run
time a copy of the Library already present on the user's
computer system, and (b) will operate properly with a modified
version of the Library that is interface-compatible with the
Linked Version.
e) Provide Installation Information, but only if you would
otherwise be required to provide such information under section 6
of the GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the Application
with a modified version of the Linked Version. (If you use option
4d0, the Installation Information must accompany the Minimal
Corresponding Source and Corresponding Application Code. If you
use option 4d1, you must provide the Installation Information in
the manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the Library
side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities, conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of
it is a work based on the Library, and explaining where to find
the accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser 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 Library
as you received it specifies that a certain numbered version of the
GNU Lesser General Public License “or any later version” applies to
it, you have the option of following the terms and conditions either
of that published version or of any later version published by the
Free Software Foundation. If the Library as you received it does not
specify a version number of the GNU Lesser General Public License,
you may choose any version of the GNU Lesser General Public License
ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the Library.

62
README
View File

@@ -10,45 +10,53 @@ HOW TO BUILD QT5
- Perl 5.8 or later
- Python 2.7 or later
- C++ compiler supporting the C++11 standard
- C++ compiler supporting the C++98 standard
For other platform specific requirements,
please see section "Setting up your machine" on:
http://wiki.qt.io/Get_The_Source
http://qt-project.org/wiki/Get_The_Source
Licensing:
----------
Optional requirements
---------------------
Opensource users:
- OpenSSL for SSL sockets or HTTPS
- Wayland
<source_package> = qt-everywhere-opensource-src-<version>
<license> = -opensource
New dependencies in Qt 5
------------------------
Commercial users:
Linux: On systems running X11, the XCB libraries are required for
the platform plugin to build. qtbase/src/plugins/platforms/xcb/README
lists the required packages.
<source_package> = qt-everywhere-enterprise-src-<version>
<license> = -commercial
Qt 5 can make use of the ICU libraries providing Unicode and Globalization
support (see http://site.icu-project.org/). They are required for building
QtWebKit.
On Linux, they will be auto-detected.
On Windows, they need to be manually installed and the "include" and "lib"
folders of the ICU installation must be appended to the INCLUDE and LIB
environment variables after calling the Windows SDK setup script.
The "bin" folder of the ICU installation should be appended to the PATH
environment variable in order to for the DLLs to be found at run-time.
Linux, Mac:
-----------
cd <path>/<source_package>
./configure -prefix $PWD/qtbase <license> -nomake tests
cd <path>/qt-everywhere-opensource-src-<version>
./configure -prefix $PWD/qtbase -opensource -nomake tests
make -j 4
Windows:
--------
Open a command prompt.
Ensure that the following tools can be found in the path:
* Supported compiler (Visual Studio 2012 or later,
MinGW-builds gcc 4.9 or later)
Open a Windows SDK (7.0, 7.1 or later) command prompt. Ensure that the
following tools can be found in the path:
* Perl version 5.12 or later [http://www.activestate.com/activeperl/]
* Python version 2.7 or later [http://www.activestate.com/activepython/]
* Ruby version 1.9.3 or later [http://rubyinstaller.org/]
cd <path>\<source_package>
configure -prefix %CD%\qtbase <license> -nomake tests
cd <path>\qt-everywhere-opensource-src-<version>
configure -prefix %CD%\qtbase -opensource -nomake tests
nmake // jom // mingw32-make
To accelerate the bootstrap of qmake with MSVC, it may be useful to pass
@@ -73,13 +81,13 @@ HOW TO BUILD QT5
Example for a release build:
(adjust the `-jN' parameter as appropriate for your system)
./configure -prefix $PWD/qtbase <license>
./configure -prefix $PWD/qtbase -opensource
make -j4
Example for a developer build:
(enables more autotests, builds debug version of libraries, ...)
./configure -developer-build <license>
./configure -developer-build -opensource
make -j4
See output of `./configure -help' for documentation on various options to
@@ -89,11 +97,11 @@ HOW TO BUILD QT5
default in the build system.
It is possible to build selected modules with their dependencies by doing
a `make module-<foo>'. For example, to build only qtdeclarative,
and the modules it depends on:
a `make module-<foo>'. For example, to build only qtscript and qtwebkit,
and the modules they depend on:
./configure -prefix $PWD/qtbase <license>
make -j4 module-qtdeclarative
./configure -prefix $PWD/qtbase -opensource
make -j4 module-qtscript module-qtwebkit
This can save a lot of time if you are only interested in a subset of Qt5.
@@ -111,9 +119,9 @@ HOW TO BUILD QT5
Building Qt5 from git
=====================
See http://wiki.qt.io/Building_Qt_5_from_Git and README.git
See http://qt-project.org/wiki/Building-Qt-5-from-Git and README.git
for more information.
See http://wiki.qt.io/Qt_5 for the reference platforms.
See http://qt-project.org/wiki/Qt-5 for the reference platforms.
Documentation
@@ -131,6 +139,6 @@ HOW TO BUILD QT5
Running "qmake -query" will list the value of QT_INSTALL_DOCS.
Information about Qt 5's documentation is located in qtbase/doc/README
or in the following page: http://wiki.qt.io/Qt5DocumentationProject
or in the following page: http://qt-project.org/wiki/Qt5DocumentationProject
Note: Building the documentation is only tested on desktop platforms.

View File

@@ -5,7 +5,7 @@ OBTAINING QT5 FROM GIT
========
For a more in-depth description on how to build Qt5 from git,
please see: http://wiki.qt.io/Building_Qt_5_from_Git
please see: http://qt-project.org/wiki/Building-Qt-5-from-Git
Get The Submodules
@@ -52,4 +52,4 @@ OBTAINING QT5 FROM GIT
================================
For more information on how to develop and contribute to Qt, please see:
http://wiki.qt.io/Category:Developing_Qt
http://qt-project.org/wiki/Category:Developing_Qt

View File

@@ -1,11 +0,0 @@
Continuous Integration
======================
This directory contains files used by Qt's Continuous Integration system (Coin).
provisioning
------------
Contains scripts that apply to different test machines in order to run automatic tests on them.
For Windows scripts, make sure that the machine has "Set-ExecutionPolicy RemoteSigned -Force" set.
(Run as admin in PowerShell)

View File

@@ -1,31 +0,0 @@
function Verify-Checksum
{
Param (
[string]$File=$(throw("You must specify a filename to get the checksum of.")),
[string]$Expected=$(throw("Checksum required")),
[ValidateSet("sha1","md5")][string]$Algorithm="sha1"
)
$fs = new-object System.IO.FileStream $File, "Open"
$algo = [type]"System.Security.Cryptography.$Algorithm"
$crypto = $algo::Create()
$hash = [BitConverter]::ToString($crypto.ComputeHash($fs)).Replace("-", "")
$fs.Close()
if ($hash -ne $Expected) {
Write-Error "Checksum verification failed, got: '$hash' expected: '$Expected'"
}
}
function Extract-Zip
{
Param (
[string]$Source,
[string]$Destination
)
echo "Extracting '$Source' to '$Destination'..."
New-Item -ItemType Directory -Force -Path $Destination
$shell = new-object -com shell.application
$zipfile = $shell.Namespace($Source)
$destinationFolder = $shell.Namespace($Destination)
$destinationFolder.CopyHere($zipfile.Items(), 16)
}

View File

@@ -1,9 +0,0 @@
# ICU is already pre-installed on Windows machines, it would be nice to have
# the installation script, but for now let's just export the right variables
# FIXME: do we really want to have it per MSVC version? What about MSVC2015?
[Environment]::SetEnvironmentVariable("CI_ICU_PATH_MSVC2012", "C:\\Utils\\icu_53_1_msvc_2012_64_devel\\icu53_1", "Machine")
[Environment]::SetEnvironmentVariable("CI_ICU_PATH_MSVC2013", "C:\\Utils\\icu_53_1_msvc_2013_64_devel\\icu53_1", "Machine")
# FIXME: do we really want to use the 4.8.2 ICU build?
[Environment]::SetEnvironmentVariable("CI_ICU_PATH_Mingw49", "C:\Utils\icu_53_1_Mingw_builds_4_8_2_posix_seh_64_devel\icu53_1", "Machine")

View File

@@ -1,9 +0,0 @@
. "$PSScriptRoot\helpers.ps1"
$zip = "c:\users\qt\downloads\jom_1_1_0.zip"
Invoke-WebRequest -UseBasicParsing http://download.qt.io/official_releases/jom/jom_1_1_0.zip -OutFile $zip
Verify-Checksum $zip "C4149FE706B25738B4C4E54C73E180B9CAB55832"
Extract-Zip $zip C:\Utils\Jom
[Environment]::SetEnvironmentVariable("CI_JOM_PATH", "C:\Utils\Jom", "Machine")

View File

@@ -1,51 +0,0 @@
#############################################################################
##
## Copyright (C) 2016 The Qt Company Ltd.
## Contact: http://www.qt.io/licensing/
##
## This file is part of the test suite of the Qt Toolkit.
##
## $QT_BEGIN_LICENSE:LGPL21$
## Commercial License Usage
## Licensees holding valid commercial Qt licenses may use this file in
## accordance with the commercial license agreement provided with the
## Software or, alternatively, in accordance with the terms contained in
## a written agreement between you and The Qt Company. For licensing terms
## and conditions see http://www.qt.io/terms-conditions. For further
## information use the contact form at http://www.qt.io/contact-us.
##
## GNU Lesser General Public License Usage
## Alternatively, this file may be used under the terms of the GNU Lesser
## General Public License version 2.1 or version 3 as published by the Free
## Software Foundation and appearing in the file LICENSE.LGPLv21 and
## LICENSE.LGPLv3 included in the packaging of this file. Please review the
## following information to ensure the GNU Lesser General Public License
## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
##
## As a special exception, The Qt Company gives you certain additional
## rights. These rights are described in The Qt Company LGPL Exception
## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
##
## $QT_END_LICENSE$
##
#############################################################################
# Patch QNX SDK due to issues in the standard library.
# The patches are available here:
# http://www.qnx.com/download/feature.html?programid=27555
# A copy of the patch must be in the root of the Coin path in
# provisioning/qnx/patch-660-4367-RS6069_cpp-headers.zip
. "$PSScriptRoot\helpers.ps1"
$zip = "c:\users\qt\downloads\patch-660-4367-RS6069_cpp-headers.zip"
$sha1 = "57A11FFE4434AD567B3C36F7B828DBB468A9E565"
$tempDir = "C:\temp\qnx_path"
Invoke-WebRequest -UseBasicParsing http://${Env:COIN_WEBSERVER_ADDRESS}/coin/provisioning/qnx/patch-660-4367-RS6069_cpp-headers.zip -OutFile $zip
Verify-Checksum $zip $sha1
Extract-Zip $zip $tempDir
Copy-Item $tempDir\patches\660-4367\target\* C:\qnx660\target\ -recurse -force
Remove-Item $tempDir -recurse

View File

@@ -1,6 +0,0 @@
# provides: fix for possible bug in the subscription manager
# version: provided by RedHat
# needed for yum to work properly in case there is incorrect data in
# the sslclientkey repository parameter value
sudo rm -f /etc/pki/entitlement/*
sudo subscription-manager refresh

View File

@@ -1,4 +0,0 @@
# provides: odbc devel packages on RHEL
# version: provided by default Linux distribution repository
# needed for configure -plugin-sql-odbc in qtbase
sudo yum install -y unixODBC-devel

View File

@@ -1,70 +0,0 @@
#!/bin/env bash
#############################################################################
##
## Copyright (C) 2016 The Qt Company Ltd.
## Contact: http://www.qt.io/licensing/
##
## This file is part of the test suite of the Qt Toolkit.
##
## $QT_BEGIN_LICENSE:LGPL21$
## Commercial License Usage
## Licensees holding valid commercial Qt licenses may use this file in
## accordance with the commercial license agreement provided with the
## Software or, alternatively, in accordance with the terms contained in
## a written agreement between you and The Qt Company. For licensing terms
## and conditions see http://www.qt.io/terms-conditions. For further
## information use the contact form at http://www.qt.io/contact-us.
##
## GNU Lesser General Public License Usage
## Alternatively, this file may be used under the terms of the GNU Lesser
## General Public License version 2.1 or version 3 as published by the Free
## Software Foundation and appearing in the file LICENSE.LGPLv21 and
## LICENSE.LGPLv3 included in the packaging of this file. Please review the
## following information to ensure the GNU Lesser General Public License
## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
##
## As a special exception, The Qt Company gives you certain additional
## rights. These rights are described in The Qt Company LGPL Exception
## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
##
## $QT_END_LICENSE$
##
#############################################################################
# This script installs the right ICU version
set -e
icuVersion="56.1"
icuLocation="/usr/lib64"
sha1="f2eab775c04ce5f3bdae6c47d06b62158b5d6753"
function Install7ZPackageFromURL {
url=$1
expectedSha1=$2
targetDirectory=$3
targetFile=`mktemp` || echo "Failed to create temporary file"
wget --tries=5 --waitretry=5 --output-document=$targetFile $url || echo "Failed to download '$url' multiple times"
echo "$expectedSha1 $targetFile" | sha1sum --check || echo "Failed to check sha1sum"
sudo /usr/local/bin/7z x -yo$targetDirectory $targetFile || echo "Failed to unzip $url archive"
rm $targetFile
}
echo "Installing custom ICU $icuVersion $sha1 packages on RHEL to $icuLocation"
baseBinaryPackageURL="http://master.qt.io/development_releases/prebuilt/icu/prebuilt/$icuVersion/icu-linux-g++-Rhel6.6-x64.7z"
Install7ZPackageFromURL $baseBinaryPackageURL $sha1 "/usr/lib64"
echo "Installing custom ICU devel packages on RHEL"
sha1Dev="82f8b216371b848b8d36ecec7fe7b6e9b0dba0df"
develPackageURL="http://master.qt.io/development_releases/prebuilt/icu/prebuilt/$icuVersion/icu-linux-g++-Rhel6.6-x64-devel.7z"
tempDir=`mktemp -d` || echo "Failed to create temporary directory"
trap "sudo rm -fr $tempDir" EXIT
Install7ZPackageFromURL $develPackageURL $sha1Dev $tempDir
sudo cp -a $tempDir/lib/* /usr/lib64
sudo cp -a $tempDir/* /usr/
sudo /sbin/ldconfig

View File

@@ -1,64 +0,0 @@
#!/bin/env bash
#############################################################################
##
## Copyright (C) 2016 The Qt Company Ltd.
## Contact: http://www.qt.io/licensing/
##
## This file is part of the test suite of the Qt Toolkit.
##
## $QT_BEGIN_LICENSE:LGPL21$
## Commercial License Usage
## Licensees holding valid commercial Qt licenses may use this file in
## accordance with the commercial license agreement provided with the
## Software or, alternatively, in accordance with the terms contained in
## a written agreement between you and The Qt Company. For licensing terms
## and conditions see http://www.qt.io/terms-conditions. For further
## information use the contact form at http://www.qt.io/contact-us.
##
## GNU Lesser General Public License Usage
## Alternatively, this file may be used under the terms of the GNU Lesser
## General Public License version 2.1 or version 3 as published by the Free
## Software Foundation and appearing in the file LICENSE.LGPLv21 and
## LICENSE.LGPLv3 included in the packaging of this file. Please review the
## following information to ensure the GNU Lesser General Public License
## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
##
## As a special exception, The Qt Company gives you certain additional
## rights. These rights are described in The Qt Company LGPL Exception
## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
##
## $QT_END_LICENSE$
##
#############################################################################
# Patch QNX SDK due to issues in the standard library.
# The patches are available here:
# http://www.qnx.com/download/feature.html?programid=27555
# A copy of the patch must be in the root of the Coin path in
# provisioning/qnx/patch-660-4367-RS6069_cpp-headers.zip
set -e
sha1="57a11ffe4434ad567b3c36f7b828dbb468a9e565"
function InstallZipPackageFromURL {
url=$1
expectedSha1=$2
targetDirectory=$3
targetFile=`mktemp` || echo "Failed to create temporary file"
wget --tries=5 --waitretry=5 --output-document=$targetFile $url || echo "Failed to download '$url' multiple times"
echo "$expectedSha1 $targetFile" | sha1sum --check || echo "Failed to check sha1sum"
tempDir=`mktemp -d` || echo "Failed to create temporary directory"
/usr/bin/unzip -o -d $tempDir $targetFile || echo "Failed to unzip $url archive"
trap "sudo rm -fr $targetFile $tempDir" EXIT
sudo cp -rafv $tempDir/patches/660-4367/target/* /opt/qnx660/target/
}
echo "Patching QNX"
baseBinaryPackageURL="http://${COIN_WEBSERVER_ADDRESS}/coin/provisioning/qnx/patch-660-4367-RS6069_cpp-headers.zip"
InstallZipPackageFromURL $baseBinaryPackageURL $sha1 "/opt/qnx660/target/"

View File

@@ -1,49 +0,0 @@
#!/bin/env bash
#############################################################################
##
## Copyright (C) 2016 The Qt Company Ltd.
## Contact: http://www.qt.io/licensing/
##
## This file is part of the test suite of the Qt Toolkit.
##
## $QT_BEGIN_LICENSE:LGPL21$
## Commercial License Usage
## Licensees holding valid commercial Qt licenses may use this file in
## accordance with the commercial license agreement provided with the
## Software or, alternatively, in accordance with the terms contained in
## a written agreement between you and The Qt Company. For licensing terms
## and conditions see http://www.qt.io/terms-conditions. For further
## information use the contact form at http://www.qt.io/contact-us.
##
## GNU Lesser General Public License Usage
## Alternatively, this file may be used under the terms of the GNU Lesser
## General Public License version 2.1 or version 3 as published by the Free
## Software Foundation and appearing in the file LICENSE.LGPLv21 and
## LICENSE.LGPLv3 included in the packaging of this file. Please review the
## following information to ensure the GNU Lesser General Public License
## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
##
## As a special exception, The Qt Company gives you certain additional
## rights. These rights are described in The Qt Company LGPL Exception
## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
##
## $QT_END_LICENSE$
##
#############################################################################
sudo apt-get update
sudo apt-get install -y libboost-dev libboost-thread-dev libboost-system-dev libboost-program-options-dev libboost-filesystem-dev libxml2-dev libboost-regex-dev
TEMPDIR=$(mktemp --directory) || echo "Failed to create temporary directory"
trap "sudo rm -fr $TEMPDIR" EXIT
cd $TEMPDIR
git clone https://github.com/FreeOpcUa/freeopcua.git freeopcua
cd freeopcua
git checkout 57b6993d39b6761af773fa4fa37c3fbd39c764f1
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local ..
make
sudo make install

View File

@@ -1,2 +0,0 @@
#!/bin/sh
defaults write com.apple.CrashReporter DialogType server

View File

@@ -1,2 +0,0 @@
#!/bin/sh
defaults write com.apple.CrashReporter DialogType server

View File

@@ -1,2 +0,0 @@
#!/bin/sh
defaults write com.apple.CrashReporter DialogType server

View File

@@ -1,2 +0,0 @@
#!/bin/sh
defaults write com.apple.CrashReporter DialogType server

View File

@@ -1 +0,0 @@
. "$PSScriptRoot\..\common\icu.ps1"

View File

@@ -1 +0,0 @@
. "$PSScriptRoot\..\common\jom.ps1"

View File

@@ -1 +0,0 @@
. "$PSScriptRoot\..\common\icu.ps1"

View File

@@ -1 +0,0 @@
. "$PSScriptRoot\..\common\jom.ps1"

View File

@@ -1 +0,0 @@
. "$PSScriptRoot\..\common\icu.ps1"

View File

@@ -1 +0,0 @@
. "$PSScriptRoot\..\common\jom.ps1"

View File

@@ -1 +0,0 @@
. "$PSScriptRoot\..\common\patch_qnx.ps1"

View File

@@ -1 +0,0 @@
. "$PSScriptRoot\..\common\icu.ps1"

View File

@@ -1 +0,0 @@
. "$PSScriptRoot\..\common\jom.ps1"

View File

@@ -1 +0,0 @@
. "$PSScriptRoot\..\common\icu.ps1"

View File

@@ -1 +0,0 @@
. "$PSScriptRoot\..\common\jom.ps1"

36
configure vendored
View File

@@ -1,33 +1,41 @@
#! /bin/sh
#############################################################################
##
## Copyright (C) 2015 The Qt Company Ltd.
## Contact: http://www.qt.io/licensing/
## Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
## Contact: http://www.qt-project.org/legal
##
## This file is part of the build tools of the Qt Toolkit.
##
## $QT_BEGIN_LICENSE:LGPL21$
## $QT_BEGIN_LICENSE:LGPL$
## Commercial License Usage
## Licensees holding valid commercial Qt licenses may use this file in
## accordance with the commercial license agreement provided with the
## Software or, alternatively, in accordance with the terms contained in
## a written agreement between you and The Qt Company. For licensing terms
## and conditions see http://www.qt.io/terms-conditions. For further
## information use the contact form at http://www.qt.io/contact-us.
## a written agreement between you and Digia. For licensing terms and
## conditions see http://qt.digia.com/licensing. For further information
## use the contact form at http://qt.digia.com/contact-us.
##
## GNU Lesser General Public License Usage
## Alternatively, this file may be used under the terms of the GNU Lesser
## General Public License version 2.1 or version 3 as published by the Free
## Software Foundation and appearing in the file LICENSE.LGPLv21 and
## LICENSE.LGPLv3 included in the packaging of this file. Please review the
## following information to ensure the GNU Lesser General Public License
## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
## General Public License version 2.1 as published by the Free Software
## Foundation and appearing in the file LICENSE.LGPL included in the
## packaging of this file. Please review the following information to
## ensure the GNU Lesser General Public License version 2.1 requirements
## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
##
## As a special exception, The Qt Company gives you certain additional
## rights. These rights are described in The Qt Company LGPL Exception
## In addition, as a special exception, Digia gives you certain additional
## rights. These rights are described in the Digia Qt LGPL Exception
## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
##
## GNU General Public License Usage
## Alternatively, this file may be used under the terms of the GNU
## General Public License version 3.0 as published by the Free Software
## Foundation and appearing in the file LICENSE.GPL included in the
## packaging of this file. Please review the following information to
## ensure the GNU General Public License version 3.0 requirements will be
## met: http://www.gnu.org/copyleft/gpl.html.
##
##
## $QT_END_LICENSE$
##
#############################################################################

View File

@@ -1,33 +1,41 @@
@echo off
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
:: Copyright (C) 2015 The Qt Company Ltd.
:: Contact: http://www.qt.io/licensing/
:: Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
:: Contact: http://www.qt-project.org/legal
::
:: This file is part of the tools applications of the Qt Toolkit.
::
:: $QT_BEGIN_LICENSE:LGPL21$
:: $QT_BEGIN_LICENSE:LGPL$
:: Commercial License Usage
:: Licensees holding valid commercial Qt licenses may use this file in
:: accordance with the commercial license agreement provided with the
:: Software or, alternatively, in accordance with the terms contained in
:: a written agreement between you and The Qt Company. For licensing terms
:: and conditions see http://www.qt.io/terms-conditions. For further
:: information use the contact form at http://www.qt.io/contact-us.
:: a written agreement between you and Digia. For licensing terms and
:: conditions see http://qt.digia.com/licensing. For further information
:: use the contact form at http://qt.digia.com/contact-us.
::
:: GNU Lesser General Public License Usage
:: Alternatively, this file may be used under the terms of the GNU Lesser
:: General Public License version 2.1 or version 3 as published by the Free
:: Software Foundation and appearing in the file LICENSE.LGPLv21 and
:: LICENSE.LGPLv3 included in the packaging of this file. Please review the
:: following information to ensure the GNU Lesser General Public License
:: requirements will be met: https://www.gnu.org/licenses/lgpl.html and
:: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
:: General Public License version 2.1 as published by the Free Software
:: Foundation and appearing in the file LICENSE.LGPL included in the
:: packaging of this file. Please review the following information to
:: ensure the GNU Lesser General Public License version 2.1 requirements
:: will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
::
:: As a special exception, The Qt Company gives you certain additional
:: rights. These rights are described in The Qt Company LGPL Exception
:: In addition, as a special exception, Digia gives you certain additional
:: rights. These rights are described in the Digia Qt LGPL Exception
:: version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
::
:: GNU General Public License Usage
:: Alternatively, this file may be used under the terms of the GNU
:: General Public License version 3.0 as published by the Free Software
:: Foundation and appearing in the file LICENSE.GPL included in the
:: packaging of this file. Please review the following information to
:: ensure the GNU General Public License version 3.0 requirements will be
:: met: http://www.gnu.org/copyleft/gpl.html.
::
::
:: $QT_END_LICENSE$
::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

BIN
gnuwin32/bin/bison.exe Executable file → Normal file

Binary file not shown.

2
gnuwin32/bin/bison.yacc Normal file
View File

@@ -0,0 +1,2 @@
#! /bin/sh
exec 'c:/progra~1/bison/bin/bison' -y "$@"

File diff suppressed because it is too large Load Diff

View File

@@ -1,544 +0,0 @@
-*- Autoconf -*-
# C++ skeleton for Bison
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# 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_include(b4_pkgdatadir/[c.m4])
# b4_comment(TEXT, [PREFIX])
# --------------------------
# Put TEXT in comment. Prefix all the output lines with PREFIX.
m4_define([b4_comment],
[b4_comment_([$1], [$2// ], [$2// ])])
## -------- ##
## Checks. ##
## -------- ##
b4_percent_define_check_kind([api.namespace], [code], [deprecated])
b4_percent_define_check_kind([parser_class_name], [code], [deprecated])
## ---------------- ##
## Default values. ##
## ---------------- ##
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([[api.location.type]], [[location]])
b4_percent_define_default([[filename_type]], [[std::string]])
# Make it a warning for those who used betas of Bison 3.0.
b4_percent_define_default([[api.namespace]], m4_defn([b4_prefix]))
b4_percent_define_default([[global_tokens_and_yystype]], [[false]])
b4_percent_define_default([[define_location_comparison]],
[m4_if(b4_percent_define_get([[filename_type]]),
[std::string], [[true]], [[false]])])
## ----------- ##
## Namespace. ##
## ----------- ##
m4_define([b4_namespace_ref], [b4_percent_define_get([[api.namespace]])])
# Don't permit an empty b4_namespace_ref. Any '::parser::foo' appended to it
# would compile as an absolute reference with 'parser' in the global namespace.
# b4_namespace_open would open an anonymous namespace and thus establish
# internal linkage. This would compile. However, it's cryptic, and internal
# linkage for the parser would be specified in all translation units that
# include the header, which is always generated. If we ever need to permit
# internal linkage somehow, surely we can find a cleaner approach.
m4_if(m4_bregexp(b4_namespace_ref, [^[ ]*$]), [-1], [],
[b4_complain_at(b4_percent_define_get_loc([[api.namespace]]),
[[namespace reference is empty]])])
# Instead of assuming the C++ compiler will do it, Bison should reject any
# invalid b4_namepsace_ref that would be converted to a valid
# b4_namespace_open. The problem is that Bison doesn't always output
# b4_namespace_ref to uncommented code but should reserve the ability to do so
# in future releases without risking breaking any existing user grammars.
# Specifically, don't allow empty names as b4_namespace_open would just convert
# those into anonymous namespaces, and that might tempt some users.
m4_if(m4_bregexp(b4_namespace_ref, [::[ ]*::]), [-1], [],
[b4_complain_at(b4_percent_define_get_loc([[api.namespace]]),
[[namespace reference has consecutive "::"]])])
m4_if(m4_bregexp(b4_namespace_ref, [::[ ]*$]), [-1], [],
[b4_complain_at(b4_percent_define_get_loc([[api.namespace]]),
[[namespace reference has a trailing "::"]])])
m4_define([b4_namespace_open],
[b4_user_code([b4_percent_define_get_syncline([[api.namespace]])
[namespace ]m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref),
[^\(.\)[ ]*::], [\1])),
[::], [ { namespace ])[ {]])])
m4_define([b4_namespace_close],
[b4_user_code([b4_percent_define_get_syncline([[api.namespace]])
m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref[ ]),
[^\(.\)[ ]*\(::\)?\([^][:]\|:[^:]\)*],
[\1])),
[::\([^][:]\|:[^:]\)*], [} ])[} // ]b4_namespace_ref])])
# b4_token_enums
# --------------
# Output the definition of the tokens as enums.
m4_define([b4_token_enums],
[[enum yytokentype
{
]m4_join([,
],
b4_symbol_map([b4_token_enum]))[
};]dnl
])
## ----------------- ##
## Semantic Values. ##
## ----------------- ##
# b4_value_type_declare
# ---------------------
# Declare semantic_type.
m4_define([b4_value_type_declare],
[b4_value_type_setup[]dnl
[ /// Symbol semantic values.
]m4_bmatch(b4_percent_define_get_kind([[api.value.type]]),
[code],
[[ typedef ]b4_percent_define_get([[api.value.type]])[ semantic_type;]],
[m4_bmatch(b4_percent_define_get([[api.value.type]]),
[union\|union-directive],
[[ union semantic_type
{
]b4_user_union_members[
};]])])dnl
])
# b4_public_types_declare
# -----------------------
# Define the public types: token, semantic value, location, and so forth.
# Depending on %define token_lex, may be output in the header or source file.
m4_define([b4_public_types_declare],
[[#ifndef ]b4_api_PREFIX[STYPE
]b4_value_type_declare[
#else
typedef ]b4_api_PREFIX[STYPE semantic_type;
#endif]b4_locations_if([
/// Symbol locations.
typedef b4_percent_define_get([[api.location.type]],
[[location]]) location_type;])[
/// Syntax errors thrown from user actions.
struct syntax_error : std::runtime_error
{
syntax_error (]b4_locations_if([const location_type& l, ])[const std::string& m);]b4_locations_if([
location_type location;])[
};
/// Tokens.
struct token
{
]b4_token_enums[
};
/// (External) token type, as returned by yylex.
typedef token::yytokentype token_type;
/// Internal symbol number.
typedef int symbol_number_type;
/// Internal symbol number for tokens (subsumed by symbol_number_type).
typedef ]b4_int_type_for([b4_translate])[ token_number_type;
/// A complete symbol.
///
/// Expects its Base type to provide access to the symbol type
/// via type_get().
///
/// Provide access to semantic value]b4_locations_if([ and location])[.
template <typename Base>
struct basic_symbol : Base
{
/// Alias to Base.
typedef Base super_type;
/// Default constructor.
basic_symbol ();
/// Copy constructor.
basic_symbol (const basic_symbol& other);
]b4_variant_if([[
/// Constructor for valueless symbols, and symbols from each type.
]b4_type_foreach([b4_basic_symbol_constructor_declare])], [[
/// Constructor for valueless symbols.
basic_symbol (typename Base::kind_type t]b4_locations_if([,
const location_type& l])[);]])[
/// Constructor for symbols with semantic value.
basic_symbol (typename Base::kind_type t,
const semantic_type& v]b4_locations_if([,
const location_type& l])[);
~basic_symbol ();
/// Destructive move, \a s is emptied into this.
void move (basic_symbol& s);
/// The semantic value.
semantic_type value;]b4_locations_if([
/// The location.
location_type location;])[
private:
/// Assignment operator.
basic_symbol& operator= (const basic_symbol& other);
};
/// Type access provider for token (enum) based symbols.
struct by_type
{
/// Default constructor.
by_type ();
/// Copy constructor.
by_type (const by_type& other);
/// The symbol type as needed by the constructor.
typedef token_type kind_type;
/// Constructor from (external) token numbers.
by_type (kind_type t);
/// Steal the symbol type from \a that.
void move (by_type& that);
/// The (internal) type number (corresponding to \a type).
/// -1 when this symbol is empty.
symbol_number_type type_get () const;
/// The token.
token_type token () const;
enum { empty = 0 };
/// The symbol type.
/// -1 when this symbol is empty.
token_number_type type;
};
/// "External" symbols: returned by the scanner.
typedef basic_symbol<by_type> symbol_type;
]b4_symbol_constructor_declare])
# b4_public_types_define
# ----------------------
# Provide the implementation needed by the public types.
m4_define([b4_public_types_define],
[[ inline
]b4_parser_class_name[::syntax_error::syntax_error (]b4_locations_if([const location_type& l, ])[const std::string& m)
: std::runtime_error (m)]b4_locations_if([
, location (l)])[
{}
// basic_symbol.
template <typename Base>
inline
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol ()
: value ()
{}
template <typename Base>
inline
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (const basic_symbol& other)
: Base (other)
, value ()]b4_locations_if([
, location (other.location)])[
{
]b4_variant_if([b4_symbol_variant([other.type_get ()], [value], [copy],
[other.value])],
[value = other.value;])[
}
template <typename Base>
inline
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (]b4_join(
[typename Base::kind_type t],
[const semantic_type& v],
b4_locations_if([const location_type& l]))[)
: Base (t)
, value (]b4_variant_if([], [v])[)]b4_locations_if([
, location (l)])[
{]b4_variant_if([[
(void) v;
]b4_symbol_variant([this->type_get ()], [value], [copy], [v])])[}
]b4_variant_if([[
// Implementation of basic_symbol constructor for each type.
]b4_type_foreach([b4_basic_symbol_constructor_define])], [[
/// Constructor for valueless symbols.
template <typename Base>
inline
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (]b4_join(
[typename Base::kind_type t],
b4_locations_if([const location_type& l]))[)
: Base (t)
, value ()]b4_locations_if([
, location (l)])[
{}]])[
template <typename Base>
inline
]b4_parser_class_name[::basic_symbol<Base>::~basic_symbol ()
{]b4_variant_if([[
// User destructor.
symbol_number_type yytype = this->type_get ();
switch (yytype)
{
]b4_symbol_foreach([b4_symbol_destructor])dnl
[ default:
break;
}
// Type destructor.
]b4_symbol_variant([[yytype]], [[value]], [[template destroy]])])[
}
template <typename Base>
inline
void
]b4_parser_class_name[::basic_symbol<Base>::move (basic_symbol& s)
{
super_type::move(s);
]b4_variant_if([b4_symbol_variant([this->type_get ()], [value], [move],
[s.value])],
[value = s.value;])[]b4_locations_if([
location = s.location;])[
}
// by_type.
inline
]b4_parser_class_name[::by_type::by_type ()
: type (empty)
{}
inline
]b4_parser_class_name[::by_type::by_type (const by_type& other)
: type (other.type)
{}
inline
]b4_parser_class_name[::by_type::by_type (token_type t)
: type (yytranslate_ (t))
{}
inline
void
]b4_parser_class_name[::by_type::move (by_type& that)
{
type = that.type;
that.type = empty;
}
inline
int
]b4_parser_class_name[::by_type::type_get () const
{
return type;
}
]b4_token_ctor_if([[
inline
]b4_parser_class_name[::token_type
]b4_parser_class_name[::by_type::token () const
{
// YYTOKNUM[NUM] -- (External) token number corresponding to the
// (internal) symbol number NUM (which must be that of a token). */
static
const ]b4_int_type_for([b4_toknum])[
yytoken_number_[] =
{
]b4_toknum[
};
return static_cast<token_type> (yytoken_number_[type]);
}
]])[]dnl
b4_symbol_constructor_define])
# b4_symbol_constructor_declare
# b4_symbol_constructor_define
# -----------------------------
# Declare/define symbol constructors for all the value types.
# Use at class-level. Redefined in variant.hh.
m4_define([b4_symbol_constructor_declare], [])
m4_define([b4_symbol_constructor_define], [])
# b4_yytranslate_define
# ---------------------
# Define yytranslate_. Sometimes used in the header file,
# sometimes in the cc file.
m4_define([b4_yytranslate_define],
[[ // Symbol number corresponding to token number t.
inline
]b4_parser_class_name[::token_number_type
]b4_parser_class_name[::yytranslate_ (]b4_token_ctor_if([token_type],
[int])[ t)
{
static
const token_number_type
translate_table[] =
{
]b4_translate[
};
const unsigned int user_token_number_max_ = ]b4_user_token_number_max[;
const token_number_type undef_token_ = ]b4_undef_token_number[;
if (static_cast<int>(t) <= yyeof_)
return yyeof_;
else if (static_cast<unsigned int> (t) <= user_token_number_max_)
return translate_table[t];
else
return undef_token_;
}
]])
# b4_lhs_value([TYPE])
# --------------------
# Expansion of $<TYPE>$.
m4_define([b4_lhs_value],
[b4_symbol_value([yyval], [$1])])
# b4_rhs_value(RULE-LENGTH, NUM, [TYPE])
# --------------------------------------
# Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
# symbols on RHS.
m4_define([b4_rhs_value],
[b4_symbol_value([yysemantic_stack_@{($1) - ($2)@}], [$3])])
# b4_lhs_location()
# -----------------
# Expansion of @$.
m4_define([b4_lhs_location],
[(yyloc)])
# b4_rhs_location(RULE-LENGTH, NUM)
# ---------------------------------
# Expansion of @NUM, where the current rule has RULE-LENGTH symbols
# on RHS.
m4_define([b4_rhs_location],
[(yylocation_stack_@{($1) - ($2)@})])
# b4_parse_param_decl
# -------------------
# Extra formal arguments of the constructor.
# Change the parameter names from "foo" into "foo_yyarg", so that
# there is no collision bw the user chosen attribute name, and the
# argument name in the constructor.
m4_define([b4_parse_param_decl],
[m4_ifset([b4_parse_param],
[m4_map_sep([b4_parse_param_decl_1], [, ], [b4_parse_param])])])
m4_define([b4_parse_param_decl_1],
[$1_yyarg])
# b4_parse_param_cons
# -------------------
# Extra initialisations of the constructor.
m4_define([b4_parse_param_cons],
[m4_ifset([b4_parse_param],
[
b4_cc_constructor_calls(b4_parse_param)])])
m4_define([b4_cc_constructor_calls],
[m4_map_sep([b4_cc_constructor_call], [,
], [$@])])
m4_define([b4_cc_constructor_call],
[$2 ($2_yyarg)])
# b4_parse_param_vars
# -------------------
# Extra instance variables.
m4_define([b4_parse_param_vars],
[m4_ifset([b4_parse_param],
[
// User arguments.
b4_cc_var_decls(b4_parse_param)])])
m4_define([b4_cc_var_decls],
[m4_map_sep([b4_cc_var_decl], [
], [$@])])
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
]])
## -------- ##
## Checks. ##
## -------- ##
b4_token_ctor_if([b4_variant_if([],
[b4_fatal_at(b4_percent_define_get_loc(api.token.constructor),
[cannot use '%s' without '%s'],
[%define api.token.constructor],
[%define api.value.type variant]))])])

View File

@@ -1,65 +0,0 @@
-*- Autoconf -*-
# Common code for C-like languages (C, C++, Java, etc.)
# Copyright (C) 2012-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# b4_comment_(TEXT, OPEN, CONTINUE, END)
# --------------------------------------
# Put TEXT in comment. Avoid trailing spaces: don't indent empty lines.
# Avoid adding indentation to the first line, as the indentation comes
# from OPEN. That's why we don't patsubst([$1], [^\(.\)], [ \1]).
#
# Prefix all the output lines with PREFIX.
m4_define([b4_comment_],
[$2[]m4_bpatsubst(m4_expand([[$1]]), [
\(.\)], [
$3\1])$4])
# b4_comment(TEXT, [PREFIX])
# --------------------------
# Put TEXT in comment. Prefix all the output lines with PREFIX.
m4_define([b4_comment],
[b4_comment_([$1], [$2/* ], [$2 ], [ */])])
# 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_],
[b4_symbol_value([$1],
m4_if([$2], [[]],
[[$3]], [[$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
])

View File

@@ -1,839 +0,0 @@
-*- Autoconf -*-
# C M4 Macros for Bison.
# Copyright (C) 2002, 2004-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# 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_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. ##
## ---------------- ##
# b4_identification
# -----------------
# Depends on individual skeletons to define b4_pure_flag, b4_push_flag, or
# b4_pull_flag if they use the values of the %define variables api.pure or
# api.push-pull.
m4_define([b4_identification],
[[/* Identify Bison output. */
#define YYBISON 1
/* Bison version. */
#define YYBISON_VERSION "]b4_version["
/* Skeleton name. */
#define YYSKELETON_NAME ]b4_skeleton[]m4_ifdef([b4_pure_flag], [[
/* Pure parsers. */
#define YYPURE ]b4_pure_flag])[]m4_ifdef([b4_push_flag], [[
/* Push parsers. */
#define YYPUSH ]b4_push_flag])[]m4_ifdef([b4_pull_flag], [[
/* Pull parsers. */
#define YYPULL ]b4_pull_flag])[
]])
## ---------------- ##
## Default values. ##
## ---------------- ##
# 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])
## ------------------------ ##
## Pure/impure interfaces. ##
## ------------------------ ##
# b4_lex_formals
# --------------
# All the yylex formal arguments.
# b4_lex_param arrives quoted twice, but we want to keep only one level.
m4_define([b4_lex_formals],
[b4_pure_if([[[[YYSTYPE *yylvalp]], [[&yylval]]][]dnl
b4_locations_if([, [[YYLTYPE *yyllocp], [&yylloc]]])])dnl
m4_ifdef([b4_lex_param], [, ]b4_lex_param)])
# b4_lex
# ------
# Call yylex.
m4_define([b4_lex],
[b4_function_call([yylex], [int], b4_lex_formals)])
# b4_user_args
# ------------
m4_define([b4_user_args],
[m4_ifset([b4_parse_param], [, b4_args(b4_parse_param)])])
# b4_parse_param
# --------------
# If defined, b4_parse_param arrives double quoted, but below we prefer
# it to be single quoted.
m4_define([b4_parse_param],
b4_parse_param)
# b4_parse_param_for(DECL, FORMAL, BODY)
# ---------------------------------------
# Iterate over the user parameters, binding the declaration to DECL,
# the formal name to FORMAL, and evaluating the BODY.
m4_define([b4_parse_param_for],
[m4_foreach([$1_$2], m4_defn([b4_parse_param]),
[m4_pushdef([$1], m4_unquote(m4_car($1_$2)))dnl
m4_pushdef([$2], m4_shift($1_$2))dnl
$3[]dnl
m4_popdef([$2])dnl
m4_popdef([$1])dnl
])])
# b4_parse_param_use([VAL], [LOC])
# --------------------------------
# 'YYUSE' VAL, LOC if locations are enabled, and all the parse-params.
m4_define([b4_parse_param_use],
[m4_ifvaln([$1], [ YYUSE ([$1]);])dnl
b4_locations_if([m4_ifvaln([$2], [ YYUSE ([$2]);])])dnl
b4_parse_param_for([Decl], [Formal], [ YYUSE (Formal);
])dnl
])
## ------------ ##
## Data Types. ##
## ------------ ##
# b4_int_type(MIN, MAX)
# ---------------------
# Return the smallest int type able to handle numbers ranging from
# MIN to MAX (included).
m4_define([b4_int_type],
[m4_if(b4_ints_in($@, [0], [255]), [1], [unsigned char],
b4_ints_in($@, [-128], [127]), [1], [signed char],
b4_ints_in($@, [0], [65535]), [1], [unsigned short int],
b4_ints_in($@, [-32768], [32767]), [1], [short int],
m4_eval([0 <= $1]), [1], [unsigned int],
[int])])
# b4_int_type_for(NAME)
# ---------------------
# Return the smallest int type able to handle numbers ranging from
# 'NAME_min' to 'NAME_max' (included).
m4_define([b4_int_type_for],
[b4_int_type($1_min, $1_max)])
# b4_table_value_equals(TABLE, VALUE, LITERAL)
# --------------------------------------------
# Without inducing a comparison warning from the compiler, check if the
# literal value LITERAL equals VALUE from table TABLE, which must have
# TABLE_min and TABLE_max defined.
m4_define([b4_table_value_equals],
[m4_if(m4_eval($3 < m4_indir([b4_]$1[_min])
|| m4_indir([b4_]$1[_max]) < $3), [1],
[[0]],
[(!!(($2) == ($3)))])])
## ----------------- ##
## Compiler issues. ##
## ----------------- ##
# b4_attribute_define
# -------------------
# Provide portability for __attribute__.
m4_define([b4_attribute_define],
[#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
# if (! defined __GNUC__ || __GNUC__ < 2 \
|| (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
# define __attribute__(Spec) /* empty */
# endif
#endif
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
# define YYUSE(E) ((void) (E))
#else
# define YYUSE(E) /* empty */
#endif
#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
# define YY_INITIAL_VALUE(Value) Value
#endif
#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
])
## ---------##
## Values. ##
## ---------##
# 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])
# b4_integral_parser_table_define(TABLE-NAME, CONTENT, COMMENT)
# -------------------------------------------------------------
# Define "yy<TABLE-NAME>" whose contents is CONTENT.
m4_define([b4_integral_parser_table_define],
[m4_ifvaln([$3], [b4_comment([$3], [ ])])dnl
static const b4_int_type_for([$2]) yy$1[[]] =
{
$2
};dnl
])
## ------------------------- ##
## Assigning token numbers. ##
## ------------------------- ##
# b4_token_define(TOKEN-NUM)
# --------------------------
# Output the definition of this token as #define.
m4_define([b4_token_define],
[b4_token_format([#define %s %s], [$1])])
# b4_token_defines
# ----------------
# Output the definition of the tokens.
m4_define([b4_token_defines],
[b4_any_token_visible_if([/* Tokens. */
m4_join([
], b4_symbol_map([b4_token_define]))
])])
# b4_token_enum(TOKEN-NUM)
# ------------------------
# Output the definition of this token as an enum.
m4_define([b4_token_enum],
[b4_token_format([%s = %s], [$1])])
# b4_token_enums
# --------------
# Output the definition of the tokens (if there are) as enums.
m4_define([b4_token_enums],
[b4_any_token_visible_if([[/* Token type. */
#ifndef ]b4_api_PREFIX[TOKENTYPE
# define ]b4_api_PREFIX[TOKENTYPE
enum ]b4_api_prefix[tokentype
{
]m4_join([,
],
b4_symbol_map([b4_token_enum]))[
};
#endif
]])])
# b4_token_enums_defines
# ----------------------
# Output the definition of the tokens (if there are any) as enums and,
# if POSIX Yacc is enabled, as #defines.
m4_define([b4_token_enums_defines],
[b4_token_enums[]b4_yacc_if([b4_token_defines])])
## ----------------- ##
## Semantic Values. ##
## ----------------- ##
# b4_symbol_value(VAL, [TYPE])
# ----------------------------
# Given a semantic value VAL ($$, $1 etc.), extract its value of type
# TYPE if TYPE is given, otherwise just return VAL. The result can be
# used safetly, it is put in parens to avoid nasty precedence issues.
# TYPE is *not* put in braces, provide some if needed.
m4_define([b4_symbol_value],
[($1[]m4_ifval([$2], [.$2]))])
## ---------------------- ##
## Defining C functions. ##
## ---------------------- ##
# b4_function_define(NAME, RETURN-VALUE, [DECL1, NAME1], ...)
# -----------------------------------------------------------
# Declare the function NAME in C.
m4_define([b4_function_define],
[$2
$1 (b4_formals(m4_shift2($@)))[]dnl
])
# b4_formals([DECL1, NAME1], ...)
# -------------------------------
# The formal arguments of a C function definition.
m4_define([b4_formals],
[m4_if([$#], [0], [void],
[$#$1], [1], [void],
[m4_map_sep([b4_formal], [, ], [$@])])])
m4_define([b4_formal],
[$1])
## ----------------------- ##
## Declaring C functions. ##
## ----------------------- ##
# b4_function_declare(NAME, RETURN-VALUE, [DECL1, NAME1], ...)
# ------------------------------------------------------------
# Declare the function NAME.
m4_define([b4_function_declare],
[$2 $1 (b4_formals(m4_shift2($@)));[]dnl
])
## --------------------- ##
## Calling C functions. ##
## --------------------- ##
# b4_function_call(NAME, RETURN-VALUE, [DECL1, NAME1], ...)
# -----------------------------------------------------------
# Call the function NAME with arguments NAME1, NAME2 etc.
m4_define([b4_function_call],
[$1 (b4_args(m4_shift2($@)))[]dnl
])
# b4_args([DECL1, NAME1], ...)
# ----------------------------
# Output the arguments NAME1, NAME2...
m4_define([b4_args],
[m4_map_sep([b4_arg], [, ], [$@])])
m4_define([b4_arg],
[$2])
## ----------- ##
## Synclines. ##
## ----------- ##
# b4_sync_start(LINE, FILE)
# -------------------------
m4_define([b4_sync_start], [[#]line $1 $2])
## -------------- ##
## User actions. ##
## -------------- ##
# b4_case(LABEL, STATEMENTS)
# --------------------------
m4_define([b4_case],
[ case $1:
$2
b4_syncline([@oline@], [@ofile@])
break;])
# b4_predicate_case(LABEL, CONDITIONS)
# ------------------------------------
m4_define([b4_predicate_case],
[ case $1:
if (! ($2)) YYERROR;
b4_syncline([@oline@], [@ofile@])
break;])
# b4_yydestruct_define
# --------------------
# Define the "yydestruct" function.
m4_define_default([b4_yydestruct_define],
[[/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
]b4_function_define([yydestruct],
[static void],
[[const char *yymsg], [yymsg]],
[[int yytype], [yytype]],
[[YYSTYPE *yyvaluep], [yyvaluep]][]dnl
b4_locations_if( [, [[YYLTYPE *yylocationp], [yylocationp]]])[]dnl
m4_ifset([b4_parse_param], [, b4_parse_param]))[
{
]b4_parse_param_use([yyvaluep], [yylocationp])dnl
[ if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
]b4_symbol_actions([destructor])[
YY_IGNORE_MAYBE_UNINITIALIZED_END
}]dnl
])
# b4_yy_symbol_print_define
# -------------------------
# Define the "yy_symbol_print" function.
m4_define_default([b4_yy_symbol_print_define],
[[
/*----------------------------------------.
| Print this symbol's value on YYOUTPUT. |
`----------------------------------------*/
]b4_function_define([yy_symbol_value_print],
[static void],
[[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;
]b4_parse_param_use([yyo], [yylocationp])dnl
[ if (!yyvaluep)
return;]
dnl glr.c does not feature yytoknum.
m4_if(b4_skeleton, ["yacc.c"],
[[# ifdef YYPRINT
if (yytype < YYNTOKENS)
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# endif
]])dnl
b4_symbol_actions([printer])[
}
/*--------------------------------.
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
]b4_function_define([yy_symbol_print],
[static void],
[[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]))[
{
YYFPRINTF (yyoutput, "%s %s (",
yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
]b4_locations_if([ YY_LOCATION_PRINT (yyoutput, *yylocationp);
YYFPRINTF (yyoutput, ": ");
])dnl
[ yy_symbol_value_print (yyoutput, yytype, yyvaluep]dnl
b4_locations_if([, yylocationp])[]b4_user_args[);
YYFPRINTF (yyoutput, ")");
}]dnl
])
## ---------------- ##
## api.value.type. ##
## ---------------- ##
# ---------------------- #
# api.value.type=union. #
# ---------------------- #
# b4_symbol_type_register(SYMBOL-NUM)
# -----------------------------------
# Symbol SYMBOL-NUM has a type (for variant) instead of a type-tag.
# Extend the definition of %union's body with a field of that type,
# and extend the symbol's "type" field to point to the field name,
# instead of the type name.
m4_define([b4_symbol_type_register],
[m4_define([b4_symbol($1, type_tag)],
[b4_symbol_if([$1], [has_id],
[b4_symbol([$1], [id])],
[yytype_[]b4_symbol([$1], [number])])])dnl
m4_append([b4_user_union_members],
m4_expand([
b4_symbol_tag_comment([$1])dnl
b4_symbol([$1], [type]) b4_symbol([$1], [type_tag]);]))
])
# b4_type_define_tag(SYMBOL1-NUM, ...)
# ------------------------------------
# For the batch of symbols SYMBOL1-NUM... (which all have the same
# type), enhance the %union definition for each of them, and set
# there "type" field to the field tag name, instead of the type name.
m4_define([b4_type_define_tag],
[b4_symbol_if([$1], [has_type],
[m4_map([b4_symbol_type_register], [$@])])
])
# b4_symbol_value_union(VAL, [TYPE])
# ----------------------------------
# Same of b4_symbol_value, but when api.value.type=union.
m4_define([b4_symbol_value_union],
[m4_ifval([$2],
[(*($2*)(&$1))],
[$1])])
])
# b4_value_type_setup_union
# -------------------------
# Setup support for api.value.type=union. Symbols are defined with a
# type instead of a union member name: build the corresponding union,
# and give the symbols their tag.
m4_define([b4_value_type_setup_union],
[m4_define([b4_union_members])
b4_type_foreach([b4_type_define_tag])
m4_copy_force([b4_symbol_value_union], [b4_symbol_value])
])
# ---------------- #
# api.value.type. #
# ---------------- #
# b4_value_type_setup_variant
# ---------------------------
# Setup support for api.value.type=variant. By default, fail, specialized
# by other skeletons.
m4_define([b4_value_type_setup_variant],
[b4_complain_at(b4_percent_define_get_loc([[api.value.type]]),
[['%s' does not support '%s']],
[b4_skeleton],
[%define api.value.type variant])])
# _b4_value_type_setup_keyword
# ----------------------------
# api.value.type is defined with a keyword/string syntax. Check if
# that is properly defined, and prepare its use.
m4_define([_b4_value_type_setup_keyword],
[b4_percent_define_check_values([[[[api.value.type]],
[[none]],
[[union]],
[[union-directive]],
[[variant]],
[[yystype]]]])dnl
m4_case(b4_percent_define_get([[api.value.type]]),
[union], [b4_value_type_setup_union],
[variant], [b4_value_type_setup_variant])])
# b4_value_type_setup
# -------------------
# Check if api.value.type is properly defined, and possibly prepare
# its use.
b4_define_silent([b4_value_type_setup],
[# Define default value.
b4_percent_define_ifdef([[api.value.type]], [],
[# %union => api.value.type=union-directive
m4_ifdef([b4_union_members],
[m4_define([b4_percent_define_kind(api.value.type)], [keyword])
m4_define([b4_percent_define(api.value.type)], [union-directive])],
[# no tag seen => api.value.type={int}
m4_if(b4_tag_seen_flag, 0,
[m4_define([b4_percent_define_kind(api.value.type)], [code])
m4_define([b4_percent_define(api.value.type)], [int])],
[# otherwise api.value.type=yystype
m4_define([b4_percent_define_kind(api.value.type)], [keyword])
m4_define([b4_percent_define(api.value.type)], [yystype])])])])
# Set up.
m4_bmatch(b4_percent_define_get_kind([[api.value.type]]),
[keyword\|string], [_b4_value_type_setup_keyword])
])
## -------------- ##
## Declarations. ##
## -------------- ##
# b4_value_type_define
# --------------------
m4_define([b4_value_type_define],
[b4_value_type_setup[]dnl
/* Value type. */
m4_bmatch(b4_percent_define_get_kind([[api.value.type]]),
[code],
[[#if ! defined ]b4_api_PREFIX[STYPE && ! defined ]b4_api_PREFIX[STYPE_IS_DECLARED
typedef ]b4_percent_define_get([[api.value.type]])[ ]b4_api_PREFIX[STYPE;
# define ]b4_api_PREFIX[STYPE_IS_TRIVIAL 1
# define ]b4_api_PREFIX[STYPE_IS_DECLARED 1
#endif
]],
[m4_bmatch(b4_percent_define_get([[api.value.type]]),
[union\|union-directive],
[[#if ! defined ]b4_api_PREFIX[STYPE && ! defined ]b4_api_PREFIX[STYPE_IS_DECLARED
typedef union ]b4_union_name[ ]b4_api_PREFIX[STYPE;
union ]b4_union_name[
{
]b4_user_union_members[
};
# define ]b4_api_PREFIX[STYPE_IS_TRIVIAL 1
# define ]b4_api_PREFIX[STYPE_IS_DECLARED 1
#endif
]])])])
# b4_location_type_define
# -----------------------
m4_define([b4_location_type_define],
[[/* Location type. */
#if ! defined ]b4_api_PREFIX[LTYPE && ! defined ]b4_api_PREFIX[LTYPE_IS_DECLARED
typedef struct ]b4_api_PREFIX[LTYPE ]b4_api_PREFIX[LTYPE;
struct ]b4_api_PREFIX[LTYPE
{
int first_line;
int first_column;
int last_line;
int last_column;
};
# define ]b4_api_PREFIX[LTYPE_IS_DECLARED 1
# define ]b4_api_PREFIX[LTYPE_IS_TRIVIAL 1
#endif
]])
# 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],
[b4_value_type_define[]b4_locations_if([
b4_location_type_define])
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],
[[/* Debug traces. */
]m4_if(b4_api_prefix, [yy],
[[#ifndef YYDEBUG
# define YYDEBUG ]b4_parse_trace_if([1], [0])[
#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_parse_trace_if([1], [0])[
# 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 (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 (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_function_define([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 += YYFPRINTF (yyo, "%d", yylocp->first_line);
if (0 <= yylocp->first_column)
res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
}
if (0 <= yylocp->last_line)
{
if (yylocp->first_line < yylocp->last_line)
{
res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
if (0 <= end_col)
res += YYFPRINTF (yyo, ".%d", end_col);
}
else if (0 <= end_col && yylocp->first_column < end_col)
res += YYFPRINTF (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
]])

File diff suppressed because it is too large Load Diff

View File

@@ -1,345 +0,0 @@
# C++ GLR skeleton for Bison
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# 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/>.
# This skeleton produces a C++ class that encapsulates a C glr parser.
# This is in order to reduce the maintenance burden. The glr.c
# skeleton is clean and pure enough so that there are no real
# problems. The C++ interface is the same as that of lalr1.cc. In
# fact, glr.c can replace yacc.c without the user noticing any
# difference, and similarly for glr.cc replacing lalr1.cc.
#
# The passing of parse-params
#
# The additional arguments are stored as members of the parser
# object, yyparser. The C routines need to carry yyparser
# throughout the C parser; that's easy: make yyparser an
# additional parse-param. But because the C++ skeleton needs to
# know the "real" original parse-param, we save them
# (b4_parse_param_orig). Note that b4_parse_param is overquoted
# (and c.m4 strips one level of quotes). This is a PITA, and
# explains why there are so many levels of quotes.
#
# The locations
#
# We use location.cc just like lalr1.cc, but because glr.c stores
# the locations in a union, the position and location classes
# must not have a constructor. Therefore, contrary to lalr1.cc, we
# must not define "b4_location_constructors". As a consequence the
# user must initialize the first positions (in particular the
# filename member).
# We require a pure interface.
m4_define([b4_pure_flag], [1])
m4_include(b4_pkgdatadir/[c++.m4])
b4_bison_locations_if([m4_include(b4_pkgdatadir/[location.cc])])
m4_define([b4_parser_class_name],
[b4_percent_define_get([[parser_class_name]])])
# Save the parse parameters.
m4_define([b4_parse_param_orig], m4_defn([b4_parse_param]))
# b4_parse_param_wrap
# -------------------
# New ones.
m4_ifset([b4_parse_param],
[m4_define([b4_parse_param_wrap],
[[b4_namespace_ref::b4_parser_class_name[& yyparser], [[yyparser]]],]
m4_defn([b4_parse_param]))],
[m4_define([b4_parse_param_wrap],
[[b4_namespace_ref::b4_parser_class_name[& yyparser], [[yyparser]]]])
])
# b4_yy_symbol_print_define
# -------------------------
# Bypass the default implementation to generate the "yy_symbol_print"
# and "yy_symbol_value_print" functions.
m4_define([b4_yy_symbol_print_define],
[[
/*--------------------.
| Print this symbol. |
`--------------------*/
]b4_function_define([yy_symbol_print],
[static void],
[[FILE *], []],
[[int yytype], [yytype]],
[[const ]b4_namespace_ref::b4_parser_class_name[::semantic_type *yyvaluep],
[yyvaluep]][]dnl
b4_locations_if([,
[[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_bison_locations_if([m4_define([b4_initial_action],
[yylloc.initialize ();]m4_ifdef([b4_initial_action], [
m4_defn([b4_initial_action])]))])[
# Hijack the post prologue to insert early definition of YYLLOC_DEFAULT
# and declaration of yyerror.
]m4_append([b4_post_prologue],
[b4_syncline([@oline@], [@ofile@])[
]b4_yylloc_default_define[
#define YYRHSLOC(Rhs, K) ((Rhs)[K].yystate.yyloc)
]b4_function_declare([yyerror],
[static void],b4_locations_if([
[[const ]b4_namespace_ref::b4_parser_class_name[::location_type *yylocationp],
[yylocationp]],])
b4_parse_param,
[[const char* msg], [msg]])])
#undef yynerrs
#undef yychar
#undef yylval]b4_locations_if([
#undef yylloc])
m4_if(b4_prefix, [yy], [],
[[/* Substitute the variable and function names. */
#define yyparse ]b4_prefix[parse
#define yylex ]b4_prefix[lex
#define yyerror ]b4_prefix[error
#define yydebug ]b4_prefix[debug
]]b4_pure_if([], [[
#define yylval ]b4_prefix[lval
#define yychar ]b4_prefix[char
#define yynerrs ]b4_prefix[nerrs]b4_locations_if([[
#define yylloc ]b4_prefix[lloc]])]))
# Hijack the epilogue to define implementations (yyerror, parser member
# functions etc.).
m4_append([b4_epilogue],
[b4_syncline([@oline@], [@ofile@])[
/*------------------.
| Report an error. |
`------------------*/
]b4_function_define([yyerror],
[static void],b4_locations_if([
[[const ]b4_namespace_ref::b4_parser_class_name[::location_type *yylocationp],
[yylocationp]],])
b4_parse_param,
[[const char* msg], [msg]])[
{
]b4_parse_param_use[]dnl
[ yyparser.error (]b4_locations_if([[*yylocationp, ]])[msg);
}
]b4_namespace_open[
]dnl In this section, the parse params are the original parse_params.
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 ]b4_api_PREFIX[DEBUG
]m4_ifset([b4_parse_param], [ ], [ :])[yycdebug_ (&std::cerr)]m4_ifset([b4_parse_param], [,])[
#endif]b4_parse_param_cons[
{
}
]b4_parser_class_name::~b4_parser_class_name[ ()
{
}
int
]b4_parser_class_name[::parse ()
{
return ::yyparse (*this]b4_user_args[);
}
#if ]b4_api_PREFIX[DEBUG
/*--------------------.
| Print this symbol. |
`--------------------*/
inline void
]b4_parser_class_name[::yy_symbol_value_print_ (int yytype,
const semantic_type* yyvaluep]b4_locations_if([[,
const location_type* yylocationp]])[)
{]b4_locations_if([[
YYUSE (yylocationp);]])[
YYUSE (yyvaluep);
std::ostream& yyoutput = debug_stream ();
std::ostream& yyo = yyoutput;
YYUSE (yyo);
]b4_symbol_actions([printer])[
}
void
]b4_parser_class_name[::yy_symbol_print_ (int yytype,
const semantic_type* yyvaluep]b4_locations_if([[,
const location_type* yylocationp]])[)
{
*yycdebug_ << (yytype < YYNTOKENS ? "token" : "nterm")
<< ' ' << yytname[yytype] << " ("]b4_locations_if([[
<< *yylocationp << ": "]])[;
yy_symbol_value_print_ (yytype, yyvaluep]b4_locations_if([[, yylocationp]])[);
*yycdebug_ << ')';
}
std::ostream&
]b4_parser_class_name[::debug_stream () const
{
return *yycdebug_;
}
void
]b4_parser_class_name[::set_debug_stream (std::ostream& o)
{
yycdebug_ = &o;
}
]b4_parser_class_name[::debug_level_type
]b4_parser_class_name[::debug_level () const
{
return yydebug;
}
void
]b4_parser_class_name[::set_debug_level (debug_level_type l)
{
// Actually, it is yydebug which is really used.
yydebug = l;
}
#endif
]m4_popdef([b4_parse_param])dnl
b4_namespace_close
])
# 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],
[m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
b4_percent_code_get([[requires]])[
#include <stdexcept>
#include <string>
#include <iostream>]b4_defines_if([
b4_bison_locations_if([[#include "location.hh"]])])[
]b4_YYDEBUG_define[
]b4_namespace_open[
]b4_defines_if([],
[b4_bison_locations_if([b4_position_define
b4_location_define])])[
/// A Bison parser.
class ]b4_parser_class_name[
{
public:
]b4_public_types_declare[
/// Build a parser object.
]b4_parser_class_name[ (]b4_parse_param_decl[);
virtual ~]b4_parser_class_name[ ();
/// Parse.
/// \returns 0 iff parsing succeeded.
virtual int parse ();
/// The current debugging stream.
std::ostream& debug_stream () const;
/// Set the current debugging stream.
void set_debug_stream (std::ostream &);
/// Type for debugging levels.
typedef int debug_level_type;
/// The current debugging level.
debug_level_type debug_level () const;
/// Set the current debugging level.
void set_debug_level (debug_level_type l);
public:
/// Report a syntax error.]b4_locations_if([[
/// \param loc where the syntax error is found.]])[
/// \param msg a description of the syntax error.
virtual void error (]b4_locations_if([[const location_type& loc, ]])[const std::string& msg);
# 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.]b4_locations_if([[
/// \param yylocationp Its location.]])[
virtual void yy_symbol_value_print_ (int yytype,
const semantic_type* yyvaluep]b4_locations_if([[,
const location_type* yylocationp]])[);
/// \brief Report a symbol on the debug stream.
/// \param yytype The token type.
/// \param yyvaluep Its semantic value.]b4_locations_if([[
/// \param yylocationp Its location.]])[
virtual void yy_symbol_print_ (int yytype,
const semantic_type* yyvaluep]b4_locations_if([[,
const location_type* yylocationp]])[);
private:
// Debugging.
std::ostream* yycdebug_;
#endif
]b4_parse_param_vars[
};
]dnl Redirections for glr.c.
b4_percent_define_flag_if([[global_tokens_and_yystype]],
[b4_token_defines])
[
#ifndef ]b4_api_PREFIX[STYPE
# define ]b4_api_PREFIX[STYPE ]b4_namespace_ref[::]b4_parser_class_name[::semantic_type
#endif
#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]])[
]m4_popdef([b4_parse_param])dnl
])
b4_defines_if(
[b4_output_begin([b4_spec_defines_file])
b4_copyright([Skeleton interface for Bison GLR parsers in C++],
[2002-2013])[
// C++ GLR parser skeleton written by Akim Demaille.
]b4_cpp_guard_open([b4_spec_defines_file])[
]b4_shared_declarations[
]b4_cpp_guard_close([b4_spec_defines_file])[
]b4_output_end()])
# Let glr.c (and b4_shared_declarations) believe that the user
# arguments include the parser itself.
m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_wrap]))
m4_include(b4_pkgdatadir/[glr.c])
m4_popdef([b4_parse_param])

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,45 +0,0 @@
## Copyright (C) 2002, 2005-2013 Free Software Foundation, Inc.
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## 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/>.
dist_pkgdata_DATA = \
data/README \
data/bison.m4 \
data/c++-skel.m4 \
data/c++.m4 \
data/c-like.m4 \
data/c-skel.m4 \
data/c.m4 \
data/glr.c \
data/glr.cc \
data/java-skel.m4 \
data/java.m4 \
data/lalr1.cc \
data/lalr1.java \
data/location.cc \
data/stack.hh \
data/variant.hh \
data/yacc.c
m4sugardir = $(pkgdatadir)/m4sugar
dist_m4sugar_DATA = \
data/m4sugar/foreach.m4 \
data/m4sugar/m4sugar.m4
xsltdir = $(pkgdatadir)/xslt
dist_xslt_DATA = \
data/xslt/bison.xsl \
data/xslt/xml2dot.xsl \
data/xslt/xml2text.xsl \
data/xslt/xml2xhtml.xsl

View File

@@ -1,335 +0,0 @@
# C++ skeleton for Bison
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# 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-2013])
# b4_position_define
# ------------------
# Define class position.
m4_define([b4_position_define],
[[ /// Abstract a position.
class position
{
public:]m4_ifdef([b4_location_constructors], [[
/// Construct a position.
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.
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 = l;
column = c;
}
/** \name Line and Column related manipulators
** \{ */
/// (line related) Advance to the COUNT next lines.
void lines (int count = 1)
{
if (count)
{
column = ]b4_location_initial_column[u;
line = add_ (line, count, ]b4_location_initial_line[);
}
}
/// (column related) Advance to the COUNT next columns.
void columns (int count = 1)
{
column = add_ (column, count, ]b4_location_initial_column[);
}
/** \} */
/// File name to which this position refers.
]b4_percent_define_get([[filename_type]])[* filename;
/// Current line number.
unsigned int line;
/// Current column number.
unsigned int column;
private:
/// Compute max(min, lhs+rhs) (provided min <= lhs).
static unsigned int add_ (unsigned int lhs, int rhs, unsigned int min)
{
return (0 < rhs || -static_cast<unsigned int>(rhs) < lhs
? rhs + lhs
: min);
}
};
/// Add and assign a position.
inline position&
operator+= (position& res, int width)
{
res.columns (width);
return res;
}
/// Add two position objects.
inline position
operator+ (position res, int width)
{
return res += width;
}
/// Add and assign a position.
inline position&
operator-= (position& res, int width)
{
return res += -width;
}
/// Add two position objects.
inline position
operator- (position res, int width)
{
return res -= width;
}
]b4_percent_define_flag_if([[define_location_comparison]], [[
/// Compare two position objects.
inline bool
operator== (const position& pos1, const position& pos2)
{
return (pos1.line == pos2.line
&& pos1.column == pos2.column
&& (pos1.filename == pos2.filename
|| (pos1.filename && pos2.filename
&& *pos1.filename == *pos2.filename)));
}
/// Compare two position objects.
inline bool
operator!= (const position& pos1, const position& pos2)
{
return !(pos1 == pos2);
}
]])[
/** \brief Intercept output stream redirection.
** \param ostr the destination output stream
** \param pos a reference to the position to redirect
*/
template <typename YYChar>
inline std::basic_ostream<YYChar>&
operator<< (std::basic_ostream<YYChar>& ostr, const position& pos)
{
if (pos.filename)
ostr << *pos.filename << ':';
return ostr << pos.line << '.' << pos.column;
}
]])
# b4_location_define
# ------------------
m4_define([b4_location_define],
[[ /// Abstract a location.
class location
{
public:
]m4_ifdef([b4_location_constructors], [
/// 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.
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 (f, l, c);
end = begin;
}
/** \name Line and Column related manipulators
** \{ */
public:
/// Reset initial location to final location.
void step ()
{
begin = end;
}
/// Extend the current location to the COUNT next columns.
void columns (int count = 1)
{
end += count;
}
/// Extend the current location to the COUNT next lines.
void lines (int count = 1)
{
end.lines (count);
}
/** \} */
public:
/// Beginning of the located region.
position begin;
/// End of the located region.
position end;
};
/// Join two location objects to create a location.
inline location operator+ (location res, const location& end)
{
res.end = end.end;
return res;
}
/// Change end position in place.
inline location& operator+= (location& res, int width)
{
res.columns (width);
return res;
}
/// Change end position.
inline location operator+ (location res, int width)
{
return res += width;
}
/// Change end position in place.
inline location& operator-= (location& res, int width)
{
return res += -width;
}
/// Change end position.
inline location operator- (const location& begin, int width)
{
return begin + -width;
}
]b4_percent_define_flag_if([[define_location_comparison]], [[
/// Compare two location objects.
inline bool
operator== (const location& loc1, const location& loc2)
{
return loc1.begin == loc2.begin && loc1.end == loc2.end;
}
/// Compare two location objects.
inline bool
operator!= (const location& loc1, const location& loc2)
{
return !(loc1 == loc2);
}
]])[
/** \brief Intercept output stream redirection.
** \param ostr the destination output stream
** \param loc a reference to the location to redirect
**
** Avoid duplicate information.
*/
template <typename YYChar>
inline std::basic_ostream<YYChar>&
operator<< (std::basic_ostream<YYChar>& ostr, const location& loc)
{
unsigned int end_col = 0 < loc.end.column ? loc.end.column - 1 : 0;
ostr << loc.begin// << "(" << loc.end << ") "
;
if (loc.end.filename
&& (!loc.begin.filename
|| *loc.begin.filename != *loc.end.filename))
ostr << '-' << loc.end.filename << ':' << loc.end.line << '.' << end_col;
else if (loc.begin.line < loc.end.line)
ostr << '-' << loc.end.line << '.' << end_col;
else if (loc.begin.column < end_col)
ostr << '-' << end_col;
return ostr;
}
]])
b4_defines_if([
b4_output_begin([b4_dir_prefix[]position.hh])
b4_copyright([Positions for Bison parsers in C++])[
/**
** \file ]b4_dir_prefix[position.hh
** Define the ]b4_namespace_ref[::position class.
*/
]b4_cpp_guard_open([b4_dir_prefix[]position.hh])[
# include <algorithm> // std::max
# include <iostream>
# include <string>
]b4_null_define[
]b4_namespace_open[
]b4_position_define[
]b4_namespace_close[
]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++])[
/**
** \file ]b4_dir_prefix[location.hh
** Define the ]b4_namespace_ref[::location class.
*/
]b4_cpp_guard_open([b4_dir_prefix[]location.hh])[
# include "position.hh"
]b4_namespace_open[
]b4_location_define[
]b4_namespace_close[
]b4_cpp_guard_close([b4_dir_prefix[]location.hh])
b4_output_end()
])
m4_popdef([b4_copyright_years])

View File

@@ -1,154 +0,0 @@
# C++ skeleton for Bison
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# 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-2013])
# b4_stack_define
# ---------------
m4_define([b4_stack_define],
[[ template <class T, class S = std::vector<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_[seq_.size () - 1 - i];
}
inline
const T&
operator[] (unsigned int i) const
{
return seq_[seq_.size () - 1 - i];
}
/// Steal the contents of \a t.
///
/// Close to move-semantics.
inline
void
push (T& t)
{
seq_.push_back (T());
operator[](0).move (t);
}
inline
void
pop (unsigned int n = 1)
{
for (; n; --n)
seq_.pop_back ();
}
void
clear ()
{
seq_.clear ();
}
inline
typename S::size_type
size () const
{
return seq_.size ();
}
inline
const_iterator
begin () const
{
return seq_.rbegin ();
}
inline
const_iterator
end () const
{
return seq_.rend ();
}
private:
stack (const stack&);
stack& operator= (const stack&);
/// The wrapped container.
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_defines_if(
[b4_output_begin([b4_dir_prefix[]stack.hh])
b4_copyright([Stack handling for Bison parsers in C++])[
/**
** \file ]b4_dir_prefix[stack.hh
** Define the ]b4_namespace_ref[::stack class.
*/
]b4_cpp_guard_open([b4_dir_prefix[]stack.hh])[
# include <vector>
]b4_namespace_open[
]b4_stack_define[
]b4_namespace_close[
]b4_cpp_guard_close([b4_dir_prefix[]stack.hh])
b4_output_end()
])
m4_popdef([b4_copyright_years])

View File

@@ -1,362 +0,0 @@
# C++ skeleton for Bison
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# 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/>.
## --------- ##
## variant. ##
## --------- ##
# b4_symbol_variant(YYTYPE, YYVAL, ACTION, [ARGS])
# ------------------------------------------------
# Run some ACTION ("build", or "destroy") on YYVAL of symbol type
# YYTYPE.
m4_define([b4_symbol_variant],
[m4_pushdef([b4_dollar_dollar],
[$2.$3< $][3 > (m4_shift3($@))])dnl
switch ($1)
{
b4_type_foreach([b4_type_action_])[]dnl
default:
break;
}
m4_popdef([b4_dollar_dollar])dnl
])
# _b4_char_sizeof_counter
# -----------------------
# A counter used by _b4_char_sizeof_dummy to create fresh symbols.
m4_define([_b4_char_sizeof_counter],
[0])
# _b4_char_sizeof_dummy
# ---------------------
# At each call return a new C++ identifier.
m4_define([_b4_char_sizeof_dummy],
[m4_define([_b4_char_sizeof_counter], m4_incr(_b4_char_sizeof_counter))dnl
dummy[]_b4_char_sizeof_counter])
# b4_char_sizeof(SYMBOL-NUMS)
# ---------------------------
# To be mapped on the list of type names to produce:
#
# char dummy1[sizeof(type_name_1)];
# char dummy2[sizeof(type_name_2)];
#
# for defined type names.
m4_define([b4_char_sizeof],
[b4_symbol_if([$1], [has_type],
[
m4_map([ b4_symbol_tag_comment], [$@])dnl
char _b4_char_sizeof_dummy@{sizeof(b4_symbol([$1], [type]))@};
])])
# b4_variant_includes
# -------------------
# The needed includes for variants support.
m4_define([b4_variant_includes],
[b4_parse_assert_if([[#include <typeinfo>]])[
#ifndef YYASSERT
# include <cassert>
# define YYASSERT assert
#endif
]])
# b4_variant_define
# -----------------
# Define "variant".
m4_define([b4_variant_define],
[[ /// A char[S] buffer to store and retrieve objects.
///
/// Sort of a variant, but does not keep track of the nature
/// of the stored data, since that knowledge is available
/// via the current state.
template <size_t S>
struct variant
{
/// Type of *this.
typedef variant<S> self_type;
/// Empty construction.
variant ()]b4_parse_assert_if([
: yytname_ (YY_NULL)])[
{}
/// Construct and fill.
template <typename T>
variant (const T& t)]b4_parse_assert_if([
: yytname_ (typeid (T).name ())])[
{
YYASSERT (sizeof (T) <= S);
new (yyas_<T> ()) T (t);
}
/// Destruction, allowed only if empty.
~variant ()
{]b4_parse_assert_if([
YYASSERT (!yytname_);
])[}
/// Instantiate an empty \a T in here.
template <typename T>
T&
build ()
{]b4_parse_assert_if([
YYASSERT (!yytname_);
YYASSERT (sizeof (T) <= S);
yytname_ = typeid (T).name ();])[
return *new (yyas_<T> ()) T;
}
/// Instantiate a \a T in here from \a t.
template <typename T>
T&
build (const T& t)
{]b4_parse_assert_if([
YYASSERT (!yytname_);
YYASSERT (sizeof (T) <= S);
yytname_ = typeid (T).name ();])[
return *new (yyas_<T> ()) T (t);
}
/// Accessor to a built \a T.
template <typename T>
T&
as ()
{]b4_parse_assert_if([
YYASSERT (yytname_ == typeid (T).name ());
YYASSERT (sizeof (T) <= S);])[
return *yyas_<T> ();
}
/// Const accessor to a built \a T (for %printer).
template <typename T>
const T&
as () const
{]b4_parse_assert_if([
YYASSERT (yytname_ == typeid (T).name ());
YYASSERT (sizeof (T) <= S);])[
return *yyas_<T> ();
}
/// Swap the content with \a other, of same type.
///
/// Both variants must be built beforehand, because swapping the actual
/// data requires reading it (with as()), and this is not possible on
/// unconstructed variants: it would require some dynamic testing, which
/// should not be the variant's responsability.
/// Swapping between built and (possibly) non-built is done with
/// variant::move ().
template <typename T>
void
swap (self_type& other)
{]b4_parse_assert_if([
YYASSERT (yytname_);
YYASSERT (yytname_ == other.yytname_);])[
std::swap (as<T> (), other.as<T> ());
}
/// Move the content of \a other to this.
///
/// Destroys \a other.
template <typename T>
void
move (self_type& other)
{]b4_parse_assert_if([
YYASSERT (!yytname_);])[
build<T> ();
swap<T> (other);
other.destroy<T> ();
}
/// Copy the content of \a other to this.
template <typename T>
void
copy (const self_type& other)
{
build<T> (other.as<T> ());
}
/// Destroy the stored \a T.
template <typename T>
void
destroy ()
{
as<T> ().~T ();]b4_parse_assert_if([
yytname_ = YY_NULL;])[
}
private:
/// Prohibit blind copies.
self_type& operator=(const self_type&);
variant (const self_type&);
/// Accessor to raw memory as \a T.
template <typename T>
T*
yyas_ ()
{
void *yyp = yybuffer_.yyraw;
return static_cast<T*> (yyp);
}
/// Const accessor to raw memory as \a T.
template <typename T>
const T*
yyas_ () const
{
const void *yyp = yybuffer_.yyraw;
return static_cast<const T*> (yyp);
}
union
{
/// Strongest alignment constraints.
long double yyalign_me;
/// A buffer large enough to store any of the semantic values.
char yyraw[S];
} yybuffer_;]b4_parse_assert_if([
/// Whether the content is built: if defined, the name of the stored type.
const char *yytname_;])[
};
]])
## -------------------------- ##
## Adjustments for variants. ##
## -------------------------- ##
# b4_value_type_declare
# ---------------------
# Declare semantic_type.
m4_define([b4_value_type_declare],
[[ /// An auxiliary type to compute the largest semantic type.
union union_type
{]b4_type_foreach([b4_char_sizeof])[};
/// Symbol semantic values.
typedef variant<sizeof(union_type)> semantic_type;][]dnl
])
# How the semantic value is extracted when using variants.
# b4_symbol_value(VAL, [TYPE])
# ----------------------------
m4_define([b4_symbol_value],
[m4_ifval([$2],
[$1.as< $2 > ()],
[$1])])
# b4_symbol_value_template(VAL, [TYPE])
# -------------------------------------
# Same as b4_symbol_value, but used in a template method.
m4_define([b4_symbol_value_template],
[m4_ifval([$2],
[$1.template as< $2 > ()],
[$1])])
## ------------- ##
## make_SYMBOL. ##
## ------------- ##
# b4_symbol_constructor_declare_(SYMBOL-NUMBER)
# ---------------------------------------------
# Declare the overloaded version of make_symbol for the (common) type of
# these SYMBOL-NUMBERS. Use at class-level.
m4_define([b4_symbol_constructor_declare_],
[b4_symbol_if([$1], [is_token], [b4_symbol_if([$1], [has_id],
[ static inline
symbol_type
make_[]b4_symbol_([$1], [id]) (dnl
b4_join(b4_symbol_if([$1], [has_type],
[const b4_symbol([$1], [type])& v]),
b4_locations_if([const location_type& l])));
])])])
# b4_symbol_constructor_declare
# -----------------------------
# Declare symbol constructors for all the value types.
# Use at class-level.
m4_define([b4_symbol_constructor_declare],
[ // Symbol constructors declarations.
b4_symbol_foreach([b4_symbol_constructor_declare_])])
# b4_symbol_constructor_define_(SYMBOL-NUMBER)
# --------------------------------------------
# Define symbol constructor for this SYMBOL-NUMBER.
m4_define([b4_symbol_constructor_define_],
[b4_symbol_if([$1], [is_token], [b4_symbol_if([$1], [has_id],
[ b4_parser_class_name::symbol_type
b4_parser_class_name::make_[]b4_symbol_([$1], [id]) (dnl
b4_join(b4_symbol_if([$1], [has_type],
[const b4_symbol([$1], [type])& v]),
b4_locations_if([const location_type& l])))
{
return symbol_type (b4_join([token::b4_symbol([$1], [id])],
b4_symbol_if([$1], [has_type], [v]),
b4_locations_if([l])));
}
])])])
# b4_basic_symbol_constructor_declare
# -----------------------------------
# Generate a constructor declaration for basic_symbol from given type.
m4_define([b4_basic_symbol_constructor_declare],
[[
basic_symbol (]b4_join(
[typename Base::kind_type t],
b4_symbol_if([$1], [has_type], const b4_symbol([$1], [type])[ v]),
b4_locations_if([const location_type& l]))[);
]])
# b4_basic_symbol_constructor_define
# ----------------------------------
# Generate a constructor implementation for basic_symbol from given type.
m4_define([b4_basic_symbol_constructor_define],
[[
template <typename Base>
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (]b4_join(
[typename Base::kind_type t],
b4_symbol_if([$1], [has_type], const b4_symbol([$1], [type])[ v]),
b4_locations_if([const location_type& l]))[)
: Base (t)
, value (]b4_symbol_if([$1], [has_type], [v])[)]b4_locations_if([
, location (l)])[
{}
]])
# b4_symbol_constructor_define
# ----------------------------
# Define the overloaded versions of make_symbol for all the value types.
m4_define([b4_symbol_constructor_define],
[ // Implementation of make_symbol for each symbol type.
b4_symbol_foreach([b4_symbol_constructor_define_])])

View File

@@ -1,397 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
xml2dot.xsl - transform Bison XML Report into DOT.
Copyright (C) 2007-2013 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/>.
Written by Wojciech Polak <polak@gnu.org>.
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:bison="http://www.gnu.org/software/bison/">
<xsl:import href="bison.xsl"/>
<xsl:output method="text" encoding="UTF-8" indent="no"/>
<xsl:template match="/">
<xsl:apply-templates select="bison-xml-report"/>
</xsl:template>
<xsl:template match="bison-xml-report">
<xsl:text>// Generated by GNU Bison </xsl:text>
<xsl:value-of select="@version"/>
<xsl:text>.&#10;</xsl:text>
<xsl:text>// Report bugs to &lt;</xsl:text>
<xsl:value-of select="@bug-report"/>
<xsl:text>&gt;.&#10;</xsl:text>
<xsl:text>// Home page: &lt;</xsl:text>
<xsl:value-of select="@url"/>
<xsl:text>&gt;.&#10;&#10;</xsl:text>
<xsl:apply-templates select="automaton">
<xsl:with-param name="filename" select="filename"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="automaton">
<xsl:param name="filename"/>
<xsl:text>digraph "</xsl:text>
<xsl:call-template name="escape">
<xsl:with-param name="subject" select="$filename"/>
</xsl:call-template>
<xsl:text>"&#10;{
node [fontname = courier, shape = box, colorscheme = paired6]
edge [fontname = courier]
</xsl:text>
<xsl:apply-templates select="state"/>
<xsl:text>}&#10;</xsl:text>
</xsl:template>
<xsl:template match="automaton/state">
<xsl:call-template name="output-node">
<xsl:with-param name="number" select="@number"/>
<xsl:with-param name="label">
<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]&#10;</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">
<xsl:apply-templates select="transition"/>
</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>&#10;</xsl:text>
<xsl:choose>
<xsl:when test="$num &lt; 10">
<xsl:text> </xsl:text>
</xsl:when>
<xsl:when test="$num &lt; 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>
<xsl:for-each select="rhs/symbol|rhs/empty">
<xsl:apply-templates select="."/>
<xsl:if test="$point = position()">
<xsl:text> .</xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template match="symbol">
<xsl:text> </xsl:text>
<xsl:value-of select="."/>
</xsl:template>
<xsl:template match="empty"/>
<xsl:template match="lookaheads">
<xsl:text> [</xsl:text>
<xsl:apply-templates select="symbol"/>
<xsl:text>]</xsl:text>
</xsl:template>
<xsl:template match="lookaheads/symbol">
<xsl:value-of select="."/>
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text>
</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]&#10;</xsl:text>
</xsl:template>
<xsl:template match="transition">
<xsl:call-template name="output-edge">
<xsl:with-param name="src" select="../../../@number"/>
<xsl:with-param name="dst" select="@state"/>
<xsl:with-param name="style">
<xsl:choose>
<xsl:when test="@symbol = 'error'">
<xsl:text>dotted</xsl:text>
</xsl:when>
<xsl:when test="@type = 'shift'">
<xsl:text>solid</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>dashed</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
<xsl:with-param name="label">
<xsl:if test="not(@symbol = 'error')">
<xsl:value-of select="@symbol"/>
</xsl:if>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template name="output-node">
<xsl:param name="number"/>
<xsl:param name="label"/>
<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>\l"]&#10;</xsl:text>
</xsl:template>
<xsl:template name="output-edge">
<xsl:param name="src"/>
<xsl:param name="dst"/>
<xsl:param name="style"/>
<xsl:param name="label"/>
<xsl:text> </xsl:text>
<xsl:value-of select="$src"/>
<xsl:text> -> </xsl:text>
<xsl:value-of select="$dst"/>
<xsl:text> [style=</xsl:text>
<xsl:value-of select="$style"/>
<xsl:if test="$label and $label != ''">
<xsl:text> label="</xsl:text>
<xsl:call-template name="escape">
<xsl:with-param name="subject" select="$label"/>
</xsl:call-template>
<xsl:text>"</xsl:text>
</xsl:if>
<xsl:text>]&#10;</xsl:text>
</xsl:template>
<xsl:template name="escape">
<xsl:param name="subject"/> <!-- required -->
<xsl:call-template name="string-replace">
<xsl:with-param name="subject">
<xsl:call-template name="string-replace">
<xsl:with-param name="subject">
<xsl:call-template name="string-replace">
<xsl:with-param name="subject" select="$subject"/>
<xsl:with-param name="search" select="'\'"/>
<xsl:with-param name="replace" select="'\\'"/>
</xsl:call-template>
</xsl:with-param>
<xsl:with-param name="search" select="'&quot;'"/>
<xsl:with-param name="replace" select="'\&quot;'"/>
</xsl:call-template>
</xsl:with-param>
<xsl:with-param name="search" select="'&#10;'"/>
<xsl:with-param name="replace" select="'\l'"/>
</xsl:call-template>
</xsl:template>
<xsl:template name="string-replace">
<xsl:param name="subject"/>
<xsl:param name="search"/>
<xsl:param name="replace"/>
<xsl:choose>
<xsl:when test="contains($subject, $search)">
<xsl:variable name="before" select="substring-before($subject, $search)"/>
<xsl:variable name="after" select="substring-after($subject, $search)"/>
<xsl:value-of select="$before"/>
<xsl:value-of select="$replace"/>
<xsl:call-template name="string-replace">
<xsl:with-param name="subject" select="$after"/>
<xsl:with-param name="search" select="$search"/>
<xsl:with-param name="replace" select="$replace"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$subject"/>
</xsl:otherwise>
</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 &lt; 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>

File diff suppressed because it is too large Load Diff

BIN
gnuwin32/bin/flex++.exe Normal file

Binary file not shown.

BIN
gnuwin32/bin/flex.exe Executable file → Normal file

Binary file not shown.

BIN
gnuwin32/bin/win_flex.exe Normal file

Binary file not shown.

2
gnuwin32/bin/yacc Normal file
View File

@@ -0,0 +1,2 @@
#! /bin/sh
exec 'c:/progra~1/bison/bin/bison' -y "$@"

View File

@@ -0,0 +1,54 @@
* Bison-2.4.1 for Windows *
===========================
What is it?
-----------
Bison: Yacc-compatible parser generator
Description
-----------
Bison is a general purpose parser generator that converts a grammar description for an LALR(1) context-free grammar into a C program to parse that grammar. Bison can be used to develop a wide range of language parsers, from ones used in simple desk calculators to complex programming languages. Bison is upwardly compatible with Yacc, so any correctly written Yacc grammar should work with Bison without any changes. If you know Yacc, you shouldn't have any trouble using Bison. You do need to be very proficient in C programming to be able to use Bison. Bison is only needed on systems that are used for development. If your system will be used for C development, you should install Bison. The package contains also the -ly library sometimes used by programs using Bison-generated parsers. If you are developing programs using Bison, you might want to link with this library. This library is not required by all Bison-generated parsers, but may be employed by simple programs to supply minimal support for the generated parsers.
Homepage
--------
http://www.gnu.org/software/bison/bison.html
Sources: http://ftp.gnu.org/gnu/bison/bison-2.4.1.tar.gz
System
------
- Win32, i.e. MS-Windows 95 / 98 / ME / NT / 2000 / XP / 2003 / Vista / 2008 with msvcrt.dll
- if msvcrt.dll is not in your Windows/System folder, get it from
Microsoft <http://support.microsoft.com/kb/259403>
or by installing Internet Explorer 4.0 or higher
<http://www.microsoft.com/windows/ie>
- libintl-3 <http://gnuwin32.sourceforge.net/packages/libintl.htm>
- libiconv-2 <http://gnuwin32.sourceforge.net/packages/libiconv.htm>
- regex <http://gnuwin32.sourceforge.net/packages/regex.htm>
- m4 <http://gnuwin32.sourceforge.net/packages/m4.htm>
Notes
-----
- Bugs and questions on this MS-Windows port: gnuwin32@users.sourceforge.net
Package Availability
--------------------
- in: http://gnuwin32.sourceforge.net
Installation
------------
Bison may be installed in any directory, provided the subdirectory structure is maintained. Native language support is also active.
Sources
-------
- bison-2.4.1-src.zip
Compilation
-----------
The package has been compiled with GNU auto-tools, GNU make, and Mingw
(GCC for MS-Windows). Any differences from the original sources are given
in bison-2.4.1-GnuWin32.diffs in bison-2.4.1-src.zip. Libraries needed
for compilation can be found at the lines starting with 'LIBS = ' in the
Makefiles. Usually, these are standard libraries provided with Mingw, or
libraries from the package itself; 'gw32c' refers to the libgw32c package,
which provides MS-Windows substitutes or stubs for functions normally found in
Unix. For more information, see: http://gnuwin32.sourceforge.net/compile.html
and http://gnuwin32.sourceforge.net/packages/libgw32c.htm.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,8 @@
Authors of GNU Bison.
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.

View File

@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
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.
TERMS AND CONDITIONS
0. 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.
1. 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.
2. 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.
3. 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.
4. 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.
5. 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:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) 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".
c) 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.
d) 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.
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.
6. 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:
a) 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.
b) 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.
c) 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.
d) 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.
e) 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.
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.
7. 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:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) 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
c) 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
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) 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.
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.
8. 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.
9. 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.
10. 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.
11. 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.
12. 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.
13. 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.
14. 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.
15. 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.
16. 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.
17. 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 OF TERMS AND CONDITIONS
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.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <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 <http://www.gnu.org/licenses/>.
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:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `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
<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
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,291 @@
Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
2006, 2007, 2008 Free Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You need `configure.ac' if
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system.
Running `configure' might take a while. While running, it prints
some messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
6. Often, you can also type `make uninstall' to remove the installed
files again.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
With a non-GNU `make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
installed the package for one architecture, use `make distclean' before
reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple `-arch' options to the
compiler but only a single `-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CPP="gcc -E" CXXCPP="g++ -E"
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
using the `lipo' tool if you have problems.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Particular systems
==================
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
CC is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
a workaround. If GNU CC is not installed, it is therefore recommended
to try
./configure CC="cc"
and if that doesn't work, try
./configure CC="cc -nodtk"
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf bug. Until the bug is fixed you can use this workaround:
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of all of the options to `configure', and exit.
`--help=short'
`--help=recursive'
Print a summary of the options unique to this package's
`configure', and exit. The `short' variant lists options used
only in the top level, while the `recursive' variant lists options
also present in any nested packages.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--prefix=DIR'
Use DIR as the installation prefix. *Note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
`--no-create'
`-n'
Run the configure checks, but stop before creating any output
files.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,43 @@
This package contains the GNU Bison parser generator.
See the file INSTALL for generic compilation and installation instructions.
See the section FAQ in the documentation (doc/bison.info) for
frequently asked questions. The documentation is also available in
PDF and HTML, provided you have a recent version of Texinfo installed:
run "make pdf" or "make html".
Bison requires GNU m4 1.4.6 or later. See:
ftp://ftp.gnu.org/gnu/m4/m4-1.4.6.tar.gz
Bison can work with pre-1.4.6 distributions of GNU m4 if they are
sufficiently patched, but if you encounter a bug with an older
distribution and report a bug we will probably suggest that you
upgrade to 1.4.6 as the first step in trying to fix it.
Please send bug reports to <bug-bison@gnu.org>. Please include the
version number from `bison --version', and a complete, self-contained
test case in each bug report.
If you have questions about using Bison and the documentation does
not answer them, please send mail to <help-bison@gnu.org>.
-----
Copyright (C) 1992, 1998, 1999, 2003, 2004, 2005, 2008 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/>.

View File

@@ -0,0 +1,30 @@
-*- text -*-
This is a test release of this package. Using it more or less
implicitly signs you up to help us find whatever problems you report.
The documentation still needs more work. Suggestions welcome.
Patches even more welcome.
Please send comments and problem reports about this test release to
<bug-bison@gnu.org>. This program will get better only if you report
the problems you encounter.
-----
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Bison.
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/>.

View File

@@ -0,0 +1,104 @@
Bison was originally written by Robert Corbett. It would not be what
it is today without the invaluable help of these people:
Airy Andre Airy.Andre@edf.fr
Akim Demaille akim@freefriends.org
Albert Chin-A-Young china@thewrittenword.com
Alexander Belopolsky alexb@rentec.com
Alexandre Duret-Lutz adl@src.lip6.fr
Andreas Schwab schwab@suse.de
Andrew Suffield asuffield@users.sourceforge.net
Anthony Heading ajrh@ajrh.net
Arnold Robbins arnold@skeeve.com
Art Haas ahaas@neosoft.com
Baron Schwartz baron@sequent.org
Benoit Perrot benoit.perrot@epita.fr
Bert Deknuydt Bert.Deknuydt@esat.kuleuven.ac.be
Bob Rossi bob@brasko.net
Brandon Lucia blucia@gmail.com
Bruce Lilly blilly@erols.com
Bruno Haible bruno@clisp.org
Charles-Henri de Boysson de-boy_c@epita.fr
Christian Burger cburger@sunysb.edu
Cris Bailiff c.bailiff+bison@awayweb.com
Cris van Pelt cris@amf03054.office.wxs.nl
Csaba Raduly csaba_22@yahoo.co.uk
Daniel Hagerty hag@gnu.org
David J. MacKenzie djm@gnu.org
Derek M. Jones derek@knosof.co.uk
Di-an Jan dianj@freeshell.org
Dick Streefland dick.streefland@altium.nl
Enrico Scholz enrico.scholz@informatik.tu-chemnitz.de
Eric Blake ebb9@byu.net
Evgeny Stambulchik fnevgeny@plasma-gate.weizmann.ac.il
Fabrice Bauzac noon@cote-dazur.com
Florian Krohm florian@edamail.fishkill.ibm.com
Frank Heckenbach frank@g-n-u.de
Frans Englich frans.englich@telia.com
Georg Sauthoff gsauthof@TechFak.Uni-Bielefeld.DE
Goran Uddeborg goeran@uddeborg.se
Guido Trentalancia trentalg@aston.ac.uk
H. Merijn Brand h.m.brand@hccnet.nl
Hans Aberg haberg@matematik.su.se
Jan Nieuwenhuizen janneke@gnu.org
Jesse Thilo jthilo@gnu.org
Jim Kent jkent@arch.sel.sony.com
Jim Meyering jim@meyering.net
Joel E. Denny jdenny@ces.clemson.edu
Juan Manuel Guerrero juan.guerrero@gmx.de
Kees Zeelenberg kzlg@users.sourceforge.net
Keith Browne kbrowne@legato.com
Laurent Mascherpa laurent.mascherpa@epita.fr
Magnus Fromreide magfr@lysator.liu.se
Marc Autret autret_m@epita.fr
Martin Mokrejs mmokrejs@natur.cuni.cz
Martin Nylin martin.nylin@linuxmail.org
Matt Kraai kraai@alumni.cmu.edu
Matt Rosing rosing@peakfive.com
Michael Hayes m.hayes@elec.canterbury.ac.nz
Mickael Labau labau_m@epita.fr
Mike Castle dalgoda@ix.netcom.com
Neil Booth NeilB@earthling.net
Nelson H. F. Beebe beebe@math.utah.edu
Nicolas Burrus nicolas.burrus@epita.fr
Nicolas Tisserand nicolas.tisserand@epita.fr
Noah Friedman friedman@gnu.org
Oleg Smolsky oleg.smolsky@pacific-simulators.co.nz
Paolo Bonzini bonzini@gnu.org
Pascal Bart pascal.bart@epita.fr
Paul Eggert eggert@cs.ucla.edu
Paul Hilfinger Hilfinger@CS.Berkeley.EDU
Per Allansson per@appgate.com
Peter Fales psfales@lucent.com
Peter Hamorsky hamo@upjs.sk
Piotr Gackiewicz gacek@intertel.com.pl
Quoc Peyrot chojin@lrde.epita.fr
R Blake blakers@mac.com
Raja R Harinath harinath@cs.umn.edu
Richard Stallman rms@gnu.org
Robert Anisko anisko_r@epita.fr
Satya Kiran Popuri satyakiran@gmail.com
Sebastien Fricker sebastien.fricker@gmail.com
Sebastian Setzer sebastian.setzer.ext@siemens.com
Sergei Steshenko sergstesh@yahoo.com
Shura debil_urod@ngs.ru
Steve Murphy murf@parsetree.com
Tim Josling tej@melbpc.org.au
Tim Van Holder tim.van.holder@pandora.be
Tom Lane tgl@sss.pgh.pa.us
Tom Tromey tromey@cygnus.com
Tommy Nordgren tommy.nordgren@chello.se
Troy A. Johnson troyj@ecn.purdue.edu
Tys Lefering twlevo@xs4all.nl
Vin Shelton acs@alumni.princeton.edu
Wayne Green wayne@infosavvy.com
Wolfram Wagner ww@mpi-sb.mpg.de
Wwp subscript@free.fr
Zack Weinberg zack@codesourcery.com
Many people are not named here because we lost track of them. We
thank them! Please, help us keeping this list up to date.
Local Variables:
mode: text
End:

View File

@@ -0,0 +1,309 @@
-*- outline -*-
* Header guards
From Franc,ois: should we keep the directory part in the CPP guard?
* Yacc.c: CPP Macros
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...).
* Installation
* Documentation
Before releasing, make sure the documentation ("Understanding your
parser") refers to the current `output' format.
* lalr1.cc
** vector
Move to using vector, drop stack.hh.
** I18n
Catch up with yacc.c.
* Report
** 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
part of $default. Should we make the two reductions explicit, or just
keep $default? See the following point.
** Disabled Reductions
See `tests/conflicts.at (Defaulted Conflicted Reduction)', and decide
what we want to do.
** Documentation
Extend with error productions. The hard part will probably be finding
the right rule so that a single state does not exhibit too many yet
undocumented ``features''. Maybe an empty action ought to be
presented too. Shall we try to make a single grammar with all these
features, or should we have several very small grammars?
** --report=conflict-path
Provide better assistance for understanding the conflicts by providing
a sample text exhibiting the (LALR) ambiguity. See the paper from
DeRemer and Penello: they already provide the algorithm.
** Statically check for potential ambiguities in GLR grammars. See
<http://www.i3s.unice.fr/~schmitz/papers.html#expamb> for an approach.
* 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; }
we should be able to have:
foo($foo) bar($bar) baz($bar): qux($qux) { $baz = $foo + $bar + $qux; }
Or something like this.
** %if and the like
It should be possible to have %if/%else/%endif. The implementation is
not clear: should it be lexical or syntactic. Vadim Maslow thinks it
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
that they seem to be quite orthogonal to the parsing technique, and
seem to depend mostly on the possibility to have some code triggered
for each reduction. As a matter of fact, such hooks could also be
used to generate the yydebug traces. Some generic scheme probably
exists in there.
XML output for GNU Bison and gcc
http://www.cs.may.ie/~jpower/Research/bisonXML/
XML output for GNU Bison
http://yaxx.sourceforge.net/
* Unit rules
Maybe we could expand unit rules, i.e., transform
exp: arith | bool;
arith: exp '+' exp;
bool: exp '&' exp;
into
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
parsing: Theory and Practice' is impossible to find, but according to
`Parsing Techniques: a Practical Guide', it includes information about
this issue. Does anybody have it?
* Documentation
** History/Bibliography
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.
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.
* Broken options ?
** %token-table
** 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 <de-boy_c@epita.fr> 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
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.
* $undefined
From Hans:
- If the Bison generated parser experiences an undefined number in the
character range, that character is written out in diagnostic messages, an
addition to the $undefined value.
Suggest: Change the name $undefined to undefined; looks better in outputs.
* Default Action
From Hans:
- For use with my C++ parser, I transported the "switch (yyn)" statement
that Bison writes to the bison.simple skeleton file. This way, I can remove
the current default rule $$ = $1 implementation, which causes a double
assignment to $$ which may not be OK under C++, replacing it with a
"default:" part within the switch statement.
Note that the default rule $$ = $1, when typed, is perfectly OK under C,
but in the C++ implementation I made, this rule is different from
$<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 <florian@edamail.fishkill.ibm.com>
Subject: YYACT_EPILOGUE
To: bug-bison@gnu.org
X-Sent: 1 week, 4 days, 14 hours, 38 minutes, 11 seconds ago
The other day I had the need for explicitly building the parse tree. I
used %locations for that and defined YYLLOC_DEFAULT to call a function
that returns the tree node for the production. Easy. But I also needed
to assign the S-attribute to the tree node. That cannot be done in
YYLLOC_DEFAULT, because it is invoked before the action is executed.
The way I solved this was to define a macro YYACT_EPILOGUE that would
be invoked after the action. For reasons of symmetry I also added
YYACT_PROLOGUE. Although I had no use for that I can envision how it
might come in handy for debugging purposes.
All is needed is to add
#if YYLSP_NEEDED
YYACT_EPILOGUE (yyval, (yyvsp - yylen), yylen, yyloc, (yylsp - yylen));
#else
YYACT_EPILOGUE (yyval, (yyvsp - yylen), yylen);
#endif
at the proper place to bison.simple. Ditto for YYACT_PROLOGUE.
I was wondering what you think about adding YYACT_PROLOGUE/EPILOGUE
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.
-----
Copyright (C) 2001, 2002, 2003, 2004, 2006 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/>.

View File

@@ -27,7 +27,7 @@ Currently, the supported skeletons are:
These skeletons are the only ones supported by the Bison team.
Because the interface between skeletons and the bison program is not
finished, *we are not bound to it*. In particular, Bison is not
mature enough for us to consider that "foreign skeletons" are
mature enough for us to consider that ``foreign skeletons'' are
supported.
* m4sugar
@@ -52,7 +52,7 @@ into various formats.
-----
Copyright (C) 2002, 2008-2013 Free Software Foundation, Inc.
Copyright (C) 2002, 2008 Free Software Foundation, Inc.
This file is part of GNU Bison.

View File

@@ -0,0 +1,195 @@
This is a port of GNU Bison @VERSION@ to MSDOS/DJGPP.
Copyright (C) 2005, 2006, 2007, 2008 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/>.
1.: DJGPP specific changes.
=======================
The DJGPP port of Bison offers LFN and SFN support depending on which
OS it is running. If LFN support is available or not is determinated at
run time. If LFN support is available (DOS session under Win9X, Win2K,
WinXP, etc.) the standard posix file name extensions will be used.
These are: y.tab.c, y.tab.c++, y.tab.h, y.output, etc. If only SFN
support is available (plain DOS), then the standard MSDOS short file
names will be used. These are: y_tab.c, y_tab.h, y.out, etc.
It should be noticed that this bison version needs the m4 program as
back end to generate the parser file (y.tab.c etc.) from the skeleton
files. This implies that m4 must always be installed to get bison
working. m4 will use a couple of m4 scripts that will be installed in
/dev/env/DJDIR/share/bison and shall not be removed.
It should also be noticed that the skeleton files bison.simple and
bison.hairy are no longer supported. This applies also to the environ-
ment variables BISON_HAIRY and BISON_SIMPLE. Those variables are *no*
longer honored at all.
The kind of skeleton file bison.hairy is no longer supported at all.
The skeleton file bison.simple is now called yacc.c and is an m4 script.
The other two skeleton files supported by this bison version are glr.c
and lalr1.cc. The first one is a generalized LR C parser based on
Bison's LALR(1) tables and the second one is a experimental C++ parser
class.
As has been told before, bison uses m4 to generate the parser file.
This is done by forking and using pipes for the IPC. MSDOS does not
support this functionality so this has been reproduced in the usual
way by redirecting stdin and stdout of bison and m4 to temporary files
and processing these files in sequence.
It should be noticed that due to the great amount of file names that do
not cleanly map to 8.3 file names, you will need an OS with LFN support
to configure and compile the sources. On Win98 this implies that the
generation of numeric tails for 8.3 file name aliases must be enabled
or the compilation will fail.
Please **read** the docs.
2.: Installing the binary package.
==============================
2.1.: Copy the binary distribution into the top DJGPP installation directory,
just unzip it preserving the directory structure running *ONE* of the
following commands:
unzip32 bsn@PACKAGE_VERSION@b.zip or
djtarx bsn@PACKAGE_VERSION@b.zip or
pkunzip -d bsn@PACKAGE_VERSION@b.zip
3.: Building the binaries from sources.
===================================
3.1.: Create a temporary directory and copy the source package into the
directory. If you download the source distribution from one of the
DJGPP sites, just unzip it preserving the directory structure
running *ONE* of the following commands:
unzip32 bsn@PACKAGE_VERSION@s.zip or
djtarx bsn@PACKAGE_VERSION@s.zip or
pkunzip -d bsn@PACKAGE_VERSION@s.zip
and proceed to the paragraph 3.3, below.
3.2.: Source distributions downloaded from one of the GNU FTP sites need
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.
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
problems on the various platforms supported by DJGPP.
`djunpack' invokes the `djtar' program (that is part of the basic DJGPP
development kit) to rename these files on the fly given a file with
name mappings; the distribution includes a file `djgpp/fnchange.lst'
with the necessary mappings. So you need first to retrieve that batch
file, and then invoke it to unpack the distribution. Here's how:
djtar -x -p -o bison-@VERSION@/djgpp/djunpack.bat bison-@VERSION@.tar.gz > djunpack.bat
djunpack bison-@VERSION@.tar.gz
(The name of the distribution archive and the leading directory of the
path to `djunpack.bat' in the distribution will be different for
versions of Bison other than @VERSION@.)
If the argument to `djunpack.bat' include leading directories, it MUST
be given with the DOS-style backslashes; Unix-style forward slashes
will NOT work.
If the distribution comes as a .tar.bz2 archive, and your version of
`djtar' doesn't support bzip2 decompression, you need to unpack it as
follows:
bnzip2 bison-@VERSION@.tar.bz2
djtar -x -p -o bison-@VERSION@/djgpp/djunpack.bat bison-@VERSION@.tar > djunpack.bat
djunpack bison-@VERSION@.tar
3.3.: To build the binaries you will need the following binary packages:
djdev203.zip (or a later but NOT a prior version)
bsh204b.zip (or a later but NOT a prior version)
gccNNNb.zip, gppNNN.zip, bnuNNNb.zip, makNNNb.zip, filNNNb.zip,
perlNNNb.zip, shlNNNb.zip, txtNNNb.zip, txiNNNb.zip, grepNNNb.zip,
sedNNNb.zip and m4NNN.zip
If you want to run the check you will need also:
difNNNb.zip
NNN represents the latest version number of the binary packages. All
this packages can be found in the /v2gnu directory of any
ftp.delorie.com mirror.
You will need bsh204b.zip or later and *NOT* a prior version or
the build will fail. The same applies to djdev203.zip. Please note
that Bison requires m4-144b.zip or later to work properly.
3.4.: If for some reason you want to reconfigure the package cd into the top
srcdir (bison-@TREE_VERSION@) and run the following commands:
del djgpp\config.cache
make clean
djgpp\config
Please note that you *MUST* delete the config.cache file in the djgpp
subdir or you will not really reconfigure the sources because the
configuration informations will be read from the cache file instead
of being newly computed.
To build the programs in a directory other than where the sources are,
you must add the parameter that specifies the source directory,
e.g:
x:\src\gnu\bison-@TREE_VERSION@\djgpp\config x:/src/gnu/bison-@TREE_VERSION@
Lets assume you want to build the binaries in a directory placed on a
different drive (z:\build in this case) from where the sources are,
then you will run the following commands:
z:
md \build
cd \build
x:\src\gnu\bison-@TREE_VERSION@\djgpp\config x:/src/gnu/bison-@TREE_VERSION@
The order of the options and the srcdir option does not matter. You
*MUST* use forward slashes to specify the source directory.
The batch file will set same environment variables, make MSDOS specific
modifications to the Makefile.in's and supply all other needed options
to the configure script.
3.5.: To compile the package run from the top srcdir the command:
make
3.6.: Now you can run the tests if you like. From the top srcdir run the
command:
make check
No test should fail but the tests #131 (Doxygen Public Documentation)
and #132 (Doxygen Private Documentation) will be skipped. Please note
that the testsuite only works with LFN available. On plain DOS, most
of the tests will fail due to invalid DOS names.
3.7.: To install the binaries, header, library, catalogs, and info docs
run the following command from the top srcdir:
make install
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
value:
make install prefix=z:/some/other/place
Send GNU bison specific bug reports to <bug-bison@gnu.org>.
Send suggestions and bug reports concerning the DJGPP port to
comp.os.msdos.djgpp or <djgpp@delorie.com>.
Enjoy.
Guerrero, Juan Manuel <juan.guerrero@gmx.de>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,717 @@
@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}.

View File

@@ -0,0 +1,41 @@
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
null), so it is really emphasizing the cost of the whole parsing
(including scanning and I/O).
Set the envvars BISON and CC to the programs and flags you want to
use. They default to bison and gcc. To run a non-installed bison
from a tarball built in _build, I suggest the following.
BISON=_build/tests/bison CC='gcc -O2' ./bench.pl
(The _build/tests/bison wrapper makes sure that _build/src/bison will
use the tarballs' skeletons, not those already installed as a
straightforward use of _build/src/bison would.)
--
Copyright (C) 2006 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/>.
Local Variables:
mode: outline
End:

View File

@@ -0,0 +1,422 @@
make.exe check-recursive
make[1]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1'
Making check in build-aux
make[2]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/build-aux'
make[2]: Nothing to be done for `check'.
make[2]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/build-aux'
Making check in po
make[2]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/po'
make[2]: Nothing to be done for `check'.
make[2]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/po'
Making check in runtime-po
make[2]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/runtime-po'
make[2]: Nothing to be done for `check'.
make[2]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/runtime-po'
Making check in lib
make[2]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/lib'
make.exe check-recursive
make[3]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/lib'
make[4]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/lib'
make[4]: Nothing to be done for `check-am'.
make[4]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/lib'
make[3]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/lib'
make[2]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/lib'
Making check in data
make[2]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/data'
make[2]: Nothing to be done for `check'.
make[2]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/data'
Making check in src
make[2]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/src'
make.exe check-am
make[3]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/src'
make[3]: Nothing to be done for `check-am'.
make[3]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/src'
make[2]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/src'
Making check in doc
make[2]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/doc'
make[2]: Nothing to be done for `check'.
make[2]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/doc'
Making check in examples
make[2]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples'
Making check in calc++
make[3]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples/calc++'
make.exe check-am
make[4]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples/calc++'
make.exe calc++.exe
make[5]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples/calc++'
g++ -I. -I../../../bison-2.4.1-src/examples/calc++ -D__USE_MINGW_ACCESS -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DENABLE_RELOCATABLE -DINSTALLPREFIX=\"c:/progra~1/bison\" -DINSTALLDIR=\"c:/progra~1/bison/bin\" -DEXEEXT=\".exe\" -DNO_XMALLOC -ID:/Progra~1/GnuWin32/include -Wall -Wpointer-arith -O3 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -march=i386 -ffast-math -fconserve-space -fno-rtti -D__STDC_LIMIT_MACROS -MT calc++-scanner.o -MD -MP -MF .deps/calc++-scanner.Tpo -c -o calc++-scanner.o ../../../bison-2.4.1-src/examples/calc++/calc++-scanner.cc
calc++-scanner.cc: In function `int yy_get_next_buffer()':
calc++-scanner.cc:1218: warning: comparison between signed and unsigned integer expressions
mv -f .deps/calc++-scanner.Tpo .deps/calc++-scanner.Po
g++ -I. -I../../../bison-2.4.1-src/examples/calc++ -D__USE_MINGW_ACCESS -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DENABLE_RELOCATABLE -DINSTALLPREFIX=\"c:/progra~1/bison\" -DINSTALLDIR=\"c:/progra~1/bison/bin\" -DEXEEXT=\".exe\" -DNO_XMALLOC -ID:/Progra~1/GnuWin32/include -Wall -Wpointer-arith -O3 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -march=i386 -ffast-math -fconserve-space -fno-rtti -D__STDC_LIMIT_MACROS -MT calc++.o -MD -MP -MF .deps/calc++.Tpo -c -o calc++.o `test -f '../../../bison-2.4.1-src/examples/calc++/calc++.cc' || echo '../../../bison-2.4.1-src/examples/calc++/'`../../../bison-2.4.1-src/examples/calc++/calc++.cc
mv -f .deps/calc++.Tpo .deps/calc++.Po
g++ -I. -I../../../bison-2.4.1-src/examples/calc++ -D__USE_MINGW_ACCESS -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DENABLE_RELOCATABLE -DINSTALLPREFIX=\"c:/progra~1/bison\" -DINSTALLDIR=\"c:/progra~1/bison/bin\" -DEXEEXT=\".exe\" -DNO_XMALLOC -ID:/Progra~1/GnuWin32/include -Wall -Wpointer-arith -O3 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -march=i386 -ffast-math -fconserve-space -fno-rtti -D__STDC_LIMIT_MACROS -MT calc++-driver.o -MD -MP -MF .deps/calc++-driver.Tpo -c -o calc++-driver.o `test -f '../../../bison-2.4.1-src/examples/calc++/calc++-driver.cc' || echo '../../../bison-2.4.1-src/examples/calc++/'`../../../bison-2.4.1-src/examples/calc++/calc++-driver.cc
mv -f .deps/calc++-driver.Tpo .deps/calc++-driver.Po
g++ -I. -I../../../bison-2.4.1-src/examples/calc++ -D__USE_MINGW_ACCESS -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DENABLE_RELOCATABLE -DINSTALLPREFIX=\"c:/progra~1/bison\" -DINSTALLDIR=\"c:/progra~1/bison/bin\" -DEXEEXT=\".exe\" -DNO_XMALLOC -ID:/Progra~1/GnuWin32/include -Wall -Wpointer-arith -O3 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -march=i386 -ffast-math -fconserve-space -fno-rtti -D__STDC_LIMIT_MACROS -MT calc++-parser.o -MD -MP -MF .deps/calc++-parser.Tpo -c -o calc++-parser.o `test -f '../../../bison-2.4.1-src/examples/calc++/calc++-parser.cc' || echo '../../../bison-2.4.1-src/examples/calc++/'`../../../bison-2.4.1-src/examples/calc++/calc++-parser.cc
mv -f .deps/calc++-parser.Tpo .deps/calc++-parser.Po
g++ -Wall -Wpointer-arith -O3 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -march=i386 -ffast-math -fconserve-space -fno-rtti -D__STDC_LIMIT_MACROS -Wl,-s -Wl,--force-exe-suffix -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--allow-multiple-definition -Wl,--enable-stdcall-fixup -LD:/Progra~1/GnuWin32/lib -o calc++.exe calc++-scanner.o calc++.o calc++-driver.o calc++-parser.o -Wl,-s -LD:/Progra~1/GnuWin32/lib -lintl -lwsock32 -lole32 -luuid -lmsvcp60
make[5]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples/calc++'
make.exe check-TESTS
make[5]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples/calc++'
PASS: test
==================
All 1 tests passed
==================
make[5]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples/calc++'
make[4]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples/calc++'
make[3]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples/calc++'
make[3]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples'
make[3]: Nothing to be done for `check-am'.
make[3]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples'
make[2]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples'
Making check in tests
make[2]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/tests'
make.exe bison
make[3]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/tests'
make[3]: `bison' is up to date.
make[3]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/tests'
make.exe check-local
make[3]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/tests'
/bin/sh ../../bison-2.4.1-src/tests/testsuite
## --------------------------- ##
## GNU Bison 2.4.1 test suite. ##
## --------------------------- ##
Input Processing.
1: Invalid $n and @n ok
2: Type Clashes ok
3: Unused values ok
4: Unused values before symbol declarations ok
5: Default %printer and %destructor redeclared ok
6: Per-type %printer and %destructor redeclared ok
7: Unused values with default %destructor ok
8: Unused values with per-type %destructor ok
9: Incompatible Aliases ok
10: Torturing the Scanner ok
11: Typed symbol aliases ok
12: Require 1.0 ok
13: Require 2.4.1 ok
14: Require 100.0 ok
15: String aliases for character tokens ok
16: Unclosed constructs ok
17: %start after first rule ok
18: %prec takes a token ok
19: Reject unused %code qualifiers ok
20: %define errors ok
21: %define Boolean variables ok
22: %define enum variables ok
23: Unused %define api.pure ok
24: C++ namespace reference errors ok
Output file names.
25: Output files: -dv ok
26: Output files: -dv >&- ok
27: Output files: -dv -o foo.c ok
28: Output files: -dv -o foo.tab.c ok
29: Output files: -dv -y ok
30: Output files: -dv -b bar ok
31: Output files: -dv -g -o foo.c ok
32: Output files: %defines %verbose ok
33: Output files: %defines %verbose %yacc ok
34: Output files: %defines %verbose %yacc ok
35: Output files: %file-prefix "bar" %defines %verbose ok
36: Output files: %output="bar.c" %defines %verbose %yacc ok
37: Output files: %file-prefix="baz" %output "bar.c" %defines %verbose %yacc ok
38: Output files: %defines %verbose ok
39: Output files: %defines %verbose -o foo.c ok
40: Output files: --defines=foo.hpp -o foo.c++ ok
41: Output files: %defines "foo.hpp" -o foo.c++ ok
42: Output files: -o foo.c++ --graph=foo.gph ok
43: Output files: %skeleton "lalr1.cc" %defines %verbose ok
44: Output files: %skeleton "lalr1.cc" %defines %verbose ok
45: Output files: %skeleton "lalr1.cc" %defines %verbose -o subdir/foo.cc ok
46: Output files: %skeleton "lalr1.cc" %defines %verbose %file-prefix "output_dir/foo" ok
47: Conflicting output files: --graph="foo.tab.c" ok
48: Conflicting output files: %defines "foo.output" -v ok
49: Conflicting output files: %skeleton "lalr1.cc" %defines --graph="location.hh" ok
50: Conflicting output files: -o foo.y ok
51: Output file name: `~!@#$%^&*()-=_+{}[]|\:;<>, .' FAILED (output.at:200)
52: Output file name: ( ok
53: Output file name: ) ok
54: Output file name: # ok
55: Output file name: @@ ok
56: Output file name: @{ ok
57: Output file name: @} ok
58: Output file name: [ ok
59: Output file name: ] ok
Skeleton Support.
60: Relative skeleton file names ok
61: Installed skeleton file names ok
62: %define Boolean variables: invalid skeleton defaults ok
63: Complaining during macro argument expansion ok
64: Fatal errors make M4 exit immediately ok
Grammar Sets (Firsts etc.).
65: Nullable ok
66: Broken Closure ok
67: Firsts ok
68: Accept ok
Grammar Reduction.
69: Useless Terminals ok
70: Useless Nonterminals ok
71: Useless Rules ok
72: Reduced Automaton ok
73: Underivable Rules ok
74: Empty Language ok
User Actions.
75: Prologue synch line ok
76: %union synch line ok
77: Postprologue synch line ok
78: Action synch line ok
79: Epilogue synch line ok
Parser Headers.
80: %union and --defines ok
81: Invalid CPP guards: input/input ok
82: Invalid CPP guards: 9foo ok
83: export YYLTYPE ok
User Actions.
84: Mid-rule actions ok
85: Exotic Dollars ok
86: Printers and Destructors : ok
87: Printers and Destructors with union: ok
88: Printers and Destructors : %defines %skeleton "lalr1.cc" ok
89: Printers and Destructors with union: %defines %skeleton "lalr1.cc" ok
90: Printers and Destructors : %glr-parser ok
91: Printers and Destructors with union: %glr-parser ok
92: Default tagless %printer and %destructor ok
93: Default tagged and per-type %printer and %destructor ok
94: Default %printer and %destructor for user-defined end token ok
95: Default %printer and %destructor are not for error or $undefined ok
96: Default %printer and %destructor are not for $accept ok
97: Default %printer and %destructor for mid-rule values ok
98: @$ in %initial-action implies %locations ok
99: @$ in %destructor implies %locations ok
100: @$ in %printer implies %locations ok
Conflicts.
101: S/R in initial ok
102: %nonassoc and eof ok
103: Unresolved SR Conflicts ok
104: Resolved SR Conflicts ok
105: Defaulted Conflicted Reduction ok
106: %expect not enough ok
107: %expect right ok
108: %expect too much ok
109: %expect with reduce conflicts ok
110: %no-default-prec without %prec ok
111: %no-default-prec with %prec ok
112: %default-prec ok
113: Unreachable States After Conflict Resolution ok
114: Solved conflicts report for multiple reductions in a state ok
115: %nonassoc error actions for multiple reductions in a state ok
Simple LALR(1) Calculator.
116: Calculator ok
117: Calculator %defines ok
118: Calculator %locations ok
119: Calculator %name-prefix="calc" ok
120: Calculator %verbose ok
121: Calculator %yacc ok
122: Calculator %error-verbose FAILED (calc.at:576)
123: Calculator %define api.pure %locations ok
124: Calculator %define api.push_pull "both" %define api.pure %locations ok
125: Calculator %error-verbose %locations FAILED (calc.at:580)
126: Calculator %error-verbose %locations %defines %name-prefix "calc" %verbose %yacc FAILED (calc.at:582)
127: Calculator %debug ok
128: Calculator %error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc FAILED (calc.at:585)
129: Calculator %define api.pure %error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc FAILED (calc.at:587)
130: Calculator %define api.push_pull "both" %define api.pure %error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc FAILED (calc.at:588)
131: Calculator %define api.pure %error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count} FAILED (calc.at:590)
Simple GLR Calculator.
132: Calculator %glr-parser ok
133: Calculator %glr-parser %defines ok
134: Calculator %glr-parser %locations ok
135: Calculator %glr-parser %name-prefix "calc" ok
136: Calculator %glr-parser %verbose ok
137: Calculator %glr-parser %yacc ok
138: Calculator %glr-parser %error-verbose FAILED (calc.at:614)
139: Calculator %glr-parser %define api.pure %locations ok
140: Calculator %glr-parser %error-verbose %locations FAILED (calc.at:617)
141: Calculator %glr-parser %error-verbose %locations %defines %name-prefix "calc" %verbose %yacc FAILED (calc.at:619)
142: Calculator %glr-parser %debug ok
143: Calculator %glr-parser %error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc FAILED (calc.at:622)
144: Calculator %glr-parser %define api.pure %error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc FAILED (calc.at:624)
145: Calculator %glr-parser %define api.pure %error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count} FAILED (calc.at:626)
Simple LALR(1) C++ Calculator.
146: Calculator %skeleton "lalr1.cc" %defines %locations ok
147: Calculator %language "C++" %defines %locations ok
148: Calculator %language "C++" %defines %locations %error-verbose %name-prefix "calc" %verbose %yacc FAILED (calc.at:646)
149: Calculator %language "C++" %defines %locations %error-verbose %debug %name-prefix "calc" %verbose %yacc FAILED (calc.at:648)
150: Calculator %language "C++" %defines %locations %pure-parser %error-verbose %debug %name-prefix "calc" %verbose %yacc FAILED (calc.at:650)
151: Calculator %language "C++" %defines %locations %pure-parser %error-verbose %debug %name-prefix "calc" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count} FAILED (calc.at:652)
Simple GLR C++ Calculator.
152: Calculator %skeleton "glr.cc" %defines %locations ok
153: Calculator %language "C++" %glr-parser %defines %locations ok
154: Calculator %language "C++" %glr-parser %defines %locations %error-verbose %name-prefix "calc" %verbose %yacc FAILED (calc.at:673)
155: Calculator %language "C++" %glr-parser %defines %locations %debug ok
156: Calculator %language "C++" %glr-parser %defines %locations %error-verbose %debug %name-prefix "calc" %verbose %yacc FAILED (calc.at:676)
157: Calculator %language "C++" %glr-parser %defines %locations %pure-parser %error-verbose %debug %name-prefix "calc" %verbose %yacc FAILED (calc.at:678)
158: Calculator %language "C++" %glr-parser %defines %locations %pure-parser %error-verbose %debug %name-prefix "calc" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count} FAILED (calc.at:680)
Torture Tests.
159: Big triangle ok
160: Big horizontal ok
161: Many lookahead tokens ok
162: Exploding the Stack Size with Alloca ok
163: Exploding the Stack Size with Malloc ok
Existing Grammars.
164: GNU AWK Grammar ok
165: GNU Cim Grammar ok
166: GNU pic Grammar ok
Regression tests.
167: Trivial grammars ok
168: YYSTYPE typedef ok
169: Early token definitions with --yacc ok
170: Early token definitions without --yacc ok
171: Braces parsing ok
172: Duplicate string ok
173: Rule Line Numbers ok
174: Mixing %token styles ok
175: Invalid inputs ok
176: Invalid inputs with {} ok
177: Token definitions ok
178: Characters Escapes ok
179: Web2c Report ok
180: Web2c Actions ok
181: Dancer ok
182: Dancer %glr-parser ok
183: Dancer %skeleton "lalr1.cc" ok
184: Expecting two tokens ok
185: Expecting two tokens %glr-parser ok
186: Expecting two tokens %skeleton "lalr1.cc" ok
187: Braced code in declaration in rules section ok
188: String alias declared after use ok
189: Extra lookahead sets in report ok
190: Token number in precedence declaration ok
191: Fix user actions without a trailing semicolon ok
C++ Features.
192: Doxygen Public Documentation skipped (c++.at:100)
193: Doxygen Private Documentation skipped (c++.at:101)
194: Relative namespace references ok
195: Absolute namespace references ok
196: Syntactically invalid namespace references ok
Java Calculator.
197: Calculator skipped (java.at:385)
198: Calculator %error-verbose skipped (java.at:385)
199: Calculator %locations skipped (java.at:385)
200: Calculator %error-verbose %locations skipped (java.at:385)
201: Calculator %lex-param { InputStream is } skipped (java.at:394)
202: Calculator %error-verbose %lex-param { InputStream is } skipped (java.at:394)
203: Calculator %locations %lex-param { InputStream is } skipped (java.at:394)
204: Calculator %error-verbose %locations %lex-param { InputStream is } skipped (java.at:394)
Java Parameters.
205: Java parser class and package names skipped (java.at:482)
206: Java parser class modifiers skipped (java.at:503)
207: Java parser class extends and implements skipped (java.at:561)
208: Java %parse-param and %lex-param skipped (java.at:581)
209: Java throws specifications skipped (java.at:713)
210: Java stype, position_class and location_class skipped (java.at:744)
C++ Type Syntax (GLR).
211: GLR: Resolve ambiguity, impure, no locations ok
212: GLR: Resolve ambiguity, impure, locations ok
213: GLR: Resolve ambiguity, pure, no locations ok
214: GLR: Resolve ambiguity, pure, locations ok
215: GLR: Merge conflicting parses, impure, no locations ok
216: GLR: Merge conflicting parses, impure, locations ok
217: GLR: Merge conflicting parses, pure, no locations ok
218: GLR: Merge conflicting parses, pure, locations ok
219: GLR: Verbose messages, resolve ambiguity, impure, no locations ok
GLR Regression Tests
220: Badly Collapsed GLR States ok
221: Improper handling of embedded actions and dollar(-N) in GLR parsers ok
222: Improper merging of GLR delayed action sets ok
223: Duplicate representation of merged trees ok
224: User destructor for unresolved GLR semantic value ok
225: User destructor after an error during a split parse ok
226: Duplicated user destructor for lookahead ok
227: Incorrectly initialized location for empty right-hand side in GLR ok
228: No users destructors if stack 0 deleted ok
229: Corrupted semantic options if user action cuts parse ok
230: Undesirable destructors if user action cuts parse ok
231: Leaked semantic values if user action cuts parse ok
232: Incorrect lookahead during deterministic GLR ok
233: Incorrect lookahead during nondeterministic GLR ok
234: Leaked semantic values when reporting ambiguity ok
235: Leaked lookahead after nondeterministic parse syntax error ok
236: Uninitialized location when reporting ambiguity ok
237: Missed %merge type warnings when LHS type is declared later ok
Push Parsing Tests
238: Push Parsing: Memory Leak for Early Deletion ok
239: Push Parsing: Multiple impure instances ok
240: Push Parsing: Unsupported Skeletons ok
## ------------- ##
## Test results. ##
## ------------- ##
ERROR: 224 tests were run,
22 failed unexpectedly.
16 tests were skipped.
## -------------------------- ##
## testsuite.log was created. ##
## -------------------------- ##
Please send `tests/testsuite.log' and all information you think might help:
To: <bug-bison@gnu.org>
Subject: [GNU Bison 2.4.1] testsuite: 51 122 125 126 128 129 130 131 138 140 141 143 144 145 148 149 150 151 154 156 157 158 failed
You may investigate any problem if you feel able to do so, in which
case the test suite provides a good starting point. Its output may
be found below `tests/testsuite.dir'.
make[3]: [check-local] Error 1 (ignored)
make[3]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/tests'
make[2]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/tests'
Making check in etc
make[2]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/etc'
make[2]: Nothing to be done for `check'.
make[2]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/etc'
make[2]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1'
make[2]: Nothing to be done for `check-am'.
make[2]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1'
make[1]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1'

View File

@@ -0,0 +1,38 @@
Flex carries the copyright used for BSD software, slightly modified
because it originated at the Lawrence Berkeley (not Livermore!) Laboratory,
which operates under a contract with the Department of Energy:
Copyright (c) 1990 The Regents of the University of California.
All rights reserved.
This code is derived from software contributed to Berkeley by
Vern Paxson.
The United States Government has rights in this work pursuant
to contract no. DE-AC03-76SF00098 between the United States
Department of Energy and the University of California.
Redistribution and use in source and binary forms with or without
modification are permitted provided that: (1) source distributions
retain this entire copyright notice and comment, and (2)
distributions including binaries display the following
acknowledgement: ``This product includes software developed by the
University of California, Berkeley and its contributors'' in the
documentation or other materials provided with the distribution and
in all advertising materials mentioning features or use of this
software. Neither the name of the University nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.
This basically says "do whatever you please with this software except
remove this notice or take advantage of the University's (or the flex
authors') name".
Note that the "flex.skl" scanner skeleton carries no copyright notice.
You are free to do whatever you please with scanners generated using flex;
for them, you are not even bound by the above copyright.

View File

@@ -0,0 +1,117 @@
This is a generic INSTALL file for utilities distributions.
If this package does not come with, e.g., installable documentation or
data files, please ignore the references to them below.
To compile this package:
1. Configure the package for your system. In the directory that this
file is in, type `./configure'. If you're using `csh' on an old
version of System V, you might need to type `sh configure' instead to
prevent `csh' from trying to execute `configure' itself.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation, and
creates the Makefile(s) (one in each subdirectory of the source
directory). In some packages it creates a C header file containing
system-dependent definitions. It also creates a file `config.status'
that you can run in the future to recreate the current configuration.
Running `configure' takes a minute or two. While it is running, it
prints some messages that tell what it is doing. If you don't want to
see the messages, run `configure' with its standard output redirected
to `/dev/null'; for example, `./configure >/dev/null'.
To compile the package in a different directory from the one
containing the source code, you must use a version of `make' that
supports the VPATH variable, such as GNU `make'. `cd' to the directory
where you want the object files and executables to go and run
`configure'. `configure' automatically checks for the source code in
the directory that `configure' is in and in `..'. If for some reason
`configure' is not in the source code directory that you are
configuring, then it will report that it can't find the source code.
In that case, run `configure' with the option `--srcdir=DIR', where
DIR is the directory that contains the source code.
By default, `make install' will install the package's files in
/usr/local/bin, /usr/local/lib, /usr/local/man, etc. You can specify
an installation prefix other than /usr/local by giving `configure' the
option `--prefix=PATH'. Alternately, you can do so by giving a value
for the `prefix' variable when you run `make', e.g.,
make prefix=/usr/gnu
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If
you give `configure' the option `--exec-prefix=PATH' or set the
`make' variable `exec_prefix' to PATH, the package will use PATH as
the prefix for installing programs and libraries. Data files and
documentation will still use the regular prefix. Normally, all files
are installed using the regular prefix.
Another `configure' option is useful mainly in `Makefile' rules for
updating `config.status' and `Makefile'. The `--no-create' option
figures out the configuration for your system and records it in
`config.status', without actually configuring the package (creating
`Makefile's and perhaps a configuration header file). Later, you can
run `./config.status' to actually configure the package. You can also
give `config.status' the `--recheck' option, which makes it re-run
`configure' with the same arguments you used before. This option is
useful if you change `configure'.
Some packages pay attention to `--with-PACKAGE' options to `configure',
where PACKAGE is something like `gnu-libc' or `x' (for X windows).
The README should mention any --with- options that the package recognizes.
`configure' ignores any other arguments that you give it.
If your system requires unusual options for compilation or linking
that `configure' doesn't know about, you can give `configure' initial
values for some variables by setting them in the environment. In
Bourne-compatible shells, you can do that on the command line like
this:
CC='gcc -traditional' DEFS=-D_POSIX_SOURCE ./configure
The `make' variables that you might want to override with environment
variables when running `configure' are:
(For these variables, any value given in the environment overrides the
value that `configure' would choose:)
CC C compiler program.
Default is `cc', or `gcc' if `gcc' is in your PATH.
INSTALL Program to use to install files.
Default is `install' if you have it, `cp' otherwise.
(For these variables, any value given in the environment is added to
the value that `configure' chooses:)
DEFS Configuration options, in the form `-Dfoo -Dbar ...'
Do not use this variable in packages that create a
configuration header file.
LIBS Libraries to link with, in the form `-lfoo -lbar ...'
If you need to do unusual things to compile the package, we encourage
you to figure out how `configure' could check whether to do them, and
mail diffs or instructions to the address given in the README so we
can include them in the next release.
2. Type `make' to compile the package. If you want, you can override
the `make' variables CFLAGS and LDFLAGS like this:
make CFLAGS=-O2 LDFLAGS=-s
3. If the package comes with self-tests and you want to run them,
type `make check'. If you're not sure whether there are any, try it;
if `make' responds with something like
make: *** No way to make target `check'. Stop.
then the package does not come with self-tests.
4. Type `make install' to install programs, data files, and
documentation.
5. You can remove the program binaries and object files from the
source directory by typing `make clean'. To also remove the
Makefile(s), the header file containing system-dependent definitions
(if the package uses one), and `config.status' (all the files that
`configure' created), type `make distclean'.
The file `configure.in' is used as a template to create `configure' by
a program called `autoconf'. You will only need it if you want to
regenerate `configure' using a newer version of `autoconf'.

View File

@@ -0,0 +1,66 @@
Received: from 128.140.1.1 by ee.lbl.gov for <vern@ee.lbl.gov> (8.6.9/1.43r)
id PAA03966; Tue, 24 Jan 1995 15:03:57 -0800
Received: from larry-le0.cc.emory.edu by
emoryu1.cc.emory.edu (5.65/Emory_cc.4.0.1) via SMTP
id AA24158 ; Tue, 24 Jan 95 17:18:18 -0500
From: tkane01@unix.cc.emory.edu (Terrence O Kane)
Received: by larry.cc.emory.edu (5.0) id AA21979; Tue, 24 Jan 1995 17:17:40 -0500
Message-Id: <9501242217.AA21979@larry.cc.emory.edu>
Subject: Re: Beta test for DOS
To: vern@ee.lbl.gov (Vern Paxson)
Date: Tue, 24 Jan 1995 17:17:38 -0500 (EST)
In-Reply-To: <199501232138.NAA11430@daffy.ee.lbl.gov> from "Vern Paxson" at Jan 23, 95 01:38:02 pm
X-Mailer: ELM [version 2.4 PL23]
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 5792
Vern,
I've made flex 2.5.0.6 successfully with no changes to the source
code at all. I'm including the Borland 4.02 makefile and config.h
at the end of this message.
When you're ready for release, I'll be happy to take care of getting
the appropriate archive files up to Simtel if you wish.
I have not used this version for any of my "work-related" scanners
yet, but have run the fastwc benchmark. The compiles were for large
memory model and optimization for fastest possible code. The test
machine was a Pentium-90 (hey! timing output was integer!) with
enhanced IDE on a PCI bus and no file system caching. I ran the
test on two different input files.
(Times are in seconds.)
The first input was a typical postscript file concatenated 10 times;
by typical, I mean that there were relatively few spaces, lots of lines
with no space, using lots of parentheses.
lines words characters
91200 356260 5889240
mywc 8.89
wc1s 15.22 default
wc1 10.82 -Cf
wc2 10.16 -Cf
wc3 9.17 -Cf
wc4 9.22 -Cf
wc5 10.98 -Cf
The second test run was on a file that consisted of 20 concatenations
of 'misc/flex.man'.
lines words characters
69960 305140 2399960
mywc 4.01
wc1s 6.87
wc1 5.32
wc2 4.95
wc3 4.12
wc4 4.12
wc5 5.05
[[Makefile and config.h moved to separate files -VP]]

View File

@@ -0,0 +1,44 @@
These patches and supplemental programs should allow porting to MVS or MVS/XA
in an EBCDIC envrionment, using SAS C V4.00C.
Included are:
-rw-r--r-- 1 swl26 1573 Jul 17 14:32 README
-rw-rw-r-- 1 swl26 20861 Jul 17 13:41 diffs
-rw-rw-r-- 1 swl26 5022 Jul 17 14:00 fixit.l
-rw-rw-r-- 1 swl26 97644 Jul 17 13:42 initscan.mvs.c
-rw-rw-r-- 1 swl26 4898 Jul 17 14:08 unfixit.l
The file "diffs" contains context diffs for changes to flex 2.3.
The file "fixit.l" contains flex sources for a program to shorten external
variable and function names to 8 characters or less. This is required for the
"dumb" compiler linker used.
The file "unfixit.l" reverses the changes in "fixit.l", to restore long names.
This is useful when trying to build diff files as created here.
The file "initscan.mvs.c" is an already "flexed" version of scan.l, in an
EBCDIC environment.
To install in an MVS environment, use patch to apply the diffs to flex 2.3,
then run "fixit" on all .c, .h, .l, .y, and .skel files. Move the files
to the MVS machine, and compile each of the .c files. (You will need a
"yacc" functional equivalent under MVS to expand parse.y in that
environment.) Link together, and the resulting flex should be ready to
go. To test, run the MVSflex -is8 -Ce on the scan.l, and you should get
back a file which is identical to initscan.mvs.c.
Enjoy.
Steven W. Layten
Senior Engineer
Chemical Abstracts Service
PO Box 3012
2540 Olentangy River Road
Columbus, Ohio 43210
+1 614 421 3600 extension 3451
INET: swl26%cas.BITNET@CUNYVM.CUNY.Edu
UUCP: osu-cis!chemabs!swl26
BITNET: swl26@cas.bitnet

View File

@@ -0,0 +1,76 @@
Miscellaneous flex stuff. The items which have been tested with flex 2.5 are:
- texinfo/, a subdirectory containing a "texinfo" version of flex(1)
and the corresponding "info" files (contributed by Francois Pinard).
- VMS/, a subdirectory containing makefiles, configuration files,
run-time support, and installation notes for building flex 2.5
on VMS (contributed by Pat Rankin).
- Borland/ - makefile and config.h for Borland 4.02 compiler
(contributed by Terrence O Kane, who notes that no source
code changes were necessary).
- NT/ - Makefile and config.h for NT, contributed by Stan Adermann.
- OS2/ - Makefile and config.h for building flex under OS/2,
contributed by Kai Uwe Rommel.
- Amiga/: notes on building flex for the Amiga, contributed
by Andreas Scherer.
- parse.c, parse.h - output of running yacc (byacc, actually)
on parse.y. If your system doesn't have a flavor of yacc available,
copy these into the main flex source directory instead.
- flex.man - preformatted version of flex man page
The following have been tested using flex 2.4:
- debflex.awk, an awk script for anotating flex debug output.
It presently only works with gawk and mawk, not with "old"
or "new" awk.
- NeXT: ProjectBuilder.app support for use in the NeXT world.
- Notes on building flex for the Macintosh using Think-C,
in the Macintosh/ subdirectory.
- testxxLexer.l, a sample C++ program that uses flex's scanner
class option ("-+").
- fastwc/, a subdirectory containing examples of how to use flex
to write progressively higher-performance versions of the Unix
"wc" utility. This certainly should work with 2.5, but hasn't
been tested.
- Borland.old/: notes on building flex 2.4 for Borland C++ 3.1
on MS-DOS. These shouldn't be needed for flex 2.5. Included
only in case you encounter unanticipated difficulties.
- EBCDIC: contact information for building flex for EBCDIC.
The following are all out-of-date with respect to flex release 2.4 (and
in general up-to-date for flex 2.3):
- Atari/Atari.patches, patches for porting flex to the Atari and
to Minix.
- A number of notes and Makefiles for compiling flex under MS-DOS,
in the MSDOS/ subdirectory.
- Notes on building flex for MVS, in the MVS/ subdirectory.
If any of this is out-of-date and can be deleted, please let me know.
And the following is included for compatibility with some broken versions
of bison:
- alloca.c, a public-domain, mostly-portable version of the
alloca() routine (used by bison's parsers) written by D. A. Gwyn.
Many thanks to those who contributed these files. Updated versions will
be appreciated!

View File

@@ -0,0 +1,56 @@
This directory contains some examples illustrating techniques for extracting
high-performance from flex scanners. Each program implements a simplified
version of the Unix "wc" tool: read text from stdin and print the number of
characters, words, and lines present in the text. All programs were compiled
using gcc (version unavailable, sorry) with the -O flag, and run on a
SPARCstation 1+. The input used was a PostScript file, mainly containing
figures, with the following "wc" counts:
lines words characters
214217 635954 2592172
The basic principles illustrated by these programs are:
- match as much text with each rule as possible
- adding rules does not slow you down!
- avoid backing up
and the big caveat that comes with them is:
- you buy performance with decreased maintainability; make
sure you really need it before applying the above techniques.
See the "Performance Considerations" section of flexdoc for more
details regarding these principles.
The different versions of "wc":
mywc.c
a simple but fairly efficient C version
wc1.l a naive flex "wc" implementation
wc2.l somewhat faster; adds rules to match multiple tokens at once
wc3.l faster still; adds more rules to match longer runs of tokens
wc4.l fastest; still more rules added; hard to do much better
using flex (or, I suspect, hand-coding)
wc5.l identical to wc3.l except one rule has been slightly
shortened, introducing backing-up
Timing results (all times in user CPU seconds):
program time notes
------- ---- -----
wc1 16.4 default flex table compression (= -Cem)
wc1 6.7 -Cf compression option
/bin/wc 5.8 Sun's standard "wc" tool
mywc 4.6 simple but better C implementation!
wc2 4.6 as good as C implementation; built using -Cf
wc3 3.8 -Cf
wc4 3.3 -Cf
wc5 5.7 -Cf; ouch, backing up is expensive

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,60 @@
This is release 2.5 of flex. See "version.h" for the exact patch-level.
See the file "NEWS" to find out what is new in this Flex release.
Read the file "INSTALL" for general installation directives. Peek near
the beginning of the file "Makefile.in" for special DEFS values. On most
systems, you can just run the "configure" script and type "make" to build
flex; then "make check" to test whether it built correctly; and if it did,
then "make install" to install it.
If you're feeling adventurous, you can also issue "make bigcheck" (be
prepared to wait a while).
Note that flex is distributed under a copyright very similar to that of
BSD Unix, and not under the GNU General Public License (GPL), except for
the "configure" script, which is covered by the GPL.
Many thanks to the 2.5 beta-testers for finding bugs and helping test and
increase portability: Stan Adermann, Scott David Daniels, Charles Elliott,
Joe Gayda, Chris Meier, James Nordby, Terrence O'Kane, Karsten Pahnke,
Francois Pinard, Pat Rankin, Andreas Scherer, Marc Wiese, Nathan Zelle.
Please send bug reports and feedback to: Vern Paxson (vern@ee.lbl.gov).
The flex distribution consists of the following files:
README This message
NEWS Differences between the various releases
INSTALL General installation information
COPYING flex's copyright
conf.in, configure.in, configure, Makefile.in, install.sh,
mkinstalldirs
elements of the "autoconf" auto-configuration process
flexdef.h, parse.y, scan.l, ccl.c, dfa.c, ecs.c, gen.c, main.c,
misc.c, nfa.c, sym.c, tblcmp.c, yylex.c
source files
version.h version of this flex release
flex.skl flex scanner skeleton
mkskel.sh script for converting flex.skl to C source file skel.c
skel.c pre-converted C version of flex.skl
libmain.c flex library (-lfl) sources
libyywrap.c
initscan.c pre-flex'd version of scan.l
FlexLexer.h header file for C++ lexer class
flex.1 user documentation
MISC/ a directory containing miscellaneous contributions.
See MISC/README for details.

View File

@@ -0,0 +1,3 @@
kernel32.dll
msvcrt.dll
ntdll.dll

View File

@@ -0,0 +1,51 @@
* Flex-2.5.4a for Windows *
===========================
What is it?
-----------
Flex: fast lexical analyzer generator
Description
-----------
Flex is a fast lexical analyser generator. It is a tool for generating
programs that perform pattern-matching on text. There are many applications
for Flex, including writing compilers in conjunction with GNU Bison. Flex
is a free implementation of the well known Lex program. It features a Lex
compatibility mode, and also provides several new features such as exclusive
start conditions.
Homepage
--------
http://www.gnu.org/software/flex/flex.html
System
------
- MS-Windows 95 / 98 / ME / NT / 2000 / XP with msvcrt.dll
- if msvcrt.dll is not in your Windows/System folder, get it from
Microsoft <http://support.microsoft.com/default.aspx?scid=kb;en-us;259403">
or by installing Internet Explorer 4.0 or higher
<http://www.microsoft.com/windows/ie>
Notes
-----
- Bugs and questions on this MS-Windows port: gnuwin32@users.sourceforge.net
Package Availability
--------------------
- in: http://gnuwin32.sourceforge.net
Sources
-------
- flex-2.5.4a-1-src.zip
Compilation
-----------
The package has been compiled with GNU auto-tools, GNU make, and Mingw
(GCC for MS-Windows). Any differences from the original sources are given
in flex-2.5.4a-1-GnuWin32.diffs in flex-2.5.4a-1-src.zip. Libraries needed
for compilation can be found at the lines starting with 'LIBS = ' in the
Makefiles. Usually, these are standard libraries provided with Mingw, or
libraries from the package itself; 'gw32c' refers to the libgw32c package,
which provides MS-Windows substitutes or stubs for functions normally found in
Unix. For more information, see: http://gnuwin32.sourceforge.net/compile.html
and http://gnuwin32.sourceforge.net/packages/libgw32c.htm.

View File

@@ -0,0 +1,188 @@
BISON(1) User Commands BISON(1)
NAME s
bison - GNU Project parser generator (yacc replacement)
n
SYNOPSIS 2
j:l. [OPTION]... FILE
4
DESCRIPTION
Bison is a parser generator in the style of yacc(1). It
should be upwardly compatible with input files designed
for yacc.
Input files should follow the yacc convention of ending
in .y. Unlike yacc, the generated files do not have
fixed names, but instead use the prefix of the input
file. Moreover, if you need to put C++ code in the
input file, you can end his name by a C++-like extension
(.ypp or .y++), then bison will follow your extension to
name the output file (.cpp or .c++). For instance, a
grammar description file named parse.yxx would produce
the generated parser in a file named parse.tab.cxx,
instead of yacc's y.tab.c or old Bison version's
parse.tab.c.
This description of the options that can be given to
bison is adapted from the node Invocation in the
bison.texinfo manual, which should be taken as authori-
tative.
Bison supports both traditional single-letter options
and mnemonic long option names. Long option names are
indicated with -- instead of -. Abbreviations for
option names are allowed as long as they are unique.
When a long option takes an argument, like --file-pre-
fix, connect the option name and the argument with =.
Generate LALR(1) and GLR parsers.
Mandatory arguments to long options are mandatory for
short options too. The same is true for optional argu-
ments.
Operation modes:
-h, --help
display this help and exit
-V, --version
output version information and exit
--print-localedir
output directory containing locale-dependent data
--print-datadir
output directory containing skeletons and XSLT
-y, --yacc
emulate POSIX Yacc
-W, --warnings=[CATEGORY]
report the warnings falling in CATEGORY
Parser:
-L, --language=LANGUAGE
specify the output programming language (this is
an experimental feature)
-S, --skeleton=FILE
specify the skeleton to use
-t, --debug
instrument the parser for debugging
--locations
enable locations computation
-p, --name-prefix=PREFIX
prepend PREFIX to the external symbols
-l, --no-lines
don't generate `#line' directives
-k, --token-table
include a table of token names
Output:
--defines[=FILE]
also produce a header file
-d likewise but cannot specify FILE (for POSIX Yacc)
-r, --report=THINGS
also produce details on the automaton
--report-file=FILE
write report to FILE
-v, --verbose
same as `--report=state'
-b, --file-prefix=PREFIX
specify a PREFIX for output files
-o, --output=FILE
leave output to FILE
-g, --graph[=FILE]
also output a graph of the automaton
-x, --xml[=FILE]
also output an XML report of the automaton (the
XML schema is experimental)
Warning categories include:
`midrule-values'
unset or unused midrule values
`yacc' incompatibilities with POSIX YACC
`all' all the warnings
`no-CATEGORY'
turn off warnings in CATEGORY
`none' turn off all the warnings
`error'
treat warnings as errors
THINGS is a list of comma separated words that can
include:
`state'
describe the states
`itemset'
complete the core item sets with their closure
`lookahead'
explicitly associate lookahead tokens to items
`solved'
describe shift/reduce conflicts solving
`all' include all the above information
`none' disable the report
AUTHOR
Written by Robert Corbett and Richard Stallman.
Copyright (C) 2008 Free Software Foundation, Inc. This
is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.
REPORTING BUGS
Report bugs to <bug-bison@gnu.org>.
SEE ALSO
lex(1), flex(1), yacc(1).
The full documentation for bison is maintained as a Tex-
info manual. If the info and bison programs are prop-
erly installed at your site, the command
info bison
should give you access to the complete manual.
bison 2.4.1 December 2008 BISON(1)

3013
gnuwin32/man/cat1/flex.1.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,98 @@
bin/bison.exe 9b77c0ac22320107da171b714daf35cd
bin/m4.exe a8bba9be6f35bd142ea6070c712db7a4
bin/yacc 7a2ae4197f417a220f2a6383107a6eeb
share/aclocal/bison-i18n.m4 b78aeb51518d933888422fe184769bc3
share/bison/bison.m4 cb4d3b1e574c3f51977a41648250ea2f
share/bison/c++-skel.m4 a6b2b7bb3ca446274a8ac9cb8752fdb5
share/bison/c++.m4 81e10995ca04361bcb62def5102453ae
share/bison/c-skel.m4 d103c4295424188df871403af31862b2
share/bison/c.m4 0ae9fd3c1281bf04d488150835abb13e
share/bison/glr.c 2ca76e035567ea8c4e4ab7e5c8c71bcd
share/bison/glr.cc 5e3848ae6d72f3aeb39e3cead9b19189
share/bison/java-skel.m4 266040f19946adcd0690a137d01b33b3
share/bison/java.m4 f14d7d0f7a5e2389ff6268571196aaff
share/bison/lalr1.cc 1e0342ff750e8327f264ac9ba40ca04e
share/bison/lalr1.java 8cfa32f6655dd131c75be26030d4f9e0
share/bison/location.cc a3b1de56827c557848a2cd796d9f0cc6
share/bison/m4sugar/foreach.m4 1ed14337cd515cb4769fa0819aea4788
share/bison/m4sugar/m4sugar.m4 927efcb06a8f6c6f1f4ed2ab61544774
share/bison/README 733daf0795885b7517ac76e7d9ec6072
share/bison/xslt/bison.xsl f9427406765c733e55302d18986461f7
share/bison/xslt/xml2dot.xsl b888fc340fc1ab15463b11d4a64885a6
share/bison/xslt/xml2text.xsl a2f070ab483e67019fed68c256e4cf4d
share/bison/xslt/xml2xhtml.xsl 2fc9119e3a9a612f057981b45ac6c54b
share/bison/yacc.c 54166ae249681d10c6f4e08287f03c81
share/locale/da/LC_MESSAGES/bison-runtime.mo 6dfd5c4570b100e040de0ff9d8650739
share/locale/da/LC_MESSAGES/bison.mo e619bb77e5aec8c63446446e2431b246
share/locale/de/LC_MESSAGES/bison-runtime.mo 170170e01937e2c8beb80cf773d769a1
share/locale/de/LC_MESSAGES/bison.mo 287df753c5a821fabaf8026874b06e0c
share/locale/el/LC_MESSAGES/bison-runtime.mo 914180733f3313feb2651575f5fce815
share/locale/el/LC_MESSAGES/bison.mo 7429c8a50d9ca4e1c872892ec3a7e92d
share/locale/es/LC_MESSAGES/bison-runtime.mo 802296357a908e3f9b8b30966f038586
share/locale/es/LC_MESSAGES/bison.mo a79f3ded869c39eec6e395b8d237c68e
share/locale/et/LC_MESSAGES/bison-runtime.mo c7c2679f0f24815f66f6ea715de66471
share/locale/et/LC_MESSAGES/bison.mo bc09ed96ae443bfd29d443977e2fab3a
share/locale/fi/LC_MESSAGES/bison-runtime.mo eb9a3e5ae9781e6e5106417f9ac95682
share/locale/fr/LC_MESSAGES/bison-runtime.mo 61e8aa920508778cd0940693ba788f82
share/locale/fr/LC_MESSAGES/bison.mo 7042cbf9fc27b4792dffbfb5cb62b032
share/locale/ga/LC_MESSAGES/bison-runtime.mo f3c89935e4c036ccbac69331023a1d02
share/locale/ga/LC_MESSAGES/bison.mo 8b429255351e8fcb8220f31ab7f15380
share/locale/hr/LC_MESSAGES/bison-runtime.mo aab786adbdf55d09ef0f06d0c35e3505
share/locale/hr/LC_MESSAGES/bison.mo e1e882789f14ba67d0d024ba7295ee70
share/locale/id/LC_MESSAGES/bison-runtime.mo c5f7380032b2ef9f6b1de236871bbb2b
share/locale/id/LC_MESSAGES/bison.mo c5d710e68f8b65bd5cdd722e91037c2f
share/locale/it/LC_MESSAGES/bison-runtime.mo a9394c45eb4b8ec48aadd75b7422c89f
share/locale/it/LC_MESSAGES/bison.mo 8c2e838bf50f3c17e67f20884fb76422
share/locale/ja/LC_MESSAGES/bison-runtime.mo eb40cb10de57e3df7856c17b32a276d0
share/locale/ja/LC_MESSAGES/bison.mo 1b801a1081b0b14aed1e806e41e444ba
share/locale/ky/LC_MESSAGES/bison-runtime.mo e09a5920850d3beb179f936d4429013c
share/locale/lt/LC_MESSAGES/bison-runtime.mo 39e5df7115def15af732bd900bc96700
share/locale/ms/LC_MESSAGES/bison-runtime.mo 9e59662660f0d3c6f431974ade35b3a4
share/locale/ms/LC_MESSAGES/bison.mo 24464692b8dad9b43b053c770dc9c125
share/locale/nb/LC_MESSAGES/bison-runtime.mo f4b38d7e0d23efe7532c873c862f1c72
share/locale/nb/LC_MESSAGES/bison.mo 13df5b58f2cecd17197726419c884c12
share/locale/nl/LC_MESSAGES/bison-runtime.mo 26a294e26df2db2531cf6b4a3cb6f3bd
share/locale/nl/LC_MESSAGES/bison.mo 0cae765387f2a8fa74d675dc053a08d5
share/locale/pl/LC_MESSAGES/bison-runtime.mo db9a933d1852b4c93f0ae280bc81239d
share/locale/pl/LC_MESSAGES/bison.mo 73037bfd4b47336ef8b860eee3eab107
share/locale/pt_BR/LC_MESSAGES/bison-runtime.mo c1861e0a8d3b47ff8d82436acbad7a1d
share/locale/pt_BR/LC_MESSAGES/bison.mo abc75395c16fe23cebff32b495e5326a
share/locale/ro/LC_MESSAGES/bison-runtime.mo 81f0521018ff088ddb1dcf5a0c55304d
share/locale/ro/LC_MESSAGES/bison.mo 17e4bbc6258a9a3515ce9f2f5e375ac9
share/locale/ru/LC_MESSAGES/bison-runtime.mo 7cb4e547d5fd69d41e714bed5ea6e07f
share/locale/ru/LC_MESSAGES/bison.mo 2677e3d7a467c1836095c1926b3fccc8
share/locale/sl/LC_MESSAGES/bison-runtime.mo 529c3f31f53666dcde532c22c8b039a8
share/locale/sv/LC_MESSAGES/bison-runtime.mo 49f339132b3ba054d15db2c36bb7d415
share/locale/sv/LC_MESSAGES/bison.mo 147d21a3a9b6aa5dacbc153a3698523b
share/locale/th/LC_MESSAGES/bison-runtime.mo 940980271d3eb51e1a3d9d04276fa82d
share/locale/tr/LC_MESSAGES/bison-runtime.mo a6a3f122a5bd3bbfe523252dbdbb8bae
share/locale/tr/LC_MESSAGES/bison.mo c530ab29d98b29ada966d345e6e1b4cc
share/locale/uk/LC_MESSAGES/bison-runtime.mo 3503e13922340f9bb8c7e7dd1745ad56
share/locale/uk/LC_MESSAGES/bison.mo a64c5fca9b48094a1293d03944a6909d
share/locale/vi/LC_MESSAGES/bison-runtime.mo 47e72d9a6bae970ac7c1f80074a16fab
share/locale/vi/LC_MESSAGES/bison.mo b9e2b62efaa700bdaf98361898e8f698
share/locale/zh_CN/LC_MESSAGES/bison-runtime.mo ff3d1e2cfd6c97093b58ec9915da4512
share/locale/zh_TW/LC_MESSAGES/bison-runtime.mo 5480f8bd87280285cc3a93cd4d32a261
share/locale/zh_TW/LC_MESSAGES/bison.mo cfe91e1fe608c7d7d5911fc443b0a8ef
man/cat1/bison.1.txt a6055372a5deb55bd1724ee2a8dce3f9
man/cat1/yacc.1.txt 46db0be5355842507a52eac5903b7656
man/cat1p/yacc.1p.txt 616a07d308d3ce1a9b818d24d3db656b
contrib/bison/2.4.1/bison-2.4.1/check.log 1fca25fd5033310331b72223313ce9d7
contrib/bison/2.4.1/bison-2.4.1-GnuWin32.README 0b034363b6623940541f78785206172b
contrib/bison/2.4.1/bison-2.4.1-src/ABOUT-NLS f60c7a8c0f41f0c420f577b8eac3eb8d
contrib/bison/2.4.1/bison-2.4.1-src/AUTHORS 831615db728b01c7deba7327cd8dae7c
contrib/bison/2.4.1/bison-2.4.1-src/ChangeLog 86bf2bdbcf7ce19ac5d012c131354895
contrib/bison/2.4.1/bison-2.4.1-src/COPYING d32239bcb673463ab874e80d47fae504
contrib/bison/2.4.1/bison-2.4.1-src/data/README 733daf0795885b7517ac76e7d9ec6072
contrib/bison/2.4.1/bison-2.4.1-src/djgpp/README.in 6a9c802d502d3eaddd1c07845794f623
contrib/bison/2.4.1/bison-2.4.1-src/doc/bison.info d1327fbe26856b29ea3e5011666699c6
contrib/bison/2.4.1/bison-2.4.1-src/doc/gpl-3.0.texi 546c7be07c02468d7ff987d788457098
contrib/bison/2.4.1/bison-2.4.1-src/etc/README 54bd8e9cac2262ddff1d42a05b71d946
contrib/bison/2.4.1/bison-2.4.1-src/INSTALL 60f30af7e6443cf9bf9d8c91e8678dd8
contrib/bison/2.4.1/bison-2.4.1-src/NEWS 77a6406fe4da30964f9118590f4d65ce
contrib/bison/2.4.1/bison-2.4.1-src/README cf4640a624fe427a45c68042ecea9a07
contrib/bison/2.4.1/bison-2.4.1-src/README-alpha cbb41c6b143a533d323d47a38231eab1
contrib/bison/2.4.1/bison-2.4.1-src/THANKS 45de5fa016f19ad20c571c7f0bd3b603
contrib/bison/2.4.1/bison-2.4.1-src/TODO f35ceeef307431ca11ed45ba5f6ce771
manifest/bison-2.4.1-bin.mft
manifest/bison-2.4.1-bin.ver 740f684ae2a8d4b60e1e3359e7080e56

View File

@@ -0,0 +1 @@
Bison-2.4.1 (Yacc-compatible parser generator): Binaries

View File

@@ -0,0 +1,5 @@
bin/libiconv2.dll
bin/libintl3.dll
bin/regex2.dll
manifest/bison-2.4.1-dep.mft
manifest/bison-2.4.1-dep.ver bb151d843339f90abdc34f5eb49bff0e

View File

@@ -0,0 +1 @@
Bison-2.4.1 (Yacc-compatible parser generator): Dependencies

View File

@@ -0,0 +1,15 @@
bin/flex.exe
bin/flex++.exe
contrib/flex/2.5.4a/flex-2.5.4a/COPYING
contrib/flex/2.5.4a/flex-2.5.4a/depends-GnuWin32.lst
contrib/flex/2.5.4a/flex-2.5.4a/flex-2.5.4a-1-GnuWin32.README
contrib/flex/2.5.4a/flex-2.5.4a/INSTALL
contrib/flex/2.5.4a/flex-2.5.4a/MISC/Borland/NOTES
contrib/flex/2.5.4a/flex-2.5.4a/MISC/fastwc/README
contrib/flex/2.5.4a/flex-2.5.4a/MISC/MVS/README
contrib/flex/2.5.4a/flex-2.5.4a/MISC/README
contrib/flex/2.5.4a/flex-2.5.4a/NEWS
contrib/flex/2.5.4a/flex-2.5.4a/README
man/cat1/flex.1.txt
manifest/flex-2.5.4a-1-bin.mft
manifest/flex-2.5.4a-1-bin.ver

View File

@@ -0,0 +1,2 @@
Flex 2.5.4a: Binaries
Flex: fast lexical analyzer generator

View File

@@ -0,0 +1,70 @@
-*- outline -*-
This directory contains data needed by Bison.
* Skeletons
Bison skeletons: the general shapes of the different parser kinds,
that are specialized for specific grammars by the bison program.
Currently, the supported skeletons are:
- yacc.c
It used to be named bison.simple: it corresponds to C Yacc
compatible LALR(1) parsers.
- lalr1.cc
Produces a C++ parser class.
- lalr1.java
Produces a Java parser class.
- glr.c
A Generalized LR C parser based on Bison's LALR(1) tables.
- glr.cc
A Generalized LR C++ parser. Actually a C++ wrapper around glr.c.
These skeletons are the only ones supported by the Bison team.
Because the interface between skeletons and the bison program is not
finished, *we are not bound to it*. In particular, Bison is not
mature enough for us to consider that ``foreign skeletons'' are
supported.
* m4sugar
This directory contains M4sugar, sort of an extended library for M4,
which is used by Bison to instantiate the skeletons.
* xslt
This directory contains XSLT programs that transform Bison's XML output
into various formats.
- bison.xsl
A library of routines used by the other XSLT programs.
- xml2dot.xsl
Conversion into GraphViz's dot format.
- xml2text.xsl
Conversion into text.
- xml2xhtml.xsl
Conversion into XHTML.
-----
Copyright (C) 2002, 2008 Free Software Foundation, Inc.
This file is part of GNU Bison.
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/>.

View File

@@ -0,0 +1,556 @@
-*- Autoconf -*-
# Language-independent M4 Macros for Bison.
# Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008 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/>.
## ---------------- ##
## Identification. ##
## ---------------- ##
# b4_copyright(TITLE, YEARS)
# --------------------------
m4_define([b4_copyright],
[b4_comment([A Bison parser, made by GNU Bison b4_version.])
b4_comment([$1
m4_text_wrap([Copyright (C) $2 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_comment([As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
as a parser skeleton. Alternatively, if you modify or redistribute
the parser skeleton itself, you may (at your option) remove this
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison.])])
## ---------------- ##
## Error handling. ##
## ---------------- ##
# The following error handling macros print error directives that should not
# become arguments of other macro invocations since they would likely then be
# mangled. Thus, they print to stdout directly.
# b4_cat(TEXT)
# ------------
# Write TEXT to stdout. Precede the final newline with an @ so that it's
# escaped. For example:
#
# b4_cat([[@complain(invalid input@)]])
m4_define([b4_cat],
[m4_syscmd([cat <<'_m4eof'
]m4_bpatsubst(m4_dquote($1), [_m4eof], [_m4@`eof])[@
_m4eof
])dnl
m4_if(m4_sysval, [0], [], [m4_fatal([$0: cannot write to stdout])])])
# b4_error(KIND, FORMAT, [ARG1], [ARG2], ...)
# -------------------------------------------
# Write @KIND(FORMAT@,ARG1@,ARG2@,...@) to stdout.
#
# For example:
#
# b4_error([[warn]], [[invalid value for `%s': %s]], [[foo]], [[3]])
m4_define([b4_error],
[b4_cat([[@]$1[(]$2[]]dnl
[m4_if([$#], [2], [],
[m4_foreach([b4_arg],
m4_dquote(m4_shift(m4_shift($@))),
[[@,]b4_arg])])[@)]])])
# b4_error_at(KIND, START, END, FORMAT, [ARG1], [ARG2], ...)
# ----------------------------------------------------------
# Write @KIND_at(START@,END@,FORMAT@,ARG1@,ARG2@,...@) to stdout.
#
# For example:
#
# b4_error_at([[complain]], [[input.y:2.3]], [[input.y:5.4]],
# [[invalid %s]], [[foo]])
m4_define([b4_error_at],
[b4_cat([[@]$1[_at(]$2[@,]$3[@,]$4[]]dnl
[m4_if([$#], [4], [],
[m4_foreach([b4_arg],
m4_dquote(m4_shift(m4_shift(m4_shift(m4_shift($@))))),
[[@,]b4_arg])])[@)]])])
# b4_warn(FORMAT, [ARG1], [ARG2], ...)
# ------------------------------------
# Write @warn(FORMAT@,ARG1@,ARG2@,...@) to stdout.
#
# For example:
#
# b4_warn([[invalid value for `%s': %s]], [[foo]], [[3]])
#
# As a simple test suite, this:
#
# m4_divert(-1)
# m4_define([asdf], [ASDF])
# m4_define([fsa], [FSA])
# m4_define([fdsa], [FDSA])
# b4_warn([[[asdf), asdf]]], [[[fsa), fsa]]], [[[fdsa), fdsa]]])
# b4_warn([[asdf), asdf]], [[fsa), fsa]], [[fdsa), fdsa]])
# b4_warn()
# b4_warn(1)
# b4_warn(1, 2)
#
# Should produce this without newlines:
#
# @warn([asdf), asdf]@,[fsa), fsa]@,[fdsa), fdsa]@)
# @warn(asdf), asdf@,fsa), fsa@,fdsa), fdsa@)
# @warn(@)
# @warn(1@)
# @warn(1@,2@)
m4_define([b4_warn],
[b4_error([[warn]], $@)])
# b4_warn_at(START, END, FORMAT, [ARG1], [ARG2], ...)
# ---------------------------------------------------
# Write @warn(START@,END@,FORMAT@,ARG1@,ARG2@,...@) to stdout.
#
# For example:
#
# b4_warn_at([[input.y:2.3]], [[input.y:5.4]], [[invalid %s]], [[foo]])
m4_define([b4_warn_at],
[b4_error_at([[warn]], $@)])
# b4_complain(FORMAT, [ARG1], [ARG2], ...)
# ----------------------------------------
# Write @complain(FORMAT@,ARG1@,ARG2@,...@) to stdout.
#
# See b4_warn example.
m4_define([b4_complain],
[b4_error([[complain]], $@)])
# b4_complain_at(START, END, FORMAT, [ARG1], [ARG2], ...)
# -------------------------------------------------------
# Write @complain(START@,END@,FORMAT@,ARG1@,ARG2@,...@) to stdout.
#
# See b4_warn_at example.
m4_define([b4_complain_at],
[b4_error_at([[complain]], $@)])
# b4_fatal(FORMAT, [ARG1], [ARG2], ...)
# -------------------------------------
# Write @fatal(FORMAT@,ARG1@,ARG2@,...@) to stdout and exit.
#
# See b4_warn example.
m4_define([b4_fatal],
[b4_error([[fatal]], $@)dnl
m4_exit(1)])
# b4_fatal_at(START, END, FORMAT, [ARG1], [ARG2], ...)
# ----------------------------------------------------
# Write @fatal(START@,END@,FORMAT@,ARG1@,ARG2@,...@) to stdout and exit.
#
# See b4_warn_at example.
m4_define([b4_fatal_at],
[b4_error_at([[fatal]], $@)dnl
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. ##
## ------------ ##
# b4_ints_in(INT1, INT2, LOW, HIGH)
# ---------------------------------
# Return 1 iff both INT1 and INT2 are in [LOW, HIGH], 0 otherwise.
m4_define([b4_ints_in],
[m4_eval([$3 <= $1 && $1 <= $4 && $3 <= $2 && $2 <= $4])])
## ------------------ ##
## Decoding options. ##
## ------------------ ##
# b4_flag_if(FLAG, IF-TRUE, IF-FALSE)
# -----------------------------------
# Run IF-TRUE if b4_FLAG_flag is 1, IF-FALSE if FLAG is 0, otherwise fail.
m4_define([b4_flag_if],
[m4_case(b4_$1_flag,
[0], [$3],
[1], [$2],
[m4_fatal([invalid $1 value: ]$1)])])
# b4_define_flag_if(FLAG)
# -----------------------
# Define "b4_FLAG_if(IF-TRUE, IF-FALSE)" that depends on the
# value of the Boolean FLAG.
m4_define([b4_define_flag_if],
[_b4_define_flag_if($[1], $[2], [$1])])
# _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.
m4_define([_b4_define_flag_if],
[m4_if([$1$2], $[1]$[2], [],
[m4_fatal([$0: Invalid arguments: $@])])dnl
m4_define([b4_$3_if],
[b4_flag_if([$3], [$1], [$2])])])
# 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.
## ------------------------- ##
## Assigning token numbers. ##
## ------------------------- ##
## ----------- ##
## Synclines. ##
## ----------- ##
# b4_basename(NAME)
# -----------------
# Similar to POSIX basename; the differences don't matter here.
# Beware that NAME is not evaluated.
m4_define([b4_basename],
[m4_bpatsubst([$1], [^.*/\([^/]+\)/*$], [\1])])
# b4_syncline(LINE, FILE)
# -----------------------
m4_define([b4_syncline],
[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])])
m4_define([b4_sync_start], [b4_comment([Line $1 of $2])])
# b4_user_code(USER-CODE)
# -----------------------
# Emit code from the user, ending it with synclines.
m4_define([b4_user_code],
[$1
b4_syncline([@oline@], [@ofile@])])
# b4_define_user_code(MACRO)
# --------------------------
# From b4_MACRO, build b4_user_MACRO that includes the synclines.
m4_define([b4_define_user_code],
[m4_define([b4_user_$1],
[b4_user_code([b4_$1])])])
# b4_user_actions
# b4_user_initial_action
# b4_user_post_prologue
# b4_user_pre_prologue
# b4_user_stype
# ----------------------
# Macros that issue user code, ending with synclines.
b4_define_user_code([actions])
b4_define_user_code([initial_action])
b4_define_user_code([post_prologue])
b4_define_user_code([pre_prologue])
b4_define_user_code([stype])
# b4_check_user_names(WHAT, USER-LIST, BISON-NAMESPACE)
# --------------------------------------------------------
# Warn if any name of type WHAT is used by the user (as recorded in USER-LIST)
# but is not used by Bison (as recorded by macros in the namespace
# BISON-NAMESPACE).
#
# USER-LIST must expand to a list specifying all grammar occurrences of all
# names of type WHAT. Each item in the list must be a triplet specifying one
# occurrence: name, start boundary, and end boundary. Empty string names are
# fine. An empty list is fine.
#
# For example, to define b4_foo_user_names to be used for USER-LIST with three
# name occurrences and with correct quoting:
#
# m4_define([b4_foo_user_names],
# [[[[[[bar]], [[parser.y:1.7]], [[parser.y:1.16]]]],
# [[[[bar]], [[parser.y:5.7]], [[parser.y:5.16]]]],
# [[[[baz]], [[parser.y:8.7]], [[parser.y:8.16]]]]]])
#
# The macro BISON-NAMESPACE(bar) must be defined iff the name bar of type WHAT
# is used by Bison (in the front-end or in the skeleton). Empty string names
# are fine, but it would be ugly for Bison to actually use one.
#
# For example, to use b4_foo_bison_names for BISON-NAMESPACE and define that
# the names bar and baz are used by Bison:
#
# m4_define([b4_foo_bison_names(bar)])
# m4_define([b4_foo_bison_names(baz)])
#
# To invoke b4_check_user_names with TYPE foo, with USER-LIST
# b4_foo_user_names, with BISON-NAMESPACE b4_foo_bison_names, and with correct
# quoting:
#
# b4_check_user_names([[foo]], [b4_foo_user_names],
# [[b4_foo_bison_names]])
m4_define([b4_check_user_names],
[m4_foreach([b4_occurrence], $2,
[m4_pushdef([b4_occurrence], b4_occurrence)dnl
m4_pushdef([b4_user_name], m4_car(b4_occurrence))dnl
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_warn_at([b4_start], [b4_end],
[[%s `%s' is not used]],
[$1], [b4_user_name])])[]dnl
m4_popdef([b4_occurrence])dnl
m4_popdef([b4_user_name])dnl
m4_popdef([b4_start])dnl
m4_popdef([b4_end])dnl
])])
# b4_percent_define_get(VARIABLE)
# -------------------------------
# Mimic muscle_percent_define_get in ../src/muscle_tab.h exactly. That is, if
# the %define variable VARIABLE is defined, emit its value. Also, record
# Bison's usage of VARIABLE by defining
# b4_percent_define_bison_variables(VARIABLE).
#
# For example:
#
# b4_percent_define_get([[foo]])
m4_define([b4_percent_define_get],
[m4_define([b4_percent_define_bison_variables(]$1[)])dnl
m4_ifdef([b4_percent_define(]$1[)], [m4_indir([b4_percent_define(]$1[)])])])
# b4_percent_define_get_loc(VARIABLE)
# -----------------------------------
# Mimic muscle_percent_define_get_loc in ../src/muscle_tab.h exactly. That is,
# if the %define variable VARIABLE is undefined, complain fatally since that's
# a Bison or skeleton error. Otherwise, return its definition location in a
# form approriate for the first two arguments of b4_warn_at, b4_complain_at, or
# b4_fatal_at. Don't record this as a Bison usage of VARIABLE as there's no
# reason to suspect that the user-supplied value has yet influenced the output.
#
# For example:
#
# b4_complain_at(b4_percent_define_get_loc([[foo]]), [[invalid foo]])
m4_define([b4_percent_define_get_loc],
[m4_ifdef([b4_percent_define_loc(]$1[)],
[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_percent_define_get_syncline(VARIABLE)
# ----------------------------------------
# Mimic muscle_percent_define_get_syncline in ../src/muscle_tab.h exactly.
# That is, if the %define variable VARIABLE is undefined, complain fatally
# since that's a Bison or skeleton error. Otherwise, return its definition
# location as a b4_syncline invocation. Don't record this as a Bison usage of
# VARIABLE as there's no reason to suspect that the user-supplied value has yet
# influenced the output.
#
# For example:
#
# b4_percent_define_get_syncline([[foo]])
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_percent_define_ifdef(VARIABLE, IF-TRUE, [IF-FALSE])
# ------------------------------------------------------
# Mimic muscle_percent_define_ifdef in ../src/muscle_tab.h exactly. That is,
# if the %define variable VARIABLE is defined, expand IF-TRUE, else expand
# IF-FALSE. Also, record Bison's usage of VARIABLE by defining
# b4_percent_define_bison_variables(VARIABLE).
#
# For example:
#
# b4_percent_define_ifdef([[foo]], [[it's defined]], [[it's undefined]])
m4_define([b4_percent_define_ifdef],
[m4_ifdef([b4_percent_define(]$1[)],
[m4_define([b4_percent_define_bison_variables(]$1[)])$2],
[$3])])
# b4_percent_define_flag_if(VARIABLE, IF-TRUE, [IF-FALSE])
# --------------------------------------------------------
# Mimic muscle_percent_define_flag_if in ../src/muscle_tab.h exactly. That is,
# if the %define variable VARIABLE is defined to "" or "true", expand IF-TRUE.
# If it is defined to "false", expand IF-FALSE. Complain if it is undefined
# (a Bison or skeleton error since the default value should have been set
# already) or defined to any other value (possibly a user error). Also, record
# Bison's usage of VARIABLE by defining
# b4_percent_define_bison_variables(VARIABLE).
#
# For example:
#
# b4_percent_define_flag_if([[foo]], [[it's true]], [[it's false]])
m4_define([b4_percent_define_flag_if],
[b4_percent_define_ifdef([$1],
[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']],
[$1])],
[[b4_percent_define_flag_if($1)]])])],
[b4_fatal([[undefined %%define variable `%s' passed to b4_percent_define_flag_if]], [$1])])])
# b4_percent_define_default(VARIABLE, DEFAULT)
# --------------------------------------------
# Mimic muscle_percent_define_default in ../src/muscle_tab.h exactly. That is,
# if the %define variable VARIABLE is undefined, set its value to DEFAULT.
# Don't record this as a Bison usage of VARIABLE as there's no reason to
# suspect that the value has yet influenced the output.
#
# For example:
#
# b4_percent_define_default([[foo]], [[default value]])
m4_define([b4_percent_define_default],
[m4_ifndef([b4_percent_define(]$1[)],
[m4_define([b4_percent_define(]$1[)], [$2])dnl
m4_define([b4_percent_define_loc(]$1[)],
[[[[[Bison:b4_percent_define_default]:1.0]], [[[Bison:b4_percent_define_default]:1.0]]]])dnl
m4_define([b4_percent_define_syncline(]$1[)],
[[]b4_syncline(1, [["[Bison:b4_percent_define_default]"]])[
]])])])
# b4_percent_define_check_values(VALUES)
# --------------------------------------
# Mimic muscle_percent_define_check_values in ../src/muscle_tab.h exactly
# except that the VALUES structure is more appropriate for M4. That is, VALUES
# is a list of sublists of strings. For each sublist, the first string is the
# name of a %define variable, and all remaining strings in that sublist are the
# valid values for that variable. Complain if such a variable is undefined (a
# Bison error since the default value should have been set already) or defined
# to any other value (possibly a user error). Don't record this as a Bison
# usage of the variable as there's no reason to suspect that the value has yet
# influenced the output.
#
# For example:
#
# b4_percent_define_check_values([[[[foo]], [[foo-value1]], [[foo-value2]]]],
# [[[[bar]], [[bar-value1]]]])
m4_define([b4_percent_define_check_values],
[m4_foreach([b4_sublist], m4_quote($@),
[_b4_percent_define_check_values(b4_sublist)])])
m4_define([_b4_percent_define_check_values],
[m4_ifdef([b4_percent_define(]$1[)],
[m4_pushdef([b4_good_value], [0])dnl
m4_if($#, 1, [],
[m4_foreach([b4_value], m4_dquote(m4_shift($@)),
[m4_if(m4_indir([b4_percent_define(]$1[)]), b4_value,
[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']],
[$1],
m4_dquote(m4_indir([b4_percent_define(]$1[)])))])dnl
m4_popdef([b4_good_value])],
[b4_fatal([[undefined %%define variable `%s' passed to b4_percent_define_check_values]], [$1])])])
# b4_percent_code_get([QUALIFIER])
# --------------------------------
# If any %code blocks for QUALIFIER are defined, emit them beginning with a
# comment and ending with synclines and a newline. If QUALIFIER is not
# specified or empty, do this for the unqualified %code blocks. Also, record
# Bison's usage of QUALIFIER (if specified) by defining
# b4_percent_code_bison_qualifiers(QUALIFIER).
#
# For example, to emit any unqualified %code blocks followed by any %code
# blocks for the qualifier foo:
#
# b4_percent_code_get
# b4_percent_code_get([[foo]])
m4_define([b4_percent_code_get],
[m4_pushdef([b4_macro_name], [[b4_percent_code(]$1[)]])dnl
m4_ifval([$1], [m4_define([b4_percent_code_bison_qualifiers(]$1[)])])dnl
m4_ifdef(b4_macro_name,
[b4_comment([m4_if([$#], [0], [[Unqualified %code]],
[["%code ]$1["]])[ blocks.]])
b4_user_code([m4_indir(b4_macro_name)])
])dnl
m4_popdef([b4_macro_name])])
# b4_percent_code_ifdef(QUALIFIER, IF-TRUE, [IF-FALSE])
# -----------------------------------------------------
# If any %code blocks for QUALIFIER (or unqualified %code blocks if
# QUALIFIER is empty) are defined, expand IF-TRUE, else expand IF-FALSE.
# Also, record Bison's usage of QUALIFIER (if specified) by defining
# b4_percent_code_bison_qualifiers(QUALIFIER).
m4_define([b4_percent_code_ifdef],
[m4_ifdef([b4_percent_code(]$1[)],
[m4_ifval([$1], [m4_define([b4_percent_code_bison_qualifiers(]$1[)])])$2],
[$3])])
## ----------------------------------------------------------- ##
## After processing the skeletons, check that all the user's ##
## %define variables and %code qualifiers were used by Bison. ##
## ----------------------------------------------------------- ##
m4_define([b4_check_user_names_wrap],
[m4_ifdef([b4_percent_]$1[_user_]$2[s],
[b4_check_user_names([[%]$1 $2],
[b4_percent_]$1[_user_]$2[s],
[[b4_percent_]$1[_bison_]$2[s]])])])
m4_wrap_lifo([
b4_check_user_names_wrap([[define]], [[variable]])
b4_check_user_names_wrap([[code]], [[qualifier]])
])

View File

@@ -1,8 +1,7 @@
-*- Autoconf -*-
# C++ skeleton dispatching for Bison.
# Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

170
gnuwin32/share/bison/c++.m4 Normal file
View File

@@ -0,0 +1,170 @@
-*- Autoconf -*-
# C++ skeleton for Bison
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 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_include(b4_pkgdatadir/[c.m4])
## ---------------- ##
## Default values. ##
## ---------------- ##
# Default parser class name.
b4_percent_define_default([[parser_class_name]], [[parser]])
b4_percent_define_default([[location_type]], [[location]])
b4_percent_define_default([[filename_type]], [[std::string]])
b4_percent_define_default([[namespace]], m4_defn([b4_prefix]))
b4_percent_define_default([[global_tokens_and_yystype]], [[false]])
b4_percent_define_default([[define_location_comparison]],
[m4_if(b4_percent_define_get([[filename_type]]),
[std::string], [[true]], [[false]])])
## ----------- ##
## Namespace. ##
## ----------- ##
m4_define([b4_namespace_ref], [b4_percent_define_get([[namespace]])])
# Don't permit an empty b4_namespace_ref. Any `::parser::foo' appended to it
# would compile as an absolute reference with `parser' in the global namespace.
# b4_namespace_open would open an anonymous namespace and thus establish
# internal linkage. This would compile. However, it's cryptic, and internal
# linkage for the parser would be specified in all translation units that
# include the header, which is always generated. If we ever need to permit
# internal linkage somehow, surely we can find a cleaner approach.
m4_if(m4_bregexp(b4_namespace_ref, [^[ ]*$]), [-1], [],
[b4_complain_at(b4_percent_define_get_loc([[namespace]]),
[[namespace reference is empty]])])
# Instead of assuming the C++ compiler will do it, Bison should reject any
# invalid b4_namepsace_ref that would be converted to a valid
# b4_namespace_open. The problem is that Bison doesn't always output
# b4_namespace_ref to uncommented code but should reserve the ability to do so
# in future releases without risking breaking any existing user grammars.
# Specifically, don't allow empty names as b4_namespace_open would just convert
# those into anonymous namespaces, and that might tempt some users.
m4_if(m4_bregexp(b4_namespace_ref, [::[ ]*::]), [-1], [],
[b4_complain_at(b4_percent_define_get_loc([[namespace]]),
[[namespace reference has consecutive "::"]])])
m4_if(m4_bregexp(b4_namespace_ref, [::[ ]*$]), [-1], [],
[b4_complain_at(b4_percent_define_get_loc([[namespace]]),
[[namespace reference has a trailing "::"]])])
m4_define([b4_namespace_open],
[b4_user_code([b4_percent_define_get_syncline([[namespace]])
[namespace ]m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref),
[^\(.\)[ ]*::], [\1])),
[::], [ { namespace ])[ {]])])
m4_define([b4_namespace_close],
[b4_user_code([b4_percent_define_get_syncline([[namespace]])
m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref),
[^\(.\)[ ]*\(::\)?\([^][:]\|:[^][:]\)*],
[\1])),
[::\([^][:]\|:[^][:]\)*], [} ])[} // ]b4_namespace_ref])])
# b4_token_enums(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
# -----------------------------------------------------
# Output the definition of the tokens as enums.
m4_define([b4_token_enums],
[/* Tokens. */
enum yytokentype {
m4_map_sep([ b4_token_enum], [,
],
[$@])
};
])
## ----------------- ##
## Semantic Values. ##
## ----------------- ##
# b4_lhs_value([TYPE])
# --------------------
# Expansion of $<TYPE>$.
m4_define([b4_lhs_value],
[(yyval[]m4_ifval([$1], [.$1]))])
# b4_rhs_value(RULE-LENGTH, NUM, [TYPE])
# --------------------------------------
# Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
# symbols on RHS.
m4_define([b4_rhs_value],
[(yysemantic_stack_@{($1) - ($2)@}m4_ifval([$3], [.$3]))])
# b4_lhs_location()
# -----------------
# Expansion of @$.
m4_define([b4_lhs_location],
[(yyloc)])
# b4_rhs_location(RULE-LENGTH, NUM)
# ---------------------------------
# Expansion of @NUM, where the current rule has RULE-LENGTH symbols
# on RHS.
m4_define([b4_rhs_location],
[(yylocation_stack_@{($1) - ($2)@})])
# b4_parse_param_decl
# -------------------
# Extra formal arguments of the constructor.
# Change the parameter names from "foo" into "foo_yyarg", so that
# there is no collision bw the user chosen attribute name, and the
# argument name in the constructor.
m4_define([b4_parse_param_decl],
[m4_ifset([b4_parse_param],
[m4_map_sep([b4_parse_param_decl_1], [, ], [b4_parse_param])])])
m4_define([b4_parse_param_decl_1],
[$1_yyarg])
# b4_parse_param_cons
# -------------------
# Extra initialisations of the constructor.
m4_define([b4_parse_param_cons],
[m4_ifset([b4_parse_param],
[
b4_cc_constructor_calls(b4_parse_param)])])
m4_define([b4_cc_constructor_calls],
[m4_map_sep([b4_cc_constructor_call], [,
], [$@])])
m4_define([b4_cc_constructor_call],
[$2 ($2_yyarg)])
# b4_parse_param_vars
# -------------------
# Extra instance variables.
m4_define([b4_parse_param_vars],
[m4_ifset([b4_parse_param],
[
/* User arguments. */
b4_cc_var_decls(b4_parse_param)])])
m4_define([b4_cc_var_decls],
[m4_map_sep([b4_cc_var_decl], [
], [$@])])
m4_define([b4_cc_var_decl],
[ $1;])

View File

@@ -1,8 +1,7 @@
-*- Autoconf -*-
# C skeleton dispatching for Bison.
# Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

477
gnuwin32/share/bison/c.m4 Normal file
View File

@@ -0,0 +1,477 @@
-*- Autoconf -*-
# C M4 Macros for Bison.
# Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008 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/>.
## ---------------- ##
## Identification. ##
## ---------------- ##
# b4_comment(TEXT)
# ----------------
m4_define([b4_comment], [/* m4_bpatsubst([$1], [
], [
]) */])
# b4_identification
# -----------------
# Depends on individual skeletons to define b4_pure_flag, b4_push_flag, or
# b4_pull_flag if they use the values of the %define variables api.pure or
# api.push_pull.
m4_define([b4_identification],
[[/* Identify Bison output. */
#define YYBISON 1
/* Bison version. */
#define YYBISON_VERSION "]b4_version["
/* Skeleton name. */
#define YYSKELETON_NAME ]b4_skeleton[]m4_ifdef([b4_pure_flag], [[
/* Pure parsers. */
#define YYPURE ]b4_pure_flag])[]m4_ifdef([b4_push_flag], [[
/* Push parsers. */
#define YYPUSH ]b4_push_flag])[]m4_ifdef([b4_pull_flag], [[
/* Pull parsers. */
#define YYPULL ]b4_pull_flag])[
/* Using locations. */
#define YYLSP_NEEDED ]b4_locations_flag[
]])
## ---------------- ##
## Default values. ##
## ---------------- ##
# If the %union is not named, its name is YYSTYPE.
m4_define_default([b4_union_name], [YYSTYPE])
# If the %name-prefix is not given, it is yy.
m4_define_default([b4_prefix], [yy])
## ------------------------ ##
## Pure/impure interfaces. ##
## ------------------------ ##
# b4_user_args
# ------------
m4_define([b4_user_args],
[m4_ifset([b4_parse_param], [, b4_c_args(b4_parse_param)])])
# b4_parse_param
# --------------
# If defined, b4_parse_param arrives double quoted, but below we prefer
# it to be single quoted.
m4_define([b4_parse_param],
b4_parse_param)
# b4_parse_param_for(DECL, FORMAL, BODY)
# ---------------------------------------
# Iterate over the user parameters, binding the declaration to DECL,
# the formal name to FORMAL, and evaluating the BODY.
m4_define([b4_parse_param_for],
[m4_foreach([$1_$2], m4_defn([b4_parse_param]),
[m4_pushdef([$1], m4_unquote(m4_car($1_$2)))dnl
m4_pushdef([$2], m4_shift($1_$2))dnl
$3[]dnl
m4_popdef([$2])dnl
m4_popdef([$1])dnl
])])
# b4_parse_param_use
# ------------------
# `YYUSE' all the parse-params.
m4_define([b4_parse_param_use],
[b4_parse_param_for([Decl], [Formal], [ YYUSE (Formal);
])dnl
])
## ------------ ##
## Data Types. ##
## ------------ ##
# b4_int_type(MIN, MAX)
# ---------------------
# Return the smallest int type able to handle numbers ranging from
# MIN to MAX (included).
m4_define([b4_int_type],
[m4_if(b4_ints_in($@, [0], [255]), [1], [unsigned char],
b4_ints_in($@, [-128], [127]), [1], [signed char],
b4_ints_in($@, [0], [65535]), [1], [unsigned short int],
b4_ints_in($@, [-32768], [32767]), [1], [short int],
m4_eval([0 <= $1]), [1], [unsigned int],
[int])])
# b4_int_type_for(NAME)
# ---------------------
# Return the smallest int type able to handle numbers ranging from
# `NAME_min' to `NAME_max' (included).
m4_define([b4_int_type_for],
[b4_int_type($1_min, $1_max)])
## ---------##
## 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])
## ------------------------- ##
## Assigning token numbers. ##
## ------------------------- ##
# b4_token_define(TOKEN-NAME, TOKEN-NUMBER)
# -----------------------------------------
# Output the definition of this token as #define.
m4_define([b4_token_define],
[#define $1 $2
])
# b4_token_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
# -------------------------------------------------------
# Output the definition of the tokens (if there are) as #defines.
m4_define([b4_token_defines],
[m4_if([$#$1], [1], [],
[/* Tokens. */
m4_map([b4_token_define], [$@])])
])
# b4_token_enum(TOKEN-NAME, TOKEN-NUMBER)
# ---------------------------------------
# Output the definition of this token as an enum.
m4_define([b4_token_enum],
[$1 = $2])
# b4_token_enums(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
# -----------------------------------------------------
# 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
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
m4_map_sep([ b4_token_enum], [,
],
[$@])
};
#endif
])])
# b4_token_enums_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
# -------------------------------------------------------------
# Output the definition of the tokens (if there are any) as enums and, if POSIX
# Yacc is enabled, as #defines.
m4_define([b4_token_enums_defines],
[b4_token_enums($@)b4_yacc_if([b4_token_defines($@)], [])
])
## --------------------------------------------- ##
## Defining C functions in both K&R and ANSI-C. ##
## --------------------------------------------- ##
# b4_modern_c
# -----------
# A predicate useful in #if to determine whether C is ancient or modern.
#
# If __STDC__ is defined, the compiler is modern. IBM xlc 7.0 when run
# as 'cc' doesn't define __STDC__ (or __STDC_VERSION__) for pedantic
# reasons, but it defines __C99__FUNC__ so check that as well.
# Microsoft C normally doesn't define these macros, but it defines _MSC_VER.
# Consider a C++ compiler to be modern if it defines __cplusplus.
#
m4_define([b4_c_modern],
[[(defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)]])
# b4_c_function_def(NAME, RETURN-VALUE, [DECL1, NAME1], ...)
# ----------------------------------------------------------
# Declare the function NAME.
m4_define([b4_c_function_def],
[#if b4_c_modern
b4_c_ansi_function_def($@)
#else
$2
$1 (b4_c_knr_formal_names(m4_shift2($@)))
b4_c_knr_formal_decls(m4_shift2($@))
#endif[]dnl
])
# b4_c_ansi_function_def(NAME, RETURN-VALUE, [DECL1, NAME1], ...)
# ---------------------------------------------------------------
# Declare the function NAME in ANSI.
m4_define([b4_c_ansi_function_def],
[$2
$1 (b4_c_ansi_formals(m4_shift2($@)))[]dnl
])
# b4_c_ansi_formals([DECL1, NAME1], ...)
# --------------------------------------
# Output the arguments ANSI-C definition.
m4_define([b4_c_ansi_formals],
[m4_if([$#], [0], [void],
[$#$1], [1], [void],
[m4_map_sep([b4_c_ansi_formal], [, ], [$@])])])
m4_define([b4_c_ansi_formal],
[$1])
# b4_c_knr_formal_names([DECL1, NAME1], ...)
# ------------------------------------------
# Output the argument names.
m4_define([b4_c_knr_formal_names],
[m4_map_sep([b4_c_knr_formal_name], [, ], [$@])])
m4_define([b4_c_knr_formal_name],
[$2])
# b4_c_knr_formal_decls([DECL1, NAME1], ...)
# ------------------------------------------
# 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;])
## ------------------------------------------------------------ ##
## Declaring (prototyping) C functions in both K&R and ANSI-C. ##
## ------------------------------------------------------------ ##
# b4_c_function_decl(NAME, RETURN-VALUE, [DECL1, NAME1], ...)
# -----------------------------------------------------------
# Declare the function NAME.
m4_define([b4_c_function_decl],
[#if defined __STDC__ || defined __cplusplus
b4_c_ansi_function_decl($@)
#else
$2 $1 ();
#endif[]dnl
])
# 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. ##
## --------------------- ##
# b4_c_function_call(NAME, RETURN-VALUE, [DECL1, NAME1], ...)
# -----------------------------------------------------------
# Call the function NAME with arguments NAME1, NAME2 etc.
m4_define([b4_c_function_call],
[$1 (b4_c_args(m4_shift2($@)))[]dnl
])
# b4_c_args([DECL1, NAME1], ...)
# ------------------------------
# Output the arguments NAME1, NAME2...
m4_define([b4_c_args],
[m4_map_sep([b4_c_arg], [, ], [$@])])
m4_define([b4_c_arg],
[$2])
## ----------- ##
## Synclines. ##
## ----------- ##
# b4_sync_start(LINE, FILE)
# -----------------------
m4_define([b4_sync_start], [[#]line $1 $2])
## -------------- ##
## User actions. ##
## -------------- ##
# b4_case(LABEL, STATEMENTS)
# --------------------------
m4_define([b4_case],
[ case $1:
$2
break;])
# b4_symbol_actions(FILENAME, LINENO,
# SYMBOL-TAG, SYMBOL-NUM,
# SYMBOL-ACTION, SYMBOL-TYPENAME)
# -------------------------------------------------
m4_define([b4_symbol_actions],
[m4_pushdef([b4_dollar_dollar],
[m4_ifval([$6], [(yyvaluep->$6)], [(*yyvaluep)])])dnl
m4_pushdef([b4_at_dollar], [(*yylocationp)])dnl
case $4: /* $3 */
b4_syncline([$2], [$1])
$5;
b4_syncline([@oline@], [@ofile@])
break;
m4_popdef([b4_at_dollar])dnl
m4_popdef([b4_dollar_dollar])dnl
])
# b4_yydestruct_generate(FUNCTION-DECLARATOR)
# -------------------------------------------
# Generate the "yydestruct" function, which declaration is issued using
# FUNCTION-DECLARATOR, which may be "b4_c_ansi_function_def" for ISO C
# or "b4_c_function_def" for K&R.
m4_define_default([b4_yydestruct_generate],
[[/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
/*ARGSUSED*/
]$1([yydestruct],
[static void],
[[const char *yymsg], [yymsg]],
[[int yytype], [yytype]],
[[YYSTYPE *yyvaluep], [yyvaluep]][]dnl
b4_locations_if( [, [[YYLTYPE *yylocationp], [yylocationp]]])[]dnl
m4_ifset([b4_parse_param], [, b4_parse_param]))[
{
YYUSE (yyvaluep);
]b4_locations_if([ YYUSE (yylocationp);
])dnl
b4_parse_param_use[]dnl
[
if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
switch (yytype)
{
]m4_map([b4_symbol_actions], m4_defn([b4_symbol_destructors]))[
default:
break;
}
}]dnl
])
# b4_yy_symbol_print_generate(FUNCTION-DECLARATOR)
# ------------------------------------------------
# Generate the "yy_symbol_print" function, which declaration is issued using
# FUNCTION-DECLARATOR, which may be "b4_c_ansi_function_def" for ISO C
# or "b4_c_function_def" for K&R.
m4_define_default([b4_yy_symbol_print_generate],
[[
/*--------------------------------.
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
/*ARGSUSED*/
]$1([yy_symbol_value_print],
[static void],
[[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]))[
{
if (!yyvaluep)
return;
]b4_locations_if([ YYUSE (yylocationp);
])dnl
b4_parse_param_use[]dnl
[# ifdef YYPRINT
if (yytype < YYNTOKENS)
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# else
YYUSE (yyoutput);
# endif
switch (yytype)
{
]m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl
[ default:
break;
}
}
/*--------------------------------.
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
]$1([yy_symbol_print],
[static void],
[[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]))[
{
if (yytype < YYNTOKENS)
YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
else
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
]b4_locations_if([ YY_LOCATION_PRINT (yyoutput, *yylocationp);
YYFPRINTF (yyoutput, ": ");
])dnl
[ yy_symbol_value_print (yyoutput, yytype, yyvaluep]dnl
b4_locations_if([, yylocationp])[]b4_user_args[);
YYFPRINTF (yyoutput, ")");
}]dnl
])

2653
gnuwin32/share/bison/glr.c Normal file

File diff suppressed because it is too large Load Diff

377
gnuwin32/share/bison/glr.cc Normal file
View File

@@ -0,0 +1,377 @@
-*- C -*-
# C++ GLR skeleton for Bison
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation,
# Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# This skeleton produces a C++ class that encapsulates a C glr parser.
# This is in order to reduce the maintenance burden. The glr.c
# skeleton is clean and pure enough so that there are no real
# problems. The C++ interface is the same as that of lalr1.cc. In
# fact, glr.c can replace yacc.c without the user noticing any
# difference, and similarly for glr.cc replacing lalr1.cc.
#
# The passing of parse-params
#
# The additional arguments are stored as members of the parser
# object, yyparser. The C routines need to carry yyparser
# throughout the C parser; that easy: just let yyparser become an
# additional parse-param. But because the C++ skeleton needs to
# know the "real" original parse-param, we save them
# (b4_parse_param_orig). Note that b4_parse_param is overquoted
# (and c.m4 strips one level of quotes). This is a PITA, and
# explains why there are so many levels of quotes.
#
# The locations
#
# We use location.cc just like lalr1.cc, but because glr.c stores
# the locations in a (C++) union, the position and location classes
# must not have a constructor. Therefore, contrary to lalr1.cc, we
# must not define "b4_location_constructors". As a consequence the
# user must initialize the first positions (in particular the
# filename member).
# We require a pure interface using locations.
m4_define([b4_locations_flag], [1])
m4_define([b4_pure_flag], [1])
# The header is mandatory.
b4_defines_if([],
[b4_fatal([b4_skeleton[: using %%defines is mandatory]])])
m4_include(b4_pkgdatadir/[c++.m4])
m4_include(b4_pkgdatadir/[location.cc])
m4_define([b4_parser_class_name],
[b4_percent_define_get([[parser_class_name]])])
# Save the parse parameters.
m4_define([b4_parse_param_orig], m4_defn([b4_parse_param]))
# b4_yy_symbol_print_generate
# ---------------------------
# Bypass the default implementation to generate the "yy_symbol_print"
# and "yy_symbol_value_print" functions.
m4_define([b4_yy_symbol_print_generate],
[[
/*--------------------.
| Print this symbol. |
`--------------------*/
]b4_c_ansi_function_def([yy_symbol_print],
[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]],
b4_parse_param)[
{
]b4_parse_param_use[]dnl
[ yyparser.yy_symbol_print_ (yytype, yyvaluep]b4_locations_if([, yylocationp])[);
}
]])
# Declare yyerror.
m4_append([b4_post_prologue],
[b4_syncline([@oline@], [@ofile@])
b4_c_ansi_function_decl([yyerror],
[static void],
[[b4_namespace_ref::b4_parser_class_name::location_type *yylocationp], [yylocationp]],
b4_parse_param,
[[const char* msg], [msg]])])
# Define yyerror.
m4_append([b4_epilogue],
[b4_syncline([@oline@], [@ofile@])[
/*------------------.
| Report an error. |
`------------------*/
]b4_c_ansi_function_def([yyerror],
[static void],
[[b4_namespace_ref::b4_parser_class_name::location_type *yylocationp], [yylocationp]],
b4_parse_param,
[[const char* msg], [msg]])[
{
]b4_parse_param_use[]dnl
[ yyparser.error (*yylocationp, msg);
}
]b4_namespace_open[
]dnl In this section, the parse param are the original parse_params.
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),
yycdebug_ (&std::cerr)]m4_ifset([b4_parse_param], [,])[
#endif]b4_parse_param_cons[
{
}
]b4_parser_class_name::~b4_parser_class_name[ ()
{
}
int
]b4_parser_class_name[::parse ()
{
return ::yyparse (*this]b4_user_args[);
}
#if YYDEBUG
/*--------------------.
| Print this symbol. |
`--------------------*/
inline void
]b4_parser_class_name[::yy_symbol_value_print_ (int yytype,
const semantic_type* yyvaluep, const location_type* yylocationp)
{
/* Pacify ``unused variable'' warnings. */
YYUSE (yyvaluep);
YYUSE (yylocationp);
switch (yytype)
{
]m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl
[ default:
break;
}
}
void
]b4_parser_class_name[::yy_symbol_print_ (int yytype,
const semantic_type* yyvaluep, const location_type* yylocationp)
{
*yycdebug_ << (yytype < YYNTOKENS ? "token" : "nterm")
<< ' ' << yytname[yytype] << " ("
<< *yylocationp << ": ";
yy_symbol_value_print_ (yytype, yyvaluep, yylocationp);
*yycdebug_ << ')';
}
std::ostream&
]b4_parser_class_name[::debug_stream () const
{
return *yycdebug_;
}
void
]b4_parser_class_name[::set_debug_stream (std::ostream& o)
{
yycdebug_ = &o;
}
]b4_parser_class_name[::debug_level_type
]b4_parser_class_name[::debug_level () const
{
return yydebug_;
}
void
]b4_parser_class_name[::set_debug_level (debug_level_type l)
{
yydebug_ = l;
}
#endif
]m4_popdef([b4_parse_param])dnl
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])))],
[m4_pushdef([b4_parse_param],
[[[[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_copyright([Skeleton interface for Bison GLR parsers in C++],
[2002, 2003, 2004, 2005, 2006])[
/* C++ GLR parser skeleton written by Akim Demaille. */
#ifndef PARSER_HEADER_H
# define PARSER_HEADER_H
]b4_percent_code_get([[requires]])[
#include <string>
#include <iostream>
/* Using locations. */
#define YYLSP_NEEDED ]b4_locations_flag[
]b4_namespace_open[
class position;
class location;
]b4_namespace_close[
#include "location.hh"
/* 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_namespace_open[
/// A Bison parser.
class ]b4_parser_class_name[
{
public:
/// Symbol semantic values.
#ifndef YYSTYPE
]m4_ifdef([b4_stype],
[ union semantic_type
{
b4_user_stype
};],
[m4_if(b4_tag_seen_flag, 0,
[[ typedef int semantic_type;]],
[[ typedef YYSTYPE semantic_type;]])])[
#else
typedef YYSTYPE semantic_type;
#endif
/// Symbol locations.
typedef ]b4_percent_define_get([[location_type]])[ location_type;
/// Tokens.
struct token
{
]b4_token_enums(b4_tokens)[
};
/// Token type.
typedef token::yytokentype token_type;
/// Build a parser object.
]b4_parser_class_name[ (]b4_parse_param_decl[);
virtual ~]b4_parser_class_name[ ();
/// Parse.
/// \returns 0 iff parsing succeeded.
virtual int parse ();
/// The current debugging stream.
std::ostream& debug_stream () const;
/// Set the current debugging stream.
void set_debug_stream (std::ostream &);
/// Type for debugging levels.
typedef int debug_level_type;
/// The current debugging level.
debug_level_type debug_level () const;
/// Set the current debugging level.
void set_debug_level (debug_level_type l);
private:
public:
/// Report a syntax error.
/// \param loc where the syntax error is found.
/// \param msg a description of the syntax error.
virtual void error (const location_type& loc, const std::string& msg);
private:
#if YYDEBUG
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);
/// \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);
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);
]b4_parse_param_vars[
};
]dnl Redirections for glr.c.
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
#endif
#ifndef YYLTYPE
# define YYLTYPE ]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)

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