Compare commits

..

193 Commits

Author SHA1 Message Date
Qt Submodule Update Bot
c5557d43ee Update submodules on '5.6.2' in qt5
Change-Id: I337a9d4897efe57d3ac09d9981bb2b07f96a9d87
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2016-09-25 14:19:10 +00:00
Qt Submodule Update Bot
0ad453a0fd Update submodules on '5.6.2' in qt5
Change-Id: I47372eb19e0f038e1ec1999a183125ed1c5300c7
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2016-09-23 09:12:36 +00:00
Qt Submodule Update Bot
efc461a174 Update submodules on '5.6.2' in qt5
Change-Id: I623adf43a36ff5cd8de844ae533063523efe2b02
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2016-09-16 18:30:36 +00:00
Qt Submodule Update Bot
4faee20713 Update submodules on '5.6.2' in qt5
Change-Id: Ie03202844e195a89cb536fde6b3c357929737cf8
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2016-09-05 16:47:08 +00:00
Oswald Buddenhagen
9584900b5c Adjust submodule branches
Change-Id: Ibc4de8e8a06cf2391ae33be2d02fc21f4e3ab70f
2016-08-24 11:52:19 +02:00
Qt Submodule Update Bot
2dcb31a181 Update submodules on '5.6' in qt5
Change-Id: I1104beac8bafb324731879efdb752a1cebbb9512
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-08-22 16:37:59 +00:00
Qt Submodule Update Bot
2556777f36 Update submodules on '5.6' in qt5
Change-Id: I3fbdb4edc4d37a8b25fdaff52853d672c951891d
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-08-16 11:53:15 +00:00
Qt Submodule Update Bot
2ed6386fe3 Update submodules on '5.6' in qt5
Change-Id: I4821c386e318139e13ad228983c43c1b1d978494
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-08-13 10:06:10 +00:00
Qt Submodule Update Bot
b0bfbf3bf0 Update submodules on '5.6' in qt5
Change-Id: I166e0f9a092f7e293d50d7efb12df54bcee5ec13
Reviewed-by: Liang Qi <liang.qi@qt.io>
2016-08-10 12:05:33 +00:00
Qt Submodule Update Bot
3fb555a773 Update submodules on '5.6' in qt5
Change-Id: I32152358542e406f773d106abba25ee5609c6469
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-08-04 22:00:58 +00:00
Tony Sarajärvi
19b472f1ff Fix Coin provisioning in RHEL 6 regarding sslclientkey values
There was a bug in RHELs subscription manager that caused yum
not to work by fetching incorrect data into the sslclientkey repository
parameter value.
This provisioning script fetches new data for the repository and thus
fixes yum. Naturally by not having a template where a bad repository
exists, this script would be obsolete. Also, as this needs to be run
before any other scripts using yum, prefixes were added to the scripts.

Change-Id: I5c6ed1d43451d2918f9b6dad22b0106339f36aea
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2016-08-03 10:28:52 +00:00
Qt Submodule Update Bot
8a8134e878 Update submodules on '5.6' in qt5
Change-Id: Ie6bd9ea82d5e67fee7645dccd9b07ceac5755582
Reviewed-by: Liang Qi <liang.qi@qt.io>
2016-07-30 07:16:36 +00:00
Qt Submodule Update Bot
6fbf179f73 Updated submodules
Change-Id: Ia80e4d39f9772e32952685008380cc348f481c6c
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-07-04 22:00:50 +00:00
Qt Submodule Update Bot
e00d0be179 Updated submodules
Change-Id: I5443b0f4d97cfc076e3a642ae78770b38661e983
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-07-04 13:30:37 +00:00
Qt Submodule Update Bot
d445febd14 Updated submodules
Change-Id: I48fca93fd045323752c79abd2710e9307ea85b3a
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-07-01 10:35:37 +00:00
Qt Submodule Update Bot
9c2315789d Updated submodules
Change-Id: I23f310f80837c73fee1fff2618e1253c6b80b74b
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-06-30 05:12:12 +00:00
Qt Submodule Update Bot
7b77cbc4df Updated submodules.
Change-Id: I5a2524a408eaf6f808c0e1242583e83bf01b42b0
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-06-29 11:59:46 +00:00
Qt Submodule Update Bot
388494d7ee Updated submodules.
Change-Id: I5a780a47ccfcea17e64eda0ed922ca57079ea0ea
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-06-25 02:39:35 +00:00
Qt Submodule Update Bot
fdbccea88a Updated submodules.
Change-Id: I67cbc0f3327aeaf3c84e2eb52432a362f0e7c64a
Reviewed-by: Liang Qi <liang.qi@qt.io>
2016-06-23 12:34:18 +00:00
Sze Howe Koh
49f1a7f0a6 Expand license scope from "Qt GUI Toolkit" to "Qt Toolkit"
See http://comments.gmane.org/gmane.comp.lib.qt.devel/25771

Change-Id: Iebda5d9a886f4c0f16fe4906cf6dc4c81f2c3c90
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-06-20 16:35:21 +00:00
Qt Submodule Update Bot
0b10bd3657 Updated submodules.
Change-Id: Ia5d6e51574251dbd0e9f9cf3f41aac2de56471c4
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-06-20 16:35:18 +00:00
Qt Submodule Update Bot
02df76bf07 Updated submodules.
Change-Id: I3d25d26bebe88a542f794c29bcda413302432874
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-06-18 15:25:48 +00:00
Qt Submodule Update Bot
6bed56a680 Updated submodules.
Change-Id: I86dfc95bd06101ed826d139fd577ccfa662ad0b7
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-06-17 13:52:32 +00:00
Frederik Gladhorn
0536b1e9e4 Clean up Windows provisioning scripts
The execution policy is set by the CI. The command usually fails as it
is in the scritps right now since it must be run as admin.

Change-Id: Ie31cb7fc15720cc6d76646bf475b3d60a02014d8
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-06-16 10:15:18 +00:00
Qt Submodule Update Bot
b3bc77fc73 Updated submodules.
Change-Id: Ia573d0de926441bc63b4c3871e075eb342e294c9
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-06-16 04:26:54 +00:00
Kai Koehne
9b6d296096 README: Do not take deprecated modules as an example
Task-number: QTBUG-54084
Change-Id: I03c81822a05fb9a3bda975421228b460c2a00fe2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-06-14 16:20:56 +00:00
Kai Koehne
5778d17a68 README: Remove platform specific build requirements
The list is not up to date (e.g. ICU is not required on Windows anymore),
and woefully incomplete. Better just link to the wiki/documentation.

Task-number: QTBUG-54084
Change-Id: I6b22fc1c84d40b892503085cb023a7db25fd19c8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-06-14 16:20:53 +00:00
Qt Submodule Update Bot
70b3b02977 Updated submodules.
Change-Id: I8358eadfea5f3bf8ff8615d3c468201acd58f1b5
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-06-14 16:20:50 +00:00
Qt Submodule Update Bot
451f93e26b Updated submodules.
Change-Id: I5ad7c931f77a167ca4574fd20eb6fe783d95a297
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-06-12 17:43:06 +00:00
Qt Submodule Update Bot
51cf8dcf3b Updated submodules.
Change-Id: Iec9d13ae71c8660baec5ca6cfee57aeee3b33922
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-06-05 11:04:42 +00:00
Erik Verbruggen
3529d894ba OSX: Switch crash reporting to server mode.
Meaning: to unattended use, so no crash dialogs will pop up. In a later
change we can suppress QTest from generating stack traces when this
setting is *not* in server mode (meaning: the OS will take care of the
stack traces).

Change-Id: Idee9311f866228cd35ecb07889f1c19424981221
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2016-06-02 14:37:12 +00:00
Jędrzej Nowacki
928c491397 Export CI_JOM_PATH variable on all templates with jom
That is needed to change provisioning way in Coin, as currently it
depends on variables hard-coded in Coin agent.

Change-Id: I0bc5c76717e994824b85a4353a7218db4b648344
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2016-05-30 14:08:24 +00:00
Jędrzej Nowacki
a97874523f Export CI_ICU_PATH variables on all windows templates
That is needed to change provisioning way in Coin, as currently it
depends on variables hard-coded in Coin agent.

Change-Id: I15068bec57dd9d67be05ef753d566b456fb8a2fc
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2016-05-30 14:08:22 +00:00
Jędrzej Nowacki
2be9656332 Coin provisioning: overwrite files while unzipping
Change-Id: I5cf59322f5a34cffe9fe8668755800bccb8cc13a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2016-05-30 14:08:20 +00:00
Qt Submodule Update Bot
82873b1b1e Updated submodules.
Change-Id: Iec0cece6ec1ca471593c4acd32595b59dc64a651
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-05-30 13:30:27 +00:00
Ilia Kirianovskii
9443890d60 Fix git_install_hooks for relative gitdir
Previously we expected gitdir to be always absolute. This patch fixes
git_install_hooks in case of relative gitdir.

Change-Id: Ia0883af18229703aaa22c62fd2181ed56d9f2fce
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-05-24 04:39:24 +00:00
Qt Submodule Update Bot
e50f5b9150 Updated submodules.
Change-Id: I9b4f1c3daedf21ab201027d5793aa162710c84af
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-05-21 06:44:36 +00:00
Qt Submodule Update Bot
9812986913 Updated submodules.
Change-Id: I092e0b94eb77397708ab6d196357ec6b3b141326
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-05-11 13:58:19 +00:00
Qt Submodule Update Bot
c07377e739 Updated submodules.
Change-Id: I5ea896b0ec6b9837fda44eb7b7a61aa3c6e42db5
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-05-09 04:09:45 +00:00
Oswald Buddenhagen
a1ec8795c6 make it actually possible to specify 'ignore' as a class
another thing the doc claims to be possible - also quite reasonably.

Change-Id: I2220245b10f02a778345b6549e345b2486630ffd
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-05-05 20:02:39 +00:00
Oswald Buddenhagen
c41d854254 make it actually possible to exclude classes
the doc - quite reasonably - claims that it is possible.

Change-Id: I4668b3feafe721f1db4deb65848206d8197962c8
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-05-05 20:02:38 +00:00
Qt Submodule Update Bot
9b9801b7d4 Updated submodules.
Change-Id: I6230a59c886114184d74ad34651f04f0d296ade0
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-05-05 05:40:27 +00:00
Jędrzej Nowacki
3963056f63 Add script that install icu on RHEL 6.6
That is translation from coin-setup golang code to sh script

Change-Id: Ic26d3877e56feb8b7f8e3ccd3405a044fb6afd8e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2016-04-28 07:54:50 +00:00
Frederik Gladhorn
54f1bfd10c Add script to install jom through powershell
Change-Id: I3f12aa0dd54f99fafdffb53796e54e7b127c3c8c
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-04-28 07:54:48 +00:00
Frederik Gladhorn
2aff311423 Add coin provisioning directory
Change-Id: I76c5c5b7a1ca41758964923d3eb5c9e644f468be
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-26 15:50:53 +00:00
Qt Submodule Update Bot
d61ac6c2f0 Updated submodules.
Change-Id: I1586fb62199695f918f016ec9437810b0f9515e9
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-04-25 08:15:10 +00:00
Qt Submodule Update Bot
499c5390b3 Updated submodules.
Change-Id: I72e29c8b66acba249f6a274e6428e00a9804b4dd
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2016-04-21 04:26:15 +00:00
Qt Submodule Update Bot
e80d89059c Updated submodules.
Change-Id: I983429d487f7667c36553d24037639abee660b42
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2016-04-04 13:21:35 +00:00
Liang Qi
c80e96bb09 Merge remote-tracking branch 'origin/5.6.0' into 5.6
Conflicts:
	.gitmodules

Change-Id: Ic9c8564006c2722f925700f09ff42da3e912f580
2016-03-31 09:53:10 +02:00
Qt Submodule Update Bot
f05fece2f7 Updated submodules.
Change-Id: I85bb46a7180a32c1808574d0a54c51703d4cee12
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-03-29 10:38:52 +00:00
Iikka Eklund
84a1676ed6 Update .gitmodules for automated release src package creation
Introduce new "deprecated" value for status attribute.

We have two flavors of big source packages we need to produce:

qt-everywhere-* which needs to include:

 - essential
 - addon
 - preview
 - deprecated (e.g. qtscript and qtenginio for Qt5.6 release)

Installer only specific source package:

 - essential
 - addon

 The rest (deprecated, preview, ...) need to be shown as split src
 packages in the installer.

The above leads to the following changes:

qtscript: addon -> deprecated

 Needs to be part of big src packages but excluded from installer
 specific big source package.

qtenginio: obsolete -> deprecated

 We can't exclude this module from qt-everywhere src packages.

qtwayland: preview -> addon

 Needs to be part of installer specific big src package and the
 module status is not preview anymore.

Change-Id: I52e10629bf81860f56ebc4ce9d395e0ca54c4264
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-03-08 17:54:29 +00:00
Qt Submodule Update Bot
5e15831271 Updated submodules.
Change-Id: Id993273e16fbbffd43d958419ab103a857fd1346
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2016-03-04 04:26:10 +00:00
Qt Submodule Update Bot
d74af1270a Updated submodules.
Change-Id: I49c2a3948ba6c7e8a12f1077b96ddbde1453f67e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-03-03 00:11:54 +00:00
Qt Submodule Update Bot
e6076450e1 Updated submodules.
Change-Id: I3459d79f2daa9d681759f0cb7b8c841aeae7179a
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2016-02-27 20:21:00 +00:00
Qt Submodule Update Bot
fb1345171a Updated submodules.
Change-Id: Ife7e51372a57f53efefc1fe0c8c805442908d8d9
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2016-02-19 05:24:28 +00:00
Oswald Buddenhagen
fdf1b3cc8d rework hook installation
the primary purpose of this change is making it work with new-style
submodules (1.7+) and git-worktree (2.5+). this means resolving '.git'
and 'commondir' files.

we avoid calling git commands, because a) it's slow on windows, b) some
of them are unavailable in older git versions and it's tedious to deal
with that and c) their output is not necessarily optimal (not always
absolute paths).

we also don't use relative paths for the hook locations any more, as
that's too tedious to deal with.

Change-Id: Ie341e748e56d6bef40856e4a49ac368850028d83
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-02-17 20:18:48 +00:00
Qt Submodule Update Bot
c2549708e5 Updated submodules.
Change-Id: I020482ae1107cdd56fad485007622cb4b62b8032
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-02-17 20:18:34 +00:00
Qt Submodule Update Bot
6bdec75429 Updated submodules.
Change-Id: I6ad2f0dfbfb78f8f4d9c20f81a84803472a4b31c
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2016-02-16 12:15:51 +00:00
Qt Submodule Update Bot
6efabf6dfe Updated submodules.
Change-Id: I444b4f3ddbb851d94abda55e2e2dfcfee3921d94
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2016-02-15 10:26:46 +00:00
Oswald Buddenhagen
4007fc7a26 Merge remote-tracking branch 'origin/5.6.0' into 5.6
Conflicts:
	.gitmodules

Change-Id: Ic3c425211f24b0dc3a341cac7d9fd9d0b7edac03
2016-02-12 11:18:27 +01:00
Qt Submodule Update Bot
37c75a23e8 Updated submodules.
Change-Id: I8740e98ba27c1f554366a5183c6972207f0b0061
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2016-02-10 23:22:34 +00:00
Oswald Buddenhagen
3cfe8712ae fix branches of some modules
all repos which are released (whichever way) need release branches.
and vice versa.
also, it needs to be the *right* release branch.

Task-number: QTBUG-50695
Change-Id: Id7b5d106d2d9bdf70e9d5276e205a3c7ea827144
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-02-07 09:10:14 +00:00
Qt Submodule Update Bot
b680c074d1 Updated submodules.
Change-Id: Ic407bd126cc4c0a557ec7769d41394aa68c0cbee
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2016-02-07 09:09:35 +00:00
Oswald Buddenhagen
d1d52b5c1e properly complain about invalid entries in --module-subset
Change-Id: I13ec7a6acdc8a47efea14bfabf0413d8a3570870
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-02-07 09:09:30 +00:00
Oswald Buddenhagen
3de19487d9 replace 'initrepo' with more fine-grained 'status'
instead of a simple bool, we now have five states: preview, active,
addon, obsolete, and ignore (the default). the default includes the
first three.

the CI system is expected to use --module-subset=all,-ignore to include
everything that is expected to build (in some configurations).

Change-Id: Ifb43412054a8e42db0425f24f8e53acfce363caa
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-02-07 09:09:27 +00:00
Oswald Buddenhagen
f5ba19c3f0 Adjust submodule branches
Change-Id: Id78b6c131063a8d25616282cd3b76815323e8048
2016-01-25 11:38:54 +01:00
Qt Submodule Update Bot
1fcdb6cafc Updated submodules.
Change-Id: I88b34da37a589451ae32c6f736f4dc863715b339
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-01-22 19:11:52 +00:00
Qt Submodule Update Bot
273821d69c Updated submodules.
Change-Id: I2c671f50d878e8ed03418c2a59c8c997ed3bd6f4
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-01-22 04:26:30 +00:00
Oswald Buddenhagen
06c3d40cc9 move module dependencies from qt.pro to .gitmodules
this removes the last redundant module list.

the module build order which is not determined by dependencies is pretty
random now. this is avoided for a few heavy and "less relevant" modules
by setting a priority to built them as late as possible.

Change-Id: Ie8ef9777d050a4915cd2282dc9ccb48fcdbc02d2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-01-22 04:26:12 +00:00
Qt Submodule Update Bot
f47e82703c Updated submodules.
Change-Id: Ie0cf0058a5e8f383be4608a5c094b610b9a575af
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-01-19 19:11:07 +00:00
Qt Submodule Update Bot
bb9eebce48 Updated submodules.
Change-Id: Ia4dbb4d02b5c32c76cd9cbdc320709af668dc4bc
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-01-18 19:58:29 +00:00
Qt Submodule Update Bot
0e2ec253d8 Updated submodules.
Change-Id: I3ce0cb4e9ea44dcd860b48d3a6ecaad0eb31964f
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-01-17 17:40:06 +00:00
Qt Submodule Update Bot
63d305bb7d Updated submodules.
Change-Id: Iff91870d954d24d2649334d2eeb8357e483009b3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2016-01-12 19:50:06 +00:00
Qt Submodule Update Bot
bcebc106f1 Updated submodules.
Change-Id: Ibacf35a5fb113f9b54a96c10d52aa70e2e64f8da
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2016-01-05 12:50:44 +00:00
Oswald Buddenhagen
2e134da46c don't use POD, to restore msysgit perl compatibility
Change-Id: I360a6d5246e33dcf3f72bc83f2790905af8c1463
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-12-25 08:07:16 +00:00
Oswald Buddenhagen
c3e404fffd don't use GetOptionsFromArray, to restore msysgit perl compatibility
Change-Id: Ic02a5d8b5a8a813a23bed1c0b45bcb8ee47e3edb
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-12-25 08:07:10 +00:00
Oswald Buddenhagen
43135d6e33 make qtandroidextras a regular optional dependency of qtconnectivity
we want to move to a purely declarative way to declare submodules, so
the conditional has to go.

instead, use an optional dependency to ensure build order, while the
module excludes itself via requires() if its dependency is missing.

Change-Id: I615382700ff601c9ab003d131b2cc600441c514c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-12-25 08:07:00 +00:00
Qt Submodule Update Bot
cda5de797b Updated submodules.
Change-Id: Icf4a1303edde9048adcb9bb40ced1b503a170f22
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-12-24 18:06:50 +00:00
Simon Hausmann
90b08b1c6d Updated submodules.
Change-Id: I701ce99cb7eb7fa8daffa67699920f51a7ab2087
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-12-17 06:52:41 +00:00
Simon Hausmann
f8ae5ee3b6 Updated submodules.
Change-Id: I806a9fb4b31adf8c02e00c2320d53f7d7fe3669e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-12-16 09:49:14 +00:00
Simon Hausmann
a93760f957 Updated submodules.
Change-Id: Iba5d9c28367748258013888c93ab773eb05bb0ee
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-12-15 07:35:22 +00:00
Simon Hausmann
d678e02936 Updated submodules.
Change-Id: Ia00cca2d8c22ff96a4f871d70eaa9eb55f6391b0
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-12-10 05:05:50 +00:00
Antti Kokko
1c04b1f7bd Updated submodules.
Change-Id: Ic83700e48f40b0ee8e76f4b4e44b28b4c85bebb7
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-12-08 04:54:41 +00:00
Oswald Buddenhagen
2a46300588 error-check dependency declarations
Change-Id: I98ad68d8be608b144c5f2ff422aaf7baab9907e8
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-12-01 14:00:46 +00:00
Antti Kokko
d527415ac6 Updated submodules.
Change-Id: Id124a31338548d9a76baa908b281b3bb6ede168a
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
2015-12-01 14:00:43 +00:00
Frederik Gladhorn
f128a9a7e1 Updated submodules.
Change-Id: Id3463e24f1aecc6e2d4d040bc7878ad1d48f6327
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-11-16 05:29:51 +00:00
Oswald Buddenhagen
83b45e9030 declare mandatory dep serialbus => serialport
Change-Id: I35c5f18b7c8856071413e50590308f402be7e528
Reviewed-by: Rolf Eike Beer <eb@emlix.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-11-13 09:22:22 +00:00
Jędrzej Nowacki
1197dbb1db Updated submodules.
Change-Id: I8e348f3cab39f75acb68b2bdc388cd37927424bb
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-11-12 19:05:33 +00:00
Frederik Gladhorn
d55a9e3a66 Updated submodules.
Change-Id: I0793599392d2e64ceabe8d0f24ba7cb0abc76b84
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-11-07 14:00:12 +00:00
Jani Heikkinen
4aabf3e19d Updated submodules.
Change-Id: I4f71eed2d556219480490f433323db4c151b4ba7
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-10-31 09:29:59 +00:00
Fredrik Orderud
ddcc9b234e Update Qt3d manually
Fixes a crash at destruction.

Change-Id: Ie773b3def96cc1e55baa36b9ff7cf697770d479e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2015-10-28 20:25:26 +00:00
Simon Hausmann
95a89a8b5a Manual update of qtmultimedia
In order to bring in the missing libs for QTBUG-48914

Change-Id: I678dcd1ca5bdae66efdd09b809ff63c7da37d58a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-10-27 12:15:41 +00:00
Fredrik Orderud
98717e27d0 Update Qt3d manually
Fixes some nasty threading problems related to pick event race
conditions and QThreadPool thread recycling.

Change-Id: I977ad310d1a767abc0fbcca49f9088ff5fdda708
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-10-26 18:22:04 +00:00
Simon Hausmann
5197447fd0 Update WebEngine manually
This brings in MSVC 2015 fixes and RHEL/OpenSuSE build fixes

Change-Id: I796c153a005e964c4a32203cfe08cbf3ece5f39e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-10-23 18:46:03 +00:00
Laszlo Agocs
a0309a7a43 Fix dependency order for qtlocation and qtwebview
Change-Id: Ie61b69be3b38975675fff3553d1f5c9510e7865e
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-10-22 05:00:55 +00:00
Simon Hausmann
17c6369c9e Updated submodules.
Change-Id: I3094692e61e5a41116d69053d1f296eac46e545b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-10-22 05:00:52 +00:00
Jani Heikkinen
6f0713adf6 Updated submodules.
Change-Id: Ifc06de16a694d8d24bdea3a81e796a0c460e1864
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-10-12 10:43:55 +00:00
Oswald Buddenhagen
0c4ec778f5 declare qtgraphicaleffects before qtquickcontrols
otherwise the dependency is botched.

amends 30e19df5b.

Change-Id: I8e17d2f91c7c55c49be6239268f928ae4577d17c
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
2015-10-12 05:25:39 +00:00
Iikka Eklund
6382845a6d Update build instructions for commercial licensees
Add build instructions for commercial licensees as well so that the
same README covers both opensource and enterprise users.

This removes the need having separate README file for commercial users.

Change-Id: Ibd3012b428c6fa85f47c1c459d8029ebfce92046
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-12 05:25:20 +00:00
Edward Welbourne
383b2585e3 Explain what the canonical URLs are.
This caught me out the first time I tried to use init-repository.
Documentation should work for noobs.

Change-Id: Ia6c9ce395ace034128bfe80f2c31be7f9cd4cf35
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-10-12 05:24:50 +00:00
Laszlo Agocs
ee443af314 Add qtserialport as dependency for qtlocation
Task-number: QTBUG-48082
Change-Id: I7b90777bfdd1286f6340caf756562146772d0bb3
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-10-09 12:05:04 +00:00
Jani Heikkinen
d16a8656f9 Updated submodules.
Change-Id: I871b519649bb6130db128d7ae4c0916ee2e48146
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-10-06 17:21:56 +00:00
Simon Hausmann
c78fc65631 Updated submodules.
Change-Id: Ia0a52a43a8c5fa7516c1469241a449c457153040
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-09-26 11:22:38 +00:00
Simon Hausmann
ae1dc7aa3e Updated submodules.
Change-Id: Ic5ea73d6ca0ea2e174cd592226a16885a73aeed1
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-09-25 19:35:21 +00:00
Thiago Macieira
942ae1dd82 Add a way to build just a few of Qt's modules more easily
The current way requires passing -skip to configure, which is a list
of what not to build. To set a list of what to build (e.g., for
testing, in a specialized build, etc.), there was no way. Now you can
just do:

    qmake "QT_BUILD_MODULES=qtbase qtdeclarative qtsvg qtxmlpatterns"

(the order doesn't matter)

Change-Id: Ifcaefa35b16b137866ca839a483ce366e35de7ab
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-09-24 05:22:45 +00:00
Frederik Gladhorn
d7f477d1cd Add qtpurchasing as non-default module
For 5.6 this is a tech preview, it will be added properly in 5.7.

Change-Id: I709830fbcfc439d5446718093f0c16ad2dcb1e57
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-09-24 05:22:42 +00:00
Simon Hausmann
c42dd3462b Updated submodules.
Change-Id: If0045fccac1af79e858831c75c7808fe6997e37e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-09-22 16:40:33 +00:00
Jani Heikkinen
944aa6bcbb Updated submodules.
Change-Id: I3c4cdbef3f8fbc016757fdd6a4b5bb8eb6a644df
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-09-21 13:24:01 +00:00
Simon Hausmann
a89c6ef703 Manual update of qttools to remove webkit dependency
Change-Id: I6cf6ae75cedb0945c46fd9b3fa63bd21a9ce4806
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-09-18 06:33:36 +00:00
Simon Hausmann
2ebfdb4ca8 Updated submodules.
Change-Id: I03bbaedeb88ad76df39ce10f6828ebf5c8b8dadf
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-09-17 11:37:09 +00:00
Oswald Buddenhagen
9bde440225 Merge remote-tracking branch 'origin/5.5' into 5.6
Change-Id: I7a28bcaeb5538763274fdef20f8c8ca81b9b21ad
2015-09-10 14:24:15 +02:00
Qt Submodule Update Bot
dd1aeea722 Updated submodules.
Change-Id: I0ba6e6ce435be779865b0ace08d74dd29800be9c
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-09-04 04:24:15 +00:00
Frederik Gladhorn
e734941df8 Add QtQuickControls2 as submodule
Change-Id: I435fb765b48a978763384226e399b33448a40502
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-09-03 22:45:29 +00:00
Alex Blasche
c5cb9d2d89 Hook qtserialbus into qt5.git
Change-Id: I17c8c55205f852b3e79f279cad7b87f403d7fbe7
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-09-03 17:40:25 +00:00
Frederik Gladhorn
4c520caa69 Add qtwebview as submodule
Change-Id: I6a69b08945767f4cb8f4164630c726cf8bf552bb
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-09-03 17:40:17 +00:00
Jani Heikkinen
4116ec2474 Removed QtWebkit and QtWebkit-Examples from qt5.git
QtWebkit (and QtWebkit-Examples) were deprecated in Qt 5.5 and will now
be removed from qt5.git in Qt5.6 release

Change-Id: I86e1072141956136fa5e4220cdcdf812492453b3
Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-09-03 17:40:10 +00:00
Simon Hausmann
3e1fd2cb31 Fix QtEnginio branch
The 1.3 branch does not exist anymore, let's use 5.6

Change-Id: I442ad45c73a0e08c853385c999dddf818447bb82
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-09-03 17:40:03 +00:00
Simon Hausmann
1a46c456eb Updated submodules.
Change-Id: Ie8c296b8e64fe0083ab5ec1584a42c7165fbe3ab
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-09-03 17:39:54 +00:00
Andrew Knight
7bbe464617 gnuwin32: remove win_bison/win_flex
These tools are copies of bison/flex and are no longer needed.

Change-Id: Ia543926ee8126358beee2aed03752d9cfe803f07
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-09-01 05:56:07 +00:00
Qt Submodule Update Bot
0ba6e6ce43 Updated submodules.
Change-Id: I1497a398e34e18abb18f705b2294464840629ca1
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-09-01 05:56:00 +00:00
Jani Heikkinen
812ff69df4 Remove quick1 from default checkout
QtQuick1 was deprecated in Qt 5.5 and will now be removed from
default modules in qt5.git

Change-Id: I88aa9d75ace8d91b4cd469d7511662425e67d95f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-08-27 19:44:22 +00:00
Qt Submodule Update Bot
1497a398e3 Updated submodules.
Change-Id: I56e7af096e889d56ef67baabf38529c0ccb8d8b5
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-08-25 04:33:00 +00:00
Liang Qi
c9425926e1 Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	qt3d
	qtactiveqt
	qtandroidextras
	qtbase
	qtcanvas3d
	qtconnectivity
	qtdeclarative
	qtdoc
	qtenginio
	qtgraphicaleffects
	qtimageformats
	qtlocation
	qtmacextras
	qtmultimedia
	qtqa
	qtquick1
	qtquickcontrols
	qtrepotools
	qtscript
	qtsensors
	qtserialport
	qtsvg
	qttools
	qttranslations
	qtwayland
	qtwebchannel
	qtwebengine
	qtwebkit
	qtwebkit-examples
	qtwebsockets
	qtwinextras
	qtx11extras
	qtxmlpatterns

Change-Id: I7410d9be5775ab276fb5a57adb397f4f92d77a50
2015-08-24 16:18:23 +02:00
Qt Submodule Update Bot
56e7af096e Updated submodules.
Change-Id: Icf1e00c471aea0ce5228165735195a9f0f76fe36
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-08-21 09:43:42 +00:00
Qt Submodule Update Bot
cf1e00c471 Updated submodules.
Change-Id: Id60882b0bc98875361477cb5aaf7d12c2693f900
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-08-18 04:24:52 +00:00
Thiago Macieira
d7b8b62cb3 Add the GPLv3 license text
LGPLv3 refers to it but does not include it in its body.

Change-Id: Ib056b47dde3341ef9a52ffff13eed18cf3504738
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-08-14 13:39:09 +02:00
Oswald Buddenhagen
bf5c38f136 Merge remote-tracking branch 'origin/5.4' into 5.5
Change-Id: I5b894e7f72ad81e62a6ea0777e6713dfa36c8a68
2015-08-14 13:38:53 +02:00
Oswald Buddenhagen
3f2ff8b460 Merge remote-tracking branch 'origin/5.4.2' into 5.4
Change-Id: Id8fa6d30810f8bfe46d5aa7e279c69ea560edd19
2015-08-14 13:34:32 +02:00
Mitch Curtis
30e19df5bf Add qtgraphicaleffects as an optional dependency for qtquickcontrols.
This is a prerequisite to making qtgraphicaleffects a dependency in
qtquickcontrols' sync.profile.

Task-number: QTBUG-46393
Change-Id: I3679392a7feb48ecefa4a01a7ecb42b2e6287ecb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-08-13 11:52:55 +00:00
Andrew Knight
3d7fe3b822 gnuwin32: Remove old versions of bison/flex from the distribution
The win_flex/win_bison tools are already in the repository and working
with all projects, so the GnuWin32 versions can be removed and the
winflexbison versions can take their place.

Task-number: QTBUG-46852
Change-Id: I41bc541adab834ff83912d7a4f076a87fc174601
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-08-13 04:45:21 +00:00
Qt Submodule Update Bot
d60882b0bc Updated submodules.
Change-Id: Idbdb4ce40f9456898ac9148dc08473f636f34f1d
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-08-13 04:45:15 +00:00
Oswald Buddenhagen
f587983764 fix qtcanvas3d submodule reference
Change-Id: I67d89f5e8d04a1e60ff0aedc33e29da7a58df620
2015-08-12 16:31:03 +02:00
Oswald Buddenhagen
cab251cd8d Adjust submodule branches
Change-Id: I7755bb88167297aef9defaa6b66639fde6e9804d
2015-08-10 16:53:39 +02:00
Qt Submodule Update Bot
dbdb4ce40f Updated submodules.
Change-Id: I20beccb62815f3c6948d888ccfad0b69c42b55e0
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-08-07 06:55:47 +00:00
Qt Submodule Update Bot
20beccb628 Updated submodules.
Change-Id: Ie77fe47fcec71a13d3640059d1e0ce66a47fc0b2
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-07-14 03:17:43 +00:00
Qt Submodule Update Bot
e77fe47fce Updated submodules.
Change-Id: I22c7d89fd93a256c4051f49b9a9b89789e697df6
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-07-11 09:46:26 +00:00
Qt Submodule Update Bot
1d3966833b Updated submodules.
Change-Id: Idc11a328839163ffae5e72f2e43860b12f19c668
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-07-11 03:32:32 +00:00
Qt Submodule Update Bot
22c7d89fd9 Updated submodules.
Change-Id: Ideafacc193da59a1db25e006b16630b74535cbee
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-06-30 18:19:55 +00:00
Kai Koehne
345e4356b7 README: Replace qt-project.org with qt.io
Change-Id: Iacc4dc8f28ce2c0bb1d761834d0f90b444f47327
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-06-30 18:19:33 +00:00
Qt Submodule Update Bot
deafacc193 Updated submodules.
Change-Id: Ibc862a8b12e46042819341229b31883bc9a1462e
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-06-29 19:59:42 +00:00
Aaron McCarthy
fb5e3cc2d3 Add qtquickcontrols as an optional dependency to qtlocation module
With the correct modules checked out 'make module-qtlocation' will build
everything necessary to run the examples.

Change-Id: I0c63221b5704c2b13495f3dc3221e888d8e9547c
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-06-26 06:46:09 +00:00
Qt Submodule Update Bot
bc862a8b12 Updated submodules.
Change-Id: Ie231e8be72006172dd80ec9f1df8f57e7fc54891
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-06-26 05:37:28 +00:00
Qt Submodule Update Bot
dc11a32883 Updated submodules.
Change-Id: Ic5910fb0b28553d1eb0815e578381fd358e342fc
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-06-25 19:31:21 +00:00
Qt Submodule Update Bot
e231e8be72 Updated submodules.
Change-Id: Icc425a6784ea3ae379716ddb1e79a8a07ccd8d74
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-06-25 19:31:02 +00:00
Qt Submodule Update Bot
cc425a6784 Updated submodules.
Change-Id: I88f32b10ee95f967686bf9c3295887b4ebb62eba
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-06-24 07:00:47 +00:00
Qt Submodule Update Bot
c5910fb0b2 Updated submodules.
Change-Id: Ic5e879665945d79c0fcdb27c2c00978b7abdeef6
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-06-23 19:28:08 +00:00
Qt Submodule Update Bot
c5e8796659 Updated submodules.
Change-Id: I5c321f6626e9bf6f64f2c120e8281547e2561880
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-06-21 11:31:31 +00:00
Qt Submodule Update Bot
5c321f6626 Updated submodules.
Change-Id: I3009287ec75bfa7b3084fad32a75552656845434
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-06-20 17:13:47 +00:00
Qt Submodule Update Bot
88f32b10ee Updated submodules.
Change-Id: Ibc644efc00d00f43c1d202106bae6facf015c7fb
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-06-20 06:59:07 +00:00
Qt Submodule Update Bot
0d60d720f8 Updated submodules.
Change-Id: I00defc7101f1cabc0cc540a84846ec9b7933f599
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-06-19 18:49:53 +00:00
Qt Submodule Update Bot
3009287ec7 Updated submodules.
Change-Id: I7257e86c7381f5237c2c135a4395e88b65735cd3
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-06-18 04:43:56 +00:00
Qt Submodule Update Bot
bc644efc00 Updated submodules.
Change-Id: Ia820c1611af25853deb8161041adf39b7bfa61db
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-06-17 12:04:07 +00:00
Qt Submodule Update Bot
7257e86c73 Updated submodules.
Change-Id: I976ffd988e7ec7b595ed610d86bf58307c5e5434
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-06-09 04:27:26 +00:00
Qt Submodule Update Bot
a820c1611a Updated submodules.
Change-Id: I5384ff79efab1a68cfb665f1e764d7f5ee73fcba
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-06-07 05:40:06 +00:00
Michael Olbrich
935ffc2e5f qtdeclarative is an optional dependency for qtwebkit
This way qtwebkit can be built when qtdeclarative is disabled. This is
especially useful for targets without OpenGL.

Also add qtxmlpatterns to the optional dependencies. It was an indirect
dependency before via qtdeclarative.

Change-Id: Ib4c29b958bd63d528fba8ec326e2dbc1ea8bce08
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-06-05 19:05:46 +00:00
Qt Submodule Update Bot
5384ff79ef Updated submodules.
Change-Id: I4fc367abe95ee78166067047d0f229bba9991956
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-06-04 20:03:11 +00:00
Qt Submodule Update Bot
4fc367abe9 Updated submodules.
Change-Id: I88af8ac70704e63a2154b3fe22b51483a69d84c3
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-05-31 06:59:17 +00:00
Qt Submodule Update Bot
00defc7101 Updated submodules.
Change-Id: Ib62714f88c3cd381cbbf8758c7b1029c2fa254ed
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-05-31 06:58:29 +00:00
Qt Submodule Update Bot
88af8ac707 Updated submodules.
Change-Id: I57641bf25f49f0f8eb55ccb08a4ede2d6a7af499
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-05-29 19:19:51 +00:00
Oswald Buddenhagen
4a5968ce75 Merge branch '5.4' into 5.4.2
Change-Id: I33d967b5f668c672a55ad93ac314340453850521
2015-05-29 20:12:13 +02:00
Oswald Buddenhagen
843a3407f2 Merge tag 'v5.4.1' into 5.4
Qt 5.4.1 Release
2015-05-29 15:53:05 +02:00
Oswald Buddenhagen
5400507252 Merge tag 'v5.4.0' into 5.4
Qt 5.4.0 Release
2015-05-29 15:52:28 +02:00
Qt Submodule Update Bot
210493d641 Updated submodules.
Change-Id: I670466b6a3ff58edb40c91ff86c443cd6dd20126
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-05-29 09:18:21 +00:00
Qt Submodule Update Bot
670466b6a3 Updated submodules.
Change-Id: I07856d73e19b60fbc01ff650cddb1d557db35617
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-05-28 11:33:18 +00:00
Andrew Knight
ea14bacdc8 Set win_bison/win_flex executable
This fixes failed execution when the Qt sources are exported to
Windows over a network share or attempted to be executed on a Linux
system using binfmt.

Change-Id: I00b1073e516d2441498a39cc13e4295484e1ef9d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-27 16:13:29 +00:00
Qt Submodule Update Bot
57641bf25f Updated submodules.
Change-Id: I31ee12ede4defe80e20dd49b9ca7b425b6758965
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-05-27 16:13:26 +00:00
Qt Submodule Update Bot
07856d73e1 Updated submodules.
Change-Id: Idfffbfdc266be3f52f716b152bbcb70810127cc9
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-05-23 06:51:36 +00:00
Qt Submodule Update Bot
dfffbfdc26 Updated submodules.
Change-Id: I24f1b3219d1db41acc3f0781fa38f253bcb04da3
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-05-16 04:57:35 +00:00
Qt Submodule Update Bot
b62714f88c Updated submodules.
Change-Id: I68b5c48282234a27f7c96595c8d84a4dc0bb3871
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-05-14 14:37:56 +00:00
Qt Submodule Update Bot
24f1b3219d Updated submodules.
Change-Id: If7cb995d04fdc05b35df8b6c5215bf530006b984
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-05-13 15:55:59 +00:00
Qt Submodule Update Bot
f7cb995d04 Updated submodules.
Change-Id: I11963ba9f0141fc72dadedffe2c36fba5be16186
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-05-09 12:22:09 +00:00
Qt Submodule Update Bot
11963ba9f0 Updated submodules.
Change-Id: I39ce0228dad0d141df17ea5f911046130f823467
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-05-03 07:57:31 +00:00
Qt Submodule Update Bot
39ce0228da Updated submodules.
Change-Id: I59e3021a529806b8b2ae7676b8f687099384f7e4
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-04-28 10:58:28 +00:00
Frederik Gladhorn
9edcb24889 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	qt3d
	qtactiveqt
	qtandroidextras
	qtbase
	qtcanvas3d
	qtconnectivity
	qtdeclarative
	qtdoc
	qtenginio
	qtimageformats
	qtlocation
	qtmacextras
	qtmultimedia
	qtqa
	qtquick1
	qtquickcontrols
	qtrepotools
	qtscript
	qtsensors
	qtserialport
	qtsvg
	qttools
	qttranslations
	qtwayland
	qtwebengine
	qtwebkit
	qtwebkit-examples
	qtwebsockets
	qtwinextras
	qtxmlpatterns

Change-Id: I691dbbe6d3399d601336bb7e309579fb89d6381c
2015-04-21 16:26:04 +02:00
Sergio Ahumada
95bb29e243 Replace old qt-project.org wiki with wiki.qt.io
Change-Id: I9a1114a8b5da649d3da718248fe5df5781810c20
Reviewed-by: Tero Kojo <tero.kojo@theqtcompany.com>
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-04-16 09:42:01 +00:00
Qt Submodule Update Bot
68b5c48282 Updated submodules.
Change-Id: I59e3021a529806b8b2ae7676b8f687099384f7e4
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-04-15 09:16:10 +00:00
Oswald Buddenhagen
451f0a193b Adjust submodule branches
Change-Id: Ib30d8a8c4691787c460fe6540b64e2d593422c68
2015-04-10 12:10:34 +02:00
Qt Submodule Update Bot
59e3021a52 Updated submodules.
Change-Id: Ibe35b9f9af23a2b84ccab7e24b10e70d9324e42b
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-04-09 09:28:44 +00:00
Simon Hausmann
b34e3669ff Prospective fix for unnecessary submodule cloning
When cloning qtdeclarative, we end up also cloning qtdeclarative-testsuites,
which is not intentional for users of Qt (and init-repository). The init-repository
script checks for the submodule "repo".update key and skips the sub module if the value
is "ignore". However according to the documentation no checkout is to be done if the value
is "none", which is also what qtdeclarative's .gitmodules specifies for the ecmascript
test suite.

Change-Id: Ieb37607ae4ea7c32d6af886d3e2533fb9dea1f13
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-03-27 10:04:11 +00:00
Jani Heikkinen
1b9d3e4ec0 Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev 2015-03-27 10:04:06 +00:00
Qt Submodule Update Bot
b02397e9df Updated submodules.
Change-Id: Ibe35b9f9af23a2b84ccab7e24b10e70d9324e42b
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-03-27 10:03:59 +00:00
Oswald Buddenhagen
4afaae4020 Merge remote-tracking branch 'origin/5.5' into dev
Change-Id: I44a6915c1212bb636456368a2b5dc36b9c26fe01
2015-03-20 13:17:05 +01:00
Qt Submodule Update Bot
e3cd5bb368 Updated submodules.
Change-Id: I0badf6179237bb89ffc57c7387cbf21ebc3b6665
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-02-16 19:57:25 +00:00
Qt Submodule Update Bot
0badf61792 Updated submodules.
Change-Id: I98737b388b9898507bebcd8d05a86e7d916b6d25
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-02-14 08:54:49 +00:00
Qt Submodule Update Bot
98737b388b Updated submodules.
Change-Id: I9fb1a2e12fb6562c22dbac5fbca06d33046a5030
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-02-13 04:29:58 +00:00
Qt Submodule Update Bot
9fb1a2e12f Updated submodules.
Change-Id: Ib71478c424ed0a6fd8d058513aa9a68dda71336f
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-02-10 09:18:23 +00:00
Qt Submodule Update Bot
b71478c424 Updated submodules.
Change-Id: I81efb6de3c49e6779556b1d1dfe06f1e1bc574f6
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-02-06 17:00:48 +00:00
Qt Submodule Update Bot
81efb6de3c Updated submodules.
Change-Id: Ief1f126ddc66293b041fe5658d57056761eefe05
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-02-03 11:14:37 +00:00
Qt Submodule Update Bot
ef1f126ddc Updated submodules.
Change-Id: I0163cb617aa19a26423a716bef23bfc6308aadc6
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-01-29 04:28:53 +00:00
Oswald Buddenhagen
c3a6185b7e Adjust submodule branches
Change-Id: I6f2358370d81238f462d26388d85aa5f74a8b455
2015-01-08 12:53:09 +01:00
Qt Submodule Update Bot
3439140073 Updated submodules.
Change-Id: I1998742ceac59b50864ccec46a6c2f255871ab30
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2014-12-05 10:51:00 +01:00
Qt Submodule Update Bot
1998742cea Updated submodules.
Change-Id: Ib1885ea72539f3bd2df4d4131f0b164b02d4b59f
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2014-12-04 13:50:13 +01:00
Qt Submodule Update Bot
b1885ea725 Updated submodules.
Change-Id: I338ee26271c05b612fc58381270ca471db12aaef
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2014-11-27 06:41:45 +01:00
133 changed files with 630 additions and 55571 deletions

View File

@@ -14,7 +14,7 @@
#
# ==[ Please wrap at 72 characters ]===================================|
#
# Remember to read http://wiki.qt-project.org/Commit_Policy
# Remember to read http://wiki.qt.io/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,7 +1,6 @@
.tag export-subst
.gitignore export-ignore
.gitattributes export-ignore
.gitmodules export-ignore
.commit-template export-ignore
init-repository export-ignore
README.git export-ignore

217
.gitmodules vendored
View File

@@ -1,181 +1,270 @@
[submodule "qtbase"]
path = qtbase
url = ../qtbase.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = essential
[submodule "qtsvg"]
depends = qtbase
path = qtsvg
url = ../qtsvg.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = addon
[submodule "qtdeclarative"]
depends = qtbase
recommends = qtsvg qtxmlpatterns
path = qtdeclarative
url = ../qtdeclarative.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = essential
[submodule "qtactiveqt"]
depends = qtbase
path = qtactiveqt
url = ../qtactiveqt.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = addon
[submodule "qtscript"]
depends = qtbase
recommends = qttools
path = qtscript
url = ../qtscript.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = deprecated
[submodule "qtmultimedia"]
depends = qtbase
recommends = qtdeclarative
path = qtmultimedia
url = ../qtmultimedia.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = essential
[submodule "qttools"]
depends = qtbase
recommends = qtdeclarative qtactiveqt qtwebkit
path = qttools
url = ../qttools.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = essential
[submodule "qtxmlpatterns"]
depends = qtbase
path = qtxmlpatterns
url = ../qtxmlpatterns.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = addon
[submodule "qttranslations"]
depends = qttools
path = qttranslations
url = ../qttranslations.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = essential
priority = 30
[submodule "qtdoc"]
depends = qtdeclarative
path = qtdoc
url = ../qtdoc.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = essential
priority = 40
[submodule "qtrepotools"]
path = qtrepotools
url = ../qtrepotools.git
branch = master
initrepo = true
status = essential
qt = false
[submodule "qtwebkit"]
depends = qtbase
recommends = qtdeclarative qtlocation qtmultimedia qtsensors qtwebchannel qtxmlpatterns
path = qtwebkit
url = ../qtwebkit.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = obsolete
project = WebKit.pro
priority = 20
[submodule "qtwebkit-examples"]
depends = qtwebkit qttools
path = qtwebkit-examples
url = ../qtwebkit-examples.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = obsolete
[submodule "qtqa"]
depends = qtbase
path = qtqa
url = ../qtqa.git
branch = master
initrepo = true
status = essential
priority = 50
[submodule "qtlocation"]
depends = qtbase
recommends = qtdeclarative qtquickcontrols qtserialport qtsystems
path = qtlocation
url = ../qtlocation.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = addon
[submodule "qtsensors"]
depends = qtbase
recommends = qtdeclarative
path = qtsensors
url = ../qtsensors.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
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.5.0
initrepo = true
branch = 5.6.2
status = addon
[submodule "qtwayland"]
depends = qtbase
recommends = qtdeclarative
path = qtwayland
url = ../qtwayland.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = addon
[submodule "qt3d"]
depends = qtdeclarative qtimageformats
path = qt3d
url = ../qt3d.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = preview
[submodule "qtimageformats"]
depends = qtbase
path = qtimageformats
url = ../qtimageformats.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = addon
[submodule "qtquick1"]
depends = qtscript
recommends = qtsvg qtxmlpatterns
path = qtquick1
url = ../qtquick1.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = obsolete
[submodule "qtgraphicaleffects"]
depends = qtdeclarative
path = qtgraphicaleffects
url = ../qtgraphicaleffects.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = addon
[submodule "qtquickcontrols"]
depends = qtdeclarative
recommends = qtgraphicaleffects
path = qtquickcontrols
url = ../qtquickcontrols.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = essential
[submodule "qtserialbus"]
depends = qtserialport
path = qtserialbus
url = ../qtserialbus.git
branch = 5.6.2
status = preview
[submodule "qtserialport"]
depends = qtbase
path = qtserialport
url = ../qtserialport.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = addon
[submodule "qtx11extras"]
depends = qtbase
path = qtx11extras
url = ../qtx11extras.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = addon
[submodule "qtmacextras"]
depends = qtbase
path = qtmacextras
url = ../qtmacextras.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = addon
[submodule "qtwinextras"]
depends = qtbase
recommends = qtdeclarative qtmultimedia
path = qtwinextras
url = ../qtwinextras.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = addon
[submodule "qtandroidextras"]
depends = qtbase
path = qtandroidextras
url = ../qtandroidextras.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = addon
[submodule "qtenginio"]
depends = qtdeclarative
path = qtenginio
url = ../qtenginio.git
branch = 1.2.0
initrepo = true
branch = 5.6.2
status = deprecated
[submodule "qtwebsockets"]
depends = qtbase
recommends = qtdeclarative
path = qtwebsockets
url = ../qtwebsockets.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = addon
[submodule "qtwebchannel"]
depends = qtbase
recommends = qtdeclarative qtwebsockets
path = qtwebchannel
url = ../qtwebchannel.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = addon
[submodule "qtwebengine"]
depends = qtquickcontrols qtwebchannel
recommends = qtlocation
path = qtwebengine
url = ../qtwebengine.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = addon
priority = 10
[submodule "qtcanvas3d"]
depends = qtdeclarative
path = qtcanvas3d
url = ../qtcanvas3d.git
branch = 5.5.0
initrepo = true
branch = 5.6.2
status = addon
[submodule "qtwebview"]
depends = qtdeclarative
recommends = qtwebengine
path = qtwebview
url = ../qtwebview.git
branch = 5.6.2
status = addon
[submodule "qtquickcontrols2"]
depends = qtquickcontrols
path = qtquickcontrols2
url = ../qtquickcontrols2.git
branch = 5.6.2
status = preview
[submodule "qtpurchasing"]
depends = qtbase
recommends = qtdeclarative
path = qtpurchasing
url = ../qtpurchasing.git
branch = dev
status = ignore

View File

@@ -3,7 +3,7 @@
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 GUI Toolkit under the terms of
You may use, distribute and copy the Qt Toolkit under the terms of
GNU General Public License version 2, which is displayed below.
-------------------------------------------------------------------------

View File

@@ -1,3 +1,15 @@
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

@@ -3,7 +3,7 @@
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 GUI Toolkit under the terms of
You may use, distribute and copy the Qt Toolkit under the terms of
GNU Lesser General Public License version 2.1, which is displayed below.
-------------------------------------------------------------------------

View File

@@ -3,8 +3,10 @@
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 GUI Toolkit under the terms of
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.
-------------------------------------------------------------------------

54
README
View File

@@ -14,36 +14,26 @@ HOW TO BUILD QT5
For other platform specific requirements,
please see section "Setting up your machine" on:
http://qt-project.org/wiki/Get_The_Source
http://wiki.qt.io/Get_The_Source
Optional requirements
---------------------
Licensing:
----------
- OpenSSL for SSL sockets or HTTPS
- Wayland
Opensource users:
New dependencies in Qt 5
------------------------
<source_package> = qt-everywhere-opensource-src-<version>
<license> = -opensource
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.
Commercial users:
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.
<source_package> = qt-everywhere-enterprise-src-<version>
<license> = -commercial
Linux, Mac:
-----------
cd <path>/qt-everywhere-opensource-src-<version>
./configure -prefix $PWD/qtbase -opensource -nomake tests
cd <path>/<source_package>
./configure -prefix $PWD/qtbase <license> -nomake tests
make -j 4
Windows:
@@ -55,8 +45,8 @@ HOW TO BUILD QT5
* Python version 2.7 or later [http://www.activestate.com/activepython/]
* Ruby version 1.9.3 or later [http://rubyinstaller.org/]
cd <path>\qt-everywhere-opensource-src-<version>
configure -prefix %CD%\qtbase -opensource -nomake tests
cd <path>\<source_package>
configure -prefix %CD%\qtbase <license> -nomake tests
nmake // jom // mingw32-make
To accelerate the bootstrap of qmake with MSVC, it may be useful to pass
@@ -81,13 +71,13 @@ HOW TO BUILD QT5
Example for a release build:
(adjust the `-jN' parameter as appropriate for your system)
./configure -prefix $PWD/qtbase -opensource
./configure -prefix $PWD/qtbase <license>
make -j4
Example for a developer build:
(enables more autotests, builds debug version of libraries, ...)
./configure -developer-build -opensource
./configure -developer-build <license>
make -j4
See output of `./configure -help' for documentation on various options to
@@ -97,11 +87,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 qtscript and qtwebkit,
and the modules they depend on:
a `make module-<foo>'. For example, to build only qtdeclarative,
and the modules it depends on:
./configure -prefix $PWD/qtbase -opensource
make -j4 module-qtscript module-qtwebkit
./configure -prefix $PWD/qtbase <license>
make -j4 module-qtdeclarative
This can save a lot of time if you are only interested in a subset of Qt5.
@@ -119,9 +109,9 @@ HOW TO BUILD QT5
Building Qt5 from git
=====================
See http://qt-project.org/wiki/Building-Qt-5-from-Git and README.git
See http://wiki.qt.io/Building_Qt_5_from_Git and README.git
for more information.
See http://qt-project.org/wiki/Qt-5 for the reference platforms.
See http://wiki.qt.io/Qt_5 for the reference platforms.
Documentation
@@ -139,6 +129,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://qt-project.org/wiki/Qt5DocumentationProject
or in the following page: http://wiki.qt.io/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://qt-project.org/wiki/Building-Qt-5-from-Git
please see: http://wiki.qt.io/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://qt-project.org/wiki/Category:Developing_Qt
http://wiki.qt.io/Category:Developing_Qt

11
coin/README Normal file
View File

@@ -0,0 +1,11 @@
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

@@ -0,0 +1,31 @@
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

@@ -0,0 +1,9 @@
# 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

@@ -0,0 +1,9 @@
. "$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

@@ -0,0 +1,6 @@
# 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

@@ -0,0 +1,4 @@
# 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

@@ -0,0 +1,70 @@
#!/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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

Binary file not shown.

View File

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

Binary file not shown.

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

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

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

View File

@@ -1,54 +0,0 @@
* 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

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

File diff suppressed because it is too large Load Diff

View File

@@ -1,291 +0,0 @@
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

@@ -1,43 +0,0 @@
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

@@ -1,30 +0,0 @@
-*- 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

@@ -1,104 +0,0 @@
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

@@ -1,309 +0,0 @@
-*- 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

@@ -1,70 +0,0 @@
-*- 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

@@ -1,195 +0,0 @@
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

@@ -1,717 +0,0 @@
@c The GNU General Public License.
@center Version 3, 29 June 2007
@c This file is intended to be included within another document,
@c hence no sectioning command or @node.
@display
Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{http://fsf.org/}
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
@end display
@heading Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom
to share and change all versions of a program---to make sure it remains
free software for all its users. We, the Free Software Foundation,
use the GNU General Public License for most of our software; it
applies also to any other work released this way by its authors. You
can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you
have certain responsibilities if you distribute copies of the
software, or if you modify it: responsibilities to respect the freedom
of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too,
receive or can get the source code. And you must show them these
terms so they know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the
manufacturer can do so. This is fundamentally incompatible with the
aim of protecting users' freedom to change the software. The
systematic pattern of such abuse occurs in the area of products for
individuals to use, which is precisely where it is most unacceptable.
Therefore, we have designed this version of the GPL to prohibit the
practice for those products. If such problems arise substantially in
other domains, we stand ready to extend this provision to those
domains in future versions of the GPL, as needed to protect the
freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish
to avoid the special danger that patents applied to a free program
could make it effectively proprietary. To prevent this, the GPL
assures that patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
@heading TERMS AND CONDITIONS
@enumerate 0
@item Definitions.
``This License'' refers to version 3 of the GNU General Public License.
``Copyright'' also means copyright-like laws that apply to other kinds
of works, such as semiconductor masks.
``The Program'' refers to any copyrightable work licensed under this
License. Each licensee is addressed as ``you''. ``Licensees'' and
``recipients'' may be individuals or organizations.
To ``modify'' a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of
an exact copy. The resulting work is called a ``modified version'' of
the earlier work or a work ``based on'' the earlier work.
A ``covered work'' means either the unmodified Program or a work based
on the Program.
To ``propagate'' a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To ``convey'' a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user
through a computer network, with no transfer of a copy, is not
conveying.
An interactive user interface displays ``Appropriate Legal Notices'' to
the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
@item Source Code.
The ``source code'' for a work means the preferred form of the work for
making modifications to it. ``Object code'' means any non-source form
of a work.
A ``Standard Interface'' means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The ``System Libraries'' of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
``Major Component'', in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The ``Corresponding Source'' for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users can
regenerate automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same
work.
@item Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey,
without conditions so long as your license otherwise remains in force.
You may convey covered works to others for the sole purpose of having
them make modifications exclusively for you, or provide you with
facilities for running those works, provided that you comply with the
terms of this License in conveying all material for which you do not
control copyright. Those thus making or running the covered works for
you must do so exclusively on your behalf, under your direction and
control, on terms that prohibit them from making any copies of your
copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the
conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
@item Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such
circumvention is effected by exercising rights under this License with
respect to the covered work, and you disclaim any intention to limit
operation or modification of the work as a means of enforcing, against
the work's users, your or third parties' legal rights to forbid
circumvention of technological measures.
@item Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
@item Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these
conditions:
@enumerate a
@item
The work must carry prominent notices stating that you modified it,
and giving a relevant date.
@item
The work must carry prominent notices stating that it is released
under this License and any conditions added under section 7. This
requirement modifies the requirement in section 4 to ``keep intact all
notices''.
@item
You must license the entire work, as a whole, under this License to
anyone who comes into possession of a copy. This License will
therefore apply, along with any applicable section 7 additional terms,
to the whole of the work, and all its parts, regardless of how they
are packaged. This License gives no permission to license the work in
any other way, but it does not invalidate such permission if you have
separately received it.
@item
If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your work
need not make them do so.
@end enumerate
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
``aggregate'' if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
@item Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of
sections 4 and 5, provided that you also convey the machine-readable
Corresponding Source under the terms of this License, in one of these
ways:
@enumerate a
@item
Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium customarily
used for software interchange.
@item
Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a written
offer, valid for at least three years and valid for as long as you
offer spare parts or customer support for that product model, to give
anyone who possesses the object code either (1) a copy of the
Corresponding Source for all the software in the product that is
covered by this License, on a durable physical medium customarily used
for software interchange, for a price no more than your reasonable
cost of physically performing this conveying of source, or (2) access
to copy the Corresponding Source from a network server at no charge.
@item
Convey individual copies of the object code with a copy of the written
offer to provide the Corresponding Source. This alternative is
allowed only occasionally and noncommercially, and only if you
received the object code with such an offer, in accord with subsection
6b.
@item
Convey the object code by offering access from a designated place
(gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to copy
the object code is a network server, the Corresponding Source may be
on a different server (operated by you or a third party) that supports
equivalent copying facilities, provided you maintain clear directions
next to the object code saying where to find the Corresponding Source.
Regardless of what server hosts the Corresponding Source, you remain
obligated to ensure that it is available for as long as needed to
satisfy these requirements.
@item
Convey the object code using peer-to-peer transmission, provided you
inform other peers where the object code and Corresponding Source of
the work are being offered to the general public at no charge under
subsection 6d.
@end enumerate
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A ``User Product'' is either (1) a ``consumer product'', which means any
tangible personal property which is normally used for personal,
family, or household purposes, or (2) anything designed or sold for
incorporation into a dwelling. In determining whether a product is a
consumer product, doubtful cases shall be resolved in favor of
coverage. For a particular product received by a particular user,
``normally used'' refers to a typical or common use of that class of
product, regardless of the status of the particular user or of the way
in which the particular user actually uses, or expects or is expected
to use, the product. A product is a consumer product regardless of
whether the product has substantial commercial, industrial or
non-consumer uses, unless such uses represent the only significant
mode of use of the product.
``Installation Information'' for a User Product means any methods,
procedures, authorization keys, or other information required to
install and execute modified versions of a covered work in that User
Product from a modified version of its Corresponding Source. The
information must suffice to ensure that the continued functioning of
the modified object code is in no case prevented or interfered with
solely because modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or
updates for a work that has been modified or installed by the
recipient, or for the User Product in which it has been modified or
installed. Access to a network may be denied when the modification
itself materially and adversely affects the operation of the network
or violates the rules and protocols for communication across the
network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
@item Additional Terms.
``Additional permissions'' are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders
of that material) supplement the terms of this License with terms:
@enumerate a
@item
Disclaiming warranty or limiting liability differently from the terms
of sections 15 and 16 of this License; or
@item
Requiring preservation of specified reasonable legal notices or author
attributions in that material or in the Appropriate Legal Notices
displayed by works containing it; or
@item
Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
@item
Limiting the use for publicity purposes of names of licensors or
authors of the material; or
@item
Declining to grant rights under trademark law for use of some trade
names, trademarks, or service marks; or
@item
Requiring indemnification of licensors and authors of that material by
anyone who conveys the material (or modified versions of it) with
contractual assumptions of liability to the recipient, for any
liability that these contractual assumptions directly impose on those
licensors and authors.
@end enumerate
All other non-permissive additional terms are considered ``further
restrictions'' within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions; the
above requirements apply either way.
@item Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your license
from a particular copyright holder is reinstated (a) provisionally,
unless and until the copyright holder explicitly and finally
terminates your license, and (b) permanently, if the copyright holder
fails to notify you of the violation by some reasonable means prior to
60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
@item Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run
a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
@item Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An ``entity transaction'' is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
@item Patents.
A ``contributor'' is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's ``contributor version''.
A contributor's ``essential patent claims'' are all patent claims owned
or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, ``control'' includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a ``patent license'' is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To ``grant'' such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. ``Knowingly relying'' means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is ``discriminatory'' if it does not include within the
scope of its coverage, prohibits the exercise of, or is conditioned on
the non-exercise of one or more of the rights that are specifically
granted under this License. You may not convey a covered work if you
are a party to an arrangement with a third party that is in the
business of distributing software, under which you make payment to the
third party based on the extent of your activity of conveying the
work, and under which the third party grants, to any of the parties
who would receive the covered work from you, a discriminatory patent
license (a) in connection with copies of the covered work conveyed by
you (or copies made from those copies), or (b) primarily for and in
connection with specific products or compilations that contain the
covered work, unless you entered into that arrangement, or that patent
license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
@item No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey
a covered work so as to satisfy simultaneously your obligations under
this License and any other pertinent obligations, then as a
consequence you may not convey it at all. For example, if you agree
to terms that obligate you to collect a royalty for further conveying
from those to whom you convey the Program, the only way you could
satisfy both those terms and this License would be to refrain entirely
from conveying the Program.
@item Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
@item Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions
of the GNU General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies that a certain numbered version of the GNU General Public
License ``or any later version'' applies to it, you have the option of
following the terms and conditions either of that numbered version or
of any later version published by the Free Software Foundation. If
the Program does not specify a version number of the GNU General
Public License, you may choose any version ever published by the Free
Software Foundation.
If the Program specifies that a proxy can decide which future versions
of the GNU General Public License can be used, that proxy's public
statement of acceptance of a version permanently authorizes you to
choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
@item Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
CORRECTION.
@item Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
@item Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
@end enumerate
@heading END OF TERMS AND CONDITIONS
@heading How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the ``copyright'' line and a pointer to where the full notice is found.
@smallexample
@var{one line to give the program's name and a brief idea of what it does.}
Copyright (C) @var{year} @var{name of author}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see @url{http://www.gnu.org/licenses/}.
@end smallexample
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
@smallexample
@var{program} Copyright (C) @var{year} @var{name of author}
This program comes with ABSOLUTELY NO WARRANTY; for details type @samp{show w}.
This is free software, and you are welcome to redistribute it
under certain conditions; type @samp{show c} for details.
@end smallexample
The hypothetical commands @samp{show w} and @samp{show c} should show
the appropriate parts of the General Public License. Of course, your
program's commands might be different; for a GUI interface, you would
use an ``about box''.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a ``copyright disclaimer'' for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
@url{http://www.gnu.org/licenses/}.
The GNU General Public License does not permit incorporating your
program into proprietary programs. If your program is a subroutine
library, you may consider it more useful to permit linking proprietary
applications with the library. If this is what you want to do, use
the GNU Lesser General Public License instead of this License. But
first, please read @url{http://www.gnu.org/philosophy/why-not-lgpl.html}.

View File

@@ -1,41 +0,0 @@
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

@@ -1,422 +0,0 @@
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

@@ -1,38 +0,0 @@
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

@@ -1,117 +0,0 @@
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

@@ -1,66 +0,0 @@
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

@@ -1,44 +0,0 @@
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

@@ -1,76 +0,0 @@
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

@@ -1,56 +0,0 @@
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

@@ -1,60 +0,0 @@
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

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

View File

@@ -1,51 +0,0 @@
* 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

@@ -1,188 +0,0 @@
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)

File diff suppressed because it is too large Load Diff

View File

@@ -1,98 +0,0 @@
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

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

View File

@@ -1,5 +0,0 @@
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

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

View File

@@ -1,15 +0,0 @@
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

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

View File

@@ -1,70 +0,0 @@
-*- 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

@@ -1,556 +0,0 @@
-*- 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,25 +0,0 @@
-*- Autoconf -*-
# C++ skeleton dispatching for Bison.
# 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
# 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_glr_if( [m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.cc]])])
b4_nondeterministic_if([m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.cc]])])
m4_define_default([b4_used_skeleton], [b4_pkgdatadir/[lalr1.cc]])
m4_define_default([b4_skeleton], ["b4_basename(b4_used_skeleton)"])
m4_include(b4_used_skeleton)

View File

@@ -1,170 +0,0 @@
-*- 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,25 +0,0 @@
-*- Autoconf -*-
# C skeleton dispatching for Bison.
# 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
# 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_glr_if( [m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.c]])])
b4_nondeterministic_if([m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.c]])])
m4_define_default([b4_used_skeleton], [b4_pkgdatadir/[yacc.c]])
m4_define_default([b4_skeleton], ["b4_basename(b4_used_skeleton)"])
m4_include(b4_used_skeleton)

View File

@@ -1,477 +0,0 @@
-*- 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
])

File diff suppressed because it is too large Load Diff

View File

@@ -1,377 +0,0 @@
-*- 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)

View File

@@ -1,25 +0,0 @@
-*- Autoconf -*-
# Java skeleton dispatching for Bison.
# Copyright (C) 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/>.
b4_glr_if( [b4_complain([%%glr-parser not supported for Java])])
b4_nondeterministic_if([b4_complain([%%nondeterministic-parser not supported for Java])])
m4_define_default([b4_used_skeleton], [b4_pkgdatadir/[lalr1.java]])
m4_define_default([b4_skeleton], ["b4_basename(b4_used_skeleton)"])
m4_include(b4_used_skeleton)

View File

@@ -1,303 +0,0 @@
-*- Autoconf -*-
# Java language support for Bison
# Copyright (C) 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/>.
# b4_comment(TEXT)
# ----------------
m4_define([b4_comment], [/* m4_bpatsubst([$1], [
], [
]) */])
# b4_list2(LIST1, LIST2)
# --------------------------
# Join two lists with a comma if necessary.
m4_define([b4_list2],
[$1[]m4_ifval(m4_quote($1), [m4_ifval(m4_quote($2), [[, ]])])[]$2])
# b4_percent_define_get3(DEF, PRE, POST, NOT)
# -------------------------------------------
# Expand to the value of DEF surrounded by PRE and POST if it's %define'ed,
# otherwise NOT.
m4_define([b4_percent_define_get3],
[m4_ifval(m4_quote(b4_percent_define_get([$1])),
[$2[]b4_percent_define_get([$1])[]$3], [$4])])
# b4_flag_value(BOOLEAN-FLAG)
# ---------------------------
m4_define([b4_flag_value], [b4_flag_if([$1], [true], [false])])
# b4_public_if(TRUE, FALSE)
# -------------------------
b4_percent_define_default([[public]], [[false]])
m4_define([b4_public_if],
[b4_percent_define_flag_if([public], [$1], [$2])])
# b4_abstract_if(TRUE, FALSE)
# ---------------------------
b4_percent_define_default([[abstract]], [[false]])
m4_define([b4_abstract_if],
[b4_percent_define_flag_if([abstract], [$1], [$2])])
# b4_final_if(TRUE, FALSE)
# ---------------------------
b4_percent_define_default([[final]], [[false]])
m4_define([b4_final_if],
[b4_percent_define_flag_if([final], [$1], [$2])])
# b4_strictfp_if(TRUE, FALSE)
# ---------------------------
b4_percent_define_default([[strictfp]], [[false]])
m4_define([b4_strictfp_if],
[b4_percent_define_flag_if([strictfp], [$1], [$2])])
# b4_lexer_if(TRUE, FALSE)
# ------------------------
m4_define([b4_lexer_if],
[b4_percent_code_ifdef([[lexer]], [$1], [$2])])
# b4_identification
# -----------------
m4_define([b4_identification],
[ /** Version number for the Bison executable that generated this parser. */
public static final String bisonVersion = "b4_version";
/** Name of the skeleton that generated this parser. */
public static final String bisonSkeleton = b4_skeleton;
])
## ------------ ##
## 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($@, [-128], [127]), [1], [byte],
b4_ints_in($@, [-32768], [32767]), [1], [short],
[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_null
# -------
m4_define([b4_null], [null])
## ------------------------- ##
## Assigning token numbers. ##
## ------------------------- ##
# b4_token_enum(TOKEN-NAME, TOKEN-NUMBER)
# ---------------------------------------
# Output the definition of this token as an enum.
m4_define([b4_token_enum],
[ /** Token number, to be returned by the scanner. */
public static final int $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. */
m4_map([b4_token_enum], [$@])])
])
# b4-case(ID, CODE)
# -----------------
# We need to fool Java's stupid unreachable code detection.
m4_define([b4_case], [ case $1:
if (yyn == $1)
$2;
break;
])
## ---------------- ##
## Default values. ##
## ---------------- ##
m4_define([b4_yystype], [b4_percent_define_get([[stype]])])
b4_percent_define_default([[stype]], [[Object]])])
# %name-prefix
m4_define_default([b4_prefix], [[YY]])
b4_percent_define_default([[parser_class_name]], [b4_prefix[]Parser])])
m4_define([b4_parser_class_name], [b4_percent_define_get([[parser_class_name]])])
b4_percent_define_default([[lex_throws]], [[java.io.IOException]])])
m4_define([b4_lex_throws], [b4_percent_define_get([[lex_throws]])])
b4_percent_define_default([[throws]], [])])
m4_define([b4_throws], [b4_percent_define_get([[throws]])])
b4_percent_define_default([[location_type]], [Location])])
m4_define([b4_location_type], [b4_percent_define_get([[location_type]])])
b4_percent_define_default([[position_type]], [Position])])
m4_define([b4_position_type], [b4_percent_define_get([[position_type]])])
## ----------------- ##
## Semantic Values. ##
## ----------------- ##
# b4_lhs_value([TYPE])
# --------------------
# Expansion of $<TYPE>$.
m4_define([b4_lhs_value], [yyval])
# b4_rhs_value(RULE-LENGTH, NUM, [TYPE])
# --------------------------------------
# Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
# symbols on RHS.
#
# In this simple implementation, %token and %type have class names
# between the angle brackets.
m4_define([b4_rhs_value],
[(m4_ifval($3, [($3)])[](yystack.valueAt ($1-($2))))])
# 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],
[yystack.locationAt ($1-($2))])
# b4_lex_param
# b4_parse_param
# --------------
# If defined, b4_lex_param arrives double quoted, but below we prefer
# it to be single quoted. Same for b4_parse_param.
# TODO: should be in bison.m4
m4_define_default([b4_lex_param], [[]]))
m4_define([b4_lex_param], b4_lex_param))
m4_define([b4_parse_param], b4_parse_param))
# b4_lex_param_decl
# -------------------
# Extra formal arguments of the constructor.
m4_define([b4_lex_param_decl],
[m4_ifset([b4_lex_param],
[b4_remove_comma([$1],
b4_param_decls(b4_lex_param))],
[$1])])
m4_define([b4_param_decls],
[m4_map([b4_param_decl], [$@])])
m4_define([b4_param_decl], [, $1])
m4_define([b4_remove_comma], [m4_ifval(m4_quote($1), [$1, ], [])m4_shift2($@)])
# b4_parse_param_decl
# -------------------
# Extra formal arguments of the constructor.
m4_define([b4_parse_param_decl],
[m4_ifset([b4_parse_param],
[b4_remove_comma([$1],
b4_param_decls(b4_parse_param))],
[$1])])
# b4_lex_param_call
# -------------------
# Delegating the lexer parameters to the lexer constructor.
m4_define([b4_lex_param_call],
[m4_ifset([b4_lex_param],
[b4_remove_comma([$1],
b4_param_calls(b4_lex_param))],
[$1])])
m4_define([b4_param_calls],
[m4_map([b4_param_call], [$@])])
m4_define([b4_param_call], [, $2])
# b4_parse_param_cons
# -------------------
# Extra initialisations of the constructor.
m4_define([b4_parse_param_cons],
[m4_ifset([b4_parse_param],
[b4_constructor_calls(b4_parse_param)])])
m4_define([b4_constructor_calls],
[m4_map([b4_constructor_call], [$@])])
m4_define([b4_constructor_call],
[this.$2 = $2;
])
# b4_parse_param_vars
# -------------------
# Extra instance variables.
m4_define([b4_parse_param_vars],
[m4_ifset([b4_parse_param],
[
/* User arguments. */
b4_var_decls(b4_parse_param)])])
m4_define([b4_var_decls],
[m4_map_sep([b4_var_decl], [
], [$@])])
m4_define([b4_var_decl],
[ protected final $1;])
# b4_maybe_throws(THROWS)
# -----------------------
# Expand to either an empty string or "throws THROWS".
m4_define([b4_maybe_throws],
[m4_ifval($1, [throws $1])])

File diff suppressed because it is too large Load Diff

View File

@@ -1,880 +0,0 @@
# Java skeleton for Bison -*- autoconf -*-
# Copyright (C) 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/[java.m4])
b4_defines_if([b4_fatal([%s: %%defines does not make sense in Java], [b4_skeleton])])
m4_ifval(m4_defn([b4_symbol_destructors]),
[b4_fatal([%s: %%destructor does not make sense in Java], [b4_skeleton])],
[])
m4_divert_push(0)dnl
@output(b4_parser_file_name@)
b4_copyright([Skeleton implementation for Bison LALR(1) parsers in Java],
[2007, 2008])
b4_percent_define_ifdef([package], [package b4_percent_define_get([package]);
])[/* First part of user declarations. */
]b4_pre_prologue
b4_percent_code_get([[imports]])
[/**
* A Bison parser, automatically generated from <tt>]m4_bpatsubst(b4_file_name, [^"\(.*\)"$], [\1])[</tt>.
*
* @@author LALR (1) parser skeleton written by Paolo Bonzini.
*/
]b4_public_if([public ])dnl
b4_abstract_if([abstract ])dnl
b4_final_if([final ])dnl
b4_strictfp_if([strictfp ])dnl
[class ]b4_parser_class_name[]dnl
b4_percent_define_get3([extends], [ extends ])dnl
b4_percent_define_get3([implements], [ implements ])[
{
]b4_identification[
/** True if verbose error messages are enabled. */
public boolean errorVerbose = ]b4_flag_value([error_verbose]);
b4_locations_if([[
/**
* A class defining a pair of positions. Positions, defined by the
* <code>]b4_position_type[</code> class, denote a point in the input.
* Locations represent a part of the input through the beginning
* and ending positions. */
public class ]b4_location_type[ {
/** The first, inclusive, position in the range. */
public ]b4_position_type[ begin;
/** The first position beyond the range. */
public ]b4_position_type[ end;
/**
* Create a <code>]b4_location_type[</code> denoting an empty range located at
* a given point.
* @@param loc The position at which the range is anchored. */
public ]b4_location_type[ (]b4_position_type[ loc) {
this.begin = this.end = loc;
}
/**
* Create a <code>]b4_location_type[</code> from the endpoints of the range.
* @@param begin The first position included in the range.
* @@param end The first position beyond the range. */
public ]b4_location_type[ (]b4_position_type[ begin, ]b4_position_type[ end) {
this.begin = begin;
this.end = end;
}
/**
* Print a representation of the location. For this to be correct,
* <code>]b4_position_type[</code> should override the <code>equals</code>
* method. */
public String toString () {
if (begin.equals (end))
return begin.toString ();
else
return begin.toString () + "-" + end.toString ();
}
}
]])
[ /** Token returned by the scanner to signal the end of its input. */
public static final int EOF = 0;]
b4_token_enums(b4_tokens)
b4_locations_if([[
private ]b4_location_type[ yylloc (YYStack rhs, int n)
{
if (n > 0)
return new ]b4_location_type[ (rhs.locationAt (1).begin, rhs.locationAt (n).end);
else
return new ]b4_location_type[ (rhs.locationAt (0).end);
}]])[
/**
* Communication interface between the scanner and the Bison-generated
* parser <tt>]b4_parser_class_name[</tt>.
*/
public interface Lexer {
]b4_locations_if([[/**
* Method to retrieve the beginning position of the last scanned token.
* @@return the position at which the last scanned token starts. */
]b4_position_type[ getStartPos ();
/**
* Method to retrieve the ending position of the last scanned token.
* @@return the first position beyond the last scanned token. */
]b4_position_type[ getEndPos ();]])[
/**
* Method to retrieve the semantic value of the last scanned token.
* @@return the semantic value of the last scanned token. */
]b4_yystype[ getLVal ();
/**
* Entry point for the scanner. Returns the token identifier corresponding
* to the next token and prepares to return the semantic value
* ]b4_locations_if([and beginning/ending positions ])[of the token.
* @@return the token identifier corresponding to the next token. */
int yylex () ]b4_maybe_throws([b4_lex_throws])[;
/**
* Entry point for error reporting. Emits an error
* ]b4_locations_if([referring to the given location ])[in a user-defined way.
*
* ]b4_locations_if([[@@param loc The location of the element to which the
* error message is related]])[
* @@param s The string for the error message. */
void yyerror (]b4_locations_if([b4_location_type[ loc, ]])[String s);]
}
b4_lexer_if([[private class YYLexer implements Lexer {
]b4_percent_code_get([[lexer]])[
}
]])[/** The object doing lexical analysis for us. */
private Lexer yylexer;
]
b4_parse_param_vars
b4_lexer_if([[
/**
* Instantiates the Bison-generated parser.
*/
public ]b4_parser_class_name (b4_parse_param_decl([b4_lex_param_decl])[) {
this.yylexer = new YYLexer(]b4_lex_param_call[);
]b4_parse_param_cons[
}
]])
/**
* Instantiates the Bison-generated parser.
* @@param yylexer The scanner that will supply tokens to the parser.
*/
b4_lexer_if([[protected]], [[public]]) b4_parser_class_name[ (]b4_parse_param_decl([[Lexer yylexer]])[) {
this.yylexer = yylexer;
]b4_parse_param_cons[
}
private java.io.PrintStream yyDebugStream = System.err;
/**
* Return the <tt>PrintStream</tt> on which the debugging output is
* printed.
*/
public final java.io.PrintStream getDebugStream () { return yyDebugStream; }
/**
* Set the <tt>PrintStream</tt> on which the debug output is printed.
* @@param s The stream that is used for debugging output.
*/
public final void setDebugStream(java.io.PrintStream s) { yyDebugStream = s; }
private int yydebug = 0;
/**
* Answer the verbosity of the debugging output; 0 means that all kinds of
* output from the parser are suppressed.
*/
public final int getDebugLevel() { return yydebug; }
/**
* Set the verbosity of the debugging output; 0 means that all kinds of
* output from the parser are suppressed.
* @@param level The verbosity level for debugging output.
*/
public final void setDebugLevel(int level) { yydebug = level; }
private final int yylex () ]b4_maybe_throws([b4_lex_throws]) [{
return yylexer.yylex ();
}
protected final void yyerror (]b4_locations_if([b4_location_type[ loc, ]])[String s) {
yylexer.yyerror (]b4_locations_if([loc, ])[s);
}
]b4_locations_if([
protected final void yyerror (String s) {
yylexer.yyerror ((]b4_location_type[)null, s);
}
protected final void yyerror (]b4_position_type[ loc, String s) {
yylexer.yyerror (new ]b4_location_type[ (loc), s);
}])
[protected final void yycdebug (String s) {
if (yydebug > 0)
yyDebugStream.println (s);
}
private final class YYStack {
private int[] stateStack = new int[16];
]b4_locations_if([[private ]b4_location_type[[] locStack = new ]b4_location_type[[16];]])[
private ]b4_yystype[[] valueStack = new ]b4_yystype[[16];
public int size = 16;
public int height = -1;
public final void push (int state, ]b4_yystype[ value]dnl
b4_locations_if([, ]b4_location_type[ loc])[) {
height++;
if (size == height)
{
int[] newStateStack = new int[size * 2];
System.arraycopy (stateStack, 0, newStateStack, 0, height);
stateStack = newStateStack;
]b4_locations_if([[
]b4_location_type[[] newLocStack = new ]b4_location_type[[size * 2];
System.arraycopy (locStack, 0, newLocStack, 0, height);
locStack = newLocStack;]])
b4_yystype[[] newValueStack = new ]b4_yystype[[size * 2];
System.arraycopy (valueStack, 0, newValueStack, 0, height);
valueStack = newValueStack;
size *= 2;
}
stateStack[height] = state;
]b4_locations_if([[locStack[height] = loc;]])[
valueStack[height] = value;
}
public final void pop () {
height--;
}
public final void pop (int num) {
// Avoid memory leaks... garbage collection is a white lie!
if (num > 0) {
java.util.Arrays.fill (valueStack, height - num + 1, height, null);
]b4_locations_if([[java.util.Arrays.fill (locStack, height - num + 1, height, null);]])[
}
height -= num;
}
public final int stateAt (int i) {
return stateStack[height - i];
}
]b4_locations_if([[public final ]b4_location_type[ locationAt (int i) {
return locStack[height - i];
}
]])[public final ]b4_yystype[ valueAt (int i) {
return valueStack[height - i];
}
// Print the state stack on the debug stream.
public void print (java.io.PrintStream out)
{
out.print ("Stack now");
for (int i = 0; i < height; i++)
{
out.print (' ');
out.print (stateStack[i]);
}
out.println ();
}
}
/**
* Returned by a Bison action in order to stop the parsing process and
* return success (<tt>true</tt>). */
public static final int YYACCEPT = 0;
/**
* Returned by a Bison action in order to stop the parsing process and
* return failure (<tt>false</tt>). */
public static final int YYABORT = 1;
/**
* Returned by a Bison action in order to start error recovery without
* printing an error message. */
public static final int YYERROR = 2;
/**
* Returned by a Bison action in order to print an error message and start
* error recovery. */
public static final int YYFAIL = 3;
private static final int YYNEWSTATE = 4;
private static final int YYDEFAULT = 5;
private static final int YYREDUCE = 6;
private static final int YYERRLAB1 = 7;
private static final int YYRETURN = 8;
private int yyerrstatus_ = 0;
/**
* Return whether error recovery is being done. In this state, the parser
* reads token until it reaches a known state, and then restarts normal
* operation. */
public final boolean recovering ()
{
return yyerrstatus_ == 0;
}
private int yyaction (int yyn, YYStack yystack, int yylen) ]b4_maybe_throws([b4_throws])[
{
]b4_yystype[ yyval;
]b4_locations_if([b4_location_type[ yyloc = yylloc (yystack, yylen);]])[
/* If YYLEN is nonzero, implement the default value of the action:
`$$ = $1'. Otherwise, use the top of the stack.
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
users should not rely upon it. */
if (yylen > 0)
yyval = yystack.valueAt (yylen - 1);
else
yyval = yystack.valueAt (0);
yy_reduce_print (yyn, yystack);
switch (yyn)
{
]b4_user_actions[
default: break;
}
yy_symbol_print ("-> $$ =", yyr1_[yyn], yyval]b4_locations_if([, yyloc])[);
yystack.pop (yylen);
yylen = 0;
/* Shift the result of the reduction. */
yyn = yyr1_[yyn];
int yystate = yypgoto_[yyn - yyntokens_] + yystack.stateAt (0);
if (0 <= yystate && yystate <= yylast_
&& yycheck_[yystate] == yystack.stateAt (0))
yystate = yytable_[yystate];
else
yystate = yydefgoto_[yyn - yyntokens_];
yystack.push (yystate, yyval]b4_locations_if([, yyloc])[);
return YYNEWSTATE;
}
/* Return YYSTR after stripping away unnecessary quotes and
backslashes, so that it's suitable for yyerror. The heuristic is
that double-quoting is unnecessary unless the string contains an
apostrophe, a comma, or backslash (other than backslash-backslash).
YYSTR is taken from yytname. */
private final String yytnamerr_ (String yystr)
{
if (yystr.charAt (0) == '"')
{
StringBuffer yyr = new StringBuffer ();
strip_quotes: for (int i = 1; i < yystr.length (); i++)
switch (yystr.charAt (i))
{
case '\'':
case ',':
break strip_quotes;
case '\\':
if (yystr.charAt(++i) != '\\')
break strip_quotes;
/* Fall through. */
default:
yyr.append (yystr.charAt (i));
break;
case '"':
return yyr.toString ();
}
}
else if (yystr.equals ("$end"))
return "end of input";
return yystr;
}
/*--------------------------------.
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
private void yy_symbol_print (String s, int yytype,
]b4_yystype[ yyvaluep]dnl
b4_locations_if([, Object yylocationp])[)
{
if (yydebug > 0)
yycdebug (s + (yytype < yyntokens_ ? " token " : " nterm ")
+ yytname_[yytype] + " ("]b4_locations_if([
+ yylocationp + ": "])[
+ (yyvaluep == null ? "(null)" : yyvaluep.toString ()) + ")");
}
/**
* Parse input from the scanner that was specified at object construction
* time. Return whether the end of the input was reached successfully.
*
* @@return <tt>true</tt> if the parsing succeeds. Note that this does not
* imply that there were no syntax errors.
*/
public boolean parse () ]b4_maybe_throws([b4_list2([b4_lex_throws], [b4_throws])])[
{
/// Lookahead and lookahead in internal form.
int yychar = yyempty_;
int yytoken = 0;
/* State. */
int yyn = 0;
int yylen = 0;
int yystate = 0;
YYStack yystack = new YYStack ();
/* Error handling. */
int yynerrs_ = 0;
]b4_locations_if([/// The location where the error started.
]b4_location_type[ yyerrloc = null;
/// ]b4_location_type[ of the lookahead.
]b4_location_type[ yylloc = new ]b4_location_type[ (null, null);
/// @@$.
]b4_location_type[ yyloc;])
/// Semantic value of the lookahead.
b4_yystype[ yylval = null;
int yyresult;
yycdebug ("Starting parse\n");
yyerrstatus_ = 0;
]m4_ifdef([b4_initial_action], [
m4_pushdef([b4_at_dollar], [yylloc])dnl
m4_pushdef([b4_dollar_dollar], [yylval])dnl
/* User initialization code. */
b4_user_initial_action
m4_popdef([b4_dollar_dollar])dnl
m4_popdef([b4_at_dollar])])dnl
[ /* Initialize the stack. */
yystack.push (yystate, yylval]b4_locations_if([, yylloc])[);
int label = YYNEWSTATE;
for (;;)
switch (label)
{
/* New state. Unlike in the C/C++ skeletons, the state is already
pushed when we come here. */
case YYNEWSTATE:
yycdebug ("Entering state " + yystate + "\n");
if (yydebug > 0)
yystack.print (yyDebugStream);
/* Accept? */
if (yystate == yyfinal_)
return true;
/* Take a decision. First try without lookahead. */
yyn = yypact_[yystate];
if (yyn == yypact_ninf_)
{
label = YYDEFAULT;
break;
}
/* Read a lookahead token. */
if (yychar == yyempty_)
{
yycdebug ("Reading a token: ");
yychar = yylex ();]
b4_locations_if([[
yylloc = new ]b4_location_type[(yylexer.getStartPos (),
yylexer.getEndPos ());]])
yylval = yylexer.getLVal ();[
}
/* Convert token to internal form. */
if (yychar <= EOF)
{
yychar = yytoken = EOF;
yycdebug ("Now at end of input.\n");
}
else
{
yytoken = yytranslate_ (yychar);
yy_symbol_print ("Next token is", yytoken,
yylval]b4_locations_if([, yylloc])[);
}
/* If the proper action on seeing token YYTOKEN is to reduce or to
detect an error, take that action. */
yyn += yytoken;
if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yytoken)
label = YYDEFAULT;
/* <= 0 means reduce or error. */
else if ((yyn = yytable_[yyn]) <= 0)
{
if (yyn == 0 || yyn == yytable_ninf_)
label = YYFAIL;
else
{
yyn = -yyn;
label = YYREDUCE;
}
}
else
{
/* Shift the lookahead token. */
yy_symbol_print ("Shifting", yytoken,
yylval]b4_locations_if([, yylloc])[);
/* Discard the token being shifted. */
yychar = yyempty_;
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus_ > 0)
--yyerrstatus_;
yystate = yyn;
yystack.push (yystate, yylval]b4_locations_if([, yylloc])[);
label = YYNEWSTATE;
}
break;
/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state. |
`-----------------------------------------------------------*/
case YYDEFAULT:
yyn = yydefact_[yystate];
if (yyn == 0)
label = YYFAIL;
else
label = YYREDUCE;
break;
/*-----------------------------.
| yyreduce -- Do a reduction. |
`-----------------------------*/
case YYREDUCE:
yylen = yyr2_[yyn];
label = yyaction (yyn, yystack, yylen);
yystate = yystack.stateAt (0);
break;
/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
case YYFAIL:
/* If not already recovering from an error, report this error. */
if (yyerrstatus_ == 0)
{
++yynerrs_;
yyerror (]b4_locations_if([yylloc, ])[yysyntax_error (yystate, yytoken));
}
]b4_locations_if([yyerrloc = yylloc;])[
if (yyerrstatus_ == 3)
{
/* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= EOF)
{
/* Return failure if at end of input. */
if (yychar == EOF)
return false;
}
else
yychar = yyempty_;
}
/* Else will try to reuse lookahead token after shifting the error
token. */
label = YYERRLAB1;
break;
/*---------------------------------------------------.
| errorlab -- error raised explicitly by YYERROR. |
`---------------------------------------------------*/
case YYERROR:
]b4_locations_if([yyerrloc = yystack.locationAt (yylen - 1);])[
/* Do not reclaim the symbols of the rule which action triggered
this YYERROR. */
yystack.pop (yylen);
yylen = 0;
yystate = yystack.stateAt (0);
label = YYERRLAB1;
break;
/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
case YYERRLAB1:
yyerrstatus_ = 3; /* Each real token shifted decrements this. */
for (;;)
{
yyn = yypact_[yystate];
if (yyn != yypact_ninf_)
{
yyn += yyterror_;
if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_)
{
yyn = yytable_[yyn];
if (0 < yyn)
break;
}
}
/* Pop the current state because it cannot handle the error token. */
if (yystack.height == 1)
return false;
]b4_locations_if([yyerrloc = yystack.locationAt (0);])[
yystack.pop ();
yystate = yystack.stateAt (0);
if (yydebug > 0)
yystack.print (yyDebugStream);
}
]b4_locations_if([
/* Muck with the stack to setup for yylloc. */
yystack.push (0, null, yylloc);
yystack.push (0, null, yyerrloc);
yyloc = yylloc (yystack, 2);
yystack.pop (2);])[
/* Shift the error token. */
yy_symbol_print ("Shifting", yystos_[yyn],
yylval]b4_locations_if([, yyloc])[);
yystate = yyn;
yystack.push (yyn, yylval]b4_locations_if([, yyloc])[);
label = YYNEWSTATE;
break;
/* Accept. */
case YYACCEPT:
return true;
/* Abort. */
case YYABORT:
return false;
}
}
// Generate an error message.
private String yysyntax_error (int yystate, int tok)
{
if (errorVerbose)
{
int yyn = yypact_[yystate];
if (yypact_ninf_ < yyn && yyn <= yylast_)
{
StringBuffer res;
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */
int yyxbegin = yyn < 0 ? -yyn : 0;
/* Stay within bounds of both yycheck and yytname. */
int yychecklim = yylast_ - yyn + 1;
int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
int count = 0;
for (int x = yyxbegin; x < yyxend; ++x)
if (yycheck_[x + yyn] == x && x != yyterror_)
++count;
// FIXME: This method of building the message is not compatible
// with internationalization.
res = new StringBuffer ("syntax error, unexpected ");
res.append (yytnamerr_ (yytname_[tok]));
if (count < 5)
{
count = 0;
for (int x = yyxbegin; x < yyxend; ++x)
if (yycheck_[x + yyn] == x && x != yyterror_)
{
res.append (count++ == 0 ? ", expecting " : " or ");
res.append (yytnamerr_ (yytname_[x]));
}
}
return res.toString ();
}
}
return "syntax error";
}
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
private static final ]b4_int_type_for([b4_pact])[ yypact_ninf_ = ]b4_pact_ninf[;
private static final ]b4_int_type_for([b4_pact])[ yypact_[] =
{
]b4_pact[
};
/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
doesn't specify something else to do. Zero means the default is an
error. */
private static final ]b4_int_type_for([b4_defact])[ yydefact_[] =
{
]b4_defact[
};
/* YYPGOTO[NTERM-NUM]. */
private static final ]b4_int_type_for([b4_pgoto])[ yypgoto_[] =
{
]b4_pgoto[
};
/* YYDEFGOTO[NTERM-NUM]. */
private static final ]b4_int_type_for([b4_defgoto])[
yydefgoto_[] =
{
]b4_defgoto[
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says. */
private static final ]b4_int_type_for([b4_table])[ yytable_ninf_ = ]b4_table_ninf[;
private static final ]b4_int_type_for([b4_table])[
yytable_[] =
{
]b4_table[
};
/* YYCHECK. */
private static final ]b4_int_type_for([b4_check])[
yycheck_[] =
{
]b4_check[
};
/* STOS_[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
private static final ]b4_int_type_for([b4_stos])[
yystos_[] =
{
]b4_stos[
};
/* TOKEN_NUMBER_[YYLEX-NUM] -- Internal symbol number corresponding
to YYLEX-NUM. */
private static final ]b4_int_type_for([b4_toknum])[
yytoken_number_[] =
{
]b4_toknum[
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
private static final ]b4_int_type_for([b4_r1])[
yyr1_[] =
{
]b4_r1[
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
private static final ]b4_int_type_for([b4_r2])[
yyr2_[] =
{
]b4_r2[
};
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at \a yyntokens_, nonterminals. */
private static final String yytname_[] =
{
]b4_tname[
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
private static final ]b4_int_type_for([b4_rhs])[ yyrhs_[] =
{
]b4_rhs[
};
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
YYRHS. */
private static final ]b4_int_type_for([b4_prhs])[ yyprhs_[] =
{
]b4_prhs[
};
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
private static final ]b4_int_type_for([b4_rline])[ yyrline_[] =
{
]b4_rline[
};
// Report on the debug stream that the rule yyrule is going to be reduced.
private void yy_reduce_print (int yyrule, YYStack yystack)
{
if (yydebug == 0)
return;
int yylno = yyrline_[yyrule];
int yynrhs = yyr2_[yyrule];
/* Print the symbols being reduced, and their result. */
yycdebug ("Reducing stack by rule " + (yyrule - 1)
+ " (line " + yylno + "), ");
/* The symbols being reduced. */
for (int yyi = 0; yyi < yynrhs; yyi++)
yy_symbol_print (" $" + (yyi + 1) + " =",
yyrhs_[yyprhs_[yyrule] + yyi],
]b4_rhs_value(yynrhs, yyi + 1)b4_locations_if([,
b4_rhs_location(yynrhs, yyi + 1)])[);
}
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
private static final ]b4_int_type_for([b4_translate])[ yytranslate_table_[] =
{
]b4_translate[
};
private static final ]b4_int_type_for([b4_translate])[ yytranslate_ (int t)
{
if (t >= 0 && t <= yyuser_token_number_max_)
return yytranslate_table_[t];
else
return yyundef_token_;
}
private static final int yylast_ = ]b4_last[;
private static final int yynnts_ = ]b4_nterms_number[;
private static final int yyempty_ = -2;
private static final int yyfinal_ = ]b4_final_state_number[;
private static final int yyterror_ = 1;
private static final int yyerrcode_ = 256;
private static final int yyntokens_ = ]b4_tokens_number[;
private static final int yyuser_token_number_max_ = ]b4_user_token_number_max[;
private static final int yyundef_token_ = ]b4_undef_token_number[;
]/* User implementation code. */
b4_percent_code_get[]dnl
}
b4_epilogue
m4_divert_pop(0)dnl

View File

@@ -1,275 +0,0 @@
# C++ 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/>.
# We do want M4 expansion after # for CPP macros.
m4_changecom()
m4_divert_push(0)dnl
@output(b4_dir_prefix[]position.hh@)
b4_copyright([Positions for Bison parsers in C++],
[2002, 2003, 2004, 2005, 2006])[
/**
** \file position.hh
** Define the ]b4_namespace_ref[::position class.
*/
#ifndef BISON_POSITION_HH
# define BISON_POSITION_HH
# include <iostream>
# include <string>
# include <algorithm>
]b4_namespace_open[
/// Abstract a position.
class position
{
public:
]m4_ifdef([b4_location_constructors], [
/// Construct a position.
position ()
: filename (0), line (]b4_location_initial_line[), column (]b4_location_initial_column[)
{
}
])[
/// Initialization.
inline void initialize (]b4_percent_define_get([[filename_type]])[* fn)
{
filename = fn;
line = ]b4_location_initial_line[;
column = ]b4_location_initial_column[;
}
/** \name Line and Column related manipulators
** \{ */
public:
/// (line related) Advance to the COUNT next lines.
inline void lines (int count = 1)
{
column = ]b4_location_initial_column[;
line += count;
}
/// (column related) Advance to the COUNT next columns.
inline void columns (int count = 1)
{
column = std::max (]b4_location_initial_column[u, column + count);
}
/** \} */
public:
/// File name to which this position refers.
]b4_percent_define_get([[filename_type]])[* filename;
/// Current line number.
unsigned int line;
/// Current column number.
unsigned int column;
};
/// Add and assign a position.
inline const position&
operator+= (position& res, const int width)
{
res.columns (width);
return res;
}
/// Add two position objects.
inline const position
operator+ (const position& begin, const int width)
{
position res = begin;
return res += width;
}
/// Add and assign a position.
inline const position&
operator-= (position& res, const int width)
{
return res += -width;
}
/// Add two position objects.
inline const position
operator- (const position& begin, const int width)
{
return begin + -width;
}
]b4_percent_define_flag_if([[define_location_comparison]], [[
/// Compare two position objects.
inline bool
operator== (const position& pos1, const position& pos2)
{
return
(pos1.filename == pos2.filename
|| pos1.filename && pos2.filename && *pos1.filename == *pos2.filename)
&& pos1.line == pos2.line && pos1.column == pos2.column;
}
/// 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
*/
inline std::ostream&
operator<< (std::ostream& ostr, const position& pos)
{
if (pos.filename)
ostr << *pos.filename << ':';
return ostr << pos.line << '.' << pos.column;
}
]b4_namespace_close[
#endif // not BISON_POSITION_HH]
@output(b4_dir_prefix[]location.hh@)
b4_copyright([Locations for Bison parsers in C++],
[2002, 2003, 2004, 2005, 2006])[
/**
** \file location.hh
** Define the ]b4_namespace_ref[::location class.
*/
#ifndef BISON_LOCATION_HH
# define BISON_LOCATION_HH
# include <iostream>
# include <string>
# include "position.hh"
]b4_namespace_open[
/// Abstract a location.
class location
{
public:
]m4_ifdef([b4_location_constructors], [
/// Construct a location.
location ()
: begin (), end ()
{
}
])[
/// Initialization.
inline void initialize (]b4_percent_define_get([[filename_type]])[* fn)
{
begin.initialize (fn);
end = begin;
}
/** \name Line and Column related manipulators
** \{ */
public:
/// Reset initial location to final location.
inline void step ()
{
begin = end;
}
/// Extend the current location to the COUNT next columns.
inline void columns (unsigned int count = 1)
{
end += count;
}
/// Extend the current location to the COUNT next lines.
inline void lines (unsigned 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 const location operator+ (const location& begin, const location& end)
{
location res = begin;
res.end = end.end;
return res;
}
/// Add two location objects.
inline const location operator+ (const location& begin, unsigned int width)
{
location res = begin;
res.columns (width);
return res;
}
/// Add and assign a location.
inline location& operator+= (location& res, unsigned int width)
{
res.columns (width);
return res;
}
]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.
*/
inline std::ostream& operator<< (std::ostream& ostr, const location& loc)
{
position last = loc.end - 1;
ostr << loc.begin;
if (last.filename
&& (!loc.begin.filename
|| *loc.begin.filename != *last.filename))
ostr << '-' << last;
else if (loc.begin.line != last.line)
ostr << '-' << last.line << '.' << last.column;
else if (loc.begin.column != last.column)
ostr << '-' << last.column;
return ostr;
}
]b4_namespace_close[
#endif // not BISON_LOCATION_HH]
m4_divert_pop(0)
m4_changecom([#])

View File

@@ -1,400 +0,0 @@
# -*- Autoconf -*-
# This file is part of Autoconf.
# foreach-based replacements for recursive functions.
# Speeds up GNU M4 1.4.x by avoiding quadratic $@ recursion, but penalizes
# GNU M4 1.6 by requiring more memory and macro expansions.
#
# Copyright (C) 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/>.
# As a special exception, the Free Software Foundation gives unlimited
# permission to copy, distribute and modify the configure scripts that
# are the output of Autoconf. You need not follow the terms of the GNU
# General Public License when using or distributing such scripts, even
# though portions of the text of Autoconf appear in them. The GNU
# General Public License (GPL) does govern all other use of the material
# that constitutes the Autoconf program.
#
# Certain portions of the Autoconf source text are designed to be copied
# (in certain cases, depending on the input) into the output of
# Autoconf. We call these the "data" portions. The rest of the Autoconf
# source text consists of comments plus executable code that decides which
# of the data portions to output in any given case. We call these
# comments and executable code the "non-data" portions. Autoconf never
# copies any of the non-data portions into its output.
#
# This special exception to the GPL applies to versions of Autoconf
# released by the Free Software Foundation. When you make and
# distribute a modified version of Autoconf, you may extend this special
# exception to the GPL to apply to your modified version as well, *unless*
# your modified version has the potential to copy into its output some
# of the text that was the non-data portion of the version that you started
# with. (In other words, unless your change moves or copies text from
# the non-data portions to the data portions.) If your modification has
# such potential, you must delete any notice of this special exception
# to the GPL from your modified version.
#
# Written by Eric Blake.
#
# In M4 1.4.x, every byte of $@ is rescanned. This means that an
# algorithm on n arguments that recurses with one less argument each
# iteration will scan n * (n + 1) / 2 arguments, for O(n^2) time. In
# M4 1.6, this was fixed so that $@ is only scanned once, then
# back-references are made to information stored about the scan.
# Thus, n iterations need only scan n arguments, for O(n) time.
# Additionally, in M4 1.4.x, recursive algorithms did not clean up
# memory very well, requiring O(n^2) memory rather than O(n) for n
# iterations.
#
# This file is designed to overcome the quadratic nature of $@
# recursion by writing a variant of m4_foreach that uses m4_for rather
# than $@ recursion to operate on the list. This involves more macro
# expansions, but avoids the need to rescan a quadratic number of
# arguments, making these replacements very attractive for M4 1.4.x.
# On the other hand, in any version of M4, expanding additional macros
# costs additional time; therefore, in M4 1.6, where $@ recursion uses
# fewer macros, these replacements actually pessimize performance.
# Additionally, the use of $10 to mean the tenth argument violates
# POSIX; although all versions of m4 1.4.x support this meaning, a
# future m4 version may switch to take it as the first argument
# concatenated with a literal 0, so the implementations in this file
# are not future-proof. Thus, this file is conditionally included as
# part of m4_init(), only when it is detected that M4 probably has
# quadratic behavior (ie. it lacks the macro __m4_version__).
#
# Please keep this file in sync with m4sugar.m4.
# m4_foreach(VARIABLE, LIST, EXPRESSION)
# --------------------------------------
# Expand EXPRESSION assigning each value of the LIST to VARIABLE.
# LIST should have the form `item_1, item_2, ..., item_n', i.e. the
# whole list must *quoted*. Quote members too if you don't want them
# to be expanded.
#
# This version minimizes the number of times that $@ is evaluated by
# using m4_for to generate a boilerplate into VARIABLE then passing $@
# to that temporary macro. Thus, the recursion is done in m4_for
# without reparsing any user input, and is not quadratic. For an idea
# of how this works, note that m4_foreach(i,[1,2],[i]) defines i to be
# m4_define([$1],[$3])$2[]m4_define([$1],[$4])$2[]m4_popdef([i])
# then calls i([i],[i],[1],[2]).
m4_define([m4_foreach],
[m4_if([$2], [], [], [_$0([$1], [$3], $2)])])
m4_define([_m4_foreach],
[m4_define([$1], m4_pushdef([$1])_m4_for([$1], [3], [$#], [1],
[$0_([1], [2], _m4_defn([$1]))])[m4_popdef([$1])])m4_indir([$1], $@)])
m4_define([_m4_foreach_],
[[m4_define([$$1], [$$3])$$2[]]])
# m4_case(SWITCH, VAL1, IF-VAL1, VAL2, IF-VAL2, ..., DEFAULT)
# -----------------------------------------------------------
# Find the first VAL that SWITCH matches, and expand the corresponding
# IF-VAL. If there are no matches, expand DEFAULT.
#
# Use m4_for to create a temporary macro in terms of a boilerplate
# m4_if with final cleanup. If $# is even, we have DEFAULT; if it is
# odd, then rounding the last $# up in the temporary macro is
# harmless. For example, both m4_case(1,2,3,4,5) and
# m4_case(1,2,3,4,5,6) result in the intermediate _m4_case being
# m4_if([$1],[$2],[$3],[$1],[$4],[$5],_m4_popdef([_m4_case])[$6])
m4_define([m4_case],
[m4_if(m4_eval([$# <= 2]), [1], [$2],
[m4_pushdef([_$0], [m4_if(]m4_for([_m4_count], [2], m4_decr([$#]), [2],
[_$0_([1], _m4_count, m4_incr(_m4_count))])[_m4_popdef(
[_$0])]m4_dquote($m4_eval([($# + 1) & ~1]))[)])_$0($@)])])
m4_define([_m4_case_],
[[[$$1],[$$2],[$$3],]])
# m4_bmatch(SWITCH, RE1, VAL1, RE2, VAL2, ..., DEFAULT)
# -----------------------------------------------------
# m4 equivalent of
#
# if (SWITCH =~ RE1)
# VAL1;
# elif (SWITCH =~ RE2)
# VAL2;
# elif ...
# ...
# else
# DEFAULT
#
# We build the temporary macro _m4_b:
# m4_define([_m4_b], _m4_defn([_m4_bmatch]))_m4_b([$1], [$2], [$3])...
# _m4_b([$1], [$m-1], [$m])_m4_b([], [], [$m+1]_m4_popdef([_m4_b]))
# then invoke m4_unquote(_m4_b($@)), for concatenation with later text.
m4_define([m4_bmatch],
[m4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])],
[$#], 1, [m4_fatal([$0: too few arguments: $#: $1])],
[$#], 2, [$2],
[m4_define([_m4_b], m4_pushdef([_m4_b])[m4_define([_m4_b],
_m4_defn([_$0]))]_m4_for([_m4_b], [3], m4_eval([($# + 1) / 2 * 2 - 1]),
[2], [_$0_([1], m4_decr(_m4_b), _m4_b)])[_m4_b([], [],]m4_dquote(
[$]m4_incr(_m4_b))[_m4_popdef([_m4_b]))])m4_unquote(_m4_b($@))])])
m4_define([_m4_bmatch],
[m4_if(m4_bregexp([$1], [$2]), [-1], [], [[$3]m4_define([$0])])])
m4_define([_m4_bmatch_],
[[_m4_b([$$1], [$$2], [$$3])]])
# m4_cond(TEST1, VAL1, IF-VAL1, TEST2, VAL2, IF-VAL2, ..., [DEFAULT])
# -------------------------------------------------------------------
# Similar to m4_if, except that each TEST is expanded when encountered.
# If the expansion of TESTn matches the string VALn, the result is IF-VALn.
# The result is DEFAULT if no tests passed. This macro allows
# short-circuiting of expensive tests, where it pays to arrange quick
# filter tests to run first.
#
# m4_cond already guarantees either 3*n or 3*n + 1 arguments, 1 <= n.
# We only have to speed up _m4_cond, by building the temporary _m4_c:
# m4_define([_m4_c], _m4_defn([m4_unquote]))_m4_c([m4_if(($1), [($2)],
# [[$3]m4_define([_m4_c])])])_m4_c([m4_if(($4), [($5)],
# [[$6]m4_define([_m4_c])])])..._m4_c([m4_if(($m-2), [($m-1)],
# [[$m]m4_define([_m4_c])])])_m4_c([[$m+1]]_m4_popdef([_m4_c]))
# We invoke m4_unquote(_m4_c($@)), for concatenation with later text.
m4_define([_m4_cond],
[m4_define([_m4_c], m4_pushdef([_m4_c])[m4_define([_m4_c],
_m4_defn([m4_unquote]))]_m4_for([_m4_c], [2], m4_eval([$# / 3 * 3 - 1]), [3],
[$0_(m4_decr(_m4_c), _m4_c, m4_incr(_m4_c))])[_m4_c(]m4_dquote(m4_dquote(
[$]m4_eval([$# / 3 * 3 + 1])))[_m4_popdef([_m4_c]))])m4_unquote(_m4_c($@))])
m4_define([_m4_cond_],
[[_m4_c([m4_if(($$1), [($$2)], [[$$3]m4_define([_m4_c])])])]])
# m4_bpatsubsts(STRING, RE1, SUBST1, RE2, SUBST2, ...)
# ----------------------------------------------------
# m4 equivalent of
#
# $_ = STRING;
# s/RE1/SUBST1/g;
# s/RE2/SUBST2/g;
# ...
#
# m4_bpatsubsts already validated an odd number of arguments; we only
# need to speed up _m4_bpatsubsts. To avoid nesting, we build the
# temporary _m4_p:
# m4_define([_m4_p], [$1])m4_define([_m4_p],
# m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$2], [$3]))m4_define([_m4_p],
# m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$4], [$5]))m4_define([_m4_p],...
# m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$m-1], [$m]))m4_unquote(
# _m4_defn([_m4_p])_m4_popdef([_m4_p]))
m4_define([_m4_bpatsubsts],
[m4_define([_m4_p], m4_pushdef([_m4_p])[m4_define([_m4_p],
]m4_dquote([$]1)[)]_m4_for([_m4_p], [3], [$#], [2], [$0_(m4_decr(_m4_p),
_m4_p)])[m4_unquote(_m4_defn([_m4_p])_m4_popdef([_m4_p]))])_m4_p($@)])
m4_define([_m4_bpatsubsts_],
[[m4_define([_m4_p],
m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$$1], [$$2]))]])
# m4_shiftn(N, ...)
# -----------------
# Returns ... shifted N times. Useful for recursive "varargs" constructs.
#
# m4_shiftn already validated arguments; we only need to speed up
# _m4_shiftn. If N is 3, then we build the temporary _m4_s, defined as
# ,[$5],[$6],...,[$m]_m4_popdef([_m4_s])
# before calling m4_shift(_m4_s($@)).
m4_define([_m4_shiftn],
[m4_if(m4_incr([$1]), [$#], [], [m4_define([_m4_s],
m4_pushdef([_m4_s])_m4_for([_m4_s], m4_eval([$1 + 2]), [$#], [1],
[[,]m4_dquote([$]_m4_s)])[_m4_popdef([_m4_s])])m4_shift(_m4_s($@))])])
# m4_do(STRING, ...)
# ------------------
# This macro invokes all its arguments (in sequence, of course). It is
# useful for making your macros more structured and readable by dropping
# unnecessary dnl's and have the macros indented properly.
#
# Here, we use the temporary macro _m4_do, defined as
# $1[]$2[]...[]$n[]_m4_popdef([_m4_do])
m4_define([m4_do],
[m4_if([$#], [0], [],
[m4_define([_$0], m4_pushdef([_$0])_m4_for([_$0], [1], [$#], [1],
[$_$0[[]]])[_m4_popdef([_$0])])_$0($@)])])
# m4_dquote_elt(ARGS)
# -------------------
# Return ARGS as an unquoted list of double-quoted arguments.
#
# m4_foreach to the rescue. It's easier to shift off the leading comma.
m4_define([m4_dquote_elt],
[m4_shift(m4_foreach([_m4_elt], [$@], [,m4_dquote(_m4_defn([_m4_elt]))]))])
# m4_reverse(ARGS)
# ----------------
# Output ARGS in reverse order.
#
# Invoke _m4_r($@) with the temporary _m4_r built as
# [$m], [$m-1], ..., [$2], [$1]_m4_popdef([_m4_r])
m4_define([m4_reverse],
[m4_if([$#], [0], [], [$#], [1], [[$1]],
[m4_define([_m4_r], m4_dquote([$$#])m4_pushdef([_m4_r])_m4_for([_m4_r],
m4_decr([$#]), [1], [-1],
[[, ]m4_dquote([$]_m4_r)])[_m4_popdef([_m4_r])])_m4_r($@)])])
# m4_map(MACRO, LIST)
# -------------------
# Invoke MACRO($1), MACRO($2) etc. where $1, $2... are the elements
# of LIST. $1, $2... must in turn be lists, appropriate for m4_apply.
#
# m4_map/m4_map_sep only execute once; the speedup comes in fixing
# _m4_map. The mismatch in () is intentional, since $1 supplies the
# opening `(' (but it sure looks odd!). Build the temporary _m4_m:
# $1, [$3])$1, [$4])...$1, [$m])_m4_popdef([_m4_m])
m4_define([_m4_map],
[m4_if([$#], [2], [],
[m4_define([_m4_m], m4_pushdef([_m4_m])_m4_for([_m4_m], [3], [$#], [1],
[$0_([1], _m4_m)])[_m4_popdef([_m4_m])])_m4_m($@)])])
m4_define([_m4_map_],
[[$$1, [$$2])]])
# m4_transform(EXPRESSION, ARG...)
# --------------------------------
# Expand EXPRESSION([ARG]) for each argument. More efficient than
# m4_foreach([var], [ARG...], [EXPRESSION(m4_defn([var]))])
#
# Invoke the temporary macro _m4_transform, defined as:
# $1([$2])[]$1([$3])[]...$1([$m])[]_m4_popdef([_m4_transform])
m4_define([m4_transform],
[m4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])],
[$#], [1], [],
[m4_define([_$0], m4_pushdef([_$0])_m4_for([_$0], [2], [$#], [1],
[_$0_([1], _$0)])[_m4_popdef([_$0])])_$0($@)])])
m4_define([_m4_transform_],
[[$$1([$$2])[]]])
# m4_transform_pair(EXPRESSION, [END-EXPR = EXPRESSION], ARG...)
# --------------------------------------------------------------
# Perform a pairwise grouping of consecutive ARGs, by expanding
# EXPRESSION([ARG1], [ARG2]). If there are an odd number of ARGs, the
# final argument is expanded with END-EXPR([ARGn]).
#
# Build the temporary macro _m4_transform_pair, with the $2([$m+1])
# only output if $# is odd:
# $1([$3], [$4])[]$1([$5], [$6])[]...$1([$m-1],
# [$m])[]m4_default([$2], [$1])([$m+1])[]_m4_popdef([_m4_transform_pair])
m4_define([m4_transform_pair],
[m4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])],
[$#], [1], [m4_fatal([$0: too few arguments: $#: $1])],
[$#], [2], [],
[$#], [3], [m4_default([$2], [$1])([$3])[]],
[m4_define([_$0], m4_pushdef([_$0])_m4_for([_$0], [3],
m4_eval([$# / 2 * 2 - 1]), [2], [_$0_([1], _$0, m4_incr(_$0))])_$0_end(
[1], [2], [$#])[_m4_popdef([_$0])])_$0($@)])])
m4_define([_m4_transform_pair_],
[[$$1([$$2], [$$3])[]]])
m4_define([_m4_transform_pair_end],
[m4_if(m4_eval([$3 & 1]), [1], [[m4_default([$$2], [$$1])([$$3])[]]])])
# m4_join(SEP, ARG1, ARG2...)
# ---------------------------
# Produce ARG1SEPARG2...SEPARGn. Avoid back-to-back SEP when a given ARG
# is the empty string. No expansion is performed on SEP or ARGs.
#
# Use a self-modifying separator, since we don't know how many
# arguments might be skipped before a separator is first printed, but
# be careful if the separator contains $. m4_foreach to the rescue.
m4_define([m4_join],
[m4_pushdef([_m4_sep], [m4_define([_m4_sep], _m4_defn([m4_echo]))])]dnl
[m4_foreach([_m4_arg], [m4_shift($@)],
[m4_ifset([_m4_arg], [_m4_sep([$1])_m4_defn([_m4_arg])])])]dnl
[_m4_popdef([_m4_sep])])
# m4_joinall(SEP, ARG1, ARG2...)
# ------------------------------
# Produce ARG1SEPARG2...SEPARGn. An empty ARG results in back-to-back SEP.
# No expansion is performed on SEP or ARGs.
#
# A bit easier than m4_join. m4_foreach to the rescue.
m4_define([m4_joinall],
[[$2]m4_if(m4_eval([$# <= 2]), [1], [],
[m4_foreach([_m4_arg], [m4_shift2($@)],
[[$1]_m4_defn([_m4_arg])])])])
# m4_list_cmp(A, B)
# -----------------
# Compare the two lists of integer expressions A and B.
#
# m4_list_cmp takes care of any side effects; we only override
# _m4_list_cmp_raw, where we can safely expand lists multiple times.
# First, insert padding so that both lists are the same length; the
# trailing +0 is necessary to handle a missing list. Next, create a
# temporary macro to perform pairwise comparisons until an inequality
# is found. For example, m4_list_cmp([1], [1,2]) creates _m4_cmp as
# m4_if(m4_eval([($1) != ($3)]), [1], [m4_cmp([$1], [$3])],
# m4_eval([($2) != ($4)]), [1], [m4_cmp([$2], [$4])],
# [0]_m4_popdef([_m4_cmp], [_m4_size]))
# then calls _m4_cmp([1+0], [0], [1], [2+0])
m4_define([_m4_list_cmp_raw],
[m4_if([$1], [$2], 0, [m4_pushdef(
[_m4_size])_m4_list_cmp($1+0_m4_list_pad(m4_count($1), m4_count($2)),
$2+0_m4_list_pad(m4_count($2), m4_count($1)))])])
m4_define([_m4_list_pad],
[m4_if(m4_eval($1 < $2), [1],
[_m4_for([_m4_size], m4_incr([$1]), [$2], [1], [,0])])])
m4_define([_m4_list_cmp],
[m4_define([_m4_size], m4_eval([$# >> 1]))]dnl
[m4_define([_m4_cmp], m4_pushdef([_m4_cmp])[m4_if(]_m4_for([_m4_cmp],
[1], _m4_size, [1], [$0_(_m4_cmp, m4_eval(_m4_cmp + _m4_size))])[
[0]_m4_popdef([_m4_cmp], [_m4_size]))])_m4_cmp($@)])
m4_define([_m4_list_cmp_],
[[m4_eval([($$1) != ($$2)]), [1], [m4_cmp([$$1], [$$2])],
]])
# m4_max(EXPR, ...)
# m4_min(EXPR, ...)
# -----------------
# Return the decimal value of the maximum (or minimum) in a series of
# integer expressions.
#
# m4_foreach to the rescue; we only need to replace _m4_minmax. Here,
# we need a temporary macro to track the best answer so far, so that
# the foreach expression is tractable.
m4_define([_m4_minmax],
[m4_pushdef([_m4_best], m4_eval([$2]))m4_foreach([_m4_arg], [m4_shift2($@)],
[m4_define([_m4_best], $1(_m4_best, _m4_defn([_m4_arg])))])]dnl
[_m4_best[]_m4_popdef([_m4_best])])
# m4_set_add_all(SET, VALUE...)
# -----------------------------
# Add each VALUE into SET. This is O(n) in the number of VALUEs, and
# can be faster than calling m4_set_add for each VALUE.
#
# m4_foreach to the rescue. If no deletions have occurred, then avoid
# the speed penalty of m4_set_add.
m4_define([m4_set_add_all],
[m4_if([$#], [0], [], [$#], [1], [],
[m4_define([_m4_set_size($1)], m4_eval(m4_set_size([$1])
+ m4_len(m4_foreach([_m4_arg], [m4_shift($@)],
m4_ifdef([_m4_set_cleanup($1)],
[[m4_set_add([$1], _m4_defn([_m4_arg]))]],
[[m4_ifdef([_m4_set([$1],]_m4_defn([_m4_arg])[)], [],
[m4_define([_m4_set([$1],]_m4_defn([_m4_arg])[)],
[1])m4_pushdef([_m4_set([$1])],
_m4_defn([_m4_arg]))-])]])))))])])

File diff suppressed because it is too large Load Diff

View File

@@ -1,93 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
bison.xsl - common templates for Bison XSLT.
Copyright (C) 2007, 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/>.
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:bison="http://www.gnu.org/software/bison/">
<xsl:key
name="bison:symbolByName"
match="/bison-xml-report/grammar/nonterminals/nonterminal"
use="@name"
/>
<xsl:key
name="bison:symbolByName"
match="/bison-xml-report/grammar/terminals/terminal"
use="@name"
/>
<xsl:key
name="bison:ruleByNumber"
match="/bison-xml-report/grammar/rules/rule"
use="@number"
/>
<xsl:key
name="bison:ruleByLhs"
match="/bison-xml-report/grammar/rules/rule[
@usefulness != 'useless-in-grammar']"
use="lhs"
/>
<xsl:key
name="bison:ruleByRhs"
match="/bison-xml-report/grammar/rules/rule[
@usefulness != 'useless-in-grammar']"
use="rhs/symbol"
/>
<!-- For the specified state, output: #sr-conflicts,#rr-conflicts -->
<xsl:template match="state" mode="bison:count-conflicts">
<xsl:variable name="transitions" select="actions/transitions"/>
<xsl:variable name="reductions" select="actions/reductions"/>
<xsl:variable
name="terminals"
select="
$transitions/transition[@type='shift']/@symbol
| $reductions/reduction/@symbol
"
/>
<xsl:variable name="conflict-data">
<xsl:for-each select="$terminals">
<xsl:variable name="name" select="."/>
<xsl:if test="generate-id($terminals[. = $name][1]) = generate-id(.)">
<xsl:variable
name="shift-count"
select="count($transitions/transition[@symbol=$name])"
/>
<xsl:variable
name="reduce-count"
select="count($reductions/reduction[@symbol=$name])"
/>
<xsl:if test="$shift-count > 0 and $reduce-count > 0">
<xsl:text>s</xsl:text>
</xsl:if>
<xsl:if test="$reduce-count > 1">
<xsl:text>r</xsl:text>
</xsl:if>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:value-of select="string-length(translate($conflict-data, 'r', ''))"/>
<xsl:text>,</xsl:text>
<xsl:value-of select="string-length(translate($conflict-data, 's', ''))"/>
</xsl:template>
</xsl:stylesheet>

View File

@@ -1,206 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
xml2dot.xsl - transform Bison XML Report into DOT.
Copyright (C) 2007, 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/>.
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:apply-templates select="automaton"/>
</xsl:template>
<xsl:template match="automaton">
<xsl:text>digraph Automaton {&#10;</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:value-of select="@number"/>
<xsl:apply-templates select="itemset/item"/>
</xsl:with-param>
</xsl:call-template>
<xsl:apply-templates select="actions/transitions"/>
</xsl:template>
<xsl:template match="actions/transitions">
<xsl:apply-templates select="transition"/>
</xsl:template>
<xsl:template match="item">
<xsl:apply-templates select="key('bison:ruleByNumber', @rule-number)">
<xsl:with-param name="point" select="@point"/>
</xsl:apply-templates>
<xsl:apply-templates select="lookaheads"/>
</xsl:template>
<xsl:template match="rule">
<xsl:param name="point"/>
<xsl:text>&#10;</xsl:text>
<xsl:value-of select="lhs"/>
<xsl:text> -&gt;</xsl:text>
<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 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:call-template name="escape">
<xsl:with-param name="subject" select="$label"/>
</xsl:call-template>
<xsl:text>"]&#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="'\n'"/>
</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:stylesheet>

View File

@@ -1,581 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
xml2text.xsl - transform Bison XML Report into plain text.
Copyright (C) 2007, 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/>.
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:apply-templates select="grammar" mode="reductions"/>
<xsl:apply-templates select="grammar" mode="useless-in-parser"/>
<xsl:apply-templates select="automaton" mode="conflicts"/>
<xsl:apply-templates select="grammar"/>
<xsl:apply-templates select="automaton"/>
</xsl:template>
<xsl:template match="grammar" mode="reductions">
<xsl:apply-templates select="nonterminals" mode="useless-in-grammar"/>
<xsl:apply-templates select="terminals" mode="unused-in-grammar"/>
<xsl:apply-templates select="rules" mode="useless-in-grammar"/>
</xsl:template>
<xsl:template match="nonterminals" mode="useless-in-grammar">
<xsl:if test="nonterminal[@usefulness='useless-in-grammar']">
<xsl:text>Nonterminals useless in grammar&#10;&#10;</xsl:text>
<xsl:for-each select="nonterminal[@usefulness='useless-in-grammar']">
<xsl:text> </xsl:text>
<xsl:value-of select="@name"/>
<xsl:text>&#10;</xsl:text>
</xsl:for-each>
<xsl:text>&#10;&#10;</xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="terminals" mode="unused-in-grammar">
<xsl:if test="terminal[@usefulness='unused-in-grammar']">
<xsl:text>Terminals unused in grammar&#10;&#10;</xsl:text>
<xsl:for-each select="terminal[@usefulness='unused-in-grammar']">
<xsl:sort select="@symbol-number" data-type="number"/>
<xsl:text> </xsl:text>
<xsl:value-of select="@name"/>
<xsl:text>&#10;</xsl:text>
</xsl:for-each>
<xsl:text>&#10;&#10;</xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="rules" mode="useless-in-grammar">
<xsl:variable name="set" select="rule[@usefulness='useless-in-grammar']"/>
<xsl:if test="$set">
<xsl:text>Rules useless in grammar&#10;</xsl:text>
<xsl:call-template name="style-rule-set">
<xsl:with-param name="rule-set" select="$set"/>
</xsl:call-template>
<xsl:text>&#10;&#10;</xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="grammar" mode="useless-in-parser">
<xsl:variable
name="set" select="rules/rule[@usefulness='useless-in-parser']"
/>
<xsl:if test="$set">
<xsl:text>Rules useless in parser due to conflicts&#10;</xsl:text>
<xsl:call-template name="style-rule-set">
<xsl:with-param name="rule-set" select="$set"/>
</xsl:call-template>
<xsl:text>&#10;&#10;</xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="grammar">
<xsl:text>Grammar&#10;</xsl:text>
<xsl:call-template name="style-rule-set">
<xsl:with-param
name="rule-set" select="rules/rule[@usefulness!='useless-in-grammar']"
/>
</xsl:call-template>
<xsl:text>&#10;&#10;</xsl:text>
<xsl:apply-templates select="terminals"/>
<xsl:apply-templates select="nonterminals"/>
</xsl:template>
<xsl:template name="style-rule-set">
<xsl:param name="rule-set"/>
<xsl:for-each select="$rule-set">
<xsl:apply-templates select=".">
<xsl:with-param name="pad" select="'3'"/>
<xsl:with-param name="prev-lhs">
<xsl:if test="position()>1">
<xsl:variable name="position" select="position()"/>
<xsl:value-of select="$rule-set[$position - 1]/lhs"/>
</xsl:if>
</xsl:with-param>
</xsl:apply-templates>
</xsl:for-each>
</xsl:template>
<xsl:template match="grammar/terminals">
<xsl:text>Terminals, with rules where they appear&#10;&#10;</xsl:text>
<xsl:apply-templates select="terminal"/>
<xsl:text>&#10;&#10;</xsl:text>
</xsl:template>
<xsl:template match="grammar/nonterminals">
<xsl:text>Nonterminals, with rules where they appear&#10;&#10;</xsl:text>
<xsl:apply-templates select="nonterminal[@usefulness!='useless-in-grammar']"/>
</xsl:template>
<xsl:template match="terminal">
<xsl:value-of select="@name"/>
<xsl:call-template name="line-wrap">
<xsl:with-param name="first-line-length">
<xsl:choose>
<xsl:when test="string-length(@name) &gt; 66">0</xsl:when>
<xsl:otherwise>
<xsl:value-of select="66 - string-length(@name)" />
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
<xsl:with-param name="line-length" select="66" />
<xsl:with-param name="text">
<xsl:value-of select="concat(' (', @token-number, ')')"/>
<xsl:for-each select="key('bison:ruleByRhs', @name)">
<xsl:value-of select="concat(' ', @number)"/>
</xsl:for-each>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="nonterminal">
<xsl:value-of select="@name"/>
<xsl:value-of select="concat(' (', @symbol-number, ')')"/>
<xsl:text>&#10;</xsl:text>
<xsl:variable name="output">
<xsl:call-template name="line-wrap">
<xsl:with-param name="line-length" select="66" />
<xsl:with-param name="text">
<xsl:text> </xsl:text>
<xsl:if test="key('bison:ruleByLhs', @name)">
<xsl:text>on@left:</xsl:text>
<xsl:for-each select="key('bison:ruleByLhs', @name)">
<xsl:value-of select="concat(' ', @number)"/>
</xsl:for-each>
</xsl:if>
<xsl:if test="key('bison:ruleByRhs', @name)">
<xsl:if test="key('bison:ruleByLhs', @name)">
<xsl:text>, </xsl:text>
</xsl:if>
<xsl:text>on@right:</xsl:text>
<xsl:for-each select="key('bison:ruleByRhs', @name)">
<xsl:value-of select="concat(' ', @number)"/>
</xsl:for-each>
</xsl:if>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="translate($output, '@', ' ')" />
</xsl:template>
<xsl:template match="automaton" mode="conflicts">
<xsl:variable name="conflict-report">
<xsl:apply-templates select="state" mode="conflicts"/>
</xsl:variable>
<xsl:if test="string-length($conflict-report) != 0">
<xsl:value-of select="$conflict-report"/>
<xsl:text>&#10;&#10;</xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="state" mode="conflicts">
<xsl:variable name="conflict-counts">
<xsl:apply-templates select="." mode="bison:count-conflicts" />
</xsl:variable>
<xsl:variable
name="sr-count" select="substring-before($conflict-counts, ',')"
/>
<xsl:variable
name="rr-count" select="substring-after($conflict-counts, ',')"
/>
<xsl:if test="$sr-count > 0 or $rr-count > 0">
<xsl:value-of select="concat('State ', @number, ' conflicts:')"/>
<xsl:if test="$sr-count > 0">
<xsl:value-of select="concat(' ', $sr-count, ' shift/reduce')"/>
<xsl:if test="$rr-count > 0">
<xsl:value-of select="(',')"/>
</xsl:if>
</xsl:if>
<xsl:if test="$rr-count > 0">
<xsl:value-of select="concat(' ', $rr-count, ' reduce/reduce')"/>
</xsl:if>
<xsl:value-of select="'&#10;'"/>
</xsl:if>
</xsl:template>
<xsl:template match="automaton">
<xsl:apply-templates select="state">
<xsl:with-param name="pad" select="'3'"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="automaton/state">
<xsl:param name="pad"/>
<xsl:text>&#10;&#10;</xsl:text>
<xsl:text>state </xsl:text>
<xsl:value-of select="@number"/>
<xsl:text>&#10;&#10;</xsl:text>
<xsl:apply-templates select="itemset/item">
<xsl:with-param name="pad" select="$pad"/>
</xsl:apply-templates>
<xsl:apply-templates select="actions/transitions">
<xsl:with-param name="type" select="'shift'"/>
</xsl:apply-templates>
<xsl:apply-templates select="actions/errors"/>
<xsl:apply-templates select="actions/reductions"/>
<xsl:apply-templates select="actions/transitions">
<xsl:with-param name="type" select="'goto'"/>
</xsl:apply-templates>
<xsl:apply-templates select="solved-conflicts"/>
</xsl:template>
<xsl:template match="actions/transitions">
<xsl:param name="type"/>
<xsl:if test="transition[@type = $type]">
<xsl:text>&#10;</xsl:text>
<xsl:apply-templates select="transition[@type = $type]">
<xsl:with-param name="pad">
<xsl:call-template name="max-width-symbol">
<xsl:with-param name="node" select="transition[@type = $type]"/>
</xsl:call-template>
</xsl:with-param>
</xsl:apply-templates>
</xsl:if>
</xsl:template>
<xsl:template match="actions/errors">
<xsl:if test="error">
<xsl:text>&#10;</xsl:text>
<xsl:apply-templates select="error">
<xsl:with-param name="pad">
<xsl:call-template name="max-width-symbol">
<xsl:with-param name="node" select="error"/>
</xsl:call-template>
</xsl:with-param>
</xsl:apply-templates>
</xsl:if>
</xsl:template>
<xsl:template match="actions/reductions">
<xsl:if test="reduction">
<xsl:text>&#10;</xsl:text>
<xsl:apply-templates select="reduction">
<xsl:with-param name="pad">
<xsl:call-template name="max-width-symbol">
<xsl:with-param name="node" select="reduction"/>
</xsl:call-template>
</xsl:with-param>
</xsl:apply-templates>
</xsl:if>
</xsl:template>
<xsl:template match="item">
<xsl:param name="pad"/>
<xsl:param name="prev-rule-number"
select="preceding-sibling::item[1]/@rule-number"/>
<xsl:apply-templates
select="key('bison:ruleByNumber', current()/@rule-number)"
>
<xsl:with-param name="itemset" select="'true'"/>
<xsl:with-param name="pad" select="$pad"/>
<xsl:with-param
name="prev-lhs"
select="key('bison:ruleByNumber', $prev-rule-number)/lhs[text()]"
/>
<xsl:with-param name="point" select="@point"/>
<xsl:with-param name="lookaheads">
<xsl:apply-templates select="lookaheads"/>
</xsl:with-param>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="rule">
<xsl:param name="itemset"/>
<xsl:param name="pad"/>
<xsl:param name="prev-lhs"/>
<xsl:param name="point"/>
<xsl:param name="lookaheads"/>
<xsl:if test="$itemset != 'true' and not($prev-lhs = lhs[text()])">
<xsl:text>&#10;</xsl:text>
</xsl:if>
<xsl:text> </xsl:text>
<xsl:call-template name="lpad">
<xsl:with-param name="str" select="string(@number)"/>
<xsl:with-param name="pad" select="number($pad)"/>
</xsl:call-template>
<xsl:text> </xsl:text>
<!-- LHS -->
<xsl:choose>
<xsl:when test="$itemset != 'true' and $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:when test="$itemset = 'true' and $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>
<!-- RHS -->
<xsl:for-each select="rhs/*">
<xsl:if test="position() = $point + 1">
<xsl:text> .</xsl:text>
</xsl:if>
<xsl:if test="$itemset = 'true' and name(.) != 'empty'">
<xsl:apply-templates select="."/>
</xsl:if>
<xsl:if test="$itemset != 'true'">
<xsl:apply-templates select="."/>
</xsl:if>
<xsl:if test="position() = last() and position() = $point">
<xsl:text> .</xsl:text>
</xsl:if>
</xsl:for-each>
<xsl:if test="$lookaheads">
<xsl:value-of select="$lookaheads"/>
</xsl:if>
<xsl:text>&#10;</xsl:text>
</xsl:template>
<xsl:template match="symbol">
<xsl:text> </xsl:text>
<xsl:value-of select="."/>
</xsl:template>
<xsl:template match="empty">
<xsl:text> /* empty */</xsl:text>
</xsl:template>
<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 match="transition">
<xsl:param name="pad"/>
<xsl:text> </xsl:text>
<xsl:call-template name="rpad">
<xsl:with-param name="str" select="string(@symbol)"/>
<xsl:with-param name="pad" select="number($pad) + 2"/>
</xsl:call-template>
<xsl:choose>
<xsl:when test="@type = 'shift'">
<xsl:text>shift, and go to state </xsl:text>
<xsl:value-of select="@state"/>
</xsl:when>
<xsl:when test="@type = 'goto'">
<xsl:text>go to state </xsl:text>
<xsl:value-of select="@state"/>
</xsl:when>
</xsl:choose>
<xsl:text>&#10;</xsl:text>
</xsl:template>
<xsl:template match="error">
<xsl:param name="pad"/>
<xsl:text> </xsl:text>
<xsl:call-template name="rpad">
<xsl:with-param name="str" select="string(@symbol)"/>
<xsl:with-param name="pad" select="number($pad) + 2"/>
</xsl:call-template>
<xsl:text>error</xsl:text>
<xsl:text> (</xsl:text>
<xsl:value-of select="text()"/>
<xsl:text>)</xsl:text>
<xsl:text>&#10;</xsl:text>
</xsl:template>
<xsl:template match="reduction">
<xsl:param name="pad"/>
<xsl:text> </xsl:text>
<xsl:call-template name="rpad">
<xsl:with-param name="str" select="string(@symbol)"/>
<xsl:with-param name="pad" select="number($pad) + 2"/>
</xsl:call-template>
<xsl:if test="@enabled = 'false'">
<xsl:text>[</xsl:text>
</xsl:if>
<xsl:choose>
<xsl:when test="@rule = 'accept'">
<xsl:text>accept</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>reduce using rule </xsl:text>
<xsl:value-of select="@rule"/>
<xsl:text> (</xsl:text>
<xsl:value-of
select="key('bison:ruleByNumber', current()/@rule)/lhs[text()]"/>
<xsl:text>)</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="@enabled = 'false'">
<xsl:text>]</xsl:text>
</xsl:if>
<xsl:text>&#10;</xsl:text>
</xsl:template>
<xsl:template match="solved-conflicts">
<xsl:if test="resolution">
<xsl:text>&#10;</xsl:text>
<xsl:apply-templates select="resolution"/>
</xsl:if>
</xsl:template>
<xsl:template match="resolution">
<xsl:text> Conflict between rule </xsl:text>
<xsl:value-of select="@rule"/>
<xsl:text> and token </xsl:text>
<xsl:value-of select="@symbol"/>
<xsl:text> resolved as </xsl:text>
<xsl:if test="@type = 'error'">
<xsl:text>an </xsl:text>
</xsl:if>
<xsl:value-of select="@type"/>
<xsl:text> (</xsl:text>
<xsl:value-of select="."/>
<xsl:text>).&#10;</xsl:text>
</xsl:template>
<xsl:template name="max-width-symbol">
<xsl:param name="node"/>
<xsl:variable name="longest">
<xsl:for-each select="$node">
<xsl:sort data-type="number" select="string-length(@symbol)"
order="descending"/>
<xsl:if test="position() = 1">
<xsl:value-of select="string-length(@symbol)"/>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:value-of select="$longest"/>
</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:template name="rpad">
<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:value-of select="$str"/>
<xsl:call-template name="space">
<xsl:with-param name="repeat" select="$diff"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="space">
<xsl:param name="repeat">0</xsl:param>
<xsl:param name="fill" select="' '"/>
<xsl:if test="number($repeat) &gt;= 1">
<xsl:call-template name="space">
<xsl:with-param name="repeat" select="$repeat - 1"/>
<xsl:with-param name="fill" select="$fill"/>
</xsl:call-template>
<xsl:value-of select="$fill"/>
</xsl:if>
</xsl:template>
<xsl:template name="line-wrap">
<xsl:param name="line-length"/> <!-- required -->
<xsl:param name="first-line-length" select="$line-length"/>
<xsl:param name="text"/> <!-- required -->
<xsl:choose>
<xsl:when test="normalize-space($text) = ''" />
<xsl:when test="string-length($text) &lt;= $first-line-length">
<xsl:value-of select="concat($text, '&#10;')" />
</xsl:when>
<xsl:otherwise>
<xsl:variable name="break-pos">
<xsl:call-template name="ws-search">
<xsl:with-param name="text" select="$text" />
<xsl:with-param name="start" select="$first-line-length+1" />
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="substring($text, 1, $break-pos - 1)" />
<xsl:text>&#10;</xsl:text>
<xsl:call-template name="line-wrap">
<xsl:with-param name="line-length" select="$line-length" />
<xsl:with-param
name="text" select="concat(' ', substring($text, $break-pos+1))"
/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="ws-search">
<xsl:param name="text"/> <!-- required -->
<xsl:param name="start"/> <!-- required -->
<xsl:variable name="search-text" select="substring($text, $start)" />
<xsl:choose>
<xsl:when test="not(contains($search-text, ' '))">
<xsl:value-of select="string-length($text)+1" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select="$start + string-length(substring-before($search-text, ' '))"
/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>

View File

@@ -1,745 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
xml2html.xsl - transform Bison XML Report into XHTML.
Copyright (C) 2007, 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/>.
Written by Wojciech Polak <polak@gnu.org>.
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:bison="http://www.gnu.org/software/bison/">
<xsl:import href="bison.xsl"/>
<xsl:output method="xml" encoding="UTF-8"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
indent="yes"/>
<xsl:template match="/">
<html>
<head>
<title>
<xsl:value-of select="bison-xml-report/filename"/>
<xsl:text> - GNU Bison XML Automaton Report</xsl:text>
</title>
<style type="text/css"><![CDATA[
body {
font-family: "Nimbus Sans L", Arial, sans-serif;
font-size: 9pt;
}
a:link {
color: #1f00ff;
text-decoration: none;
}
a:visited {
color: #1f00ff;
text-decoration: none;
}
a:hover {
color: red;
}
#menu a {
text-decoration: underline;
}
.i {
font-style: italic;
}
.pre {
font-family: monospace;
white-space: pre;
}
ol.decimal {
list-style-type: decimal;
}
ol.lower-alpha {
list-style-type: lower-alpha;
}
.point {
color: #cc0000;
}
#footer {
margin-top: 3.5em;
font-size: 7pt;
}
]]></style>
</head>
<body>
<xsl:apply-templates select="bison-xml-report"/>
<xsl:text>&#10;&#10;</xsl:text>
<div id="footer"><hr />This document was generated using
<a href="http://www.gnu.org/software/bison/" title="GNU Bison">
GNU Bison <xsl:value-of select="/bison-xml-report/@version"/></a>
XML Automaton Report.<br />
<!-- default copying notice -->
Verbatim copying and distribution of this entire page is
permitted in any medium, provided this notice is preserved.</div>
</body>
</html>
</xsl:template>
<xsl:template match="bison-xml-report">
<h1>GNU Bison XML Automaton Report</h1>
<p>
input grammar: <span class="i"><xsl:value-of select="filename"/></span>
</p>
<xsl:text>&#10;&#10;</xsl:text>
<h3>Table of Contents</h3>
<ul id="menu">
<li>
<a href="#reductions">Reductions</a>
<ul class="lower-alpha">
<li><a href="#nonterminals_useless_in_grammar">Nonterminals useless in grammar</a></li>
<li><a href="#terminals_unused_in_grammar">Terminals unused in grammar</a></li>
<li><a href="#rules_useless_in_grammar">Rules useless in grammar</a></li>
<xsl:if test="grammar/rules/rule[@usefulness='useless-in-parser']">
<li><a href="#rules_useless_in_parser">Rules useless in parser due to conflicts</a></li>
</xsl:if>
</ul>
</li>
<li><a href="#conflicts">Conflicts</a></li>
<li>
<a href="#grammar">Grammar</a>
<ul class="lower-alpha">
<li><a href="#grammar">Itemset</a></li>
<li><a href="#terminals">Terminal symbols</a></li>
<li><a href="#nonterminals">Nonterminal symbols</a></li>
</ul>
</li>
<li><a href="#automaton">Automaton</a></li>
</ul>
<xsl:apply-templates select="grammar" mode="reductions"/>
<xsl:apply-templates select="grammar" mode="useless-in-parser"/>
<xsl:apply-templates select="automaton" mode="conflicts"/>
<xsl:apply-templates select="grammar"/>
<xsl:apply-templates select="automaton"/>
</xsl:template>
<xsl:template match="grammar" mode="reductions">
<h2>
<a name="reductions"/>
<xsl:text> Reductions</xsl:text>
</h2>
<xsl:apply-templates select="nonterminals" mode="useless-in-grammar"/>
<xsl:apply-templates select="terminals" mode="unused-in-grammar"/>
<xsl:apply-templates select="rules" mode="useless-in-grammar"/>
</xsl:template>
<xsl:template match="nonterminals" mode="useless-in-grammar">
<h3>
<a name="nonterminals_useless_in_grammar"/>
<xsl:text> Nonterminals useless in grammar</xsl:text>
</h3>
<xsl:text>&#10;&#10;</xsl:text>
<xsl:if test="nonterminal[@usefulness='useless-in-grammar']">
<p class="pre">
<xsl:for-each select="nonterminal[@usefulness='useless-in-grammar']">
<xsl:text> </xsl:text>
<xsl:value-of select="@name"/>
<xsl:text>&#10;</xsl:text>
</xsl:for-each>
<xsl:text>&#10;&#10;</xsl:text>
</p>
</xsl:if>
</xsl:template>
<xsl:template match="terminals" mode="unused-in-grammar">
<h3>
<a name="terminals_unused_in_grammar"/>
<xsl:text> Terminals unused in grammar</xsl:text>
</h3>
<xsl:text>&#10;&#10;</xsl:text>
<xsl:if test="terminal[@usefulness='unused-in-grammar']">
<p class="pre">
<xsl:for-each select="terminal[@usefulness='unused-in-grammar']">
<xsl:sort select="@symbol-number" data-type="number"/>
<xsl:text> </xsl:text>
<xsl:value-of select="@name"/>
<xsl:text>&#10;</xsl:text>
</xsl:for-each>
<xsl:text>&#10;&#10;</xsl:text>
</p>
</xsl:if>
</xsl:template>
<xsl:template match="rules" mode="useless-in-grammar">
<h3>
<a name="rules_useless_in_grammar"/>
<xsl:text> Rules useless in grammar</xsl:text>
</h3>
<xsl:text>&#10;</xsl:text>
<xsl:variable name="set" select="rule[@usefulness='useless-in-grammar']"/>
<xsl:if test="$set">
<p class="pre">
<xsl:call-template name="style-rule-set">
<xsl:with-param name="rule-set" select="$set"/>
</xsl:call-template>
<xsl:text>&#10;&#10;</xsl:text>
</p>
</xsl:if>
</xsl:template>
<xsl:template match="grammar" mode="useless-in-parser">
<xsl:variable
name="set" select="rules/rule[@usefulness='useless-in-parser']"
/>
<xsl:if test="$set">
<h2>
<a name="rules_useless_in_parser"/>
<xsl:text> Rules useless in parser due to conflicts</xsl:text>
</h2>
<xsl:text>&#10;</xsl:text>
<p class="pre">
<xsl:call-template name="style-rule-set">
<xsl:with-param name="rule-set" select="$set"/>
</xsl:call-template>
</p>
<xsl:text>&#10;&#10;</xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="grammar">
<h2>
<a name="grammar"/>
<xsl:text> Grammar</xsl:text>
</h2>
<xsl:text>&#10;</xsl:text>
<p class="pre">
<xsl:call-template name="style-rule-set">
<xsl:with-param
name="rule-set" select="rules/rule[@usefulness!='useless-in-grammar']"
/>
</xsl:call-template>
</p>
<xsl:text>&#10;&#10;</xsl:text>
<xsl:apply-templates select="terminals"/>
<xsl:apply-templates select="nonterminals"/>
</xsl:template>
<xsl:template name="style-rule-set">
<xsl:param name="rule-set"/>
<xsl:for-each select="$rule-set">
<xsl:apply-templates select=".">
<xsl:with-param name="pad" select="'3'"/>
<xsl:with-param name="prev-lhs">
<xsl:if test="position()>1">
<xsl:variable name="position" select="position()"/>
<xsl:value-of select="$rule-set[$position - 1]/lhs"/>
</xsl:if>
</xsl:with-param>
</xsl:apply-templates>
</xsl:for-each>
</xsl:template>
<xsl:template match="automaton" mode="conflicts">
<h2>
<a name="conflicts"/>
<xsl:text> Conflicts</xsl:text>
</h2>
<xsl:text>&#10;&#10;</xsl:text>
<xsl:variable name="conflict-report">
<xsl:apply-templates select="state" mode="conflicts"/>
</xsl:variable>
<xsl:if test="string-length($conflict-report) != 0">
<p class="pre">
<xsl:copy-of select="$conflict-report"/>
<xsl:text>&#10;&#10;</xsl:text>
</p>
</xsl:if>
</xsl:template>
<xsl:template match="state" mode="conflicts">
<xsl:variable name="conflict-counts">
<xsl:apply-templates select="." mode="bison:count-conflicts" />
</xsl:variable>
<xsl:variable
name="sr-count" select="substring-before($conflict-counts, ',')"
/>
<xsl:variable
name="rr-count" select="substring-after($conflict-counts, ',')"
/>
<xsl:if test="$sr-count > 0 or $rr-count > 0">
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat('#state_', @number)"/>
</xsl:attribute>
<xsl:value-of select="concat('State ', @number)"/>
</a>
<xsl:text> conflicts:</xsl:text>
<xsl:if test="$sr-count > 0">
<xsl:value-of select="concat(' ', $sr-count, ' shift/reduce')"/>
<xsl:if test="$rr-count > 0">
<xsl:value-of select="(',')"/>
</xsl:if>
</xsl:if>
<xsl:if test="$rr-count > 0">
<xsl:value-of select="concat(' ', $rr-count, ' reduce/reduce')"/>
</xsl:if>
<xsl:value-of select="'&#10;'"/>
</xsl:if>
</xsl:template>
<xsl:template match="grammar/terminals">
<h3>
<a name="terminals"/>
<xsl:text> Terminals, with rules where they appear</xsl:text>
</h3>
<xsl:text>&#10;&#10;</xsl:text>
<p class="pre">
<xsl:apply-templates select="terminal"/>
</p>
<xsl:text>&#10;&#10;</xsl:text>
</xsl:template>
<xsl:template match="grammar/nonterminals">
<h3>
<a name="nonterminals"/>
<xsl:text> Nonterminals, with rules where they appear</xsl:text>
</h3>
<xsl:text>&#10;&#10;</xsl:text>
<p class="pre">
<xsl:apply-templates
select="nonterminal[@usefulness!='useless-in-grammar']"
/>
</p>
</xsl:template>
<xsl:template match="terminal">
<b><xsl:value-of select="@name"/></b>
<xsl:value-of select="concat(' (', @token-number, ')')"/>
<xsl:for-each select="key('bison:ruleByRhs', @name)">
<xsl:apply-templates select="." mode="number-link"/>
</xsl:for-each>
<xsl:text>&#10;</xsl:text>
</xsl:template>
<xsl:template match="nonterminal">
<b><xsl:value-of select="@name"/></b>
<xsl:value-of select="concat(' (', @symbol-number, ')')"/>
<xsl:text>&#10; </xsl:text>
<xsl:if test="key('bison:ruleByLhs', @name)">
<xsl:text>on left:</xsl:text>
<xsl:for-each select="key('bison:ruleByLhs', @name)">
<xsl:apply-templates select="." mode="number-link"/>
</xsl:for-each>
</xsl:if>
<xsl:if test="key('bison:ruleByRhs', @name)">
<xsl:if test="key('bison:ruleByLhs', @name)">
<xsl:text>&#10; </xsl:text>
</xsl:if>
<xsl:text>on right:</xsl:text>
<xsl:for-each select="key('bison:ruleByRhs', @name)">
<xsl:apply-templates select="." mode="number-link"/>
</xsl:for-each>
</xsl:if>
<xsl:text>&#10;</xsl:text>
</xsl:template>
<xsl:template match="rule" mode="number-link">
<xsl:text> </xsl:text>
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat('#rule_', @number)"/>
</xsl:attribute>
<xsl:value-of select="@number"/>
</a>
</xsl:template>
<xsl:template match="automaton">
<h2>
<a name="automaton"/>
<xsl:text> Automaton</xsl:text>
</h2>
<xsl:apply-templates select="state">
<xsl:with-param name="pad" select="'3'"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="automaton/state">
<xsl:param name="pad"/>
<xsl:text>&#10;&#10;</xsl:text>
<h3>
<a>
<xsl:attribute name="name">
<xsl:value-of select="concat('state_', @number)"/>
</xsl:attribute>
</a>
<xsl:text>state </xsl:text>
<xsl:value-of select="@number"/>
</h3>
<xsl:text>&#10;&#10;</xsl:text>
<p class="pre">
<xsl:apply-templates select="itemset/item">
<xsl:with-param name="pad" select="$pad"/>
</xsl:apply-templates>
<xsl:apply-templates select="actions/transitions">
<xsl:with-param name="type" select="'shift'"/>
</xsl:apply-templates>
<xsl:apply-templates select="actions/errors"/>
<xsl:apply-templates select="actions/reductions"/>
<xsl:apply-templates select="actions/transitions">
<xsl:with-param name="type" select="'goto'"/>
</xsl:apply-templates>
<xsl:apply-templates select="solved-conflicts"/>
</p>
</xsl:template>
<xsl:template match="actions/transitions">
<xsl:param name="type"/>
<xsl:if test="transition[@type = $type]">
<xsl:text>&#10;</xsl:text>
<xsl:apply-templates select="transition[@type = $type]">
<xsl:with-param name="pad">
<xsl:call-template name="max-width-symbol">
<xsl:with-param name="node" select="transition[@type = $type]"/>
</xsl:call-template>
</xsl:with-param>
</xsl:apply-templates>
</xsl:if>
</xsl:template>
<xsl:template match="actions/errors">
<xsl:if test="error">
<xsl:text>&#10;</xsl:text>
<xsl:apply-templates select="error">
<xsl:with-param name="pad">
<xsl:call-template name="max-width-symbol">
<xsl:with-param name="node" select="error"/>
</xsl:call-template>
</xsl:with-param>
</xsl:apply-templates>
</xsl:if>
</xsl:template>
<xsl:template match="actions/reductions">
<xsl:if test="reduction">
<xsl:text>&#10;</xsl:text>
<xsl:apply-templates select="reduction">
<xsl:with-param name="pad">
<xsl:call-template name="max-width-symbol">
<xsl:with-param name="node" select="reduction"/>
</xsl:call-template>
</xsl:with-param>
</xsl:apply-templates>
</xsl:if>
</xsl:template>
<xsl:template match="item">
<xsl:param name="pad"/>
<xsl:param name="prev-rule-number"
select="preceding-sibling::item[1]/@rule-number"/>
<xsl:apply-templates
select="key('bison:ruleByNumber', current()/@rule-number)"
>
<xsl:with-param name="itemset" select="'true'"/>
<xsl:with-param name="pad" select="$pad"/>
<xsl:with-param name="prev-lhs"
select="key('bison:ruleByNumber', $prev-rule-number)/lhs[text()]"
/>
<xsl:with-param name="point" select="@point"/>
<xsl:with-param name="lookaheads">
<xsl:apply-templates select="lookaheads"/>
</xsl:with-param>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="rule">
<xsl:param name="itemset"/>
<xsl:param name="pad"/>
<xsl:param name="prev-lhs"/>
<xsl:param name="point"/>
<xsl:param name="lookaheads"/>
<xsl:if test="$itemset != 'true' and not($prev-lhs = lhs[text()])">
<xsl:text>&#10;</xsl:text>
</xsl:if>
<xsl:if test="$itemset != 'true'">
<a>
<xsl:attribute name="name">
<xsl:value-of select="concat('rule_', @number)"/>
</xsl:attribute>
</a>
</xsl:if>
<xsl:text> </xsl:text>
<xsl:choose>
<xsl:when test="$itemset = 'true'">
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat('#rule_', @number)"/>
</xsl:attribute>
<xsl:call-template name="lpad">
<xsl:with-param name="str" select="string(@number)"/>
<xsl:with-param name="pad" select="number($pad)"/>
</xsl:call-template>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="lpad">
<xsl:with-param name="str" select="string(@number)"/>
<xsl:with-param name="pad" select="number($pad)"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
<!-- LHS -->
<xsl:choose>
<xsl:when test="$itemset != 'true' and $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()])) + 2"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="$itemset = 'true' and $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()])) + 2"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<span class="i">
<xsl:value-of select="lhs"/>
</span>
<xsl:text> &#8594;</xsl:text>
</xsl:otherwise>
</xsl:choose>
<!-- RHS -->
<xsl:for-each select="rhs/*">
<xsl:if test="position() = $point + 1">
<xsl:text> </xsl:text>
<span class="point">.</span>
</xsl:if>
<xsl:if test="$itemset = 'true' and name(.) != 'empty'">
<xsl:apply-templates select="."/>
</xsl:if>
<xsl:if test="$itemset != 'true'">
<xsl:apply-templates select="."/>
</xsl:if>
<xsl:if test="position() = last() and position() = $point">
<xsl:text> </xsl:text>
<span class="point">.</span>
</xsl:if>
</xsl:for-each>
<xsl:if test="$lookaheads">
<xsl:value-of select="$lookaheads"/>
</xsl:if>
<xsl:text>&#10;</xsl:text>
</xsl:template>
<xsl:template match="symbol">
<xsl:text> </xsl:text>
<xsl:choose>
<xsl:when test="name(key('bison:symbolByName', .)) = 'nonterminal'">
<span class="i"><xsl:value-of select="."/></span>
</xsl:when>
<xsl:otherwise>
<b><xsl:value-of select="."/></b>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="empty">
<xsl:text> &#949;</xsl:text>
</xsl:template>
<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 match="transition">
<xsl:param name="pad"/>
<xsl:text> </xsl:text>
<xsl:call-template name="rpad">
<xsl:with-param name="str" select="string(@symbol)"/>
<xsl:with-param name="pad" select="number($pad) + 2"/>
</xsl:call-template>
<xsl:choose>
<xsl:when test="@type = 'shift'">
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat('#state_', @state)"/>
</xsl:attribute>
<xsl:value-of select="concat('shift, and go to state ', @state)"/>
</a>
</xsl:when>
<xsl:when test="@type = 'goto'">
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat('#state_', @state)"/>
</xsl:attribute>
<xsl:value-of select="concat('go to state ', @state)"/>
</a>
</xsl:when>
</xsl:choose>
<xsl:text>&#10;</xsl:text>
</xsl:template>
<xsl:template match="error">
<xsl:param name="pad"/>
<xsl:text> </xsl:text>
<xsl:call-template name="rpad">
<xsl:with-param name="str" select="string(@symbol)"/>
<xsl:with-param name="pad" select="number($pad) + 2"/>
</xsl:call-template>
<xsl:text>error</xsl:text>
<xsl:text> (</xsl:text>
<xsl:value-of select="text()"/>
<xsl:text>)</xsl:text>
<xsl:text>&#10;</xsl:text>
</xsl:template>
<xsl:template match="reduction">
<xsl:param name="pad"/>
<xsl:text> </xsl:text>
<xsl:call-template name="rpad">
<xsl:with-param name="str" select="string(@symbol)"/>
<xsl:with-param name="pad" select="number($pad) + 2"/>
</xsl:call-template>
<xsl:if test="@enabled = 'false'">
<xsl:text>[</xsl:text>
</xsl:if>
<xsl:choose>
<xsl:when test="@rule = 'accept'">
<xsl:text>accept</xsl:text>
</xsl:when>
<xsl:otherwise>
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat('#rule_', @rule)"/>
</xsl:attribute>
<xsl:value-of select="concat('reduce using rule ', @rule)"/>
</a>
<xsl:text> (</xsl:text>
<xsl:value-of
select="key('bison:ruleByNumber', current()/@rule)/lhs[text()]"
/>
<xsl:text>)</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="@enabled = 'false'">
<xsl:text>]</xsl:text>
</xsl:if>
<xsl:text>&#10;</xsl:text>
</xsl:template>
<xsl:template match="solved-conflicts">
<xsl:if test="resolution">
<xsl:text>&#10;</xsl:text>
<xsl:apply-templates select="resolution"/>
</xsl:if>
</xsl:template>
<xsl:template match="resolution">
<xsl:text> Conflict between </xsl:text>
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat('#rule_', @rule)"/>
</xsl:attribute>
<xsl:value-of select="concat('rule ',@rule)"/>
</a>
<xsl:text> and token </xsl:text>
<xsl:value-of select="@symbol"/>
<xsl:text> resolved as </xsl:text>
<xsl:if test="@type = 'error'">
<xsl:text>an </xsl:text>
</xsl:if>
<xsl:value-of select="@type"/>
<xsl:text> (</xsl:text>
<xsl:value-of select="."/>
<xsl:text>).&#10;</xsl:text>
</xsl:template>
<xsl:template name="max-width-symbol">
<xsl:param name="node"/>
<xsl:variable name="longest">
<xsl:for-each select="$node">
<xsl:sort data-type="number" select="string-length(@symbol)"
order="descending"/>
<xsl:if test="position() = 1">
<xsl:value-of select="string-length(@symbol)"/>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:value-of select="$longest"/>
</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:template name="rpad">
<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:value-of select="$str"/>
<xsl:call-template name="space">
<xsl:with-param name="repeat" select="$diff"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="space">
<xsl:param name="repeat">0</xsl:param>
<xsl:param name="fill" select="' '"/>
<xsl:if test="number($repeat) &gt;= 1">
<xsl:call-template name="space">
<xsl:with-param name="repeat" select="$repeat - 1"/>
<xsl:with-param name="fill" select="$fill"/>
</xsl:call-template>
<xsl:value-of select="$fill"/>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

File diff suppressed because it is too large Load Diff

View File

@@ -39,155 +39,129 @@ use warnings;
package Qt::InitRepository;
=head1 NAME
sub printUsage($)
{
my ($ex) = @_;
init-repository - initialize the Qt5 repository and all submodules
print <<EOF ;
Usage:
./init-repository [options]
=head1 SYNOPSIS
This script may be run after an initial `git clone' of Qt5 in order to
check out all submodules. It fetches them from canonical URLs inferred
from the clone's origin.
./init-repository [options]
Options:
Global options:
This script may be run after an initial `git clone' of Qt5 in order to check
out all submodules.
--force, -f
Force initialization (even if the submodules are already checked
out).
--force-hooks
Force initialization of hooks (even if there are already hooks in
checked out submodules).
=head1 OPTIONS
--quiet, -q
Be quiet. Will exit cleanly if the repository is already
initialized.
B<Global options:>
Module options:
=over
--module-subset=<module1>,<module2>...
Only initialize the specified subset of modules given as the
argument. Specified modules must already exist in .gitmodules. The
string "all" results in cloning all known modules. The strings
"essential", "addon", "preview", "deprecated", "obsolete", and
"ignore" refer to classes of modules; "default" maps to
"essential,addon,preview,deprecated", which corresponds with the
set of maintained modules and is also the default set. Module
names may be prefixed with a dash to exclude them from a bigger
set, e.g. "all,-ignore".
=item --force, -f
--no-update
Skip the `git submodule update' command.
Force initialization (even if the submodules are already checked out).
--branch
Instead of checking out specific SHA1s, check out the submodule
branches that correspond with the current supermodule commit. By
default, this option will cause local commits in the submodules to
be rebased. With --no-update, the branches will be checked out, but
their heads will not move.
--ignore-submodules
Set git config to ignore submodules by default when doing operations
on the qt5 repo, such as `pull', `fetch', `diff' etc.
=item --force-hooks
After using this option, pass `--ignore-submodules=none' to git to
override it as needed.
Force initialization of hooks (even if there are already hooks in checked out
submodules).
Repository options:
--berlin
Switch to internal URLs and make use of the Berlin git mirrors.
(Implies `--mirror').
=item --quiet, -q
--oslo
Switch to internal URLs and make use of the Oslo git mirrors.
(Implies `--mirror').
Be quiet. Will exit cleanly if the repository is already initialized.
--codereview-username <Gerrit/JIRA username>
Specify the user name for the (potentially) writable `gerrit' remote
for each module, for use with the Gerrit code review tool.
=back
If this option is omitted, the gerrit remote is created without a
username and port number, and thus relies on a correct SSH
configuration.
--alternates <path to other Qt5 repo>
Adds alternates for each submodule to another full qt5 checkout.
This makes this qt5 checkout very small, as it will use the object
store of the alternates before unique objects are stored in its own
object store.
B<Module options:>
This option has no effect when using `--no-update'.
=over
NOTE: This will make this repo dependent on the alternate, which is
potentially dangerous! The dependency can be broken by also using
the `--copy-objects' option, or by running "git repack -a" in each
submodule, where required. Please read the note about the `--shared'
option in the documentation of `git clone' for more information.
=item --no-webkit
--copy-objects
When `--alternates' is used, automatically do a "git repack -a" in
each submodule after cloning, to ensure that the repositories are
independent from the source used as a reference for cloning.
Skip webkit and webkit examples submodules.
It may be desirable to skip these modules due to the large size of the webkit
git repository.
Note that this negates the disk usage benefits gained from the use
of `--alternates'.
=item --module-subset=<module1>,<module2>...
--mirror <url-base>
Uses <url-base> as the base URL for submodule git mirrors.
Only initialize the specified subset of modules given as the argument. Specified
modules must already exist in .gitmodules.
The string "all" results in cloning all known modules. The default is the set of
maintained modules.
Module names may be prefixed with a dash to exclude them from a bigger set.
For example:
=item --no-update
--mirror user\@machine:/foo/bar/
Skip the `git submodule update' command.
...will use the following as a mirror for qtbase:
=item --branch
user\@machine:/foo/bar/qt/qtbase.git
Instead of checking out specific SHA1s, check out the submodule branches that
correspond with the current supermodule commit.
By default, this option will cause local commits in the submodules to be rebased.
With --no-update, the branches will be checked out, but their heads will not move.
The mirror is permitted to contain a subset of the submodules; any
missing modules will fall back to the canonical URLs.
=item --ignore-submodules
Set git config to ignore submodules by default when doing operations on the
qt5 repo, such as `pull', `fetch', `diff' etc.
After using this option, pass `--ignore-submodules=none' to git to override
it as needed.
=back
B<Repository options:>
=over
=item --berlin
Switch to internal URLs and make use of the Berlin git mirrors.
(Implies `--mirror').
=item --oslo
Switch to internal URLs and make use of the Oslo git mirrors.
(Implies `--mirror').
=item --codereview-username <Gerrit/JIRA username>
Specify the user name for the (potentially) writable `gerrit' remote
for each module, for use with the Gerrit code review tool.
If this option is omitted, the gerrit remote is created without a username
and port number, and thus relies on a correct SSH configuration.
=item --alternates <path to other Qt5 repo>
Adds alternates for each submodule to another full qt5 checkout. This makes
this qt5 checkout very small, as it will use the object store of the
alternates before unique objects are stored in its own object store.
This option has no effect when using `--no-update'.
B<NOTE:> This will make this repo dependent on the alternate, which is
potentially dangerous! The dependency can be broken by also using
the `--copy-objects' option, or by running C<git repack -a> in each
submodule, where required. Please read the note about the `--shared' option
in the documentation of `git clone' for more information.
=item --copy-objects
When `--alternates' is used, automatically do a C<git repack -a> in each
submodule after cloning, to ensure that the repositories are independent
from the source used as a reference for cloning.
Note that this negates the disk usage benefits gained from the use of
`--alternates'.
=item --mirror <url-base>
Uses <url-base> as the base URL for submodule git mirrors.
For example:
--mirror user@machine:/foo/bar/
...will use the following as a mirror for qtbase:
user@machine:/foo/bar/qt/qtbase.git
The mirror is permitted to contain a subset of the submodules; any
missing modules will fall back to the canonical URLs.
=back
=cut
EOF
exit($ex);
}
use Carp qw( confess );
use Cwd qw( getcwd abs_path );
use English qw( -no_match_vars );
use Getopt::Long qw( GetOptionsFromArray );
use Pod::Usage qw( pod2usage );
use Cwd qw( getcwd );
use File::Spec::Functions qw ( rel2abs );
use Getopt::Long qw( GetOptions );
my $script_path = abs_path($0);
$script_path =~ s,[/\\][^/\\]+$,,;
my $GERRIT_SSH_BASE
= 'ssh://@USER@codereview.qt-project.org@PORT@/';
@@ -227,7 +201,7 @@ sub exe
sub parse_arguments
{
my ($self, @args) = @_;
my ($self) = @_;
%{$self} = (%{$self},
'alternates' => "",
@@ -239,11 +213,10 @@ sub parse_arguments
'ignore-submodules' => 0 ,
'mirror-url' => "",
'update' => 1 ,
'webkit' => 1 ,
'module-subset' => "default",
);
GetOptionsFromArray(\@args,
GetOptions(
'alternates=s' => \$self->{qw{ alternates }},
'branch' => \$self->{qw{ branch }},
'codereview-username=s' => \$self->{qw{ codereview-username }},
@@ -254,10 +227,9 @@ sub parse_arguments
'mirror=s' => \$self->{qw{ mirror-url }},
'quiet' => \$self->{qw{ quiet }},
'update!' => \$self->{qw{ update }},
'webkit!' => \$self->{qw{ webkit }},
'module-subset=s' => \$self->{qw{ module-subset }},
'help|?' => sub { pod2usage(1); },
'help|?' => sub { printUsage(1); },
'berlin' => sub {
$self->{'mirror-url'} = $BER_MIRROR_URL_BASE;
@@ -265,15 +237,13 @@ sub parse_arguments
'oslo' => sub {
$self->{'mirror-url'} = $OSLO_MIRROR_URL_BASE;
},
) || pod2usage(2);
) || printUsage(2);
# Replace any double trailing slashes from end of mirror
$self->{'mirror-url'} =~ s{//+$}{/};
$self->{'module-subset'} =~ s/\bdefault\b/preview,essential,addon,deprecated/;
$self->{'module-subset'} = [ split(/,/, $self->{'module-subset'}) ];
if (!$self->{webkit}) {
push @{$self->{'module-subset'}}, "-qtwebkit", "-qtwebkit-examples";
}
return;
}
@@ -311,6 +281,14 @@ sub git_submodule_init
return;
}
use constant {
STS_PREVIEW => 1,
STS_ESSENTIAL => 2,
STS_ADDON => 3,
STS_DEPRECATED => 4,
STS_OBSOLETE => 5
};
sub git_clone_all_submodules
{
my ($self, $my_repo_base, $co_branch, @subset) = @_;
@@ -334,22 +312,58 @@ sub git_clone_all_submodules
while ($base =~ s,/(?!\.\./)[^/]+/\.\./,/,g) {}
$subbases{$mod} = $base;
} elsif ($2 eq "update") {
push @subset, '-'.$1 if ($3 eq 'ignore');
} elsif ($2 eq "initrepo") {
$subinits{$1} = ($3 eq "yes" or $3 eq "true");
push @subset, '-'.$1 if ($3 eq 'none');
} elsif ($2 eq "status") {
if ($3 eq "preview") {
$subinits{$1} = STS_PREVIEW;
} elsif ($3 eq "essential") {
$subinits{$1} = STS_ESSENTIAL;
} elsif ($3 eq "addon") {
$subinits{$1} = STS_ADDON;
} elsif ($3 eq "deprecated") {
$subinits{$1} = STS_DEPRECATED;
} elsif ($3 eq "obsolete") {
$subinits{$1} = STS_OBSOLETE;
} elsif ($3 eq "ignore") {
delete $subinits{$1};
} else {
die("Invalid subrepo status '$3' for '$1'.\n");
}
}
}
my %include = ();
foreach my $mod (@subset) {
my $del = ($mod =~ s/^-//);
my $fail = 0;
my @what;
if ($mod eq "all") {
map { $include{$_} = 1; } keys %subbases;
} elsif ($mod eq "default") {
map { $include{$_} = 1; } grep { $subinits{$_} } keys %subbases;
} elsif ($mod =~ s/^-//) {
delete $include{$mod};
@what = keys %subbases;
} elsif ($mod eq "essential") {
@what = grep { ($subinits{$_} || 0) eq STS_ESSENTIAL } keys %subbases;
} elsif ($mod eq "addon") {
@what = grep { ($subinits{$_} || 0) eq STS_ADDON } keys %subbases;
} elsif ($mod eq "preview") {
@what = grep { ($subinits{$_} || 0) eq STS_PREVIEW } keys %subbases;
} elsif ($mod eq "deprecated") {
@what = grep { ($subinits{$_} || 0) eq STS_DEPRECATED } keys %subbases;
} elsif ($mod eq "obsolete") {
@what = grep { ($subinits{$_} || 0) eq STS_OBSOLETE } keys %subbases;
} elsif ($mod eq "ignore") {
@what = grep { ($subinits{$_} || 0) eq 0 } keys %subbases;
} elsif (defined($subdirs{$mod})) {
push @what, $mod;
} else {
$include{$mod} = 1;
$fail = 1;
}
if ($del) {
print "Warning: excluding non-existent module '$mod'.\n"
if ($fail);
map { delete $include{$_} } @what;
} else {
die("Error: module subset names non-existent '$mod'.\n")
if ($fail);
map { $include{$_} = 1; } @what;
}
}
@@ -522,11 +536,16 @@ sub ensure_link
return if (!$self->{'force-hooks'} and -f $tgt);
unlink($tgt); # In case we have a dead symlink or pre-existing hook
print "Aliasing $src\n as $tgt ...\n" if (!$self->{quiet});
return if eval { symlink($src, $tgt) };
if ($^O ne "msys" && $^O ne "MSWin32") {
return if eval { symlink($src, $tgt) };
}
# Windows doesn't do (proper) symlinks. As the post_commit script needs
# them to locate itself, we write a forwarding script instead.
open SCRIPT, ">".$tgt or die "Cannot create forwarding script $tgt: $!\n";
print SCRIPT "#!/bin/sh\nexec `dirname \$0`/$src \"\$\@\"\n";
# Make the path palatable for MSYS.
$src =~ s,\\,/,g;
$src =~ s,^(.):/,/$1/,g;
print SCRIPT "#!/bin/sh\nexec $src \"\$\@\"\n";
close SCRIPT;
}
@@ -534,19 +553,31 @@ sub git_install_hooks
{
my ($self) = @_;
return if (!-d 'qtrepotools/git-hooks');
my $hooks = $script_path.'/qtrepotools/git-hooks';
return if (!-d $hooks);
# Force C locale as git submodule returns the localized string "Entering"
local $ENV{LC_ALL} = 'C';
chomp(my @modules = `git submodule foreach :`);
push @modules, "";
for my $module (@modules) {
$module =~ s,^Entering \'([^\']+)\'$,$1/,;
my $rel = $module;
$rel =~ s,[^/]+,..,g;
$rel .= "../../qtrepotools/git-hooks/";
$self->ensure_link($rel.'gerrit_commit_msg_hook', $module.'.git/hooks/commit-msg');
$self->ensure_link($rel.'git_post_commit_hook', $module.'.git/hooks/post-commit');
my @configresult = qx(git config --list --local);
foreach my $line (@configresult) {
next if ($line !~ /submodule\.([^.=]+)\.url=/);
my $module = $1;
my $module_gitdir = $module.'/.git';
if (!-d $module_gitdir) {
open GITD, $module_gitdir or die "Cannot open $module: $!\n";
my $gd = <GITD>;
close GITD;
chomp($gd);
$gd =~ s/^gitdir: // or die "Malformed .git file $module_gitdir\n";
$module_gitdir = rel2abs($gd, $module);
if (open COMD, $module_gitdir.'/commondir') {
my $cd = <COMD>;
chomp($cd);
$module_gitdir .= '/'.$cd;
$module_gitdir = abs_path($module_gitdir);
close COMD;
}
}
$self->ensure_link($hooks.'/gerrit_commit_msg_hook', $module_gitdir.'/hooks/commit-msg');
$self->ensure_link($hooks.'/git_post_commit_hook', $module_gitdir.'/hooks/post-commit');
}
}
@@ -573,5 +604,5 @@ sub run
#==============================================================================
Qt::InitRepository->new(@ARGV)->run if (!caller);
Qt::InitRepository->new()->run if (!caller);
1;

133
qt.pro
View File

@@ -7,89 +7,68 @@ CONFIG -= build_pass # unhack, as it confuses Qt Creator
TEMPLATE = subdirs
defineReplace(moduleName) {
return(module_$$replace(1, -, _))
}
# Arguments: module name, [mandatory deps], [optional deps], [project file]
defineTest(addModule) {
contains(QT_SKIP_MODULES, $$1): return(false)
mod = $$moduleName($$1)
isEmpty(4) {
!exists($$1/$${1}.pro): return(false)
$${mod}.subdir = $$1
export($${mod}.subdir)
# Extract submodules from .gitmodules.
lines = $$cat(.gitmodules, lines)
for (line, lines) {
mod = $$replace(line, "^\\[submodule \"([^\"]+)\"\\]$", \\1)
!equals(mod, $$line) {
module = $$mod
modules += $$mod
} else {
!exists($$1/$${4}): return(false)
$${mod}.file = $$1/$$4
prop = $$replace(line, "^$$escape_expand(\\t)([^ =]+) *=.*$", \\1)
!equals(prop, $$line) {
val = $$replace(line, "^[^=]+= *", )
module.$${module}.$$prop = $$split(val)
} else {
error("Malformed line in .gitmodules: $$line")
}
}
}
QMAKE_INTERNAL_INCLUDED_FILES += $$PWD/.gitmodules
modules = $$sort_depends(modules, module., .depends .recommends)
modules = $$reverse(modules)
for (mod, modules) {
equals(module.$${mod}.qt, false): \
next()
deps = $$eval(module.$${mod}.depends)
recs = $$eval(module.$${mod}.recommends)
for (d, $$list($$deps $$recs)): \
!contains(modules, $$d): \
error("'$$mod' depends on undeclared '$$d'.")
contains(QT_SKIP_MODULES, $$mod): \
next()
!isEmpty(QT_BUILD_MODULES):!contains(QT_BUILD_MODULES, $$mod): \
next()
project = $$eval(module.$${mod}.project)
isEmpty(project) {
!exists($$mod/$${mod}.pro): \
next()
$${mod}.subdir = $$mod
} else {
!exists($$mod/$$project): \
next()
$${mod}.file = $$mod/$$project
$${mod}.makefile = Makefile
export($${mod}.file)
export($${mod}.makefile)
}
$${mod}.target = module-$$mod
for(d, 2) {
dn = $$moduleName($$d)
!contains(SUBDIRS, $$dn): \
return(false)
$${mod}.depends += $$dn
for (d, deps) {
!contains(SUBDIRS, $$d) {
$${mod}.target =
break()
}
$${mod}.depends += $$d
}
for(d, 3) {
dn = $$moduleName($$d)
contains(SUBDIRS, $$dn): \
$${mod}.depends += $$dn
isEmpty($${mod}.target): \
next()
for (d, recs) {
contains(SUBDIRS, $$d): \
$${mod}.depends += $$d
}
!isEmpty($${mod}.depends): \
export($${mod}.depends)
$${mod}.target = module-$$1
export($${mod}.target)
SUBDIRS += $$mod
export(SUBDIRS)
return(true)
}
# only qtbase is required to exist. The others may not - but it is the
# users responsibility to ensure that all needed dependencies exist, or
# it may not build.
ANDROID_EXTRAS =
android: ANDROID_EXTRAS = qtandroidextras
addModule(qtbase)
addModule(qtandroidextras, qtbase)
addModule(qtmacextras, qtbase)
addModule(qtx11extras, qtbase)
addModule(qtsvg, qtbase)
addModule(qtxmlpatterns, qtbase)
addModule(qtdeclarative, qtbase, qtsvg qtxmlpatterns)
addModule(qtquickcontrols, qtdeclarative, qtgraphicaleffects)
addModule(qtmultimedia, qtbase, qtdeclarative)
addModule(qtwinextras, qtbase, qtdeclarative qtmultimedia)
addModule(qtactiveqt, qtbase)
addModule(qtsystems, qtbase, qtdeclarative)
addModule(qtlocation, qtbase, qtdeclarative qtsystems)
addModule(qtsensors, qtbase, qtdeclarative)
addModule(qtconnectivity, qtbase $$ANDROID_EXTRAS, qtdeclarative)
addModule(qtfeedback, qtdeclarative, qtmultimedia)
addModule(qtpim, qtdeclarative)
addModule(qtwebsockets, qtbase, qtdeclarative)
addModule(qtwebchannel, qtbase, qtdeclarative qtwebsockets)
addModule(qtwebkit, qtdeclarative, qtlocation qtmultimedia qtsensors qtwebchannel, WebKit.pro)
addModule(qttools, qtbase, qtdeclarative qtactiveqt qtwebkit)
addModule(qtwebkit-examples, qtwebkit qttools)
addModule(qtimageformats, qtbase)
addModule(qt3d, qtdeclarative qtimageformats)
addModule(qtcanvas3d, qtdeclarative)
addModule(qtgraphicaleffects, qtdeclarative)
addModule(qtscript, qtbase, qttools)
addModule(qtquick1, qtscript, qtsvg qtxmlpatterns qtwebkit)
addModule(qtdocgallery, qtdeclarative)
addModule(qtwayland, qtbase, qtdeclarative)
addModule(qtserialport, qtbase)
addModule(qtenginio, qtdeclarative)
addModule(qtwebengine, qtquickcontrols qtwebchannel, qtwebkit qtlocation)
addModule(qttranslations, qttools)
addModule(qtdoc, qtdeclarative)
addModule(qtqa, qtbase)

2
qt3d

Submodule qt3d updated: a2bd6a2a82...d3889211dc

2
qtbase

Submodule qtbase updated: fae33bfbe3...b4ada3f0d8

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