bisonc++-4.05.00/CLASSES 0000644 0001750 0001750 00000001671 12161635335 013301 0 ustar frank frank atdollar
block atdollar
element
enumsolution
firstset element
followset firstset terminal
generator writer
grammar symbol production
item lookaheadset production
lookaheadset firstset terminal
next enumsolution statetype stateitem symbol item
nonterminal production firstset followset symbol
options
parser scanner rules symtab
production block terminal symbol
rmreduction
rmshift
rrconflict stateitem lookaheadset rrdata
rrdata lookaheadset
rules nonterminal block terminal production symbol
scanner block
srconflict rmreduction next
state statetype next srconflict rrconflict
stateitem symbol item lookaheadset rmshift rmreduction rrdata
statetype
symbol firstset element
symtab nonterminal symbol terminal
terminal symbol
transition item lookaheadset
writer next
bisonc++-4.05.00/CLASSES.bobcat 0000644 0001750 0001750 00000000120 11714551316 014515 0 ustar frank frank a2x
align
arg
datetime
errno
indent
msg
string
table
tablesupport
typetrait
x2a
bisonc++-4.05.00/INSTALL 0000644 0001750 0001750 00000005645 11714551316 013316 0 ustar frank frank To Install bisonc++ by hand instead of using the binary distribution perform
the following steps:
0. The previously used scripts below make/ are obsolete and were removed
from this and future distributions. Icmake should be used instead, for
which a top-level script (build) and support scripts in the ./icmake/
directory are available. Icmake is available on a great many
architectures. See the file INSTALL (and INSTALL.im, replacing the
previously used INSTALL.cf) for further details.
1. Skip this UNLESS you're intending to compile Bisonc++ under
CYGWIN under Windows
When compiling for CYGWIN, do as follows:
a. Change the #define EXTENSION directive in INSTALL.im to:
#define EXTENSION ".exe"
b. The Bobcat library must be available under CYGWIN. As Bisonc++ does
not use all classes of the Bobcat library. When compiling Bobcat
only for Bisonc++, replace Bobcat's CLASSES file by the file
CLASSES.bobcat also found in this directory, then follow the
compilation instructions provided with Bobcat.
c. Note that CYGWIN is not an official target environment for
Bisonc++. When encountering problems I may or may not be able to
provide assistance.
2. Inspect the values of the variables in the file INSTALL.im Modify these
when necessary. The default skeleton filenames are compiled into
bisonc++ through the definitions in parser/dataskel.cc
3. Make sure the bobcat library has been installed.
(If you compile the bobcat library yourself, note that bisonc++ does
not use the classes Milter and Xpointer; they may --as far as bisonc++
is concerned-- be left out of the library)
4. Run
./build program [strip]
to compile bisonc++. Optionally provide `strip' to strip the
executable (not with PROFILE, see INSTALL.im)
5. Run (probably as root)
./build install
to install. Optionally add an additional argument as a base directory
below which the software should be installed.
Following the installation nothing in this directory tree is required
for the proper functioning of bisonc++, so consider removing it.
NOTE that parser-class header files generated by bisonc++ before version 1.00
should modify the prototypes of some of their private members. Simply
replacing the `support functions for parse()' section shown at the end of
the header file by the following lines should make your header file
up-to-date again. Note that bisonc++ does not by itself rewrite the
parser class headers to prevent undoing any modifications you may have
implemented in parser-class header files:
// support functions for parse():
void executeAction(int ruleNr);
void errorRecovery();
int lookup();
void nextToken();
bisonc++-4.05.00/INSTALL.im 0000644 0001750 0001750 00000002520 12161014761 013702 0 ustar frank frank #define PROGRAM "bisonc++"
// When defined, these overrule COMPILER and COMPILER_OPTIONS
// COMPILER and COMPILER_OPTIONS are now obsolete
// Instead of CXX and CXXFLAGS, CC and CFLAGS can be used.
// Their #define values are overruled by identically named environment
// variables.
#define CXX "g++"
// the compiler to use.
#define CXXFLAGS "--std=c++0x -Wall -O2 -g"
// the compiler options to use.
#define LDFLAGS ""
// flags passed to the linker
#define SKEL "/usr/share/bisonc++"
// the directory where the skeleton files are installed
// Recompile options/data.cc if the skeleton location changes
// =========================================================================
// The following locations are overruled by `build' arguments
#define BINARY "/usr/bin/"${PROGRAM}
// the full path of the final program
#define MAN "/usr/share/man/man1"
// the directory whre the manual page is stored
#define MANUAL "/usr/share/doc/"${PROGRAM}"-doc/manual"
// the directory whre the manual page is stored
#define STD "/usr/share/doc/"${PROGRAM}
// the directory where the standard documentation is stored
#define EXTRA "/usr/share/doc/"${PROGRAM}"-doc"
// the directory where the extra documentation is stored
bisonc++-4.05.00/LICENSE 0000644 0001750 0001750 00000104513 12201456452 013261 0 ustar frank frank GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
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 .
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:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
.
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
.
bisonc++-4.05.00/README-0.98 0000644 0001750 0001750 00000002377 11714551316 013540 0 ustar frank frank Bisonc++ 0.98 is a complete rewrite of the well-known bison(++) parser
generator. See the manual page for details.
Several demo programs are found below the bisonc++/documentation/examples
directory. In that directory there's a README file describing the purposes of
the various examples.
The (original) bison documentation is provided in html format in the directory
bisonc++/documentation/html. The Debian package (bisonc++*.deb) installs that
documentation below /usr/share/doc/bisonc++.
Note that bisonc++'s specifications differs from bison's specifications, in
particular with respect to the declaration section. The production rule
specification section is, however, practically identical to the one defined
for bison. There are some differences, though. Consult bisonc++'s manpage
(installed by the Debian package, otherwise available in the directory
bisonc++/documentation/man) for the differences.
Since it is a complete rewrite it is quite likely that bugs will be
encountered. Bison itself offers an extensive input grammar, and I may easily
have overlooked various subtleties.
Do not hesitate to contact me when you encounter a bug. A (small) grammar
illustrating your point is then always extremely useful.
Frank.
May 2005-April 2006
(f.b.brokken@rug.nl)
bisonc++-4.05.00/README.class-setup 0000644 0001750 0001750 00000010453 12161014761 015373 0 ustar frank frank This hierarchy defines the header and the implementation dependencies among
the classes. The topmost class is not dependent on any class. Lines should be
read down-to-up to find the the lowest class in the hierarchy on which a
given class depends (e.g., LookaheadSet depends on Rules, and possibly uses
the classes used by Rules; RmReduction does not depend on any other class).
The semantic value classes SemBlock until SemSymbol only derive from SemBase,
not from semantic values classes mentioned above them. All semantic value
classes derived from SemBase, and spSemBase only uses the features of SemBase.
SemBase Block
| |
+--+----+ +---------------+
| | | |
spSemBase +-SemBlock |
| | |
| +-SemString |
| | |
| +-SemBool |
| | |
| +-SemSizeT |
| | |
| +-SemTerminal |
| | |
| +-SemSymbol |
| | |
+---+---+ |
| |
| +---------------+-------------+
| | |
| | |
| | Element |
| | | |
| | FirstSet |
| | | |
| | Symbol |
| | | |
| | Terminal |
| | | |
| | +-------+-------+ |
| | | | |
| | | +----+
| | | |
| | FollowSet Production
| | | |
| | +-------+-------+
| | |
| | NonTerminal
| | |
| | +-------+-------+
| | | |
| | Symtab Rules
| Scanner | |
| | | +-------------+-----------+
| | | | | |
| +--------+---------------+ LookaheadSet Grammar
| | | |
| | +---+---+ |
| | | | |
| | RmShift RmReduction RRData Item |
| | | | | | |
| | +------------+-----+----+-------+ |
| | | |
| | StateType EnumSolution StateItem |
| | | | | |
| | +-----------+----------+ |
| | | | |
| | Next | |
+--------+ | | |
| SrConflict RRConflict |
Parser | | |
| +-----+----+ |
| | |
| State |
| | |
| Writer |
| | |
+-------------+----------+ |
| |
Generator |
| |
+----------------+-------------------+
|
bisonc++
bisonc++-4.05.00/README.flex 0000644 0001750 0001750 00000001105 11714551316 014065 0 ustar frank frank About the lexical scanner
=========================
Bisonc++ uses a lexical scanner generated by flex.
The file bisonc++/scanner/yylex.cc depends on a file FlexLexer.h having
different contents over different `flex' versions.
Bisonc++ therefore also depends on flex being installed, callable as the
program `flex'.
Starting with Bisonc++ version 2.4.2 the build process will create
scanner/yylex.cc from the file scanner/lexer and scanner/yylex.cc is no longer
included in Bisonc++'s distribution.
Frank.
bisonc++-4.05.00/README.insertions 0000644 0001750 0001750 00000001044 11714551316 015326 0 ustar frank frank Classes Item, Next, NonTerminal, StateItem and Terminal use a static
inserter() function to define the way the object is inserted into a
stream. These functions expect addresses of member functions defining a
particular insertion as their arguments.
In the class header files the members that define an insertion type are listed
immediately following the inserter() prototype.
Currently only the Terminal class supports a manipulator functionality for
these member functions, allowing a insertion mode-switch within a single
insertion statement.
bisonc++-4.05.00/README.lookaheads 0000644 0001750 0001750 00000024700 11714551316 015247 0 ustar frank frank This file describes the lookahead-propagation procedure as used by Bisonc++
A more extensive description is found in documentation/manual/algorithm.yo
Start with the following simple grammar:
1 run$: run
2 run: one
3 run: two X
4 one:
5 two: one
This grammar produces the following states:
S0: run$: . run (kernel)
run: . one (non-kernel)
run: . two X
one: .
two: . one
S1: run$: run . (accept)
S2: run: one . (kernel)
two: one .
S3: run: two . X (kernel)
S4: run: two X . (kernel)
Notation:
The notation FIRST(d L) indicates the FIRST set of the sequence `d L'. The
notation {} is used to indicate the empty set. Otherwise, the terminals
are shown in a blank-delimited list, e.g., {X $}
Within an item, its non-kernel items are inspected to obtain the
lookaheads. The lookaheads are propagated, starting from the
initial $, representing EOF.
With a particular item (L being its LA set):
a: b . C d, L
all rules of C must be added to the item as non-kernel items. These items
use LA FIRST(d, L). When transiting to the next state, an item in a new state
inherits it LA set of its `parent'
The initial set receives LA {$}. So:
S0: 1 run$: . run, {$}
In this set, the `run' rules must be added, receiving LA FIRST({} $) = {$}.
So, the `run' rules become:
2 run: . one , {$}
3 run: . two X , {$}
From (2) the `one' rule is added, using LA FIRST({}, $) = $.
4 one: . , {$}
From (3) the `two' rule is aded, receiving LA FIRST(X $) = X
5 two: . one , {X}
From (5) the `one' rules are once again added, receiving LA FIRST({}, X) = X
4 one: . , {X $} (revised)
This results in:
S0: 1 run$: . run, {$}
2 run: . one , {$}
3 run: . two X , {$}
4 one: . , {X $}
5 two: . one , {X}
Transitions on:
run -> S1
one -> S2
two -> S3
There is one reduction in this state (4), so it becomes the default
reduction. A default reduction is executed immediately upon entering
its state:
Reduce: according to rule 4 (by default)
Transition on run, inheriting the LA set:
S1: 1 run$: run . {$}
There is one reduction in this state (4), so it becomes the default
reduction.
Reduce: according to rule 1 (by default)
Transition on one, inheriting the LA sets:
S2: 2 run: one . , {$}
5 two: one . , {X}
There are two reductions in this state (2, 5). There is no conflict as
they have different LA sets. So:
Reduce on:
$: according to rule 2
X: according to rule 5
(Optionally, define one as the default reduction).
Transition on two, inheriting the LA set:
S3: 3 run: two . X , {$}
Transition on
X -> S4, LA remains unaltered:
S4: 3 run: two X . , {$}
Reduce: according to rule 3 (by default)
==========================================================================
Now consider the following grammar, after Aho, example 4.46:
Here's the grammar:
1. S*: S
2. S: L = R
3. S: R
4. L: * R
5. L: i
6. R: L
Here are the states:
S0: 1. S*: . S
S1: 1. S*: S .
S2: 2. S: L . = R
6. R: L .
S3: 3. S: R .
S4: 4. L: * . R
S5: 5. L: i .
S6: 2. S: L = . R
S7: 4. L: * R .
S8: 6. R: L .
S9: 2. S: L = R .
Start at state S0, LA {$}:
S0: 1. S*: . S , {$}
Adding the `S' rules, same LA, we get:
2. S: . L = R {$}
3. S: . R {$}
Adding the `L' rules from (2), LA {=} is used:
4. L: . * R {=}
5. L: . i {=}
Adding the `R' rule from (3), LA {$} is kept:
6. R: . L {$}
Revising the L rules from (6), LA {$} is added:
4. L: . * R {= $} (revised)
5. L: . i {= $} (revised)
This results in:
S0: 1. S*: . S , {$}
2. S: . L = R {$}
3. S: . R {$}
4. L: . * R {= $}
5. L: . i {= $}
6. R: . L {$}
Transitions on:
S -> S1
L -> S2
R -> S3
* -> S4
i -> S5
Transition on S, inheriting the LA set:
S1: 1. S*: S . {$} (accept)
Transition on L, inheriting the LA set:
S2: 2. S: L . = R {$) (LA inherited from 2)
6. R: L . ($) (LA inherited from 6)
Transition on R, inheriting the LA set:
S3: 3. S: R . {$}
Transition on *, inheriting the LA set:
S4: 4. L: * . R {= $}
Transition on i, inheriting the LA set:
S5: 5. L: i . {= $}
S1: 1. S*: S . {$} (accept)
Reduce: according to rule 1 (by default)
S2: 2. S: L . = R {$)
6. R: L . ($)
Transition on:
= -> S6
Reduce: according to (6) by default.
Transition on =, inheriting the LA set:
S6: 2. S: L = . R {$) (LA inherited from 2)
S3: 3. S: R . {$}
Reduce: according to rule 3 (by default)
S4: 4. L: * . R {= $}
Adding the R rules, LA unaltered:
6. R: . L {= $}
Adding the L rules from (6), LA unaltered:
4. L: . * R {= $}
5. L: . i {= $}
This results in:
S4: 4. L: * . R {= $}
6. R: . L {= $}
4. L: . * R {= $}
5. L: . i {= $}
Transition on:
R -> S7
L -> S8
* -> S4
i -> S5
Transition on R, inheriting LA {= $}
S7: 4. L: * R . {$ =}
Transition on L, inheriting LA {= $}
S8: 6. R: L . {= $}
Transition on *, inheriting the LA set:
S4: 4. L: * . R {= $}
LA set at 4 already {= $}. No need to change. Done.
Transition on i, inheriting the LA set:
S5: 5. L: i . {= $}
LA set at 5 already {= $}. No need to change. Done.
S5: 5. L: i . {= $}
Reduce: according to rule 5 (by default)
S6: 2. S: L = . R {$)
Adding the R rules, LA unaltered:
6. R: . L {$}
Adding the L rules from (6), LA unaltered:
4. L: . * R {$}
5. L: . i {$}
This results in:
2. S: L = R . {$}
6. R: . L {$}
4. L: . * R {$}
5. L: . i {$}
Transition on:
R -> S9
L -> S8
* -> S4
i -> S5
Transition on R, inheriting LA {= $}
S9: 2. S: L = R . {$}
Transition on L, inheriting LA {= $}
S8: 6. R: L . {$}
LA set at S8 already contains {$}. No need to change. Done.
Transition on *, inheriting the LA set:
S4: 4. L: * . R {$}
LA set at 4 already contains {$}. No need to change. Done.
Transition on i, inheriting the LA set:
S5: 5. L: i . {$}
LA set at 5 already contains {$}. No need to change. Done.
S7: 4. L: * R . {= $}
Reduce: according to rule 4 (by default)
S8: 6. R: L . {= $}
Reduce: according to rule 6 (by default)
S9: 2. S: L = R . {$}
Reduce: according to rule 2 (by default)
==========================================================================
Finally consider Aho's 4.42 grammar, p. 231:
1. S*: S
2. S: C C
3. C: c C
4. C: d
Starting at 1, using LA {$}
S0: 1. S*: . S {$}
Add production rules from S, using LA {$}:
2. S: . C C {$}
Add production rules from C, using LA FIRST(C $} = {c d}
3. C: . c C {c d}
4. C: . d {c d}
Resulting in:
S0: 1. S*: . S {$}
2. S: . C C {$}
3. C: . c C {c d}
4. C: . d {c d}
Transitions on:
S -> S1
C -> S2
c -> S3
d -> S4
Transition on S, inheriting LA:
S1: 1. S*: S . {$}
Transition on C, inheriting LA:
S2: 2. S: C . C {$}
Transition on c, inheriting LA:
S3: 3. C: c . C {c d}
Transition on d, inheriting LA:
S4: 4. C: d . {c d}
S1: 1. S*: S . {$}
Reduce: according to rule 1 (by default)
S2: 2. S: C . C {$}
Add production rules from C, using LA FIRST($} = {$}
3. C: . c C {$}
4. C: . d {$}
Resulting in:
S2: 2. S: C . C {$}
3. C: . c C {$}
4. C: . d {$}
Transitions on:
C -> S5
c -> S3
d -> S4
Transition on C, inheriting LA:
S5: 2. S: C C . {$}
Transition on c, inheriting LA:
S3: 3. C: c . C {$}
Add $ to LA set of S3
Transition on d, inheriting LA:
S4: 4. C: d . {c d}
Add $ to LA set of S4
S3: 3. C: c . C {c d $}
Add production rules from C, using LA FIRST($} = {c d $}
3. C: . c C {c d $}
4. C: . d {c d $}
Resulting in:
S3: 3. C: c . C {c d $}
3. C: . c C {c d $}
4. C: . d {c d $}
Transitions on:
C -> S6
c -> S3
d -> S4
Transition on C, inheriting LA:
S6: 3. C: c C . {c d $}
Transition on c, inheriting LA:
S3: 3. C: c . C {c d $} Already defined in this configuration
Transition on d, inheriting LA:
S4: 3. C: d . {c d $} Already defined in this configuration
S4: 4. C: d . {c d $}
Reduce: according to rule 4 (by default)
S5: 2. S: C C . {$}
Reduce: according to rule 2 (by default)
S6: 3. C: c C . {c d $}
Reduce: according to rule 3 (by default)
=============================================================================
The algorithm implementing the above LA propagation is implemented in various
functions in the class State, starting in state/propagatela.cc
bisonc++-4.05.00/README.output 0000644 0001750 0001750 00000000634 11714551316 014475 0 ustar frank frank Output to the xxx.output file by the --verbose or --construction flags are
mostly handled from the State::allStates() function. This function calls
State's operator<<, which is initialized by a pointer pointing to either
insertStd,
insertExt
or
skipInsertion.
Inspect state/insertstd.cc for the standard insertion method and
state/insertext.cc for the extensive insertion method.
bisonc++-4.05.00/README.parser 0000644 0001750 0001750 00000004132 11714551316 014426 0 ustar frank frank Bisonc++ 2.0.0 uses a grammar specification file (parser/grammar) defining the
input language that it will recognize. The grammar specification file was
initially written to be used with Bisonc++ 1.6.1, but once Bisonc++ 2.0.0 was
available it was split into various subfiles, each having a well defined
function. As a result, the individual grammar specification files are fairly
small, which facilitates understanding of the grammar.
The main grammar specification file is the file parser/grammar, the
subdirectory parser/spec contains the grammar specification subfiles:
parser/spec/messages
parser/spec/precedence
parser/spec/optrules
parser/spec/directives
parser/spec/symbols
parser/spec/rules
parser/spec/productionlist
parser/spec/auxiliary
parser/grammar:
A short file, defining tokens, the semantic value union, the grammar's
start rule and one support rule used by the start rule.
parser/spec/messages:
Defines all rules that expect a token and assign an appropriate text
to the syntactic error message variable `d_msg'. All these rules end in
_t. Another set of rules (ending in _m) merely set the `d_msg' data
member.
parser/spec/precedence:
Defines support rules when recognizing the precedence (LEFT, RIGHT,
NONASSOC) and TOKEN terminals directives. These rules end in _p.
parser/spec/optrules
Defines rules for all tokens that may optionally be given. These rules
all start with the phrase `opt'.
parser/spec/directives
Defines the syntax for each of Bisonc++'s directives.
parser/spec/symbols
All precedence directives, the %token directive and the %type
directive all expect one or more symbols. The `symbols' rule is defined in
this file.
parser/spec/rules
Defines the grammar recognizing Bisonc++'s rules
parser/spec/productionlist
Defines the grammar recognizing the production rules recognized by
Bisonc++.
parser/spec/auxiliary
Defines rules that are used in at least two specification files. These
rules all end in _a.
bisonc++-4.05.00/README.states 0000644 0001750 0001750 00000022156 11714551316 014443 0 ustar frank frank This file contains a short description about the way states and look-aheads
(LA's) are constructed. The example does not cover new information. In fact,
it follows the construction of the states of the grammar given in example 4.42
in Aho et al.
A more extensive description is found in documentation/manual/algorithm.yo
The grammar has the following production rules (numbered 1-3):
1 S' -> S
2 S -> CC
3 C -> cC
4 C -> d
Production rule 1 is added to the grammar, representing the so-called
augmented grammar. When this rule is recognized at end-of-input (represented
by $) then the input is grammatically correct, and the parser will flag
`success'.
$ is called a `look ahead' (LA) token. LA's may be in sets, which are used to
determine whether a rule (when potentially recognized) will be reduced or
not. So, when recognizing S, it is only reduced to S' (by rule S' -> S) if $
is indeed the next input token (i.e., if the end-of-input has been reached.
With the starting rule an `item' is associated. An items consists of a rule,
having a `dot' and a LA-set. The dot (.) represents the point to where input
has been recognized. So, initially we have, starting from rule 1 and using []
to contain the LA token(s):
S' -> . S [$]
This is the starting point, state 0, and this point of departure defines the
`kernel' of a state. To the kernel additional (production) rules and new
LA-sets may be added as follows:
New rules: If a . is followed by a non-terminal all production rules of
that non-terminal are added to the item as new items having dots in postion
0. This process is followed for the newly added production rules as well until
no more rules are added.
LA-sets: Here is where it gets a bit complicated. To find LA-sets the
FIRST function must be defined first.
The FIRST function defines the set of terminal tokens that can be
encountered at the start of a (series of) grammatical tokens. This FIRST-set
is determined as follows:
- if X is a terminal token x, FIRST(X) is [x].
- if X is empty FIRST(X) is [e] (the empty set)
- if X is a production rule X1 X2 ... Xn then:
FIRST(X) is FIRST(X1), except [e].
If [e] was removed, FIRST(X2) is added to the set,
again removing [e], if it was now added to the set.
This process is repeated until an Xi was without [e], or
until FIRST(Xn) was added to the set. In this final case,
if FIRST(Xn) contains [e] it is kept
For our little grammar, we have the following FIRST sets:
S' -> S FIRST(S') = FIRST(S)
S -> CC FIRST(S) = FIRST(C)
C -> cC FIRST(cC) = [c]
C -> d FIRST(d) = [d]
so, FIRST(S') = FIRST(S) = FIRST(C) = FIRST(S) = [cd]
Back to the LA-sets: In a state having an item:
A -> x . B y, [a]
with A, B non-terminals, x, y possibly empty series of terminal symbols
and [a] the LA-set belonging to this item (so, x . B y is a production rule of
A with a dot), all B's production rules are added to the state having
FIRST(ya) as its LA-set.
Having constructed a state, the dots are moved one symbol to the
right. Every unique grammar symbol thus shifted represents a `shift' in the
parsing process to another state. A shift may result in a shift to an earlier
state. This earlier state may thus see its LA-set expanded, which expansion
must then propagate to all states derived from that state. When no shift is
possible, a reduction takes place. If a state has only a single reduction,
then this becomes the default reduction (on any symbol not resulting in a
shift). If a state has multiple reductions, then this is ok if their LA-sets
are different. Otherwise the grammar contains a reduce-reduce
conflict. Analogously, if a reduction on a certain LA-set is indicated, but
there's also a shift required for (one or more) terminal tokens in the LA-set,
then the grammar contains a shift-reduce conflict.
At each rule in each state actions/gotos are specified: `goto' a state if
the symbol following a dot is a nonterminal, `shift' to a state if the symbol
following a dot is a terminal, or reduce according to a production rule if the
dot is at the end of a production rule. This indicates that a rule has been
recognized, and if an action block has been defined for such a production
rule, it is executed at that point (i.e., at the point where the reduction
takes place).
Now it's time to start constructing states, called S0, S1, S2,
etc. Production rules are numbered by their original number.
S0:
1 S' -> . S [$] On S goto S1
for S' -> . S [$]
compute, matching A -> x . B y, [a],
FIRST(y a)
as FIRST( $), which is: [$], LA for the next S rule:
add S-rule:
2 S -> . C C [$] On C goto S2
for S -> . C C [$]
compute, matching A -> x . B y, [a],
FIRST(y a)
as FIRST(C $), which is: [cd], LA for the next C rules:
add C-rules:
3 C -> . c C [cd] On c shift S3
4 C -> . d [cd] On d shift S4
having (of course) the same LA set. `Of course',
since the LA set does not depend on this production
rule, but on the rule causing this addition. So, once
a nonterminal is added, the LA-set of its production
rules is determined once.
Continuing this way, each of the previous state's items is processed in turn:
S1:
1 S' -> S . [$] Reduce to S' by rule 1.
This is the ACCEPT state
S2:
2 S -> C . C [$] On C goto S5
for S -> C . C [$]
compute, matching A -> x . B y, [a]
FIRST(y a)
as FIRST( $), which is: [$], LA for the next C rules:
3 C -> . c C [$] On c shift S3
(Adding [$] to S3's LA-set)
4 C -> . d [$] On d shift S4
(Adding [$] to S4's LA-set)
S3:
3 C -> c . C [cd]+[$] from S2 On C goto S6
(Adding [cd] to S5's LA-set)
for C -> c . C [cd]+[$]
compute, matching A -> x . B y, [a]
FIRST(y a )
as FIRST( [cd]), which is: [cd]+[$]
3 C -> . c C [cd]+[$] On c shift S3
4 C -> . d [cd]+[$] On d shift S4
S4:
4 C -> d . [cd]+[$] from S2 Reduce to C by rule 4
S5:
2 S -> C C . [$] Reduce to S by rule 2
S6:
3 C -> c C . [cd]+[$] Reduce to C by rule 3
Now, the action/goto table can be summarized:
------------------------------------
action goto
------------------------------------
State c d $ S C
------------------------------------
0 s3 s4 s1 s2
1 acc
2 s3 s4 s5
3 s3 s4 s6
4 r4 r4 r4
5 r2 [d]
6 r3 r3 r3
------------------------------------
[d]: use this by default for every
next token
If a grammatical rule has an empty production the same procedure is followed.
Consider:
1 S' -> S
2 S -> S E
3 S ->
4 E -> n
5 E -> i
(representing a grammar accepting possibly empty series of numbers and
identifiers). The grammar is constructed as follows:
FIRST(E) = [in], FIRST(S') = FIRST(S) = [in$]
S0:
S' -> . S [$] On S: goto S1
Obtaining [$] from the above rule:
S -> . S E [$] On S: goto S1
S -> . [$] Default: reduce to S
S1:
S' -> S . [$] On $: ACCEPT
S -> S . E [$] On E: goto S2
Add E-rules: match A -> b . B y [a]
with: S -> S . E [$]
E -> . n [$] On n shift S3
E -> . i [$] On i shift S4
S2:
S -> S E . [$] REDUCE
S3:
E -> n . [$] REDUCE
S4:
E -> i . [$] REDUCE
Action/Goto table:
------------------------------------
action goto
------------------------------------
State i n $ S E
------------------------------------
0 r3[d] s1
1 s3 s4 acc s2
2 r2[d]
3 r4[d]
4 r5[d]
------------------------------------
bisonc++-4.05.00/README.states-and-conflicts 0000644 0001750 0001750 00000020362 12161014761 017155 0 ustar frank frank The information in this file is closely related to what's happening in
state/define.cc. Refer to define.cc for the implementation of the process
described below. All functions mentioned below are defined by the class State.
Defining states proceeds as follows:
0. The initial state is constructed. It contains the augmented grammar's
production rule. This part is realized by the static member
initialState();
1. From the state's kernel item(s) all implied rules are added as
additional state items. This results in a vector of (kernel/non-kernel)
items, as well as per item the numbers of the items that are affected
by this item. This information is used later on to propagate the
LA's. This part is realized by the member
setItems()
This fills the StateItem::Vector vector. A StateItem contains
1. an item (containing a production rule, dot position, and LA set)
2. a LA-enlarged flag, raised when an item's LA set is enlarged
3. a size_t vector of indices of `dependent' items, indicating which
items have LA sets that depend on the current item
(StateItem::d_child).
4. The size_t field `next' holds the index in d_nextVector,
allowing quick access of the d_nextVector element defining the
state having the current item as its kernel. A next value 'npos'
indicates that the item does not belong to a next-kernel.
E.g.,
StateItem:
---------------------------------------------------------------
item LA-enlarged LA-set dependent next next
stateitems state LA-enlarged
---------------------------------------------------------------
S* -> . S, false, EOF, (1, 2) 0 true/false
...
---------------------------------------------------------------
Also, State::d_nextVector vector is filled.
A Next element contains
0. The symbol on which the transition takes place
1. The number of the next state
2. The indices of the StateItem::Vector defining the next
state's kernel
E.g.,
Next:
-------------------------------
On next next kernel
Symbol state from items
-------------------------------
S ? (0, 1)
...
-------------------------------
Previously, nextOnSymbol() was called here. It simply removed the
production rules where dot appeared at the rule's end, since they will not
become part of the next state's kernels.
Empty production rules don't require special handling as they won't appear
in the Next table, since there's no transition on them. Thus, the
previously mentioned nextOnSymbol() function is now no longer required.
Next, from these facilities all states are constructed. LA propagation is
performed after the state construction since LA propagation is an
inherently recursive process, and state construction isn't. State
construction takes place (in the while loop in State::define.cc following
the initial state construction).
2. Following the state construction the lookaheads (LAs) will be propagated
over the items in the current state. This is where previous bisonc++
versions erred. LAs are distributed over and determined for each
individual item, and are then inherited by the next states. Also, LAs can
be determined during the construction of a state, instead of during a
separate cycle. LAs are propagated from the initial state over the
dependent StateItems. Lookahead propagation is performed by the member
propagateLA()
3. Then, from the Next::Vector constructed at (1) the next states
are constructed. This is realized by the member
constructNext()
A next state is only constructed if it wasn't constructed yet. For a new
state, the construct() member is called. Construct() calls setItems()
and propagateLA(). Otherwise, propagateLA will also be called for all
states having kernels whose next LA-enlarged flag is set.
4. Once all states have been constructed, conflicts are located and
solved. If a state contains conflict, they are resolved and
information about these conflicts is stored in an SRConflict::Vector
and/or RRConflict::Vector. Conflicts are identified and resolved by the
member:
State::checkConflicts();
5. S/R conflicts are handled by the d_srConflict object. This object received
at construction time a context consisting of the state's d_itemVector and
d_nextVector as well as d_reducible containing all indices of reducible
items. Each of these indices is the index of a reducible item which is,
together with a context consisting of the state's d_itemVector and
d_nextVector, passed to Next::checkShiftReduceConflict(), which solves the
observed shift-reduce conflicts.
Here is how this is done:
Assume a state's itemVector holds the following StateItems:
0: [P11 3] expression -> expression '-' expression .
{ EOLN '+' '-' '*' '/' ')' } 0, 1, () -1
1: [P10 1] expression -> expression . '+' expression
{ EOLN '+' '-' '*' '/' ')' } 0, 0, () 0
2: [P11 1] expression -> expression . '-' expression
{ EOLN '+' '-' '*' '/' ')' } 0, 0, () 1
3: [P12 1] expression -> expression . '*' expression
{ EOLN '+' '-' '*' '/' ')' } 0, 0, () 2
4: [P13 1] expression -> expression . '/' expression
{ EOLN '+' '-' '*' '/' ')' } 0, 0, () 3
and the associated nextVector is:
0: On '+' to state 15 with (1 )
1: On '-' to state 16 with (2 )
2: On '*' to state 17 with (3 )
3: On '/' to state 18 with (4 )
Conflicts are inspected for all reducible items. Here the reducible item
is the item having index 0.
Inspection involves (but see below for an extension of this process when
the LHS of a reducible item differs from the LHS of a non-reducible item):
1. The nextVector's symbols are searched for in the LA set of the
reduction item (so, subsequently '+', '-', '*' and '/' are searched
for in the LA set of itemVector[0]).
2. In this case, all are found and depending on the token's priority
and the rule's priority either a shift or a reduce is selected.
Production rules received their priority setting either explicitly (using
%prec) or from their first terminal token. See also
rules/updateprecedences.cc
What happens if neither occurs? In a rule like 'expr: term' there is no
first terminal token and there is no %prec being used.
In these cases the rule is removed, by default using a shift instead of a
reduce (until 4.00.00 this was handled incorrectly by giving the reduction
rule the highest precedence, using a reduce rather than a shift)
The problem with rules without precedence was originally brought to my
attention by Ramanand Mandayam.
Different LHS elements of items:
As pointed out by Ramanand Mandayam, S/R conflicts may be observed when
reducible rules merely consist of non-terminals. Here is an example:
%left '*'
%token ID
%%
expr:
term
;
term:
term '*' primary
|
ID
;
primary:
'-' expr
|
ID
;
This grammar contains the following state
State 2:
0: [P1 1] expr -> term . { } 1, () -1
1: [P2 1] term -> term . '*' primary { '*' } 0, () 0
0: On '*' to state 4 with (1 )
Reduce item(s): 0
Here, item 0 reduces to N 'expr' and item 1 requires a shift in a
production rule of the N 'term'.
In these cases the rule 'expr -> term .' has no precedence that can be
derived from either %prec or an initial terminal. Such reductions
automatically receive the highest possible precedence and 'reduce' is
used, rather than 'shift'. Since there is no explicit basis for this
choice the choice between shift and reduce is flagged as a conflict.
bisonc++-4.05.00/TODO 0000644 0001750 0001750 00000000136 12161635335 012744 0 ustar frank frank - %nonassoc should probably produce an error when %nonassoc operators are used
repeatedly.
bisonc++-4.05.00/VERSION 0000644 0001750 0001750 00000000066 12161635335 013326 0 ustar frank frank #define VERSION "4.05.00"
#define YEARS "2005-2013"
bisonc++-4.05.00/VERSION.h 0000644 0001750 0001750 00000000104 11714551317 013545 0 ustar frank frank #include "VERSION"
SUBST(_CurVers_)(VERSION)
SUBST(_CurYrs_)(YEARS)
bisonc++-4.05.00/atdollar/ 0000755 0001750 0001750 00000000000 12161613144 014050 5 ustar frank frank bisonc++-4.05.00/atdollar/operatorinsert.cc 0000644 0001750 0001750 00000001012 12161014761 017431 0 ustar frank frank #include "atdollar.ih"
std::ostream &operator<<(std::ostream &out, AtDollar const &atd)
{
out << "At line " << atd.d_lineNr << ", block pos. " << atd.d_pos <<
", length: " << atd.d_length << ": " <<
(atd.d_type == AtDollar::AT ? '@' : '$');
if (atd.d_id.length())
out << '<' << atd.d_id << '>';
if (atd.d_nr == numeric_limits::max())
out << '$';
else
out << atd.d_nr;
if (atd.d_member)
out << ". (member call)";
return out;
}
bisonc++-4.05.00/atdollar/atdollar1.cc 0000644 0001750 0001750 00000000571 12161014761 016245 0 ustar frank frank #include "atdollar.ih"
// ${NR}, ${NR}. or @{NR}
AtDollar::AtDollar(Type type,
size_t blockPos, size_t lineNr, std::string const &text,
int nr, bool member)
:
d_type(type),
d_lineNr(lineNr),
d_pos(blockPos),
d_length(text.length() - member),
d_text(text),
d_nr(nr),
d_member(member),
d_stype(false)
{}
bisonc++-4.05.00/atdollar/atdollar.h 0000644 0001750 0001750 00000004530 12161014761 016025 0 ustar frank frank #ifndef INCLUDED_ATDOLLAR_
#define INCLUDED_ATDOLLAR_
#include
#include
#include
class AtDollar
{
friend std::ostream &operator<<(std::ostream &out, AtDollar const &atd);
public:
enum Type
{
AT,
DOLLAR
};
enum Action
{
RETURN_VALUE,
NUMBERED_ELEMENT,
TYPED_RETURN_VALUE,
TYPED_NUMBERED_ELEMENT
};
private:
Type d_type;
size_t d_lineNr;
size_t d_pos;
size_t d_length;
std::string d_text;
std::string d_id;
int d_nr; // $$ if numeric_limits::max()
bool d_member;
bool d_stype;
public:
AtDollar() = default; // only used by std::vector in Block
// 1 $$, $$., $NR, $NR., @@ or @NR
AtDollar(Type type, size_t blockPos, size_t lineNr,
std::string const &text, int nr, bool member);
// 3 $$ or $-?NR
AtDollar(Type type, size_t blockPos, size_t lineNr,
std::string const &text, std::string const &id, int nr);
Type type() const;
int nr() const;
std::string const &text() const;
std::string const &id() const;
size_t pos() const;
size_t length() const;
size_t lineNr() const;
Action action() const;
bool callsMember() const;
bool returnValue() const; // $$ is being referred to
bool stype() const; // id == STYPE__
};
inline AtDollar::Type AtDollar::type() const
{
return d_type;
}
inline int AtDollar::nr() const
{
return d_nr;
}
inline bool AtDollar::callsMember() const
{
return d_member;
}
inline bool AtDollar::returnValue() const
{
return d_nr == std::numeric_limits::max();
}
inline bool AtDollar::stype() const
{
return d_stype;
}
inline size_t AtDollar::pos() const
{
return d_pos;
}
inline size_t AtDollar::length() const
{
return d_length;
}
inline size_t AtDollar::lineNr() const
{
return d_lineNr;
}
inline std::string const &AtDollar::text() const
{
return d_text;
}
inline std::string const &AtDollar::id() const
{
return d_id;
}
#endif
bisonc++-4.05.00/atdollar/atdollar2.cc 0000644 0001750 0001750 00000000617 12161014761 016247 0 ustar frank frank #include "atdollar.ih"
// $$ or $-?NR
AtDollar::AtDollar(Type type, size_t blockPos, size_t lineNr,
string const &text, string const &id, int nr)
:
d_type(type),
d_lineNr(lineNr),
d_pos(blockPos),
d_length(text.length()),
d_text(text),
d_id(id.empty() ? "STYPE__" : id),
d_nr(nr),
d_member(false),
d_stype(d_id == "STYPE__")
{}
bisonc++-4.05.00/atdollar/frame 0000644 0001750 0001750 00000000047 12161014761 015066 0 ustar frank frank #include "atdollar.ih"
AtDollar::
{
}
bisonc++-4.05.00/atdollar/action.cc 0000644 0001750 0001750 00000000403 12161014761 015631 0 ustar frank frank #include "atdollar.ih"
AtDollar::Action AtDollar::action() const
{
if (d_nr == numeric_limits::max())
return d_id.length() ? TYPED_RETURN_VALUE : RETURN_VALUE;
return d_id.length() ? TYPED_NUMBERED_ELEMENT : NUMBERED_ELEMENT;
}
bisonc++-4.05.00/atdollar/atdollar.ih 0000644 0001750 0001750 00000000101 12161014761 016164 0 ustar frank frank #include "atdollar.h"
#include
using namespace std;
bisonc++-4.05.00/bisonc++.cc 0000644 0001750 0001750 00000010211 12201361427 014152 0 ustar frank frank /*
bisonc++.cc
*/
#include "bisonc++.ih"
using namespace std;
using namespace FBB;
namespace
{
Arg::LongOption longOptions[] =
{
{"analyze-only", 'A'}, // option only
{"baseclass-header", 'b'},
{"baseclass-preinclude", 'H'},
{"baseclass-skeleton", 'B'}, // options only
{"polymorphic-skeleton", 'M'},
{"polymorphic-inline-skeleton", 'm'},
{"class-header", 'c'},
{"class-name", Arg::Required},
{"class-skeleton", 'C'}, // option only
Arg::LongOption("construction"), // option only
// implies verbose, but also shows FIRST and FOLLOW sets as
// well as the full set of states, including the non-kernel
// items
Arg::LongOption("debug"),
Arg::LongOption("error-verbose"),
{"filenames", 'f'},
Arg::LongOption("flex"),
{"help", 'h'}, // option only
{"implementation-header", 'i'},
{"implementation-skeleton", 'I'}, // option only
Arg::LongOption("insert-stype"), // option only
{"max-inclusion-depth", Arg::Required}, // option only
{"namespace", 'n'},
// option only
Arg::LongOption("no-baseclass-header"),
Arg::LongOption("no-lines"),
Arg::LongOption("no-parse-member"), // options only
{"own-debug", Arg::None},
{"own-tokens", 'T'},
{"parsefun-skeleton", 'P'},
{"parsefun-source", 'p'},
{"print-tokens", 't'},
{"required-tokens", Arg::Required},
{"scanner", 's'},
Arg::LongOption("scanner-debug"),
{"scanner-matched-text-function", Arg::Required},
{"scanner-token-function", Arg::Required},
{"scanner-class-name", Arg::Required},
Arg::LongOption("show-filenames"), // option only
{"skeleton-directory", 'S'}, // option only
{"target-directory", Arg::Required},
Arg::LongOption("thread-safe"), // options only
{"usage", 'h'},
{"verbose", 'V'},
// shows rules, tokens, final states and kernel items,
// and describes conflicts when found
{"version", 'v'},
};
auto longEnd = longOptions +
sizeof(longOptions) / sizeof(Arg::LongOption);
}
int main(int argc, char **argv)
try
{
Arg &arg = Arg::initialize("AB:b:C:c:f:H:hI:i:M:m:n:p:P:s:S:tTVv",
longOptions, longEnd, argc, argv);
arg.versionHelp(usage, version, 1);
Rules rules;
Parser parser(rules); // Prepare parsing. If `include-only' was
// specified, processing stops here.
parser.parse(); // parses the input, fills the data in the Rules
// read the grammar file, build required data
// structures.
parser.cleanup(); // do cleanup actions following parse()
// (terminate if parsing produced errors)
rules.updatePrecedences(); // update production rule precedences
rules.showRules();
rules.showTerminals();
rules.determineFirst();
rules.showFirst();
rules.determineFollow();
rules.showFollow();
// define the startproduction
Production::setStart(rules.startProduction());
State::define(); // define all states
rules.assignNonTerminalNumbers();
rules.showUnusedTerminals();
rules.showUnusedNonTerminals();
rules.showUnusedRules();
State::allStates();
Grammar grammar;
grammar.deriveSentence();
if (emsg.count())
return 1;
if (arg.option('A')) // Analyze only
return 0;
Generator generator(rules, parser.polymorphic());
generator.baseClassHeader();
generator.classHeader();
generator.implementationHeader();
generator.parseFunction();
}
catch(exception const &err)
{
cerr << err.what() << '\n';
return 1;
}
catch(int x)
{
return Arg::instance().option("hv") ? 0 : x;
}
bisonc++-4.05.00/bisonc++.ih 0000644 0001750 0001750 00000001006 12161014761 014170 0 ustar frank frank #ifndef _INCLUDED_BISONCPP_H_
#define _INCLUDED_BISONCPP_H_
#include
#include
#include
#include
#include
#include "rules/rules.h"
#include "parser/parser.h"
#include "state/state.h"
#include "srconflict/srconflict.h"
#include "rrconflict/rrconflict.h"
#include "grammar/grammar.h"
#include "generator/generator.h"
using namespace std;
using namespace FBB;
extern char version[];
extern char year[];
void usage(string const &program_name);
#endif
bisonc++-4.05.00/bisonc++.xref 0000644 0001750 0001750 00000231732 12201373366 014553 0 ustar frank frank oxref by Frank B. Brokken (f.b.brokken@rug.nl)
oxref V0.91.00 2012-2013
CREATED Sat, 10 Aug 2013 08:16:54 +0000
CROSS REFERENCE FOR: -fxs tmp/libmodules.a
----------------------------------------------------------------------
accept(Options::PathType, char const*)
Full name: Options::accept(Options::PathType, char const*)
Source: accept.cc
Used By:
assign.cc: Options::assign(std::string*, Options::PathType, char const*)
actionCases(std::ostream&) const
Full name: Generator::actionCases(std::ostream&) const
Source: actioncases.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
addDependents(Next const&, Symbol const*, unsigned int)
Full name: State::addDependents(Next const&, Symbol const*, unsigned int)
Source: adddependents.cc
Used By:
notreducible.cc: State::notReducible(unsigned int)
addElement(Symbol*)
Full name: Rules::addElement(Symbol*)
Source: addelement.cc
Used By:
augmentgrammar.cc: Rules::augmentGrammar(Symbol*)
handleproductionelement.cc: Parser::handleProductionElement(Meta__::SType&)
handleproductionelements.cc: Parser::handleProductionElements(Meta__::SType&, Meta__::SType const&)
nestedblock.cc: Parser::nestedBlock(Block&)
addFollowFromFirst(Production*)
Full name: Rules::addFollowFromFirst(Production*)
Source: addfollowfromfirst.cc
Used By:
determinefollow.cc: Rules::determineFollow()
addFollowToFollow()
Full name: Rules::addFollowToFollow()
Source: addfollowtofollow.cc
Used By:
determinefollow.cc: Rules::determineFollow()
addIncludeQuotes(std::string&)
Full name: Options::addIncludeQuotes(std::string&)
Source: addincludequotes.cc
Used By:
setquotedstrings.cc: Options::setQuotedStrings()
addKernelItem(StateItem const&)
Full name: State::addKernelItem(StateItem const&)
Source: addkernelitem.cc
Used By:
addstate.cc: State::addState(std::vector- > const&)
initialstate.cc: State::initialState()
addNext(Symbol const*, unsigned int)
Full name: State::addNext(Symbol const*, unsigned int)
Source: addnext.cc
Used By:
notreducible.cc: State::notReducible(unsigned int)
addPolymorphic(std::string const&, std::string const&)
Full name: Parser::addPolymorphic(std::string const&, std::string const&)
Source: addpolymorphic.cc
Used By:
parse.cc: Parser::executeAction(int)
addProduction()
Full name: Rules::addProduction()
Source: addproduction.cc
Used By:
augmentgrammar.cc: Rules::augmentGrammar(Symbol*)
openrule.cc: Parser::openRule(std::string const&)
parse.cc: Parser::executeAction(int)
addProduction(Production const*, std::vector >&, unsigned int)
Full name: StateItem::addProduction(Production const*, std::vector >&, unsigned int)
Source: addproduction.cc
Used By:
addproductions.cc: State::addProductions(Symbol const*, unsigned int)
addProductions(Symbol const*, unsigned int)
Full name: State::addProductions(Symbol const*, unsigned int)
Source: addproductions.cc
Used By:
addnext.cc: State::addNext(Symbol const*, unsigned int)
addState(std::vector
- > const&)
Full name: State::addState(std::vector
- > const&)
Source: addstate.cc
Used By:
nextstate.cc: State::nextState(Next&)
addToKernel(std::vector >&, Symbol const*, unsigned int)
Full name: Next::addToKernel(std::vector >&, Symbol const*, unsigned int)
Source: addtokernel.cc
Used By:
adddependents.cc: State::addDependents(Next const&, Symbol const*, unsigned int)
assign(std::string*, Options::PathType, char const*)
Full name: Options::assign(std::string*, Options::PathType, char const*)
Source: assign.cc
Used By:
parse.cc: Parser::executeAction(int)
AtDollar(AtDollar::Type, unsigned int, unsigned int, std::string const&, int, bool)
Full name: AtDollar::AtDollar(AtDollar::Type, unsigned int, unsigned int, std::string const&, int, bool)
Source: atdollar1.cc
Used By:
atindex.cc: Block::atIndex(unsigned int, std::string const&)
dollar.cc: Block::dollar(unsigned int, std::string const&, bool)
dollarindex.cc: Block::dollarIndex(unsigned int, std::string const&, bool)
AtDollar(AtDollar::Type, unsigned int, unsigned int, std::string const&, std::string const&, int)
Full name: AtDollar::AtDollar(AtDollar::Type, unsigned int, unsigned int, std::string const&, std::string const&, int)
Source: atdollar2.cc
Used By:
iddollar.cc: Block::IDdollar(unsigned int, std::string const&)
idindex.cc: Block::IDindex(unsigned int, std::string const&)
atIndex(unsigned int, std::string const&)
Full name: Block::atIndex(unsigned int, std::string const&)
Source: atindex.cc
Used By:
lex.cc: Scanner::executeAction__(unsigned int)
augmentGrammar(Symbol*)
Full name: Rules::augmentGrammar(Symbol*)
Source: augmentgrammar.cc
Used By:
cleanup.cc: Parser::cleanup()
baseClass(std::ostream&) const
Full name: Generator::baseClass(std::ostream&) const
Source: baseclass.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
baseclassHeaderName() const
Full name: Options::baseclassHeaderName() const
Source: baseclassheadername.cc
Used By:
classheader.cc: Generator::classHeader() const
becomesDerivable(Production const*)
Full name: Grammar::becomesDerivable(Production const*)
Source: becomesderivable.cc
Used By:
derivable.cc: Grammar::derivable(Symbol const*)
buildKernel(std::vector
- >*, std::vector > const&)
Full name: Next::buildKernel(std::vector
- >*, std::vector > const&)
Source: buildkernel.cc
Used By:
nextstate.cc: State::nextState(Next&)
canonicalQuote()
Full name: Scanner::canonicalQuote()
Source: canonicalquote.cc
Used By:
parse.cc: Parser::executeAction(int)
setprecedence.cc: Parser::setPrecedence(int)
useterminal.cc: Parser::useTerminal()
checkConflicts()
Full name: State::checkConflicts()
Source: checkconflicts.cc
Used By:
define.cc: State::define()
checkEmptyBlocktype()
Full name: Parser::checkEmptyBlocktype()
Source: checkemptyblocktype.cc
Used By:
parse.cc: Parser::executeAction(int)
checkFirstType()
Full name: Parser::checkFirstType()
Source: checkfirsttype.cc
Used By:
handleproductionelement.cc: Parser::handleProductionElement(Meta__::SType&)
installaction.cc: Parser::installAction(Block&)
checkRemoved(std::ostream&) const
Full name: Next::checkRemoved(std::ostream&) const
Source: checkremoved.cc
Used By:
transition.cc: Next::transition(std::ostream&) const
transitionkernel.cc: Next::transitionKernel(std::ostream&) const
checkZeroNumber()
Full name: Scanner::checkZeroNumber()
Source: checkzeronumber.cc
Used By:
hexadecimal.cc: Scanner::hexadecimal()
octal.cc: Scanner::octal()
classH(std::ostream&) const
Full name: Generator::classH(std::ostream&) const
Source: classh.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
classIH(std::ostream&) const
Full name: Generator::classIH(std::ostream&) const
Source: classih.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
cleanDir(std::string&, bool)
Full name: Options::cleanDir(std::string&, bool)
Source: cleandir.cc
Used By:
setbasicstrings.cc: Options::setBasicStrings()
clear()
Full name: Block::clear()
Source: clear.cc
Used By:
expectrules.cc: Parser::expectRules()
open.cc: Block::open(unsigned int, std::string const&)
close()
Full name: Block::close()
Source: close.cc
Used By:
lex.cc: Scanner::executeAction__(unsigned int)
comparePrecedence(Symbol const*, Symbol const*)
Full name: Terminal::comparePrecedence(Symbol const*, Symbol const*)
Source: compareprecedence.cc
Used By:
solvebyprecedence.cc: Next::solveByPrecedence(Symbol const*) const
comparereductions.cc: RRConflict::compareReductions(unsigned int)
compareReductions(unsigned int)
Full name: RRConflict::compareReductions(unsigned int)
Source: comparereductions.cc
Used By:
visitreduction.cc: RRConflict::visitReduction(unsigned int)
construct()
Full name: State::construct()
Source: construct.cc
Used By:
define.cc: State::define()
containsKernelItem(Item const&, unsigned int, std::vector > const&)
Full name: StateItem::containsKernelItem(Item const&, unsigned int, std::vector > const&)
Source: containskernelitem.cc
Used By:
haskernel.cc: State::hasKernel(std::vector
- > const&) const
debug(std::ostream&) const
Full name: Generator::debug(std::ostream&) const
Source: debug.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
debugDecl(std::ostream&) const
Full name: Generator::debugDecl(std::ostream&) const
Source: debugdecl.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
debugFunctions(std::ostream&) const
Full name: Generator::debugFunctions(std::ostream&) const
Source: debugfunctions.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
debugIncludes(std::ostream&) const
Full name: Generator::debugIncludes(std::ostream&) const
Source: debugincludes.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
debugInit(std::ostream&) const
Full name: Generator::debugInit(std::ostream&) const
Source: debuginit.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
debugLookup(std::ostream&) const
Full name: Generator::debugLookup(std::ostream&) const
Source: debuglookup.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
defineNonTerminal(std::string const&, std::string const&)
Full name: Parser::defineNonTerminal(std::string const&, std::string const&)
Source: definenonterminal.cc
Used By:
nestedblock.cc: Parser::nestedBlock(Block&)
defineTerminal(std::string const&, Symbol::Type)
Full name: Parser::defineTerminal(std::string const&, Symbol::Type)
Source: defineterminal.cc
Used By:
definetokenname.cc: Parser::defineTokenName(std::string const&, bool)
parse.cc: Parser::executeAction(int)
defineTokenName(std::string const&, bool)
Full name: Parser::defineTokenName(std::string const&, bool)
Source: definetokenname.cc
Used By:
parse.cc: Parser::executeAction(int)
derivable(Symbol const*)
Full name: Grammar::derivable(Symbol const*)
Source: derivable.cc
Used By:
becomesderivable.cc: Grammar::becomesDerivable(Production const*)
derivesentence.cc: Grammar::deriveSentence()
distributeLA(Next&, State::LookaheadContext&)
Full name: State::distributeLA(Next&, State::LookaheadContext&)
Source: distributela.cc
Used By:
propagatela.cc: State::propagateLA()
dollar(unsigned int, std::string const&, bool)
Full name: Block::dollar(unsigned int, std::string const&, bool)
Source: dollar.cc
Used By:
lex.cc: Scanner::executeAction__(unsigned int)
dollarIndex(unsigned int, std::string const&, bool)
Full name: Block::dollarIndex(unsigned int, std::string const&, bool)
Source: dollarindex.cc
Used By:
lex.cc: Scanner::executeAction__(unsigned int)
enlargeLA(LookaheadSet const&)
Full name: StateItem::enlargeLA(LookaheadSet const&)
Source: enlargela.cc
Used By:
updatela.cc: State::updateLA(unsigned int, State::LookaheadContext&)
eoln()
Full name: Scanner::eoln()
Source: eoln.cc
Used By:
lex.cc: Scanner::executeAction__(unsigned int)
errIndexTooLarge(AtDollar const&, int) const
Full name: Parser::errIndexTooLarge(AtDollar const&, int) const
Source: errindextoolarge.cc
Used By:
handleatsign.cc: Parser::handleAtSign(Block&, AtDollar const&, int)
handledollar.cc: Parser::handleDollar(Block&, AtDollar const&, int)
errNoSemantic(char const*, AtDollar const&, std::string const&) const
Full name: Parser::errNoSemantic(char const*, AtDollar const&, std::string const&) const
Source: errnosemantic.cc
Used By:
semtag.cc: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::string const&) const) const
error(char const*)
Full name: Parser::error(char const*)
Source: error.cc
Used By:
parse.cc: Parser::errorRecovery()
errorVerbose(std::ostream&) const
Full name: Generator::errorVerbose(std::ostream&) const
Source: errorverbose.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
escape()
Full name: Scanner::escape()
Source: escape.cc
Used By:
lex.cc: Scanner::executeAction__(unsigned int)
expandFollow(Production*)
Full name: Rules::expandFollow(Production*)
Source: expandfollow.cc
Used By:
addfollowtofollow.cc: Rules::addFollowToFollow()
expectRules()
Full name: Parser::expectRules()
Source: expectrules.cc
Used By:
parse.cc: Parser::executeAction(int)
filename(std::string const&)
Full name: Generator::filename(std::string const&)
Source: filename.cc
Used By:
baseclass.cc: Generator::baseClass(std::ostream&) const
classh.cc: Generator::classH(std::ostream&) const
classih.cc: Generator::classIH(std::ostream&) const
filter(std::istream&, std::ostream&, bool) const
Full name: Generator::filter(std::istream&, std::ostream&, bool) const
Source: filter.cc
Used By:
baseclassheader.cc: Generator::baseClassHeader() const
classheader.cc: Generator::classHeader() const
implementationheader.cc: Generator::implementationHeader() const
parsefunction.cc: Generator::parseFunction() const
polymorphic.cc: Generator::polymorphic(std::ostream&) const
polymorphicinline.cc: Generator::polymorphicInline(std::ostream&) const
findKernel(std::vector
- > const&) const
Full name: State::findKernel(std::vector
- > const&) const
Source: findkernel.cc
Used By:
nextstate.cc: State::nextState(Next&)
firstBeyondDot(FirstSet*) const
Full name: Item::firstBeyondDot(FirstSet*) const
Source: firstbeyonddot.cc
Used By:
propagatela.cc: StateItem::propagateLA(StateItem&, std::vector >&)
FirstSet(Element const*)
Full name: FirstSet::FirstSet(Element const*)
Source: firstset1.cc
Used By:
terminal1.cc: Terminal::Terminal(std::string const&, Symbol::Type, unsigned int, Terminal::Association, std::string const&)
terminal2.cc: Terminal::Terminal(std::string const&, std::string const&, Symbol::Type)
grep(std::string const&, std::string const&) const
Full name: Generator::grep(std::string const&, std::string const&) const
Source: grep.cc
Used By:
warnexisting.cc: Generator::warnExisting(std::string const&, std::string const&, std::string const&, std::string const&) const
handleAtSign(Block&, AtDollar const&, int)
Full name: Parser::handleAtSign(Block&, AtDollar const&, int)
Source: handleatsign.cc
Used By:
substituteblock.cc: Parser::substituteBlock(int, Block&)
handleDollar(Block&, AtDollar const&, int)
Full name: Parser::handleDollar(Block&, AtDollar const&, int)
Source: handledollar.cc
Used By:
substituteblock.cc: Parser::substituteBlock(int, Block&)
handleProductionElement(Meta__::SType&)
Full name: Parser::handleProductionElement(Meta__::SType&)
Source: handleproductionelement.cc
Used By:
parse.cc: Parser::executeAction(int)
handleProductionElements(Meta__::SType&, Meta__::SType const&)
Full name: Parser::handleProductionElements(Meta__::SType&, Meta__::SType const&)
Source: handleproductionelements.cc
Used By:
parse.cc: Parser::executeAction(int)
handleSRconflict(unsigned int, __gnu_cxx::__normal_iterator > > const&, unsigned int)
Full name: SRConflict::handleSRconflict(unsigned int, __gnu_cxx::__normal_iterator > > const&, unsigned int)
Source: handlesrconflict.cc
Used By:
processshiftreduceconflict.cc: SRConflict::processShiftReduceConflict(__gnu_cxx::__normal_iterator > > const&, unsigned int)
handleXstring(unsigned int)
Full name: Scanner::handleXstring(unsigned int)
Source: handlexstring.cc
Used By:
lex.cc: Scanner::executeAction__(unsigned int)
hasKernel(std::vector
- > const&) const
Full name: State::hasKernel(std::vector
- > const&) const
Source: haskernel.cc
Used By:
findkernel.cc: State::findKernel(std::vector
- > const&) const
hexadecimal()
Full name: Scanner::hexadecimal()
Source: hexadecimal.cc
Used By:
lex.cc: Scanner::executeAction__(unsigned int)
IDdollar(unsigned int, std::string const&)
Full name: Block::IDdollar(unsigned int, std::string const&)
Source: iddollar.cc
Used By:
lex.cc: Scanner::executeAction__(unsigned int)
IDindex(unsigned int, std::string const&)
Full name: Block::IDindex(unsigned int, std::string const&)
Source: idindex.cc
Used By:
lex.cc: Scanner::executeAction__(unsigned int)
indexToOffset(int, int) const
Full name: Parser::indexToOffset(int, int) const
Source: indextooffset.cc
Used By:
handleatsign.cc: Parser::handleAtSign(Block&, AtDollar const&, int)
handledollar.cc: Parser::handleDollar(Block&, AtDollar const&, int)
substituteblock.cc: Parser::substituteBlock(int, Block&)
initialState()
Full name: State::initialState()
Source: initialstate.cc
Used By:
define.cc: State::define()
insert(NonTerminal*)
Full name: Rules::insert(NonTerminal*)
Source: insert2.cc
Used By:
augmentgrammar.cc: Rules::augmentGrammar(Symbol*)
definenonterminal.cc: Parser::defineNonTerminal(std::string const&, std::string const&)
requirenonterminal.cc: Parser::requireNonTerminal(std::string const&)
usesymbol.cc: Parser::useSymbol()
insert(std::ostream&) const
Full name: FirstSet::insert(std::ostream&) const
Source: oinsert.cc
Used By:
showfirst.cc: GLOBALS showfirst.cc 21showfirst.o
insertext.cc: GLOBALS insertext.cc 23insertext.o
insert(std::ostream&) const
Full name: SRConflict::insert(std::ostream&) const
Source: insert.cc
Used By:
insertext.cc: State::insertExt(std::ostream&) const
insertstd.cc: State::insertStd(std::ostream&) const
insert(std::ostream&) const
Full name: LookaheadSet::insert(std::ostream&) const
Source: insert.cc
Used By:
operatorinsert.cc: operator<<(std::ostream&, LookaheadSet const&)
insert(std::ostream&) const
Full name: Generator::insert(std::ostream&) const
Source: insert.cc
Used By:
filter.cc: Generator::filter(std::istream&, std::ostream&, bool) const
insert(std::ostream&) const
Full name: RRConflict::insert(std::ostream&) const
Source: insert.cc
Used By:
insertext.cc: State::insertExt(std::ostream&) const
insertstd.cc: State::insertStd(std::ostream&) const
insert(std::ostream&) const
Full name: NonTerminal::insert(std::ostream&) const
Source: v.cc
Used By:
destructor.cc: NonTerminal::~NonTerminal()
insert(std::ostream&, Production const*) const
Full name: Item::insert(std::ostream&, Production const*) const
Source: insert.cc
Used By:
plainitem.cc: Item::plainItem(std::ostream&) const
pnrdotitem.cc: Item::pNrDotItem(std::ostream&) const
insert(std::vector > const&) const
Full name: Writer::insert(std::vector > const&) const
Source: insert.cc
Used By:
tokens.cc: Generator::tokens(std::ostream&) const
insert(Terminal*, std::string const&)
Full name: Rules::insert(Terminal*, std::string const&)
Source: insert1.cc
Used By:
defineterminal.cc: Parser::defineTerminal(std::string const&, Symbol::Type)
predefine.cc: Parser::predefine(Terminal const*)
useterminal.cc: Parser::useTerminal()
insertAction(Production const*, std::ostream&, bool, unsigned int)
Full name: Production::insertAction(Production const*, std::ostream&, bool, unsigned int)
Source: insertaction.cc
Used By:
actioncases.cc: Generator::actionCases(std::ostream&) const
insertExt(std::ostream&) const
Full name: State::insertExt(std::ostream&) const
Source: insertext.cc
Used By:
allstates.cc: State::allStates()
define.cc: State::define()
insertStd(std::ostream&) const
Full name: State::insertStd(std::ostream&) const
Source: insertstd.cc
Used By:
define.cc: State::define()
insertToken(Terminal const*, unsigned int&, std::ostream&)
Full name: Writer::insertToken(Terminal const*, unsigned int&, std::ostream&)
Source: inserttoken.cc
Used By:
insert.cc: Writer::insert(std::vector > const&) const
insName(std::ostream&) const
Full name: NonTerminal::insName(std::ostream&) const
Source: insname.cc
Used By:
showfirst.cc: GLOBALS showfirst.cc 21showfirst.o
showfollow.cc: GLOBALS showfollow.cc 21showfollow.o
insertext.cc: GLOBALS insertext.cc 23insertext.o
inspect()
Full name: RRConflict::inspect()
Source: inspect.cc
Used By:
checkconflicts.cc: State::checkConflicts()
inspect()
Full name: SRConflict::inspect()
Source: inspect.cc
Used By:
checkconflicts.cc: State::checkConflicts()
installAction(Block&)
Full name: Parser::installAction(Block&)
Source: installaction.cc
Used By:
handleproductionelement.cc: Parser::handleProductionElement(Meta__::SType&)
instance()
Full name: Options::instance()
Source: instance.cc
Used By:
parser1.cc: Parser::Parser(Rules&)
generator1.cc: Generator::Generator(Rules const&, std::unordered_map, std::equal_to, std::allocator > > const&)
intersection(LookaheadSet const&) const
Full name: LookaheadSet::intersection(LookaheadSet const&) const
Source: intersection.cc
Used By:
comparereductions.cc: RRConflict::compareReductions(unsigned int)
isDerivable(Production const*)
Full name: Grammar::isDerivable(Production const*)
Source: isderivable.cc
Used By:
derivable.cc: Grammar::derivable(Symbol const*)
isFirstStypeDefinition() const
Full name: Options::isFirstStypeDefinition() const
Source: isfirststypedef.cc
Used By:
setpolymorphicdecl.cc: Options::setPolymorphicDecl()
setstype.cc: Options::setStype()
setuniondecl.cc: Options::setUnionDecl(std::string const&)
Item()
Full name: Item::Item()
Source: item0.cc
Used By:
stateitem1.cc: StateItem::StateItem()
Item(Item const*, unsigned int)
Full name: Item::Item(Item const*, unsigned int)
Source: item2.cc
Used By:
buildkernel.cc: Next::buildKernel(std::vector
- >*, std::vector > const&)
Item(Production const*)
Full name: Item::Item(Production const*)
Source: item1.cc
Used By:
initialstate.cc: State::initialState()
addproduction.cc: StateItem::addProduction(Production const*, std::vector >&, unsigned int)
itemContext(std::ostream&) const
Full name: StateItem::itemContext(std::ostream&) const
Source: itemcontext.cc
Used By:
insertext.cc: State::insertExt(std::ostream&) const
key(std::ostream&) const
Full name: Generator::key(std::ostream&) const
Source: key.cc
Used By:
actioncases.cc: Generator::actionCases(std::ostream&) const
baseclass.cc: Generator::baseClass(std::ostream&) const
classh.cc: Generator::classH(std::ostream&) const
classih.cc: Generator::classIH(std::ostream&) const
debug.cc: Generator::debug(std::ostream&) const
debugdecl.cc: Generator::debugDecl(std::ostream&) const
debugfunctions.cc: Generator::debugFunctions(std::ostream&) const
debugincludes.cc: Generator::debugIncludes(std::ostream&) const
debuginit.cc: Generator::debugInit(std::ostream&) const
debuglookup.cc: Generator::debugLookup(std::ostream&) const
errorverbose.cc: Generator::errorVerbose(std::ostream&) const
lex.cc: Generator::lex(std::ostream&) const
ltype.cc: Generator::ltype(std::ostream&) const
ltypedata.cc: Generator::ltypeData(std::ostream&) const
ltypepop.cc: Generator::ltypePop(std::ostream&) const
ltypepush.cc: Generator::ltypePush(std::ostream&) const
ltyperesize.cc: Generator::ltypeResize(std::ostream&) const
ltypestack.cc: Generator::ltypeStack(std::ostream&) const
namespaceclose.cc: Generator::namespaceClose(std::ostream&) const
namespaceopen.cc: Generator::namespaceOpen(std::ostream&) const
namespaceuse.cc: Generator::namespaceUse(std::ostream&) const
polymorphic.cc: Generator::polymorphic(std::ostream&) const
polymorphicimpl.cc: Generator::polymorphicImpl(std::ostream&) const
polymorphicinline.cc: Generator::polymorphicInline(std::ostream&) const
polymorphicspecializations.cc: Generator::polymorphicSpecializations(std::ostream&) const
preincludes.cc: Generator::preIncludes(std::ostream&) const
print.cc: Generator::print(std::ostream&) const
requiredtokens.cc: Generator::requiredTokens(std::ostream&) const
scannerh.cc: Generator::scannerH(std::ostream&) const
scannerobject.cc: Generator::scannerObject(std::ostream&) const
staticdata.cc: Generator::staticData(std::ostream&) const
stype.cc: Generator::stype(std::ostream&) const
threading.cc: Generator::threading(std::ostream&) const
tokens.cc: Generator::tokens(std::ostream&) const
lex(std::ostream&) const
Full name: Generator::lex(std::ostream&) const
Source: lex.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
lex__()
Full name: Scanner::lex__()
Source: lex.cc
Used By:
parse.cc: Parser::nextToken()
LookaheadSet(LookaheadSet const&)
Full name: LookaheadSet::LookaheadSet(LookaheadSet const&)
Source: lookaheadset3.cc
Used By:
comparereductions.cc: GLOBALS comparereductions.cc 19comparereductions.o
rrdata1.cc: RRData::RRData(LookaheadSet)
visitreduction.cc: SRConflict::visitReduction(unsigned int)
addkernelitem.cc: GLOBALS addkernelitem.cc 23addkernelitem.o
addproduction.cc: GLOBALS addproduction.cc 24addproduction.o
LookaheadSet(LookaheadSet::EndStatus)
Full name: LookaheadSet::LookaheadSet(LookaheadSet::EndStatus)
Source: lookaheadset1.cc
Used By:
initialstate.cc: State::initialState()
propagatela.cc: StateItem::propagateLA(StateItem&, std::vector >&)
stateitem1.cc: StateItem::StateItem()
stateitem2.cc: StateItem::StateItem(Item const&)
lookup(std::string const&)
Full name: Symtab::lookup(std::string const&)
Source: lookup.cc
Used By:
cleanup.cc: Parser::cleanup()
definenonterminal.cc: Parser::defineNonTerminal(std::string const&, std::string const&)
defineterminal.cc: Parser::defineTerminal(std::string const&, Symbol::Type)
requirenonterminal.cc: Parser::requireNonTerminal(std::string const&)
setprecedence.cc: Parser::setPrecedence(int)
usesymbol.cc: Parser::useSymbol()
useterminal.cc: Parser::useTerminal()
ltype(std::ostream&) const
Full name: Generator::ltype(std::ostream&) const
Source: ltype.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
ltypeData(std::ostream&) const
Full name: Generator::ltypeData(std::ostream&) const
Source: ltypedata.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
ltypePop(std::ostream&) const
Full name: Generator::ltypePop(std::ostream&) const
Source: ltypepop.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
ltypePush(std::ostream&) const
Full name: Generator::ltypePush(std::ostream&) const
Source: ltypepush.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
ltypeResize(std::ostream&) const
Full name: Generator::ltypeResize(std::ostream&) const
Source: ltyperesize.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
ltypeStack(std::ostream&) const
Full name: Generator::ltypeStack(std::ostream&) const
Source: ltypestack.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
multiCharQuote()
Full name: Scanner::multiCharQuote()
Source: multicharquote.cc
Used By:
lex.cc: Scanner::executeAction__(unsigned int)
multiplyDefined(Symbol const*)
Full name: Parser::multiplyDefined(Symbol const*)
Source: multiplydefined.cc
Used By:
definenonterminal.cc: Parser::defineNonTerminal(std::string const&, std::string const&)
defineterminal.cc: Parser::defineTerminal(std::string const&, Symbol::Type)
requirenonterminal.cc: Parser::requireNonTerminal(std::string const&)
useterminal.cc: Parser::useTerminal()
nameOrValue(std::ostream&) const
Full name: Terminal::nameOrValue(std::ostream&) const
Source: nameorvalue.cc
Used By:
reductionsymbol.cc: Writer::reductionSymbol(Element const*, unsigned int, FBB::Table&)
transition.cc: Writer::transition(Next const&, FBB::Table&)
namespaceClose(std::ostream&) const
Full name: Generator::namespaceClose(std::ostream&) const
Source: namespaceclose.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
namespaceOpen(std::ostream&) const
Full name: Generator::namespaceOpen(std::ostream&) const
Source: namespaceopen.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
namespaceUse(std::ostream&) const
Full name: Generator::namespaceUse(std::ostream&) const
Source: namespaceuse.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
negativeIndex(AtDollar const&) const
Full name: Parser::negativeIndex(AtDollar const&) const
Source: negativeindex.cc
Used By:
semtag.cc: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::string const&) const) const
warnautoignored.cc: Parser::warnAutoIgnored(char const*, AtDollar const&) const
nestedBlock(Block&)
Full name: Parser::nestedBlock(Block&)
Source: nestedblock.cc
Used By:
handleproductionelements.cc: Parser::handleProductionElements(Meta__::SType&, Meta__::SType const&)
newRule(NonTerminal*, std::string const&, unsigned int)
Full name: Rules::newRule(NonTerminal*, std::string const&, unsigned int)
Source: newrule.cc
Used By:
augmentgrammar.cc: Rules::augmentGrammar(Symbol*)
openrule.cc: Parser::openRule(std::string const&)
newState()
Full name: State::newState()
Source: newstate.cc
Used By:
addstate.cc: State::addState(std::vector
- > const&)
initialstate.cc: State::initialState()
Next(Symbol const*, unsigned int)
Full name: Next::Next(Symbol const*, unsigned int)
Source: next2.cc
Used By:
addnext.cc: State::addNext(Symbol const*, unsigned int)
nextFind(Symbol const*) const
Full name: State::nextFind(Symbol const*) const
Source: nextfindfrom.cc
Used By:
nexton.cc: State::nextOn(Symbol const*) const
notreducible.cc: State::notReducible(unsigned int)
nextHiddenName()
Full name: Parser::nextHiddenName()
Source: nexthiddenname.cc
Used By:
nestedblock.cc: Parser::nestedBlock(Block&)
nextState(Next&)
Full name: State::nextState(Next&)
Source: nextstate.cc
Used By:
construct.cc: State::construct()
NonTerminal(std::string const&, std::string const&, Symbol::Type)
Full name: NonTerminal::NonTerminal(std::string const&, std::string const&, Symbol::Type)
Source: nonterminal1.cc
Used By:
augmentgrammar.cc: Rules::augmentGrammar(Symbol*)
definenonterminal.cc: Parser::defineNonTerminal(std::string const&, std::string const&)
requirenonterminal.cc: Parser::requireNonTerminal(std::string const&)
usesymbol.cc: Parser::useSymbol()
nonTerminalSymbol(NonTerminal const*, std::ostream&)
Full name: Writer::nonTerminalSymbol(NonTerminal const*, std::ostream&)
Source: nonterminalsymbol.cc
Used By:
symbolicnames.cc: Writer::symbolicNames() const
notReducible(unsigned int)
Full name: State::notReducible(unsigned int)
Source: notreducible.cc
Used By:
setitems.cc: State::setItems()
octal()
Full name: Scanner::octal()
Source: octal.cc
Used By:
lex.cc: Scanner::executeAction__(unsigned int)
oInsert(std::ostream&) const
Full name: FollowSet::oInsert(std::ostream&) const
Source: oinsert.cc
Used By:
showfollow.cc: GLOBALS showfollow.cc 21showfollow.o
open(unsigned int, std::string const&)
Full name: Block::open(unsigned int, std::string const&)
Source: open.cc
Used By:
lex.cc: Scanner::executeAction__(unsigned int)
openRule(std::string const&)
Full name: Parser::openRule(std::string const&)
Source: openrule.cc
Used By:
parse.cc: Parser::executeAction(int)
operator()(std::string const&)
Full name: Block::operator()(std::string const&)
Source: opfuncharp.cc
Used By:
lex.cc: Scanner::executeAction__(unsigned int)
operator+=(FirstSet const&)
Full name: FollowSet::operator+=(FirstSet const&)
Source: operatorplusis2.cc
Used By:
addfollowfromfirst.cc: Rules::addFollowFromFirst(Production*)
operator+=(FirstSet const&)
Full name: FirstSet::operator+=(FirstSet const&)
Source: operatorplusis1.cc
Used By:
firstbeyonddot.cc: Item::firstBeyondDot(FirstSet*) const
operatorplusis.cc: LookaheadSet::operator+=(LookaheadSet const&)
operatorplusis2.cc: LookaheadSet::operator+=(FirstSet const&)
setfirst.cc: NonTerminal::setFirst(NonTerminal*)
addfollowfromfirst.cc: Rules::addFollowFromFirst(Production*)
operator+=(FollowSet const&)
Full name: FollowSet::operator+=(FollowSet const&)
Source: operatorplusis1.cc
Used By:
expandfollow.cc: Rules::expandFollow(Production*)
operator+=(LookaheadSet const&)
Full name: LookaheadSet::operator+=(LookaheadSet const&)
Source: operatorplusis.cc
Used By:
enlargela.cc: StateItem::enlargeLA(LookaheadSet const&)
propagate.cc: StateItem::propagate(unsigned int, std::vector >&, LookaheadSet const&)
propagatela.cc: StateItem::propagateLA(StateItem&, std::vector >&)
operator+=(std::set, std::allocator > const&)
Full name: FirstSet::operator+=(std::set, std::allocator > const&)
Source: operatorplusis2.cc
Used By:
operatorplusis1.cc: FirstSet::operator+=(FirstSet const&)
operator-=(LookaheadSet const&)
Full name: LookaheadSet::operator-=(LookaheadSet const&)
Source: operatorsubis.cc
Used By:
removeconflicts.cc: RRConflict::removeConflicts(std::vector >&)
operator-=(Symbol const*)
Full name: LookaheadSet::operator-=(Symbol const*)
Source: operatorsubis2.cc
Used By:
removereductions.cc: SRConflict::removeReductions(std::vector >&)
operator<<(std::ostream&, AtDollar const&)
Full name: operator<<(std::ostream&, AtDollar const&)
Source: operatorinsert.cc
Used By:
operatorinsert.cc: operator<<(std::ostream&, Block const&)
operator<<(std::ostream&, LookaheadSet const&)
Full name: operator<<(std::ostream&, LookaheadSet const&)
Source: operatorinsert.cc
Used By:
insert.cc: RRConflict::insert(std::ostream&) const
itemcontext.cc: StateItem::itemContext(std::ostream&) const
operator==(Item const&) const
Full name: Item::operator==(Item const&) const
Source: operatorequal.cc
Used By:
containskernelitem.cc: StateItem::containsKernelItem(Item const&, unsigned int, std::vector > const&)
operator>=(LookaheadSet const&) const
Full name: LookaheadSet::operator>=(LookaheadSet const&) const
Source: operatorgreaterequal.cc
Used By:
enlargela.cc: StateItem::enlargeLA(LookaheadSet const&)
propagate.cc: StateItem::propagate(unsigned int, std::vector >&, LookaheadSet const&)
Options()
Full name: Options::Options()
Source: options1.cc
Used By:
instance.cc: Options::instance()
ParserBase()
Full name: ParserBase::ParserBase()
Source: parse.cc
Used By:
parser1.cc: Parser::Parser(Rules&)
plainItem(std::ostream&) const
Full name: Item::plainItem(std::ostream&) const
Source: plainitem.cc
Used By:
data.cc: GLOBALS data.cc 11data.o
plainItem(std::ostream&) const
Full name: StateItem::plainItem(std::ostream&) const
Source: plainitem.cc
Used By:
data.cc: GLOBALS data.cc 24data.o
plainWarnings()
Full name: Global::plainWarnings()
Source: plainwarnings.cc
Used By:
unused.cc: NonTerminal::unused(NonTerminal const*)
unused.cc: Production::unused(Production const*)
showunusednonterminals.cc: Rules::showUnusedNonTerminals() const
unused.cc: Terminal::unused(Terminal const*)
generator1.cc: Generator::Generator(Rules const&, std::unordered_map, std::equal_to, std::allocator > > const&)
pNrDotItem(std::ostream&) const
Full name: Item::pNrDotItem(std::ostream&) const
Source: pnrdotitem.cc
Used By:
insertext.cc: State::insertExt(std::ostream&) const
polymorphic(std::ostream&) const
Full name: Generator::polymorphic(std::ostream&) const
Source: polymorphic.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
polymorphicImpl(std::ostream&) const
Full name: Generator::polymorphicImpl(std::ostream&) const
Source: polymorphicimpl.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
polymorphicInline(std::ostream&) const
Full name: Generator::polymorphicInline(std::ostream&) const
Source: polymorphicinline.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
polymorphicSpecializations(std::ostream&) const
Full name: Generator::polymorphicSpecializations(std::ostream&) const
Source: polymorphicspecializations.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
popStream()
Full name: Scanner::popStream()
Source: popstream.cc
Used By:
lex.cc: Scanner::lex__()
popStream()
Full name: ScannerBase::popStream()
Source: lex.cc
Used By:
popstream.cc: Scanner::popStream()
predefine(Terminal const*)
Full name: Parser::predefine(Terminal const*)
Source: predefine.cc
Used By:
parser1.cc: Parser::Parser(Rules&)
preIncludes(std::ostream&) const
Full name: Generator::preIncludes(std::ostream&) const
Source: preincludes.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
print(std::ostream&) const
Full name: Generator::print(std::ostream&) const
Source: print.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
processShiftReduceConflict(__gnu_cxx::__normal_iterator > > const&, unsigned int)
Full name: SRConflict::processShiftReduceConflict(__gnu_cxx::__normal_iterator > > const&, unsigned int)
Source: processshiftreduceconflict.cc
Used By:
visitreduction.cc: SRConflict::visitReduction(unsigned int)
Production(Symbol const*)
Full name: Production::Production(Symbol const*)
Source: production1.cc
Used By:
addproduction.cc: Rules::addProduction()
sethiddenaction.cc: Rules::setHiddenAction(Block const&)
productionInfo(Production const*, std::ostream&)
Full name: Writer::productionInfo(Production const*, std::ostream&)
Source: productioninfo.cc
Used By:
productions.cc: Writer::productions() const
productions() const
Full name: Writer::productions() const
Source: productions.cc
Used By:
staticdata.cc: Generator::staticData(std::ostream&) const
propagate(unsigned int, std::vector >&, LookaheadSet const&)
Full name: StateItem::propagate(unsigned int, std::vector >&, LookaheadSet const&)
Source: propagate.cc
Used By:
propagatela.cc: StateItem::propagateLA(StateItem&, std::vector >&)
propagateLA()
Full name: State::propagateLA()
Source: propagatela.cc
Used By:
define.cc: State::define()
propagateLA(StateItem&, std::vector >&)
Full name: StateItem::propagateLA(StateItem&, std::vector >&)
Source: propagatela.cc
Used By:
propagatela.cc: State::propagateLA()
pushStream(std::string const&)
Full name: ScannerBase::pushStream(std::string const&)
Source: lex.cc
Used By:
handlexstring.cc: Scanner::handleXstring(unsigned int)
quotedName(std::ostream&) const
Full name: Terminal::quotedName(std::ostream&) const
Source: quotedname.cc
Used By:
setprecedence.cc: Rules::setPrecedence(Terminal const*)
redo(unsigned int)
Full name: ScannerBase::redo(unsigned int)
Source: lex.cc
Used By:
handlexstring.cc: Scanner::handleXstring(unsigned int)
reduction(FBB::Table&, StateItem const&)
Full name: Writer::reduction(FBB::Table&, StateItem const&)
Source: reduction.cc
Used By:
reductions.cc: Writer::reductions(FBB::Table&, State const&)
reductions(FBB::Table&, State const&)
Full name: Writer::reductions(FBB::Table&, State const&)
Source: reductions.cc
Used By:
srtable.cc: Writer::srTable(State const*, std::string const&, FBB::Table&, std::ostream&)
reductionSymbol(Element const*, unsigned int, FBB::Table&)
Full name: Writer::reductionSymbol(Element const*, unsigned int, FBB::Table&)
Source: reductionsymbol.cc
Used By:
reduction.cc: Writer::reduction(FBB::Table&, StateItem const&)
removeConflicts(std::vector >&)
Full name: RRConflict::removeConflicts(std::vector >&)
Source: removeconflicts.cc
Used By:
checkconflicts.cc: State::checkConflicts()
removeReductions(std::vector >&)
Full name: SRConflict::removeReductions(std::vector >&)
Source: removereductions.cc
Used By:
checkconflicts.cc: State::checkConflicts()
removeShift(RmShift const&, std::vector >&, unsigned int*)
Full name: Next::removeShift(RmShift const&, std::vector >&, unsigned int*)
Source: removeshift.cc
Used By:
removeshifts.cc: SRConflict::removeShifts(std::vector >&)
removeShifts(std::vector >&)
Full name: SRConflict::removeShifts(std::vector >&)
Source: removeshifts.cc
Used By:
checkconflicts.cc: State::checkConflicts()
replace(std::string&, char, std::string const&)
Full name: Generator::replace(std::string&, char, std::string const&)
Source: replace.cc
Used By:
implementationheader.cc: Generator::implementationHeader() const
requiredTokens(std::ostream&) const
Full name: Generator::requiredTokens(std::ostream&) const
Source: requiredtokens.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
requireNonTerminal(std::string const&)
Full name: Parser::requireNonTerminal(std::string const&)
Source: requirenonterminal.cc
Used By:
openrule.cc: Parser::openRule(std::string const&)
reRead(unsigned int)
Full name: ScannerBase::Input::reRead(unsigned int)
Source: lex.cc
Used By:
returntypespec.cc: Scanner::returnTypeSpec()
returnPolymorphic(AtDollar const&) const
Full name: Parser::returnPolymorphic(AtDollar const&) const
Source: returnpolymorphic.cc
Used By:
handledollar.cc: Parser::handleDollar(Block&, AtDollar const&, int)
returnQuoted(void (Scanner::*)())
Full name: Scanner::returnQuoted(void (Scanner::*)())
Source: returnquoted.cc
Used By:
lex.cc: Scanner::executeAction__(unsigned int)
returnSingle(AtDollar const&) const
Full name: Parser::returnSingle(AtDollar const&) const
Source: returnsingle.cc
Used By:
handledollar.cc: Parser::handleDollar(Block&, AtDollar const&, int)
returnTypeSpec()
Full name: Scanner::returnTypeSpec()
Source: returntypespec.cc
Used By:
lex.cc: Scanner::executeAction__(unsigned int)
returnUnion(AtDollar const&) const
Full name: Parser::returnUnion(AtDollar const&) const
Source: returnunion.cc
Used By:
handledollar.cc: Parser::handleDollar(Block&, AtDollar const&, int)
RmReduction(unsigned int, unsigned int, Symbol const*, bool)
Full name: RmReduction::RmReduction(unsigned int, unsigned int, Symbol const*, bool)
Source: rmreduction1.cc
Used By:
handlesrconflict.cc: SRConflict::handleSRconflict(unsigned int, __gnu_cxx::__normal_iterator > > const&, unsigned int)
RmShift(unsigned int, bool)
Full name: RmShift::RmShift(unsigned int, bool)
Source: rmshift1.cc
Used By:
handlesrconflict.cc: SRConflict::handleSRconflict(unsigned int, __gnu_cxx::__normal_iterator > > const&, unsigned int)
RRConflict(std::vector > const&, std::vector > const&)
Full name: RRConflict::RRConflict(std::vector > const&, std::vector > const&)
Source: rrconflict1.cc
Used By:
state1.cc: State::State(unsigned int)
RRData(LookaheadSet)
Full name: RRData::RRData(LookaheadSet)
Source: rrdata1.cc
Used By:
comparereductions.cc: RRConflict::compareReductions(unsigned int)
s_acceptProductionNr
Full name: Rules::s_acceptProductionNr
Source: data.cc
Used By:
augmentgrammar.cc: Rules::augmentGrammar(Symbol*)
s_acceptState
Full name: State::s_acceptState
Source: data.cc
Used By:
define.cc: State::define()
srtable.cc: Writer::srTable(State const*, std::string const&, FBB::Table&, std::ostream&)
s_baseFlag
Full name: Generator::s_baseFlag
Source: data.cc
Used By:
filter.cc: Generator::filter(std::istream&, std::ostream&, bool) const
s_baseFlagSize
Full name: Generator::s_baseFlagSize
Source: data.cc
Used By:
filter.cc: Generator::filter(std::istream&, std::ostream&, bool) const
s_counter
Full name: NonTerminal::s_counter
Source: data.cc
Used By:
setfirst.cc: NonTerminal::setFirst(NonTerminal*)
addfollowtofollow.cc: Rules::addFollowToFollow()
determinefirst.cc: Rules::determineFirst()
s_defaultBaseClassSkeleton
Full name: Options::s_defaultBaseClassSkeleton
Source: data.cc
Used By:
setskeletons.cc: Options::setSkeletons()
s_defaultClassName
Full name: Options::s_defaultClassName
Source: data.cc
Used By:
setbasicstrings.cc: Options::setBasicStrings()
s_defaultClassSkeleton
Full name: Options::s_defaultClassSkeleton
Source: data.cc
Used By:
setskeletons.cc: Options::setSkeletons()
s_defaultImplementationSkeleton
Full name: Options::s_defaultImplementationSkeleton
Source: data.cc
Used By:
setskeletons.cc: Options::setSkeletons()
s_defaultParsefunSkeleton
Full name: Options::s_defaultParsefunSkeleton
Source: data.cc
Used By:
setskeletons.cc: Options::setSkeletons()
s_defaultParsefunSource
Full name: Options::s_defaultParsefunSource
Source: data.cc
Used By:
setpathstrings.cc: Options::setPathStrings()
s_defaultPolymorphicInlineSkeleton
Full name: Options::s_defaultPolymorphicInlineSkeleton
Source: data.cc
Used By:
setskeletons.cc: Options::setSkeletons()
s_defaultPolymorphicSkeleton
Full name: Options::s_defaultPolymorphicSkeleton
Source: data.cc
Used By:
setskeletons.cc: Options::setSkeletons()
s_defaultScannerClassName
Full name: Options::s_defaultScannerClassName
Source: data.cc
Used By:
setbasicstrings.cc: Options::setBasicStrings()
s_defaultScannerMatchedTextFunction
Full name: Options::s_defaultScannerMatchedTextFunction
Source: data.cc
Used By:
setbasicstrings.cc: Options::setBasicStrings()
s_defaultScannerTokenFunction
Full name: Options::s_defaultScannerTokenFunction
Source: data.cc
Used By:
setbasicstrings.cc: Options::setBasicStrings()
s_defaultSkeletonDirectory
Full name: Options::s_defaultSkeletonDirectory
Source: data.cc
Used By:
setbasicstrings.cc: Options::setBasicStrings()
s_dfaBase__
Full name: ScannerBase::s_dfaBase__
Source: lex.cc
Used By:
eoln.cc: Scanner::eoln()
handlexstring.cc: Scanner::handleXstring(unsigned int)
returnquoted.cc: Scanner::returnQuoted(void (Scanner::*)())
returntypespec.cc: Scanner::returnTypeSpec()
parse.cc: Parser::executeAction(int)
s_eofTerminal
Full name: Rules::s_eofTerminal
Source: data.cc
Used By:
operatorsubis2.cc: LookaheadSet::operator-=(Symbol const*)
parser1.cc: Parser::Parser(Rules&)
reduction.cc: Writer::reduction(FBB::Table&, StateItem const&)
srtable.cc: Writer::srTable(State const*, std::string const&, FBB::Table&, std::ostream&)
selectsymbolic.cc: Generator::selectSymbolic(Terminal const*, std::vector >&)
s_errorTerminal
Full name: Rules::s_errorTerminal
Source: data.cc
Used By:
notreducible.cc: State::notReducible(unsigned int)
parser1.cc: Parser::Parser(Rules&)
s_hiddenName
Full name: Parser::s_hiddenName
Source: data.cc
Used By:
nexthiddenname.cc: Parser::nextHiddenName()
s_insert
Full name: Generator::s_insert
Source: data.cc
Used By:
insert.cc: Generator::insert(std::ostream&) const
s_insert
Full name: State::s_insert
Source: data.cc
Used By:
allstates.cc: State::allStates()
define.cc: State::define()
s_insertPtr
Full name: NonTerminal::s_insertPtr
Source: data.cc
Used By:
insert.cc: Item::insert(std::ostream&, Production const*) const
transitionkernel.cc: Next::transitionKernel(std::ostream&) const
v.cc: NonTerminal::insert(std::ostream&) const
showfirst.cc: Rules::showFirst() const
showfollow.cc: Rules::showFollow() const
insertext.cc: State::insertExt(std::ostream&) const
multiplydefined.cc: Parser::multiplyDefined(Symbol const*)
reductionsymbol.cc: Writer::reductionSymbol(Element const*, unsigned int, FBB::Table&)
transition.cc: Writer::transition(Next const&, FBB::Table&)
s_insertPtr
Full name: Terminal::s_insertPtr
Source: data.cc
Used By:
insert.cc: Item::insert(std::ostream&, Production const*) const
transitionkernel.cc: Next::transitionKernel(std::ostream&) const
setprecedence.cc: Rules::setPrecedence(Terminal const*)
showfirst.cc: Rules::showFirst() const
showterminals.cc: Rules::showTerminals() const
showunusedrules.cc: Rules::showUnusedRules() const
showunusedterminals.cc: Rules::showUnusedTerminals() const
insertext.cc: State::insertExt(std::ostream&) const
destructor.cc: GLOBALS destructor.cc 28destructor.o
multiplydefined.cc: Parser::multiplyDefined(Symbol const*)
reductionsymbol.cc: Writer::reductionSymbol(Element const*, unsigned int, FBB::Table&)
transition.cc: Writer::transition(Next const&, FBB::Table&)
oinsert.cc: FollowSet::oInsert(std::ostream&) const
filter.cc: Generator::filter(std::istream&, std::ostream&, bool) const
s_insertPtr
Full name: StateItem::s_insertPtr
Source: data.cc
Used By:
insertext.cc: State::insertExt(std::ostream&) const
insertstd.cc: State::insertStd(std::ostream&) const
s_insertPtr
Full name: Item::s_insertPtr
Source: data.cc
Used By:
insertext.cc: State::insertExt(std::ostream&) const
itemcontext.cc: StateItem::itemContext(std::ostream&) const
plainitem.cc: StateItem::plainItem(std::ostream&) const
s_insertPtr
Full name: Next::s_insertPtr
Source: data.cc
Used By:
insertext.cc: State::insertExt(std::ostream&) const
insertstd.cc: State::insertStd(std::ostream&) const
s_locationValue
Full name: Parser::s_locationValue
Source: data.cc
Used By:
handleatsign.cc: Parser::handleAtSign(Block&, AtDollar const&, int)
s_locationValueStack
Full name: Parser::s_locationValueStack
Source: data.cc
Used By:
handleatsign.cc: Parser::handleAtSign(Block&, AtDollar const&, int)
s_maxValue
Full name: Terminal::s_maxValue
Source: data.cc
Used By:
assignnonterminalnumbers.cc: Rules::assignNonTerminalNumbers()
terminal1.cc: Terminal::Terminal(std::string const&, Symbol::Type, unsigned int, Terminal::Association, std::string const&)
s_namespaceBaseFlag
Full name: Generator::s_namespaceBaseFlag
Source: data.cc
Used By:
filter.cc: Generator::filter(std::istream&, std::ostream&, bool) const
s_namespaceBaseFlagSize
Full name: Generator::s_namespaceBaseFlagSize
Source: data.cc
Used By:
filter.cc: Generator::filter(std::istream&, std::ostream&, bool) const
s_nConflicts
Full name: SRConflict::s_nConflicts
Source: data.cc
Used By:
handlesrconflict.cc: SRConflict::handleSRconflict(unsigned int, __gnu_cxx::__normal_iterator > > const&, unsigned int)
define.cc: State::define()
s_nConflicts
Full name: RRConflict::s_nConflicts
Source: data.cc
Used By:
comparereductions.cc: RRConflict::compareReductions(unsigned int)
define.cc: State::define()
s_nExpectedConflicts
Full name: Rules::s_nExpectedConflicts
Source: data.cc
Used By:
define.cc: State::define()
parse.cc: Parser::executeAction(int)
s_nHidden
Full name: Parser::s_nHidden
Source: data.cc
Used By:
nexthiddenname.cc: Parser::nextHiddenName()
s_nr
Full name: Production::s_nr
Source: data.cc
Used By:
production1.cc: Production::Production(Symbol const*)
s_number
Full name: NonTerminal::s_number
Source: data.cc
Used By:
assignnonterminalnumbers.cc: Rules::assignNonTerminalNumbers()
s_options
Full name: Options::s_options
Source: data.cc
Used By:
instance.cc: Options::instance()
s_precedence
Full name: Terminal::s_precedence
Source: data.cc
Used By:
terminal1.cc: Terminal::Terminal(std::string const&, Symbol::Type, unsigned int, Terminal::Association, std::string const&)
terminal2.cc: Terminal::Terminal(std::string const&, std::string const&, Symbol::Type)
expectrules.cc: Parser::expectRules()
parse.cc: Parser::executeAction(int)
s_semanticValue
Full name: Parser::s_semanticValue
Source: data.cc
Used By:
handledollar.cc: Parser::handleDollar(Block&, AtDollar const&, int)
savedollar1.cc: Parser::saveDollar1(Block&, int)
s_semanticValueStack
Full name: Parser::s_semanticValueStack
Source: data.cc
Used By:
handledollar.cc: Parser::handleDollar(Block&, AtDollar const&, int)
savedollar1.cc: Parser::saveDollar1(Block&, int)
s_startProduction
Full name: Production::s_startProduction
Source: data.cc
Used By:
initialstate.cc: State::initialState()
s_startSymbol
Full name: Rules::s_startSymbol
Source: data.cc
Used By:
derivesentence.cc: Grammar::deriveSentence()
augmentgrammar.cc: Rules::augmentGrammar(Symbol*)
s_state
Full name: State::s_state
Source: data.cc
Used By:
allstates.cc: State::allStates()
define.cc: State::define()
distributela.cc: State::distributeLA(Next&, State::LookaheadContext&)
findkernel.cc: State::findKernel(std::vector
- > const&) const
newstate.cc: State::newState()
nextstate.cc: State::nextState(Next&)
srtables.cc: Writer::srTables() const
statesarray.cc: Writer::statesArray() const
s_stateName
Full name: StateType::s_stateName
Source: data.cc
Used By:
srtable.cc: Writer::srTable(State const*, std::string const&, FBB::Table&, std::ostream&)
s_stype__
Full name: Parser::s_stype__
Source: data.cc
Used By:
checkfirsttype.cc: Parser::checkFirstType()
semtag.cc: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::string const&) const) const
s_threadConst
Full name: Writer::s_threadConst
Source: data.cc
Used By:
srtable.cc: Writer::srTable(State const*, std::string const&, FBB::Table&, std::ostream&)
statesarray.cc: Writer::statesArray() const
writer0.cc: Writer::Writer(std::string const&, Rules const&)
s_undefined
Full name: NonTerminal::s_undefined
Source: data.cc
Used By:
undefined.cc: NonTerminal::undefined(NonTerminal const*)
showunusednonterminals.cc: Rules::showUnusedNonTerminals() const
s_unused
Full name: NonTerminal::s_unused
Source: data.cc
Used By:
unused.cc: NonTerminal::unused(NonTerminal const*)
showunusednonterminals.cc: Rules::showUnusedNonTerminals() const
s_unused
Full name: Production::s_unused
Source: data.cc
Used By:
unused.cc: Production::unused(Production const*)
showunusedrules.cc: Rules::showUnusedRules() const
s_value
Full name: Terminal::s_value
Source: data.cc
Used By:
setvalue.cc: Terminal::setValue(unsigned int)
terminal1.cc: Terminal::Terminal(std::string const&, Symbol::Type, unsigned int, Terminal::Association, std::string const&)
s_valueSet
Full name: Terminal::s_valueSet
Source: data.cc
Used By:
setunique.cc: Terminal::setUnique(unsigned int)
setvalue.cc: Terminal::setValue(unsigned int)
s_yylex
Full name: Options::s_yylex
Source: data.cc
Used By:
setbasicstrings.cc: Options::setBasicStrings()
s_YYText
Full name: Options::s_YYText
Source: data.cc
Used By:
setbasicstrings.cc: Options::setBasicStrings()
saveDollar1(Block&, int)
Full name: Parser::saveDollar1(Block&, int)
Source: savedollar1.cc
Used By:
substituteblock.cc: Parser::substituteBlock(int, Block&)
Scanner(std::string const&)
Full name: Scanner::Scanner(std::string const&)
Source: scanner1.cc
Used By:
parser1.cc: Parser::Parser(Rules&)
ScannerBase(std::string const&, std::string const&)
Full name: ScannerBase::ScannerBase(std::string const&, std::string const&)
Source: lex.cc
Used By:
scanner1.cc: Scanner::Scanner(std::string const&)
scannerH(std::ostream&) const
Full name: Generator::scannerH(std::ostream&) const
Source: scannerh.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
scannerObject(std::ostream&) const
Full name: Generator::scannerObject(std::ostream&) const
Source: scannerobject.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
selectSymbolic(Terminal const*, std::vector >&)
Full name: Generator::selectSymbolic(Terminal const*, std::vector >&)
Source: selectsymbolic.cc
Used By:
tokens.cc: Generator::tokens(std::ostream&) const
semTag(char const*, AtDollar const&, bool (Parser::*)(std::string const&) const) const
Full name: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::string const&) const) const
Source: semtag.cc
Used By:
returnpolymorphic.cc: Parser::returnPolymorphic(AtDollar const&) const
returnsingle.cc: Parser::returnSingle(AtDollar const&) const
returnunion.cc: Parser::returnUnion(AtDollar const&) const
setAccessorVariables()
Full name: Options::setAccessorVariables()
Source: setaccessorvariables.cc
Used By:
cleanup.cc: Parser::cleanup()
setBasicStrings()
Full name: Options::setBasicStrings()
Source: setbasicstrings.cc
Used By:
setaccessorvariables.cc: Options::setAccessorVariables()
setBooleans()
Full name: Options::setBooleans()
Source: setbooleans.cc
Used By:
setaccessorvariables.cc: Options::setAccessorVariables()
setChildren(std::vector > const&)
Full name: StateItem::setChildren(std::vector > const&)
Source: setchildren.cc
Used By:
adddependents.cc: State::addDependents(Next const&, Symbol const*, unsigned int)
setDebug(bool)
Full name: ScannerBase::setDebug(bool)
Source: lex.cc
Used By:
parser1.cc: Parser::Parser(Rules&)
setFirst(NonTerminal*)
Full name: NonTerminal::setFirst(NonTerminal*)
Source: setfirst.cc
Used By:
determinefirst.cc: Rules::determineFirst()
setHiddenAction(Block const&)
Full name: Rules::setHiddenAction(Block const&)
Source: sethiddenaction.cc
Used By:
nestedblock.cc: Parser::nestedBlock(Block&)
setIdx(RRData::Keep, unsigned int, unsigned int)
Full name: RRData::setIdx(RRData::Keep, unsigned int, unsigned int)
Source: setidx.cc
Used By:
comparereductions.cc: RRConflict::compareReductions(unsigned int)
setItems()
Full name: State::setItems()
Source: setitems.cc
Used By:
construct.cc: State::construct()
setLA(LookaheadSet const&)
Full name: StateItem::setLA(LookaheadSet const&)
Source: setla.cc
Used By:
initialstate.cc: State::initialState()
setLineNrs() const
Full name: Scanner::setLineNrs() const
Source: setlinenrs.cc
Used By:
eoln.cc: Scanner::eoln()
handlexstring.cc: Scanner::handleXstring(unsigned int)
lex.cc: Scanner::executeAction__(unsigned int)
settags.cc: Scanner::setTags() const
setLocationDecl(std::string const&)
Full name: Options::setLocationDecl(std::string const&)
Source: setlocationdecl.cc
Used By:
parse.cc: Parser::executeAction(int)
setLtype()
Full name: Options::setLtype()
Source: setltype.cc
Used By:
parse.cc: Parser::executeAction(int)
setNonTerminalTypes()
Full name: Rules::setNonTerminalTypes()
Source: setnonterminaltypes.cc
Used By:
expectrules.cc: Parser::expectRules()
setOpt(char const*, std::string const&)
Full name: Options::setOpt(char const*, std::string const&)
Source: setopt.cc
Used By:
setbasicstrings.cc: Options::setBasicStrings()
setPath(std::string*, int, std::string const&, char const*, char const*)
Full name: Options::setPath(std::string*, int, std::string const&, char const*, char const*)
Source: setpath2.cc
Used By:
setpathstrings.cc: Options::setPathStrings()
setPathStrings()
Full name: Options::setPathStrings()
Source: setpathstrings.cc
Used By:
setaccessorvariables.cc: Options::setAccessorVariables()
setPolymorphicDecl()
Full name: Options::setPolymorphicDecl()
Source: setpolymorphicdecl.cc
Used By:
setpolymorphicdecl.cc: Parser::setPolymorphicDecl()
setPolymorphicDecl()
Full name: Parser::setPolymorphicDecl()
Source: setpolymorphicdecl.cc
Used By:
parse.cc: Parser::executeAction(int)
setPrecedence(int)
Full name: Parser::setPrecedence(int)
Source: setprecedence.cc
Used By:
parse.cc: Parser::executeAction(int)
setPrecedence(Terminal const*)
Full name: Rules::setPrecedence(Terminal const*)
Source: setprecedence.cc
Used By:
setprecedence.cc: Parser::setPrecedence(int)
setPrecedence(Terminal const*)
Full name: Production::setPrecedence(Terminal const*)
Source: setprecedence.cc
Used By:
setprecedence.cc: Rules::setPrecedence(Terminal const*)
updateprecedence.cc: Rules::updatePrecedence(Production*, std::vector > const&)
setPrintTokens()
Full name: Options::setPrintTokens()
Source: setprinttokens.cc
Used By:
parse.cc: Parser::executeAction(int)
setQuotedStrings()
Full name: Options::setQuotedStrings()
Source: setquotedstrings.cc
Used By:
setaccessorvariables.cc: Options::setAccessorVariables()
setRequiredTokens(unsigned int)
Full name: Options::setRequiredTokens(unsigned int)
Source: setrequiredtokens.cc
Used By:
parse.cc: Parser::executeAction(int)
setSkeletons()
Full name: Options::setSkeletons()
Source: setskeletons.cc
Used By:
setaccessorvariables.cc: Options::setAccessorVariables()
setStart()
Full name: Parser::setStart()
Source: setstart.cc
Used By:
parse.cc: Parser::executeAction(int)
setStype()
Full name: Options::setStype()
Source: setstype.cc
Used By:
parse.cc: Parser::executeAction(int)
setTags() const
Full name: Scanner::setTags() const
Source: settags.cc
Used By:
handlexstring.cc: Scanner::handleXstring(unsigned int)
popstream.cc: Scanner::popStream()
scanner1.cc: Scanner::Scanner(std::string const&)
setUnionDecl()
Full name: Parser::setUnionDecl()
Source: setuniondecl.cc
Used By:
parse.cc: Parser::executeAction(int)
setUnionDecl(std::string const&)
Full name: Options::setUnionDecl(std::string const&)
Source: setuniondecl.cc
Used By:
setuniondecl.cc: Parser::setUnionDecl()
setUnique(unsigned int)
Full name: Terminal::setUnique(unsigned int)
Source: setunique.cc
Used By:
setvalue.cc: Terminal::setValue(unsigned int)
setValue(unsigned int)
Full name: Terminal::setValue(unsigned int)
Source: setvalue.cc
Used By:
definetokenname.cc: Parser::defineTokenName(std::string const&, bool)
setVerbosity()
Full name: Options::setVerbosity()
Source: setverbosity.cc
Used By:
cleanup.cc: Parser::cleanup()
showFilenames() const
Full name: Options::showFilenames() const
Source: showfilenames.cc
Used By:
cleanup.cc: Parser::cleanup()
solveByAssociation() const
Full name: Next::solveByAssociation() const
Source: solvebyassociation.cc
Used By:
handlesrconflict.cc: SRConflict::handleSRconflict(unsigned int, __gnu_cxx::__normal_iterator > > const&, unsigned int)
solveByPrecedence(Symbol const*) const
Full name: Next::solveByPrecedence(Symbol const*) const
Source: solvebyprecedence.cc
Used By:
handlesrconflict.cc: SRConflict::handleSRconflict(unsigned int, __gnu_cxx::__normal_iterator > > const&, unsigned int)
SRConflict(std::vector > const&, std::vector > const&, std::vector > const&)
Full name: SRConflict::SRConflict(std::vector > const&, std::vector > const&, std::vector > const&)
Source: srconflict1.cc
Used By:
state1.cc: State::State(unsigned int)
srTable(State const*, std::string const&, FBB::Table&, std::ostream&)
Full name: Writer::srTable(State const*, std::string const&, FBB::Table&, std::ostream&)
Source: srtable.cc
Used By:
srtables.cc: Writer::srTables() const
srTables() const
Full name: Writer::srTables() const
Source: srtables.cc
Used By:
staticdata.cc: Generator::staticData(std::ostream&) const
standard(std::ostream&) const
Full name: Production::standard(std::ostream&) const
Source: standard.cc
Used By:
unused.cc: Production::unused(Production const*)
showrules.cc: Rules::showRules() const
checkfirsttype.cc: Parser::checkFirstType()
errindextoolarge.cc: Parser::errIndexTooLarge(AtDollar const&, int) const
errnosemantic.cc: Parser::errNoSemantic(char const*, AtDollar const&, std::string const&) const
negativeindex.cc: Parser::negativeIndex(AtDollar const&) const
warnautoignored.cc: Parser::warnAutoIgnored(char const*, AtDollar const&) const
warnautooverride.cc: Parser::warnAutoOverride(AtDollar const&) const
warnuntaggedvalue.cc: Parser::warnUntaggedValue(AtDollar const&) const
productioninfo.cc: Writer::productionInfo(Production const*, std::ostream&)
State(unsigned int)
Full name: State::State(unsigned int)
Source: state1.cc
Used By:
newstate.cc: State::newState()
StateItem(Item const&)
Full name: StateItem::StateItem(Item const&)
Source: stateitem2.cc
Used By:
addstate.cc: State::addState(std::vector
- > const&)
initialstate.cc: State::initialState()
addproduction.cc: StateItem::addProduction(Production const*, std::vector >&, unsigned int)
statesArray() const
Full name: Writer::statesArray() const
Source: statesarray.cc
Used By:
staticdata.cc: Generator::staticData(std::ostream&) const
staticData(std::ostream&) const
Full name: Generator::staticData(std::ostream&) const
Source: staticdata.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
stype(std::ostream&) const
Full name: Generator::stype(std::ostream&) const
Source: stype.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
sType(unsigned int) const
Full name: Rules::sType(unsigned int) const
Source: stype.cc
Used By:
checkfirsttype.cc: Parser::checkFirstType()
returnpolymorphic.cc: Parser::returnPolymorphic(AtDollar const&) const
returnunion.cc: Parser::returnUnion(AtDollar const&) const
semtag.cc: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::string const&) const) const
substituteBlock(int, Block&)
Full name: Parser::substituteBlock(int, Block&)
Source: substituteblock.cc
Used By:
installaction.cc: Parser::installAction(Block&)
nestedblock.cc: Parser::nestedBlock(Block&)
summarizeActions()
Full name: State::summarizeActions()
Source: summarizeactions.cc
Used By:
define.cc: State::define()
Symbol(std::string const&, Symbol::Type, std::string const&)
Full name: Symbol::Symbol(std::string const&, Symbol::Type, std::string const&)
Source: symbol1.cc
Used By:
nonterminal1.cc: NonTerminal::NonTerminal(std::string const&, std::string const&, Symbol::Type)
terminal1.cc: Terminal::Terminal(std::string const&, Symbol::Type, unsigned int, Terminal::Association, std::string const&)
terminal2.cc: Terminal::Terminal(std::string const&, std::string const&, Symbol::Type)
symbolicNames() const
Full name: Writer::symbolicNames() const
Source: symbolicnames.cc
Used By:
staticdata.cc: Generator::staticData(std::ostream&) const
Terminal(std::string const&, std::string const&, Symbol::Type)
Full name: Terminal::Terminal(std::string const&, std::string const&, Symbol::Type)
Source: terminal2.cc
Used By:
data.cc: GLOBALS data.cc 21data.o
Terminal(std::string const&, Symbol::Type, unsigned int, Terminal::Association, std::string const&)
Full name: Terminal::Terminal(std::string const&, Symbol::Type, unsigned int, Terminal::Association, std::string const&)
Source: terminal1.cc
Used By:
defineterminal.cc: Parser::defineTerminal(std::string const&, Symbol::Type)
useterminal.cc: Parser::useTerminal()
terminalSymbol(Terminal const*, std::ostream&)
Full name: Writer::terminalSymbol(Terminal const*, std::ostream&)
Source: terminalsymbol.cc
Used By:
symbolicnames.cc: Writer::symbolicNames() const
termToNonterm(Symbol*, Symbol*)
Full name: Rules::termToNonterm(Symbol*, Symbol*)
Source: termtononterm.cc
Used By:
requirenonterminal.cc: Parser::requireNonTerminal(std::string const&)
threading(std::ostream&) const
Full name: Generator::threading(std::ostream&) const
Source: threading.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
tokens(std::ostream&) const
Full name: Generator::tokens(std::ostream&) const
Source: tokens.cc
Used By:
data.cc: GLOBALS data.cc 9data.o
transition(Next const&, FBB::Table&)
Full name: Writer::transition(Next const&, FBB::Table&)
Source: transition.cc
Used By:
transitions.cc: Writer::transitions(FBB::Table&, std::vector > const&)
transition(std::ostream&) const
Full name: Next::transition(std::ostream&) const
Source: transition.cc
Used By:
data.cc: GLOBALS data.cc 13data.o
transitionKernel(std::ostream&) const
Full name: Next::transitionKernel(std::ostream&) const
Source: transitionkernel.cc
Used By:
insertext.cc: State::insertExt(std::ostream&) const
transitions(FBB::Table&, std::vector > const&)
Full name: Writer::transitions(FBB::Table&, std::vector > const&)
Source: transitions.cc
Used By:
srtable.cc: Writer::srTable(State const*, std::string const&, FBB::Table&, std::ostream&)
undefined(NonTerminal const*)
Full name: NonTerminal::undefined(NonTerminal const*)
Source: undefined.cc
Used By:
showunusednonterminals.cc: Rules::showUnusedNonTerminals() const
undelimit(std::string const&)
Full name: Options::undelimit(std::string const&)
Source: undelimit.cc
Used By:
cleandir.cc: Options::cleanDir(std::string&, bool)
setopt.cc: Options::setOpt(char const*, std::string const&)
handlexstring.cc: Scanner::handleXstring(unsigned int)
definepathname.cc: Parser::definePathname(std::string*)
unused(NonTerminal const*)
Full name: NonTerminal::unused(NonTerminal const*)
Source: unused.cc
Used By:
showunusednonterminals.cc: Rules::showUnusedNonTerminals() const
unused(Production const*)
Full name: Production::unused(Production const*)
Source: unused.cc
Used By:
showunusedrules.cc: Rules::showUnusedRules() const
unused(Terminal const*)
Full name: Terminal::unused(Terminal const*)
Source: unused.cc
Used By:
showunusedterminals.cc: Rules::showUnusedTerminals() const
updateLA(unsigned int, State::LookaheadContext&)
Full name: State::updateLA(unsigned int, State::LookaheadContext&)
Source: updatela.cc
Used By:
distributela.cc: State::distributeLA(Next&, State::LookaheadContext&)
updatePrecedence(Production*, std::vector > const&)
Full name: Rules::updatePrecedence(Production*, std::vector > const&)
Source: updateprecedence.cc
Used By:
updateprecedences.cc: Rules::updatePrecedences()
useSymbol()
Full name: Parser::useSymbol()
Source: usesymbol.cc
Used By:
parse.cc: Parser::executeAction(int)
useTerminal()
Full name: Parser::useTerminal()
Source: useterminal.cc
Used By:
parse.cc: Parser::executeAction(int)
v_firstSet() const
Full name: NonTerminal::v_firstSet() const
Source: v.cc
Used By:
destructor.cc: NonTerminal::~NonTerminal()
v_value() const
Full name: NonTerminal::v_value() const
Source: v.cc
Used By:
destructor.cc: NonTerminal::~NonTerminal()
valueQuotedName(std::ostream&) const
Full name: Terminal::valueQuotedName(std::ostream&) const
Source: valuequotedname.cc
Used By:
showterminals.cc: Rules::showTerminals() const
showunusedterminals.cc: Rules::showUnusedTerminals() const
oinsert.cc: FollowSet::oInsert(std::ostream&) const
vectorIdx(unsigned int) const
Full name: Production::vectorIdx(unsigned int) const
Source: vectoridx.cc
Used By:
firstbeyonddot.cc: Item::firstBeyondDot(FirstSet*) const
hasrightofdot.cc: Item::hasRightOfDot(Symbol const&) const
stype.cc: Rules::sType(unsigned int) const
notreducible.cc: State::notReducible(unsigned int)
warnautooverride.cc: Parser::warnAutoOverride(AtDollar const&) const
version
Full name: version
Source: version.cc
Used By:
usage.cc: usage(std::string const&)
filter.cc: Generator::filter(std::istream&, std::ostream&, bool) const
visitReduction(unsigned int)
Full name: SRConflict::visitReduction(unsigned int)
Source: visitreduction.cc
Used By:
inspect.cc: SRConflict::inspect()
visitReduction(unsigned int)
Full name: RRConflict::visitReduction(unsigned int)
Source: visitreduction.cc
Used By:
inspect.cc: RRConflict::inspect()
warnAutoIgnored(char const*, AtDollar const&) const
Full name: Parser::warnAutoIgnored(char const*, AtDollar const&) const
Source: warnautoignored.cc
Used By:
semtag.cc: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::string const&) const) const
warnAutoOverride(AtDollar const&) const
Full name: Parser::warnAutoOverride(AtDollar const&) const
Source: warnautooverride.cc
Used By:
semtag.cc: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::string const&) const) const
warnExisting(std::string const&, std::string const&, std::string const&, std::string const&) const
Full name: Generator::warnExisting(std::string const&, std::string const&, std::string const&, std::string const&) const
Source: warnexisting.cc
Used By:
classheader.cc: Generator::classHeader() const
implementationheader.cc: Generator::implementationHeader() const
warnUntaggedValue(AtDollar const&) const
Full name: Parser::warnUntaggedValue(AtDollar const&) const
Source: warnuntaggedvalue.cc
Used By:
semtag.cc: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::string const&) const) const
Writer(std::string const&, Rules const&)
Full name: Writer::Writer(std::string const&, Rules const&)
Source: writer0.cc
Used By:
generator1.cc: Generator::Generator(Rules const&, std::unordered_map, std::equal_to, std::allocator > > const&)
year
Full name: year
Source: version.cc
Used By:
usage.cc: usage(std::string const&)
~Base()
Full name: Meta__::Base::~Base()
Source: parse.cc
Used By:
handleproductionelements.cc: GLOBALS handleproductionelements.cc 2handleproductionelements.o
~Element()
Full name: Element::~Element()
Source: destructor.cc
Used By:
destructor.cc: Symbol::~Symbol()
symbol1.cc: Symbol::Symbol(std::string const&, Symbol::Type, std::string const&)
~Symbol()
Full name: Symbol::~Symbol()
Source: destructor.cc
Used By:
destructor.cc: NonTerminal::~NonTerminal()
destructor.cc: Terminal::~Terminal()
terminal1.cc: Terminal::Terminal(std::string const&, Symbol::Type, unsigned int, Terminal::Association, std::string const&)
terminal2.cc: Terminal::Terminal(std::string const&, std::string const&, Symbol::Type)
~Terminal()
Full name: Terminal::~Terminal()
Source: destructor.cc
Used By:
data.cc: GLOBALS data.cc 21data.o
bisonc++-4.05.00/block/ 0000755 0001750 0001750 00000000000 12161635335 013346 5 ustar frank frank bisonc++-4.05.00/block/iddollar.cc 0000644 0001750 0001750 00000000653 12161611075 015446 0 ustar frank frank #include "block.ih"
// $$
void Block::IDdollar(size_t lineNr, string const &text)
{
size_t begin = text.find('<') + 1;
d_atDollar.push_back(
AtDollar(
AtDollar::DOLLAR, length(), lineNr,
text, text.substr(
begin,
text.find('>') - begin
),
numeric_limits::max()
)
);
append(text);
}
bisonc++-4.05.00/block/clear.cc 0000644 0001750 0001750 00000000143 12161611075 014734 0 ustar frank frank #include "block.ih"
void Block::clear()
{
erase();
d_atDollar.clear();
d_count = 0;
}
bisonc++-4.05.00/block/opfuncharp.cc 0000644 0001750 0001750 00000000225 12161611075 016014 0 ustar frank frank #include "block.ih"
bool Block::operator()(string const &text)
{
if (d_count == 0)
return false;
*this += text;
return true;
}
bisonc++-4.05.00/block/operatorinsert.cc 0000644 0001750 0001750 00000000421 12161611075 016725 0 ustar frank frank #include "block.ih"
std::ostream &operator<<(std::ostream &out, Block const &blk)
{
out << '`' << static_cast(blk) << "'\n";
copy(blk.d_atDollar.rbegin(), blk.d_atDollar.rend(),
ostream_iterator(out, "\n"));
return out;
}
bisonc++-4.05.00/block/dollarindex.cc 0000644 0001750 0001750 00000000427 12161635335 016165 0 ustar frank frank #include "block.ih"
// $-?NR or $-?NR.
void Block::dollarIndex(size_t lineNr, string const &text, bool member)
{
d_atDollar.push_back(
AtDollar(AtDollar::DOLLAR, length(), lineNr,
text, stol(text.substr(1)), member)
);
append(text);
}
bisonc++-4.05.00/block/dollar.cc 0000644 0001750 0001750 00000000551 12161611075 015126 0 ustar frank frank #include "block.ih"
// called at @@, $$ or $$. in a block
void Block::dollar(size_t lineNr, string const &text, bool member)
{
d_atDollar.push_back(
AtDollar(
text[0] == '$' ? AtDollar::DOLLAR : AtDollar::AT,
length(), lineNr,
text, numeric_limits::max(), member
)
);
append(text);
}
bisonc++-4.05.00/block/open.cc 0000644 0001750 0001750 00000000731 12161611075 014612 0 ustar frank frank #include "block.ih"
void Block::open(size_t lineno, string const &source)
{
if (d_count) // existing block ?
*this += "{"; // add open curly bracket to the block's code
else
{ // assign line if no braces were open yet
clear();
this->string::operator=("{");
d_line = lineno;
d_source = source;
}
++d_count; // here, as clear() will reset d_count
}
bisonc++-4.05.00/block/block.h 0000644 0001750 0001750 00000006174 12161014761 014613 0 ustar frank frank #ifndef _INCLUDED_BLOCK_
#define _INCLUDED_BLOCK_
#include
#include
#include
#include "../atdollar/atdollar.h"
class Block: private std::string
{
friend std::ostream &operator<<(std::ostream &out, Block const &blk);
size_t d_line;
std::string d_source; // the source in which the block
// was found. The block's text itself
// is in the Block's base class
int d_count; // curly braces nesting count, handled
// by clear(), close(), and open()
std::vector d_atDollar; // @- and $-specifications
public:
Block();
using std::string::empty;
using std::string::find;
using std::string::find_first_not_of;
using std::string::find_first_of;
using std::string::find_last_of;
using std::string::insert;
using std::string::length;
using std::string::operator[];
using std::string::replace;
using std::string::substr;
void clear();
// clears the previous block contents
void open(size_t lineno, std::string const &source);
bool close();
void dollar(size_t lineNr, std::string const &matched, // $$ or $$.
bool member);
void atIndex(size_t lineNr, std::string const &matched); // @NR
// $-?NR or $-?NR.
void dollarIndex(size_t lineNr, std::string const &matched,
bool member);
void IDdollar(size_t lineNr, std::string const &matched); // $$
// $-?NR
void IDindex(size_t lineNr, std::string const &matched);
void operator+=(std::string const &text);
operator bool() const; // return true if a block is active
// add text if a block is active,
bool operator()(std::string const &text); // returns true if active
std::vector::const_reverse_iterator rbeginAtDollar() const;
std::vector::const_reverse_iterator rendAtDollar() const;
size_t line() const;
std::string const &source() const; // the block's source file
std::string const &str() const; // the block's contents
};
inline Block::Block()
:
d_count(0)
{}
inline void Block::operator+=(std::string const &text)
{
append(text);
}
inline Block::operator bool() const
{
return d_count;
}
inline std::vector::const_reverse_iterator
Block::rbeginAtDollar() const
{
return d_atDollar.rbegin();
}
inline std::vector::const_reverse_iterator
Block::rendAtDollar() const
{
return d_atDollar.rend();
}
inline size_t Block::line() const
{
return d_line;
}
inline std::string const &Block::source() const
{
return d_source;
}
inline std::string const &Block::str() const
{
return *this;
}
#endif
bisonc++-4.05.00/block/idindex.cc 0000644 0001750 0001750 00000000550 12161635335 015301 0 ustar frank frank #include "block.ih"
void Block::IDindex(size_t lineNr, string const &text)
{
size_t begin = text.find('<') + 1;
size_t end = text.find('>');
d_atDollar.push_back(
AtDollar(
AtDollar::DOLLAR, length(), lineNr,
text, text.substr(begin, end - begin), stol(text.substr(end + 1))
)
);
append(text);
}
bisonc++-4.05.00/block/atindex.cc 0000644 0001750 0001750 00000000405 12161635335 015310 0 ustar frank frank #include "block.ih"
// @NR
void Block::atIndex(size_t lineNr, string const &text)
{
d_atDollar.push_back(
AtDollar(
AtDollar::AT, length(), lineNr,
text, stol(text.substr(1)), false
)
);
append(text);
}
bisonc++-4.05.00/block/frame 0000644 0001750 0001750 00000000056 12161014761 014356 0 ustar frank frank #include "block.ih"
void Block::() const
{
}
bisonc++-4.05.00/block/block.ih 0000644 0001750 0001750 00000000172 12161635335 014762 0 ustar frank frank #include "block.h"
#include
#include
#include
#include
using namespace std;
bisonc++-4.05.00/block/close.cc 0000644 0001750 0001750 00000000132 12161611075 014751 0 ustar frank frank #include "block.ih"
bool Block::close()
{
*this += "}";
return --d_count == 0;
}
bisonc++-4.05.00/build 0000755 0001750 0001750 00000006166 12161014761 013304 0 ustar frank frank #!/usr/bin/icmake -qt/tmp/bisonc++
#include "icmconf"
#include "icmake/setopt"
#include "icmake/run"
#include "icmake/md"
#include "icmake/special"
#include "icmake/clean"
#include "icmake/manpage"
#include "icmake/manual"
#include "icmake/install"
string g_cwd = chdir(""); // initial working directory
void main(int argc, list argv)
{
string option;
string strip;
option = argv[1];
if (option == "clean")
clean(0);
if (option == "distclean")
clean(1);
if (option == "install")
install(argv[2], argv[3]);
if (option != "")
special();
if (option == "sourceforge")
exit(0);
if (option == "man")
manpage();
if (option == "manual")
manual();
if (option == "library")
{
system("icmbuild library");
exit(0);
}
if (argv[2] == "strip")
strip = "strip";
if (option == "program")
{
system("icmbuild program " + strip);
exit(0);
}
if (option == "oxref")
{
system("icmbuild program " + strip);
run("oxref -fxs tmp/lib" LIBRARY ".a > " PROGRAM ".xref");
exit(0);
}
if (option == "scanner")
{
chdir("scanner");
system("flexc++ lexer");
chdir("..");
system("icmbuild program " + strip);
exit(0);
}
printf("Usage: build [-p] what\n"
"Where `what' is one of:\n"
" clean - clean up remnants of previous "
"compilations\n"
" distclean - clean + fully remove tmp/\n"
" library - build " PROGRAM "'s library\n"
" man - build the man-page (requires Yodl)\n"
" manual - build the manual (requires Yodl)\n"
" program [strip] - build " PROGRAM " (optionally strip the\n"
" executable)\n"
" oxref [strip] - same a `program', also builds xref file\n"
" using oxref\n"
" scanner [strip] - build new scanner, then 'build program'\n"
" install program [path] - install the program at `path'\n"
" (by default below `" PROGRAM "')\n"
" install skel [base] - install the skeleton files below `base'\n"
" (by default below `" SKEL "')\n"
" install man [base] - install the man pages below `base'\n"
" (by default below `" MAN "')\n"
" install manual [base]- install the manual below `base'\n"
" (by default below `" MANUAL "')\n"
" install std [base] - install standard docs below `base'\n"
" (by default below `" STD "')\n"
" install extra [base] - install extra docs below `base'\n"
" sourceforge - prepare sourceforge's index update\n"
"\n"
"If the environment variable DRYRUN is defined, no commands are\n"
"actually executed\n"
"\n"
);
exit(1);
}
bisonc++-4.05.00/changelog 0000644 0001750 0001750 00000142441 12201446501 014122 0 ustar frank frank bisonc++ (4.05.00)
* Added the directive %scanner-class-name specifying the class name of the
scanner to use in combination with the %scanner directive
* re-installed the --namespace option (see the next item)
* Warnings are issued when options or directives are specified wchich are
ignored because the target file (e.g., parser.h, parser.ih) already
exists. These warnings are not issued for parse.cc and parserbase.h, which
are by default rewritten at each bisonc++ run. These warnings are issued
for the `class-header', `class-name', `baseclass-header', `namespace',
`scanner', `scanner-class-name' and `scanner-token-function'
options/directives.
* The --force-class-header and --force-implementation-header options were
removed: 'rm ...' should be used instead.
* man-page and manual updated
* CLASSES class dependencies updated, icmconf's USE_ALL activated
-- Frank B. Brokken Sat, 10 Aug 2013 10:16:17 +0200
bisonc++ (4.04.01)
* Removed the possibility to specify path names for the --baseclass-header,
--class-header, --implementation-header, and --parsefun-source options
(and corresponding directives). Path names for generated files should be
specified using the target-directory option or directive.
-- Frank B. Brokken Mon, 27 May 2013 12:12:58 +0200
bisonc++ (4.04.00)
* Repaired %target-directory not recognizing path-characters and not
removing surrounding "-delimiters.
* The --baseclass-header, --class-header, --implementation-header, and
--parsefun-source options (and corresponding directives) now also accept
path-specifications.
* The man-page and manual have been updated accordingly.
-- Frank B. Brokken Sun, 26 May 2013 14:22:50 +0200
bisonc++ (4.03.00)
* Bisonc++ before 4.03.00 failed to notice the --debug option. Now repaired.
* Added the rpn example to the manual, and repaired typos in the manual.
* Options/directives that can only accept file names (like
--baseclass-header) no longer accept path names.
-- Frank B. Brokken Sun, 31 Mar 2013 11:25:49 +0200
bisonc++ (4.02.01)
* Parser-class header files (e.g., Parser.h) and parser-class internal
header files (e.g., Parser.ih) generated with bisonc++ < 4.02.00 require
two hand-modifications when used in combination with bisonc++ >= 4.02.00:
In Parser.h, just below the declaration
void print__();
add:
void exceptionHandler__(std::exception const &exc);
In Parser.ih, assuming the name of the generated class is `Parser', add
the following member definition (if a namespace is used: within the
namespace's scope):
inline void Parser::exceptionHandler__(std::exception const &exc)
{
throw; // re-implement to handle exceptions thrown by actions
}
This function may be re-implemented, see the man-page for further details.
-- Frank B. Brokken Mon, 11 Mar 2013 16:50:26 +0100
bisonc++ (4.02.00)
* Added member Parser::exceptionHandler(std::exception const &exc), handling
std::exceptions thrown from the parser's action blocks.
* The --namespace option was removed, since it does not affect once
generated parser.h files, resulting in inconsistent namespace
definitions.
* Include guards of parser.h and parserbase.h include the namespace
identifier, if %namespace has been used.
* Provided print()'s implementation in bisonc++.ih with a correct
class-prifix (was a fixed Parser::)
* Textual corrections of the man-page and manual.
-- Frank B. Brokken Thu, 07 Mar 2013 09:57:07 +0100
bisonc++ (4.01.02)
* Bisonc++ returns 0 for options --help and --version
* Catching Errno exceptions is replaced by catching std::exception
exceptions
-- Frank B. Brokken Thu, 24 Jan 2013 08:14:59 +0100
bisonc++ (4.01.01)
* The following #defines in INSTALL.im can be overruled by defining
identically named environment variables:
CXX defines the name of the compiler to use. By default `g++'
CXXFLAGS the options passed to the compiler.
By default `-Wall --std=c++0x -O2 -g'
LDFLAGS the options passed to the linker. By default no options are
passed to the linker.
SKEL the directory where the skeletons are stored
-- Frank B. Brokken Sun, 15 Jul 2012 14:44:46 +0200
bisonc++ (4.01.00)
* Repaired a long-existing bug due to which some S/R conflicts are solved by
a reduce, where a shift should have been used. See
README.states-and-conflicts for details.
* Removed line-numbers from final warning/error messages
* This version requires Bobcat >= 3.00.00
-- Frank B. Brokken Thu, 03 May 2012 21:21:47 +0200
bisonc++ (4.00.00)
* Implemented the %polymorphic directive. Bisonc++ itself uses %polymorphic
to implement its own polymorphic semantic values; man-page and manual
extended with sections about polymorphic semantic values.
* Implemented the %weak-tags directive. By default %polymorphic declares
an `enum class Tag__', resulting in strongly typed polymorphic tags. If
the traditional tag declaration is preferred, the %weak-tags directive can
be specified in addition to %polymorphic, resulting in the declaration
`enum Tag__'.
* The previously used class spSemBase and derivatives (e.g., SemBase,
Semantic) are now obsolete and the directories sembase and spsembase
implementing these classes were removed.
* The Parser's inline functions are all private and were moved to the
parser's .ih file. This doesn't affect current implementations, as
parser.h and parser.ih are only generated once, but newly generated
parsers no longer define the Parser's inline members (error, print__, and
lex) in parser.h but in parser.ih
* @@ can be used (instead of d_loc__) to refer to a rule's location stack
value.
* The generated parser now uses unordered_maps instead of maps.
-- Frank B. Brokken Fri, 13 Apr 2012 14:10:12 +0200
bisonc++ (3.01.00)
* The `%print-tokens' directive was accidentally omitted from
3.00.00. Repaired in this release.
* Starting this release all release tags (using names that are identical to
the version number, so for this release the tag is 3.01.00) are signed to
allow authentication.
-- Frank B. Brokken Mon, 27 Feb 2012 13:33:20 +0100
bisonc++ (3.00.00)
* This release's scanner was built by flexc++
* Option handling was separated from parsing, following the method also used
in flexc++: a class Options holds and maintains directives and options
that are used in multiple points in bisonc++'s sources. The Parser passes
directive specifications to set-functions defined by the class Options.
* The parser's semantic value handling recevied a complete overhaul. Unions
are no longer used; instead a light-weight polymorphic base class in
combination with some template meta programming was used to handle the
semantic values. See sembase/sembase.h for a description of the appproach.
* Options and directives were rationalized/standardized. See the man-page
for details. Grammar specification files should no longer use %print, but
should either use %print-tokens or %own-tokens (or the equivalent
command-line options).
* NOTE: Existing Parser class interfaces (i.e. parser.h) must be
(hand-) modified by declaring a private member
void print__();
See the man-page and/or manual for details about print__.
* All regression tests (in documentation/regression) are now expecting
that flexc++ (>= 0.93.00) is available.
-- Frank B. Brokken Mon, 20 Feb 2012 16:32:01 +0100
bisonc++ (2.09.04)
* Replaced many for_each calls and lamda functions by range-based for-loops
* Used g++-4.7
-- Frank B. Brokken Wed, 04 Jan 2012 12:26:01 +0100
bisonc++ (2.09.03)
* Replaced all FnWrap* calls by lambda function calls
* `build' script now recognizes CXXFLAGS and LDFLAGS for, resp. g++ and ld
flags. Default values are set in INSTALL.im, as before.
-- Frank B. Brokken Thu, 23 Jun 2011 10:06:02 +0200
bisonc++ (2.09.02)
* Repaired flaws that emerged with g++ 4.6
-- Frank B. Brokken Mon, 02 May 2011 16:30:43 +0200
bisonc++ (2.9.1)
* Documentation requires >= Yodl 3.00.0
-- Frank B. Brokken Wed, 10 Nov 2010 10:30:51 +0100
bisonc++ (2.9.0)
* Changed Errno::what() call to Errno::why()
* Removed dependencies on Msg, using Mstreams and Errno::open
instead. Consequently, bisonc++ depends on at least Bobcat 2.9.0
-- Frank B. Brokken Sat, 30 Oct 2010 22:05:30 +0200
bisonc++ (2.8.0)
* Grammars having states consisting of items in which a reduction from a
(series of) non-terminals is indicated have automatically a higher
precedence than items in which a shift is required. Therefore, in these
cases the shift/reduce conflict is solved by a reduce, rather than a
shift. See README.states-and-conflicts, srconflict/visitreduction.cc and
the Bisonc++ manual, section 'Rule precedence' for examples and further
information. These grammars are now showing S/R conflicts, which remained
undetected in earlier versions of Bisonc++. The example was brought to my
attention by Ramanand Mandayam (thanks, Ramanand!).
* To the set of regression tests another test was added containing a grammar
having two S/R conflicts resulting from automatically selecting reductions
rather than shifts. This test was named 'mandayam'.
* Output generated by --verbose and --construction now shows in more detail
how S/R conflicts are handled. The Bisonc++ manual also received an
additional section explaining when reduces are used with certain S/R
conflicts.
* Previously the documentation stated that --construction writes the
construction process to stdout, whereas it is written to the same file as
used by --verbose. This is now repaired.
* The meaning/use of the data members of all classes are now described at
the data members in all the classes' header files.
-- Frank B. Brokken Sun, 08 Aug 2010 15:15:46 +0200
bisonc++ (2.7.0)
* $-characters appearing in strings or character constants in action blocks
no longer cause warnings about incorrect or negative $-indices
* Repaired incorrect interpretation of '{' and '}' character constants
in action blocks.
* Added option --print (directive %print) displaying tokens received by the
scanner used by the generated parser.
* Added option --scanner-token-function (directive %scanner-token-function)
specifying the name of the function called from the generated parser's
lex() function.
* The build script received an additional option: `build parser' can be used
to force the reconstruction of parser/parse.cc and parser/parserbase.h
-- Frank B. Brokken Wed, 31 Mar 2010 15:54:52 +0200
bisonc++ (2.6.0)
* Reorganized Bisonc++'s classes: public inheritance changed to private
where possible, all virtual members now private. The parser->parserbase
inheritance remains as-is (public) because parserbase essentially is a
element of parser, defining types and the token-enum that must also be
available to the users of the generated parser class. The alternative,
defining types and tokens in the parser class would make it impossible to
adapt the tokens without rewriting the parser class. Another alternative,
defining the types and enum in a separate namespace imposes further
restrictions on the users of the parser class, which is also considered
undesirable. Public inheritance is now only used by NonTerminal, Terminal,
and Symbol as these classes override virtual functions either in Symbol or
in Element and the derived classes must all be usable where their base
classes are expected (in accordance with the LSP).
bisonc++ (2.5.1)
* Token values written to parserbase.h are (again) suppressed when their
values exceed the previous token's value by 1. All values were shown
because writer/insertToken erroneously didn't receive a size_t
&lastTokenValue anymore, but a size_t lastTokenValue.
* Removed Terminal's operator<< from the namespace std
* Now using initializer_lists to initialize static data (generator/data.cc
main.cc)
-- Frank B. Brokken Mon, 08 Mar 2010 20:51:22 +0100
bisonc++ (2.5.0)
* Renamed parser/spec/aux to parser/spec/auxiliary to avoid file/device
confusion on some systems
* Removed inclusions of superfluous bobcat/fnwrap1c headers
* Replaced all FnWrap1c calls by FnWrap::unary
* Added check for d_currentRule == 0 in rules/addproduction. d_currentRule
could be a 0-pointer, in which case addproduction shouldn't do anything.
d_currentRule is a 0-pointer in, e.g. the erroneous grammar submitted
by Justin Madru about which he rightfully remarked that even though
erroneous bisonc++ shouldn't crash on it. This is his stripped-down
grammar:
%token X x_list
%%
x_list:
x_list X
|
X
;
bisonc++ (2.4.8)
* Recompilation using option --std=c++0x, required because of Bobcat's use
of C++0x syntax.
-- Frank B. Brokken Sat, 05 Sep 2009 17:25:56 +0200
bisonc++ (2.4.7)
* Streams processed by an `#include' directive were not properly closed,
resulting in a memory leak. The Scanner's code was modified to plug that
leak.
-- Frank B. Brokken Wed, 06 May 2009 09:36:02 +0200
bisonc++ (2.4.6)
* Changed the build script to allow finer control over construction and
installation of parts of the package
-- Frank B. Brokken Tue, 24 Mar 2009 19:16:10 +0100
bisonc++ (2.4.5)
* DateTime (generator/filter.cc) adapted due to change of Bobcat's DateTime
interface
bisonc++ (2.4.4)
* typed terminal tokens (as used in, e.g., %type) were not
included in the parserbase's Tokens__ enum since their symbol type is left
at UNDETERMINED. tokens used in type lists can also be non-terminals, in
which case their symbol type is changed accordingly. In 2.4.4. a symbol is
selected for inclusion in the Tokens__ enum if it's a terminal token but
also if it's a symbol that has been used in the grammar although its
symbol type is left at UNDETERMINED (in generator/selectsymbolic.cc)
bisonc++ (2.4.3)
* repaired segfault generated when the name of a non-existing file was
passed to bisonc++
bisonc++ (2.4.2)
* scanner/yylex.cc removed from the distribution: flex will create a new
Scanner::yylex() member at each new distribution to prevent
incompatibilities between earlier yylex.cc and later FlexLexer.h files.
bisonc++ (2.4.1)
* Implemented minor changes related to requirements imposed upon the code by
g++ 4.3.
* Generator/filter now uses the Datetime::rfc2822(), implmented since Bobcat
1.17.1
bisonc++ (2.4.0)
* Fixed missing entry in multiple reduction state tables:
State tables of multiple reduction states (e.g., REQ_RED states) were
constructed incompletely. E.g., for the grammar:
expr:
name
|
ident '(' ')'
|
NR
;
name:
IDENT
;
ident:
IDENT
;
the state following IDENT is either a reduce to 'name' or 'ident': the
corresponding table was filled incompletely, using the number of the next
token where the next token for the reduction should have been be
mentioned, and an empty field in the table itself.
NOTE that in these situations d_val__ MUST be set by the scanner, as the
reduction requires another token, and only once that token is available
the reduction to, e.g., 'ident' can be performed, but at that time
YYText() has already gone and is inaccessible in an action block like:
ident:
IDENT
{
$$ = d_scanner.YYText();
}
;
* The error recovery procedure in skeleton's bisonc++.cc skeleton file was
reimplemented. As a side effect the internally used function
'ParserBase::checkEOF()' could be removed.
* #line directives in rule action blocks now correctly identify the grammar
specification file in which the action block was defined.
* Extra empty line at the end of state transition tables were removed
* Files generated by Bisonc++ report Bisonc++'s version and the file
construction time (conform RFC 2822) as C++ comment in their first line.
bisonc++ (2.3.1)
* Fixed character returned in escaped constants. E.g., at '\'' the \ was
returned instead of the ' character.
* Implemented the default assignment of $1 to $$ at the begin of action
rules. This required another Block member: saveDollar1(), called for
nested blocks. The function saveDollar1() prepends the code to save $$
from $1 of the rule in which the nested block was defined. In
share/bisonc++ the function executeAction() no longer saves the semantic
value's TOS value as d_val__ but the rule's $1 value.
* To allow extraction of the archive under Cygwin (Windows) the directory
parser/spec/aux was renamed to parser/spec/auxiliary (as Windows can't
handle files or directories named 'aux').
bisonc++ (2.3.0)
* Dallas A. Clement uncovered a bug in handling semantic values, due to
which semantic values of tokens returned by some grammars got lost. He
intended to use a polymorphic semantic value class to pass different kinds
of semantic values over from the scanner to the parser. This approach was
the foundation of another regression test example, now added to the set of
regression tests and described in Bisonc++'s manual. It will also appear
as an annotated example in the C++ Annotations. Thanks, Dallas, for
uncovering and reporting that bug.
* Dallas also noted that mid-rule actions could not refer to semantic values
of rule components that had already been seen by Bisonc++. This has been
fixed in this release. Dallas, thanks again!
* Earlier versions of Bisonc++ used the class OM (Output Mode) to define the
way objects like (Non)Terminal tokens and (Non)Kernel Items were inserted
into ostreams. Using OM did not result in the clarity of design I
originally had in mind. OM is now removed, and instead relevant classes
support a function `inserter()' allowing sources to specify (passing
`inserter()' a pointer to a member function) what kind of insertion they
need. For the Terminal class there is also a manipulator allowing sources
to insert a insertion-member directly into the ostream.
* New option: --insert-stype
The generated parser will now also display semantic values when %debug is
specified if the new command-line option --insert-stype is provided. Of
course, in this case users should make sure that the semantic value is
actually insertable (e.g., by providing an overloaded operator
std::ostream &std::operator<<(std::ostream &out, STYPE__ const &semVal).
bisonc++ (2.2.0)
* Repaired a bug in parsing action blocks of rules appearing only in
versions 2.1.0 and 2.0.0. In these versions compound statements defined
within the action blocks result in bisonc++ erroneously reporting an error
caused by bisonc++'s scanner (scanner/lexer) interpreting the closing
curly brace as the end of the action block.
* Repaired a flaw in terminal/terminal1.cc causing a segfault when using
bisonc++ compiled with g++ 4.2.1
bisonc++ (2.1.0)
* In the skeleton bisonc++.cc $insert 4 staticdata is followed by $insert
namespace-open. Since `staticdata' defined s_out if %debug is requested,
it could be defined outside of the user's namespace (defined by
%namespace). Repaired by defining s_out after (if applicable) opening the
namespace (in Generator::namespaceOpen(), called from $insert
namespace-open).
bisonc++ (2.0.0)
* Rebuilt Bisonc++'s parser and scanner, creating Bisonc++'s parser from the
file parser/grammar. Initially Bisonc++ 1.6.1 was used to create the
Parser class header and parsing function. Once Bisonc++ 2.0.0 was
available, the grammar file was split into various subfiles (see below)
and Bisonc++ 2.0.0 was used to implement its own parsing function. As a
direct consequence of using a grammar rather than a hand-implemented
parsing function quite a few members of the Parser and Scanner class were
reimplemented, new members were added and some could be removed. Parts of
other classes (Rules, Block) were significantly modified as well.
* Minor hand-modifications may be necessary with previously designed code
using identifiers that are defined by the parser class generated by
Bisonc++. The following names have changed:
-------------------------------------------------------------------------
old name change into new name: Protected
-------------------------------------------------------------------------
Parser::LTYPE Parser::LTYPE__
Parser::STYPE Parser::STYPE__
Parser::Tokens Parser::Tokens__
Parser::DEFAULT_RECOVERY_MODE Parser::DEFAULT_RECOVERY_MODE__ Yes
Parser::ErrorRecovery Parser::ErrorRecovery__ Yes
Parser::Return Parser::Return__ Yes
Parser::UNEXPECTED_TOKEN Parser::UNEXPECTED_TOKEN__ Yes
Parser::d_debug Parser::d_debug__ Yes
Parser::d_loc Parser::d_loc__ Yes
Parser::d_lsp Parser::d_lsp__ Yes
Parser::d_nErrors Parser::d_nErrors__ Yes
Parser::d_nextToken Parser::d_nextToken__ Yes
Parser::d_state Parser::d_state__ Yes
Parser::d_token Parser::d_token__ Yes
Parser::d_val Parser::d_val__ Yes
Parser::d_vsp Parser::d_vsp__ Yes
-------------------------------------------------------------------------
The symbols marked `Protected' can only occur in classes that were derived
from the parser class generated by Bisonc++. Unless you derived a class
from the parser class generated by Bisonc++ these changes should not
affect your code. The first three symbols may have been used in other
classes as well (for an example now using LTYPE__ and STYPE__ see the file
documentation/regression/location/scanner/scanner.h).
Note that the only required modification in all these cases is to append
two underscores to the previously defined identifiers.
* The grammar file may now be split into several grammar specification
files. The directive %include may be specified to include grammar files
into other grammar files (much like the way C/C++'s #include preprocessor
directive operates). Starting point of the grammar recognized by Bisonc++
2.0.0 is the file parser/grammar, using subfiles in the parser/spec
directory. The file README.parser documents the grammar specification
files in some detail.
* Previous releases implicitly enforced several restrictions on the
identifiers used for the grammar's tokens. These restrictions resulted
from name collisions with names defined in the parser's base class. While
the restrictions cannot be completely resolved without giving up backward
compatibility, they can be relieved greatly. Tokens cannot be ABORT,
ACCEPT, ERROR, clearin, debug, error and setDebug. Furthermore, tokens
should not end in two underscores (__).
* Implemented various new options and directives:
- the option --analyze-only, merely analyzing the provided grammar, not
writing any source or header files.
- the option --error-verbose as well as the directive %error-verbose
dumping the state-stack when a syntactic error is reported.
- the option --include-only, catenating all grammar files in their order
of processing to the standard output stream (and terminating).
- the option --max-inclusion-depth, defining the maximum number of nested
grammar files (default: 10).
- the option --required-tokens (also available as the directive
%required-tokens). Error recovery is now configurable in the sense that
a configurable number of tokens must have been successfully processed
before new error messages can be generated (see
documentation/manual/error/intro.yo)
- the option --scanner-debug writing the contents and locations (in
scanner/lexer) of matched regular expresions as well as the names/values
of returned tokens to the standard error stream.
- the option --skeleton-directory. This option overrides the default
location of the director containing the skeleton files. In turn it is
overridden by the options specifying specific skeleton files (e.g.,
--baseclass-skeleton).
- the option --thread-safe. If specified, Bisonc++ will generate code that
is thread-safe. I.e., no static data will be modified by the parse()
function. As a consequence, all static data in the file containing the
parse() function are defined as const. Manpage and manual adapted
accordingly.
* As a convenience, filenames in the grammar files may optionally be
surrounded by double quotes ("...") or pointed brackets <...>. Delimiting
pointed brackets are only kept with the %scanner and %baseclass-preinclude
directives, in all other cases they are replaced by double quotes and a
warning is displayed.
* Token Handling in the generated parsing member function was improved: the
share/bisonc++.cc skeleton now defines pushToken__() and popToken__() as
the standard interface to the tiny two-element token stack. The member
nextToken() was redesigned.
* Documentation was extended and updated. The Bisonc++ manual now contains an
extensive description of the grammar-analysis process as implemented in
Bisonc++ (see documentation/manual/algorith.yo). All new options and
directives, as well as the token-name requirements are covered by the
man-page and by the manual.
* Various other repairs and cosmetic changes:
- The --construction option as implemented in Bisonc++ 1.6.1 showed the
FIRST set where the FOLLOW set was labeled. Repaired: now the FOLLOW set
is actually displayed.
- The --show-filenames option now shows `(not requested)' as default for
d_verboseName instead of `-' if no --verbose was requested.
- The --construction option no longer displays the `LA expanded' value
from the state's descriptions since it's always 0
- The --class-name option was not actually mentioned in the set of
recognized long options: repaired.
- The %type directive now allows you to specify semantic type associations
of terminal tokens as well.
- The %token, %left, %right and %nonassoc directives now all use the same
syntax (as they always should have). These directives all define
terminal tokens
- Added `rebuild' command to the `build' script to recreate the parser
bisonc++ (1.6.1)
* Changed the error recovery procedure preventing stack underflows with
unrecoverable input errors.
* Added protected parser base class member checkEOF(), terminating the
parse() member's activities (man-page adapted accordingly).
* Changed small support member functions in the share/bisonc++.cc skeleton
file into inline members, some were moved to share/bisonc++base.h
* The skeleton files now use `\@' as baseclass-flag rather than `@'. The
baseclass-flag is now defined as a static data member in Generator. This
change prevents the `@' in e-mail addresses from being changed into the
parser's class name.
* Removed the class Support since it is now covered by Bobcat's (1.15.0)
default implementation of FBB::TableSupport
bisonc++ (1.6.0)
* NOTE: THE PROTOTYPE OF THE PARSER'S lookup() FUNCTION CHANGED. IT IS NOW:
int lookup(bool recovery);
OLD parser.h HEADER FILES CAN BE REUSED AFTER ADDING THE PARAMETER
bool recovery
* Segfaults were caused by some grammars due to an erroneous index in
(formerly state/setitems.cc) state/adddependents.cc, where idx,
representing an index in d_itemVector was used to index an element in
d_nextVector (for which the index variable `nextIdx' should have been
used. Repaired.
* For some unknown reason, priority and association rules were not
implemented in earlier versions of bisonc++. Consequently priority and
association values of rules were left at their default values. This was
repaired by defining the function Rules::updatePrecedences(), which
defines priorities of productions as either their values assigned by a
%prec specification or as the priority of their first terminal token.
* The accepting State no longer has default reductions. It doesn't need them
since _EOF_ in those states terminates the parser. Accepting States
now have search sentinels, allowing the parser to do proper error
recovery.
* The implementation of the shift/reduce algorithm and error handling in
share/bisonc++.cc was modified, now using bitflags indicating
state-requirements (e.g., requiring a token, having a default reduction,
having an `error' continuation, etc.). Also, the functions nextToken() and
lookup() were reimplemented.
* The share/bisonc++.cc parser function skeleton's initial comment was
improved.
* The function state/state1.cc contained the superfluous intialization
d_itemVector(0). The line has been removed.
* The class `Rules' lacked facilities to detect properly whether a grammar
file without rules was specified. Solved by defining a Rules constructor
and an additional member indicating whether there weree any rules at all.
* In grammar files, rules must now be terminated by a semicolon. Previous
versions did not explicitly check this. Also, improperly formed
character-tokens are now recognized as errors.
* In correspondence with bison, the default verbose grammar output file is
now called .output rather than .output
* The description of the State information shown when --construction is
specified was clarified.
* The debug output generated by parse.cc was improved.
* The setDebug() member is now a public member. Manual page and
documentation changed accordingly.
* The description of the setItems() algorithm in state/setItems was
improved.
* The `build' script was given an additional command (installprog) to
install just the program and the skeletons.
* Added several missing headers fixing gcc/g++ 4.3 problems
-- Frank B. Brokken Mon, 09 Apr 2007 14:54:46 +0200
bisonc++ (1.5.3)
* Using Bobcat's FnWrap* classes instead of Bobcat's Wrap* classes
* The INSTALL.im file has received a (by default commented out)
#define PROFILE. By activating this define, bisonc++ is compiled with
support for the gprof profiler. This define should not be activated for
production versions of bisonc++
* Not released.
-- Frank B. Brokken Sat, 17 Feb 2007 20:44:19 +0100
bisonc++ (1.5.2)
* It turns out that the modification in 1.5.1. is not necessary. The
compilation problems mentioned there were the result of a presumed small
g++ compiler bug. A workaround is implemented in Bobcat 1.12.1, preventing
the bug from occurring. In fact, this release has the same contents as
release 1.5.0. Release 1.5.1. can be considered obsolete. It is available
from the svn repository only.
-- Frank B. Brokken Thu, 30 Nov 2006 17:05:09 +0100
bisonc++ (1.5.1)
* Building the usage support program failed because of implied dependencies
on the bobcat library, resulting from superfluously including bobcat.h in
the documentation/usage/usage.cc program source. This is solved by
setting bisonc++.h's include guard identifier just before inserting
../../usage.cc in the documentation/usage/usage.cc program source.
bisonc++ (1.5.0)
* The algorithms for lookahead propagation and detection of grammars not
deriving sentences have been redesigned and rewritten. The previously used
algorithm propagating lookaheads suffered from spurious reduce/reduce
conflicts for some grammars (e.g., see the one in
documentation/regression/icmake1). Also, 1.4.0 choked on a (fairly)
complex grammar like the one used by icmake V 7.00. These problems are now
solved, and comparable problems should no longer occur.
The layout and organization of the output has been changed as well. Now
there are basically three forms of verbose output: No verbose output, in
which the file *.output is not written, standard verbose output, in which
an overview of the essential parts of the grammar is written to the file
*.output, and --construction, in which case all lookaheadsets, as well as
the first and follow sets are written to *.output.
Multiple new classes were added, and some previously existing classes were
removed. See the file README.class-setup and the file CLASSES for details.
The man-page and manual were adapted on minor points.
bisonc++ (1.4.0)
* It turned out that in the previous versions, S/R conflicts were also
produced for empty default reductions. Now detectSR() checks whether there
is one empty reduction. If so, no S/R conflicts are possible in that
state. Instead a SHIFT (which is already the default solution of a S/R
conflict) is performed in these situations. So, now for all
tokens for which a known continuation state exist the known continuation
state is selected; for all other tokens the default reduction (reducing to
its associated state) is selected. See state/detectsr.cc for details.
Since the above change also represents a change of algorithm, the
subversion was incremented. I added a sub-subversion to have a separate
level of version-numbers for minor modifications.
The documentation/regression/run script did not properly return to its
initial working directory, and it called a test that no longer
existed. Both errors have been repaired.
Some leftover references to the Academic Free License were replaced by
references to the GPL.
The previously used scripts below make/ are obsolete and were removed from
this and future distributions. Icmake should be used instead, for which a
top-level script (build) and support scripts in the ./icmake/ directory
are available. Icmake is available on a great many architectures. See the
file INSTALL (and INSTALL.im, replacing the previously used INSTALL.cf)
for further details.
All plain `unsigned' variables were changed to `size_t'
bisonc++ (1.03-1) unstable; urgency=low
* License changed to the GNU GENERAL PUBLIC LICENSE. See the file
`copyright'.
According to the manual page, the debug-output generated by parsers
created using the --debug option should be user-controllable through the
`setDebug()' member. These feature is now actually implemented.
The usage info now correctly shows the -V flag as a synonym for the
--verbose option.
From now on this file will contain the `upstream' changes. The Debian
related changes are in changelog.Debian.gz
-- Frank B. Brokken Wed, 19 Jul 2006 13:12:39 +0200
bisonc++ (1.02) unstable; urgency=low
* Following suggestions made by George Danchev, this version was compiled by
the unstable's g++ compiler (version >= 4.1), which unveiled several flaws
in the library's class header files. These flaws were removed (i.e.,
repaired).
In order to facilitate compiler selection, the compiler to use is defined
in the INSTALL.cf file.
The debian control-files (i.e., all files under the debian subdirectory)
were removed from the source distribution, which is now also named in
accordance with the Debian policy. A diff.gz file was added.
-- Frank B. Brokken Thu, 6 Jul 2006 12:41:43 +0200
bisonc++ (1.01) unstable; urgency=low
* Synchronized the version back to numbers-only, adapted the debian
standards and the required bobcat library in the debian/control file.
No implementation changes as compared to the previous version, but I felt
the need to join various sub-sub-versions back to just one standard
version.
-- Frank B. Brokken Mon, 26 Jun 2006 12:11:15 +0200
bisonc++ (1.00a) unstable; urgency=low
* Debian's Linda and lintian errors, warnings and notes processed. No
messages are generated by linda and lintian in this version.
-- Frank B. Brokken Sun, 28 May 2006 14:26:03 +0200
bisonc++ (1.00) unstable; urgency=low
* Bisonc++ Version 1.00 has changed markedly as compared to its predecessor,
bisonc++ 0.98.510.
The main reason for upgrading to 1.00 following a year of testing the 0.98
series is that the grammar analysis and lookahead propagation algorithms
as used in bisonc++ 0.98.510 were either too cumbersome and contained some
unfortunate errors.
The errors were discovered during my 2005-2006 C++ class, where some
students produced grammars which were simple, but were incorrectly
analyzed by bisonc++ 0.98. It turned out that the lookahead (LA)
propagation contained several flaws. Furthermore, a plain and simple bug
assigned the last-used priority to terminal tokens appearing literally in
the grammar (i.e., without explicitly defining them in a %token or
comparable directive). A simple, but potentially very confusing bug.
At the cosmetic level, the information produced with the --construction
option was modified, aiming at better legibility of the construction
process.
The `examples' directory was reduced in size, moving most examples to a
new directory `regression', which now contains a script `run' that can be
used to try each of the examples below the `regression' directory. Some of
the examples call `bison', so in order to run those examples `bison' must
be installed as well. It usually is.
A minor backward IN-compatibility results from a change in prototype of
some private parser member functions. This should only affect exising
Parser.h header files. Simply replacing the `support functions for
parse()' section shown at the end of the header file by the following
lines should make your header file up-to-date again. Note that bisonc++
does not by itself rewrite Parser.h to prevent undoing any modifications
you may have implemented in the parser-class header file:
// support functions for parse():
void executeAction(int ruleNr);
void errorRecovery();
int lookup();
void nextToken();
Please note that this version depends on bobcat 1.7.1 or beyond. If you
compile bobcat yourself, then you may want to know that bobcat's Milter
and Xpointer classes are not used by bisonc++, so they could optionally be
left out of bobcat's compilation.
-- Frank B. Brokken Sun, 7 May 2006 15:10:05 +0200
bisonc++ (0.98.510) unstable; urgency=low
* When no %union has been declared, no $$ warnings are issued anymore about
non-exisiting types;
When no %union has been declared a $i or $$ warning is issued
about non-exisiting types.
The State table (in the generated parse.cc file) containing `PARSE_ACCEPT'
was created with a `REDUCE' indication for grammars whose start symbol's
production rules were non-repetitive. This was repaired in
state/writestatearray.cc by setting the (positive) non-reduce indication
for states using shifts and/or the accept state.
The logic in writeStateArray() was modifed: a separate ShiftReduce::Status
variable is now used to store the possible actions: SHIFT, REDUCE or
ACCEPT. The tables show `SHIFTS' if a state uses shifts; `ACCEPTS' if a
state contains PARSE_ACCEPT; and `REDUCE' otherwise.
-- Frank B. Brokken Tue, 21 Mar 2006 20:47:49 +0100
bisonc++ (0.98.500) unstable; urgency=low
* Handling of $i and $$ repaired, added the
%negative-dollar-indices directive.
$ specifications were not properly parsed. Instead of $i or
$$ constructions like $i and $$ were parsed, which is
contrary to the manual's specification. The function parsing the $-values
is defined in parser/handledollar.cc.
The handling of negative $-indices is improved. Negative $-indices are
used when synthesizing attributes. In that context, $0 is useful, since it
refers to the nonterminal matched before the current rule is starting to
be used, allowing rules like `vardef: typename varlist ' where `varlist'
inherits the type specification defined at `typename'.
In most situations indices are positive. Therefore bisonc++ will warn when
zero or non-positive $-indices are seen. The %negative-dollar-indices
directive may be used to suppress these warnings.
$-indices exceeding the number of elements continue to cause an error.
-- Frank B. Brokken Sun, 5 Mar 2006 13:59:08 +0100
bisonc++ (0.98.402) unstable; urgency=low
* links against bobcat 1.6.0, using bobcat's new Arg:: interface
-- Frank B. Brokken Mon, 26 Dec 2005 19:25:42 +0100
bisonc++ (0.98.400) unstable; urgency=low
* state/writestatearray.cc adds {} around individual union values to allow
warningless compilation of the generated parse.cc file by g++-4.0.
bisonc++ is now itself too compiled by g++-4.0.
-- Frank B. Brokken Fri, 18 Nov 2005 22:46:06 +0100
bisonc++ (0.98.007) unstable; urgency=low
* Added a README.flex file giving some background information about the
provided implementation of the lexical scanner (bisonc++/scanner/yylex.cc)
Modified the compilation scripts: bisconc++/flex/FlexLexer.h is now
included by default. This FlexLexer.h file is expected by
bisonc++/scanner/yylex.cc and by the Scanner class.
Simplified some compilation scripts.
-- Frank B. Brokken Fri, 9 Sep 2005 11:42:24 +0200
bisonc++ (0.98.006) unstable; urgency=low
* Removed the dependency on `icmake'. No change of functionality
See the instructions in the `INSTALL' file when you want to compile and
install `bisonc++' yourself, rather than using the binary (.deb)
distribution.
-- Frank B. Brokken Sat, 3 Sep 2005 17:42:29 +0200
bisonc++ (0.98.005) unstable; urgency=low
* Removed the classes Arg, Errno, Msg and Wrap1, using the Bobcat library's
versions of these classes from now on. No feature-changes.
Added minor modifications to the `build' script.
Annoying Error: The function `ItemSets::deriveAction()' did not recognize
the `ACCEPT' action, so some (most ?) grammars could not be properly
recognized. I applied a quick hack: if an action isn't `shift' or
`reduce', it can be `accept', resulting in acceptance of the grammar. This
solves the actual problem, but I'll have to insepct this in a bit more
detail. For now, it should work ok.
-- Frank B. Brokken Mon, 22 Aug 2005 13:05:28 +0200
bisonc++ (0.98.004) unstable; urgency=low
* When new lookahead set elements are added to existing states,
d_recheckState in itemsets/lookaheads.cc (ItemSets::checkLookaheads()) was
reassigned to the state index whose lookaheadset was enlarged. However, if
that happened for existing state `i' and then, during the same
state-inspection, for state `j' where j > i, then the recheck would start
at `j' rather than `i'. This problem was solved by giving d_recheckState
only a lower value than its current value.
With R/R conflicts involving `ACCEPT' reductions (with, e.g., `S_$: S .'),
ACCEPT is selected as the chosen alternative. See State::setReduce()
(state/setreduce.cc). Since this matches with the `first reduction rule'
principle, it should be ok.
%stype specifications may consist of multiple elements: the remainder of
the line beyond %stype is interpreted as the type definition. The
specification should (therefore) not contain comment or other characters
that are not part of the actual type definition. The man-page is adapted
accordingly. Same holds true for the %ltype directive
Added a check whether the grammar derives a sentence
(itemsets/derivesentence.cc). If not, a fatal error is issued. This
happens at the end of the program's actions, and at this point files
etc. have already been generated. They are kept rather than removed for
further reference. Grammars not deriving sentences should probably not be
used.
The original Bison documentation has been converted to a Bisonc++ user
guide. Furthermore, a html-converted manual page is now available under
/usr/share/doc/bisonc++/man
The `calculator' example used in the man-page is now under
/usr/share/doc/bisonc++/man/calculator
Bisonc++ is distributed under the Academic Free License, see the file
COPYING in /usr/share/doc/bisonc++
-- Frank B. Brokken Sun, 7 Aug 2005 13:49:07 +0200
bisonc++ (0.98.003) unstable; urgency=low
* Incomplete default State constructor now explicitly defined, prevents
the incidental erroneous rapporting of conflicts for some states.
-- Frank B. Brokken Thu, 26 May 2005 07:21:20 +0200
bisonc++ (0.98.002) unstable; urgency=low
* The Wrap1 configurable unary predicate template class replaces various
other templates (WrapStatic, Wrap, Pred1Wrap). No further usage or
implementation changes/modifications.
-- Frank B. Brokken Sun, 22 May 2005 15:27:19 +0200
bisonc++ (0.98.001) unstable; urgency=low
* This is a complete rewrite of the former bisonc++ (0.91) version. The
program bisonc++ is now a C++ program, producing C++ sources, using the
algorithm for creating LALR-1 grammars as outlined by Aho, Sethi and
Ullman's (1986) `Dragon' book. The release number will remain 0.98 for a
while, and 0.98.001 holds the initial package, new style. Also see the
man-page, since some things have been changed (augmented) since the
previous version. No dramatic changes in the grammar specification method:
Bisonc++ still uses bison's way to specify grammars, but some features,
already obsolete in bisonc++ 0.91 were removed.
Also note my e-mail address: the U. of Groningen's official policy now is
to remove department specific information, so it's `@rug.nl' rather than
`@rc.rug.nl', as used before.
-- Frank B. Brokken Mon, 16 May 2005 13:39:38 +0200
bisonc++ (0.91) unstable; urgency=low
* Added several missing short options (like -B etc) to the getopt() function
call. I forgot to add them to the previous version(s). Internally, all old
C style allocations were changed to C++ style allocations, using operators
new and delete. Where it was immediately obvious that a vector could be
used, I now use vectors. The internally used types `core' `shifts' and
'reductions' (types.h) now use a vector data member rather than an int [1]
member, which is then allocated to its proper (I may hope) size when the
structs are allocated.
-- Frank B. Brokken Sat, 19 Feb 2005 10:21:58 +0100
bisonc++ (0.90) unstable; urgency=low
* Command-line options now override matching declarations specified in the
grammar specification file.
All %define declarations have been removed. Instead their first arguments
are now used to specify declarations. E.g., %parser-skeleton instead of
%define parser-skeleton.
All declarations use lower-case letters, and use only separating hyphens,
no underscores. E.g., %lsp-needed rather than %define LSP_NEEDED
The declaration %class-name replaces the former %name declaration
All yy and YY name prefixes of symbols defined by bisonc++ have been
removed. The parser-state `yydefault' has been renamed to `defaultstate'.
-- Frank B. Brokken Sun, 6 Feb 2005 12:50:40 +0100
bisonc++ (0.82) unstable; urgency=low
* Added d_nError as protected data member to the base class. Missed it
during the initial conversion. d_nErrors counts the number of parsing
errors. Replaces yynerrs from bison(++)
-- Frank B. Brokken Sat, 29 Jan 2005 18:58:24 +0100
bisonc++ (0.81) unstable; urgency=low
* Added the option --show-files to display the names of the files that are
used or generated by bisonc++.
-- Frank B. Brokken Fri, 28 Jan 2005 14:50:48 +0100
bisonc++ (0.80) unstable; urgency=low
* Completed the initial debian release. No changes in the software.
-- Frank B. Brokken Fri, 28 Jan 2005 14:30:05 +0100
bisonc++ (0.70-1) unstable; urgency=low
* Initial Release.
-- Frank B. Brokken Thu, 27 Jan 2005 22:34:50 +0100
bisonc++-4.05.00/documentation/ 0000755 0001750 0001750 00000000000 11714551317 015125 5 ustar frank frank bisonc++-4.05.00/documentation/regression/ 0000755 0001750 0001750 00000000000 12161014762 017300 5 ustar frank frank bisonc++-4.05.00/documentation/regression/nosentence/ 0000755 0001750 0001750 00000000000 11714551317 021446 5 ustar frank frank bisonc++-4.05.00/documentation/regression/nosentence/parser/ 0000755 0001750 0001750 00000000000 11720217455 022741 5 ustar frank frank bisonc++-4.05.00/documentation/regression/nosentence/parser/bgram 0000644 0001750 0001750 00000000045 11714551317 023754 0 ustar frank frank %token NR
%%
start:
NR start
;
bisonc++-4.05.00/documentation/regression/nosentence/parser/grammar 0000644 0001750 0001750 00000000045 11714551317 024312 0 ustar frank frank %token NR
%%
start:
NR start
;
bisonc++-4.05.00/documentation/regression/nosentence/doc 0000644 0001750 0001750 00000000305 11714551317 022134 0 ustar frank frank This grammar has a single left-recursive rule, so no rule reduces to
`start'. Consequently, no sentences can be derived from this grammar.
Here is its sole production rule:
start:
NR start
;
bisonc++-4.05.00/documentation/regression/mandayam/ 0000755 0001750 0001750 00000000000 11714551317 021074 5 ustar frank frank bisonc++-4.05.00/documentation/regression/mandayam/parser/ 0000755 0001750 0001750 00000000000 11747173116 022373 5 ustar frank frank bisonc++-4.05.00/documentation/regression/mandayam/parser/bgram 0000644 0001750 0001750 00000004025 11714551317 023404 0 ustar frank frank %debug
%union {
int ival;
char cval;
char *strval;
float fval;
}
/* Keywords */
%token DEFINEtkn DEFINE_GROUPtkn
%token LPARAtkn RPARAtkn LBRtkn RBRtkn COLONtkn SEMItkn COMMAtkn
/* Arithmetic operators */
%token EQtkn
%left PLUStkn MINUStkn
%left MULTtkn DIVtkn
%right UNARY
%token IDtkn
%token INT_CONSTtkn
%token FLOAT_CONSTtkn
%token STRING_CONSTtkn
%token TRUEtkn FALSEtkn
%%
file: collection ;
collection:
prefix LBRtkn statement_list RBRtkn
| prefix LBRtkn RBRtkn
;
prefix:
IDtkn LPARAtkn param_list RPARAtkn
| IDtkn LPARAtkn RPARAtkn
;
param_list:
param_list COMMAtkn parameter
| parameter
;
parameter:
numeric_constant
| string_or_named_constant
| string_or_named_constant COLONtkn string_or_named_constant
| boolean_constant
;
statement_list:
statement_list statement
| statement
;
statement:
primitive_attribute
| complex_attribute
| definition
| definition_group
| collection
;
definition:
DEFINEtkn LPARAtkn enumerator COMMAtkn enumerator COMMAtkn enumerator RPARAtkn SEMItkn
;
definition_group:
DEFINE_GROUPtkn LPARAtkn enumerator COMMAtkn enumerator RPARAtkn SEMItkn
;
primitive_attribute:
IDtkn COLONtkn primitive_attribute_value
| IDtkn COLONtkn primitive_attribute_value SEMItkn
| IDtkn EQtkn primitive_attribute_value
;
primitive_attribute_value:
expr
;
expr:
expr PLUStkn term
| expr MINUStkn term
| term
;
term:
term MULTtkn primary
| term DIVtkn primary
| primary
;
primary:
LPARAtkn expr RPARAtkn
| MINUStkn expr %prec UNARY
| PLUStkn expr %prec UNARY
| constant
;
constant:
boolean_constant
| numeric_constant
| string_or_named_constant
;
enumerator:
string_or_named_constant
;
string_or_named_constant:
STRING_CONSTtkn
| IDtkn
;
numeric_constant:
INT_CONSTtkn
| FLOAT_CONSTtkn
;
boolean_constant:
TRUEtkn
| FALSEtkn
;
complex_attribute:
prefix SEMItkn
| prefix
;
bisonc++-4.05.00/documentation/regression/mandayam/parser/grammar 0000644 0001750 0001750 00000004025 11714551317 023742 0 ustar frank frank %debug
%union {
int ival;
char cval;
char *strval;
float fval;
}
/* Keywords */
%token DEFINEtkn DEFINE_GROUPtkn
%token LPARAtkn RPARAtkn LBRtkn RBRtkn COLONtkn SEMItkn COMMAtkn
/* Arithmetic operators */
%token EQtkn
%left PLUStkn MINUStkn
%left MULTtkn DIVtkn
%right UNARY
%token IDtkn
%token INT_CONSTtkn
%token FLOAT_CONSTtkn
%token STRING_CONSTtkn
%token TRUEtkn FALSEtkn
%%
file: collection ;
collection:
prefix LBRtkn statement_list RBRtkn
| prefix LBRtkn RBRtkn
;
prefix:
IDtkn LPARAtkn param_list RPARAtkn
| IDtkn LPARAtkn RPARAtkn
;
param_list:
param_list COMMAtkn parameter
| parameter
;
parameter:
numeric_constant
| string_or_named_constant
| string_or_named_constant COLONtkn string_or_named_constant
| boolean_constant
;
statement_list:
statement_list statement
| statement
;
statement:
primitive_attribute
| complex_attribute
| definition
| definition_group
| collection
;
definition:
DEFINEtkn LPARAtkn enumerator COMMAtkn enumerator COMMAtkn enumerator RPARAtkn SEMItkn
;
definition_group:
DEFINE_GROUPtkn LPARAtkn enumerator COMMAtkn enumerator RPARAtkn SEMItkn
;
primitive_attribute:
IDtkn COLONtkn primitive_attribute_value
| IDtkn COLONtkn primitive_attribute_value SEMItkn
| IDtkn EQtkn primitive_attribute_value
;
primitive_attribute_value:
expr
;
expr:
expr PLUStkn term
| expr MINUStkn term
| term
;
term:
term MULTtkn primary
| term DIVtkn primary
| primary
;
primary:
LPARAtkn expr RPARAtkn
| MINUStkn expr %prec UNARY
| PLUStkn expr %prec UNARY
| constant
;
constant:
boolean_constant
| numeric_constant
| string_or_named_constant
;
enumerator:
string_or_named_constant
;
string_or_named_constant:
STRING_CONSTtkn
| IDtkn
;
numeric_constant:
INT_CONSTtkn
| FLOAT_CONSTtkn
;
boolean_constant:
TRUEtkn
| FALSEtkn
;
complex_attribute:
prefix SEMItkn
| prefix
;
bisonc++-4.05.00/documentation/regression/mandayam/doc 0000644 0001750 0001750 00000000717 11714551317 021571 0 ustar frank frank This grammar was submitted by Ramanand Mandayam on July 5, 2010. The grammar
generates 2 shift/reduce conflicts resulting from forced removal of shiftable
items (in State 2), favoring reductions. Also it uses (production rule)
priorities (in state 11) to remove shiftable items in favor of reductions. The
grammar is interesting in that it shows that a grammar may (by default) reduce
rather than shift. See also section 'Rule Precedence' in Bisonc++'s manual.
bisonc++-4.05.00/documentation/regression/icmake1/ 0000755 0001750 0001750 00000000000 11714551317 020617 5 ustar frank frank bisonc++-4.05.00/documentation/regression/icmake1/parser/ 0000755 0001750 0001750 00000000000 11720221307 022101 5 ustar frank frank bisonc++-4.05.00/documentation/regression/icmake1/parser/bgram 0000644 0001750 0001750 00000000102 11714551317 023117 0 ustar frank frank %token X
%%
run:
one
|
two X
;
one:
;
two:
one
;
bisonc++-4.05.00/documentation/regression/icmake1/parser/grammar 0000644 0001750 0001750 00000000102 11714551317 023455 0 ustar frank frank %token X
%%
run:
one
|
two X
;
one:
;
two:
one
;
bisonc++-4.05.00/documentation/regression/icmake1/doc 0000644 0001750 0001750 00000000201 11714551317 021300 0 ustar frank frank A highly reduced grammar derived from icmake V 7.00's grammar producing
spurious RR conflicts with bisonc++ before version 1.5.0
bisonc++-4.05.00/documentation/regression/calculator/ 0000755 0001750 0001750 00000000000 11720431326 021430 5 ustar frank frank bisonc++-4.05.00/documentation/regression/calculator/scanner/ 0000755 0001750 0001750 00000000000 12161014762 023062 5 ustar frank frank bisonc++-4.05.00/documentation/regression/calculator/scanner/lexer 0000644 0001750 0001750 00000000404 12161014762 024122 0 ustar frank frank %interactive
%filenames scanner
%%
[ \t]+ // skip white space
\n return Parser::EOLN;
[0-9]+ return Parser::NUMBER;
. return matched()[0];
%%
bisonc++-4.05.00/documentation/regression/calculator/scanner/scanner.ih 0000644 0001750 0001750 00000000073 12161014762 025035 0 ustar frank frank #include "scanner.h"
#include "../parser/parserbase.h"
bisonc++-4.05.00/documentation/regression/calculator/scanner/scanner.h 0000644 0001750 0001750 00000001714 12161014762 024667 0 ustar frank frank // Generated by Flexc++ V0.93.00 on Mon, 20 Feb 2012 12:42:32 +0100
#ifndef Scanner_H_INCLUDED_
#define Scanner_H_INCLUDED_
// $insert baseclass_h
#include "scannerbase.h"
// $insert classHead
class Scanner: public ScannerBase
{
public:
explicit Scanner(std::istream &in = std::cin,
std::ostream &out = std::cout);
// $insert lexFunctionDecl
int lex();
private:
int lex__();
int executeAction__(size_t ruleNr);
void print();
void preCode(); // re-implement this function for code that must
// be exec'ed before the patternmatching starts
};
// $insert scannerConstructors
inline Scanner::Scanner(std::istream &in, std::ostream &out)
:
ScannerBase(in, out)
{}
inline void Scanner::preCode()
{
// optionally replace by your own code
}
inline void Scanner::print()
{
print__();
}
#endif // Scanner_H_INCLUDED_
bisonc++-4.05.00/documentation/regression/calculator/parser/ 0000755 0001750 0001750 00000000000 12161014762 022725 5 ustar frank frank bisonc++-4.05.00/documentation/regression/calculator/parser/bgram 0000644 0001750 0001750 00000002261 11714551317 023746 0 ustar frank frank // lowest precedence
%token NUMBER // integral numbers
EOLN // newline
%left '+' '-'
%left '*' '/'
%right UNARY
// highest precedence
%%
expressions:
expressions
evaluate
|
prompt
;
evaluate:
alternative
prompt
;
prompt:
{
prompt();
}
;
alternative:
expression
EOLN
{
cout << $1 << endl;
}
|
'q'
done
|
EOLN
|
error
EOLN
;
done:
{
cout << "Done.\n";
ACCEPT();
}
;
expression:
expression
'+'
expression
{
$$ = $1 + $3;
}
|
expression
'-'
expression
{
$$ = $1 - $3;
}
|
expression
'*'
expression
{
$$ = $1 * $3;
}
|
expression
'/'
expression
{
$$ = $1 / $3;
}
|
'-'
expression %prec UNARY
{
$$ = -$2;
}
|
'+'
expression %prec UNARY
{
$$ = $2;
}
|
'('
expression
')'
{
$$ = $2;
}
|
NUMBER
{
$$ = atoi(d_scanner.YYText());
}
;
bisonc++-4.05.00/documentation/regression/calculator/parser/parser.h 0000644 0001750 0001750 00000002254 12161014762 024375 0 ustar frank frank // Generated by Bisonc++ V3.00.00 on Mon, 20 Feb 2012 12:46:21 +0100
#ifndef Parser_h_included
#define Parser_h_included
// $insert baseclass
#include "parserbase.h"
// $insert scanner.h
#include "../scanner/scanner.h"
#undef Parser
class Parser: public ParserBase
{
// $insert scannerobject
Scanner d_scanner;
public:
int parse();
private:
void error(char const *msg); // called on (syntax) errors
int lex(); // returns the next token from the
// lexical scanner.
void print(); // use, e.g., d_token, d_loc
void prompt()
{
std::cout << "? ";
}
// support functions for parse():
void executeAction(int ruleNr);
void errorRecovery();
int lookup(bool recovery);
void nextToken();
void print__();
};
inline void Parser::error(char const *msg)
{
std::cerr << msg << '\n';
}
// $insert lex
inline int Parser::lex()
{
return d_scanner.lex();
}
inline void Parser::print()
{
print__(); // displays tokens if --print was specified
}
#endif
bisonc++-4.05.00/documentation/regression/calculator/parser/grammar 0000644 0001750 0001750 00000002352 12161014762 024300 0 ustar frank frank %filenames parser
%scanner ../scanner/scanner.h
// lowest precedence
%token NUMBER // integral numbers
EOLN // newline
%left '+' '-'
%left '*' '/'
%right UNARY
// highest precedence
%%
expressions:
expressions
evaluate
|
prompt
;
evaluate:
alternative
prompt
;
prompt:
{
prompt();
}
;
alternative:
expression
EOLN
{
cout << $1 << '\n';
}
|
'q'
done
|
EOLN
|
error
EOLN
;
done:
{
cout << "Done.\n";
ACCEPT();
}
;
expression:
expression
'+'
expression
{
$$ = $1 + $3;
}
|
expression
'-'
expression
{
$$ = $1 - $3;
}
|
expression
'*'
expression
{
$$ = $1 * $3;
}
|
expression
'/'
expression
{
$$ = $1 / $3;
}
|
'-'
expression %prec UNARY
{
$$ = -$2;
}
|
'+'
expression %prec UNARY
{
$$ = $2;
}
|
'('
expression
')'
{
$$ = $2;
}
|
NUMBER
{
$$ = atoi(d_scanner.matched().c_str());
}
;
bisonc++-4.05.00/documentation/regression/calculator/parser/parser.ih 0000644 0001750 0001750 00000000555 11714551317 024555 0 ustar frank frank // include this file in the sources of the class Calculator,
// and add any includes etc. that are only needed for
// the compilation of these sources.
// include the file defining the parser class:
#include "parser.h"
// UN-comment if you don't want to prefix std::
// for every symbol defined in the std. namespace:
#include
using namespace std;
bisonc++-4.05.00/documentation/regression/calculator/doc 0000644 0001750 0001750 00000000544 11714551317 022131 0 ustar frank frank This is the regression installation of the calculator also found in
documentation/man. The program implements a simple calculator, accepting unary
and binary + and -, binary * and /, and nested expressions, using integral
operands.
To end the program, enter: q
Errors are handled by skipping all information until the next end of line.
bisonc++-4.05.00/documentation/regression/calculator/demo.cc 0000644 0001750 0001750 00000001036 11714551317 022671 0 ustar frank frank #include
#include "parser/parser.h"
using namespace std;
int main(int argc, char **argv)
{
cout << "Enter (integral) expressions on separate lines, using "
"+ - * / ()\n"
"Other line content should result in a `syntax error'\n"
"Blanks and tabs are ignored. Use ^c or ^d to end the program\n"
"Use any program argument to view parser debug output\n";
Parser calculator;
calculator.setDebug(argc > 1);
return calculator.parse();
}
bisonc++-4.05.00/documentation/regression/aho4.46/ 0000755 0001750 0001750 00000000000 11714551317 020370 5 ustar frank frank bisonc++-4.05.00/documentation/regression/aho4.46/parser/ 0000755 0001750 0001750 00000000000 11714551317 021664 5 ustar frank frank bisonc++-4.05.00/documentation/regression/aho4.46/parser/grammar 0000644 0001750 0001750 00000000145 11714551317 023235 0 ustar frank frank /* AHO et al, example 4.46 */
%token i
%%
S: L '=' R ;
S: R ;
L: '*' R ;
L: i ;
R: L ;
bisonc++-4.05.00/documentation/regression/aho4.46/doc 0000644 0001750 0001750 00000000165 11714551317 021062 0 ustar frank frank This grammar, given by AHO et al as grammar 4.46 (p. 241), has 10 states, no
shift-reduce or reduce-reduce conflict.
bisonc++-4.05.00/documentation/regression/polymorphic/ 0000755 0001750 0001750 00000000000 12161014762 021645 5 ustar frank frank bisonc++-4.05.00/documentation/regression/polymorphic/dallas2 0000644 0001750 0001750 00000012475 11714551317 023130 0 ustar frank frank From dallas.a.clement@gmail.com Tue Oct 9 00:29:53 2007
Received: from smtp1.rug.nl (smtp1.rug.nl [129.125.50.11])
by suffix.rc.rug.nl (8.14.1/8.14.1/Debian-9) with SMTP id l98MTrxe030265
for ; Tue, 9 Oct 2007 00:29:53 +0200
Received: from smtp1.rug.nl ([129.125.50.11])
by smtp1.rug.nl (SMSSMTP 4.1.0.19) with SMTP id M2007100900294623523
for ; Tue, 09 Oct 2007 00:29:46 +0200
Received: from mail3.rug.nl (mail3.rug.nl [129.125.50.14])
by smtp1.rug.nl (8.12.11.20060308/8.12.11) with ESMTP id l98MTkQa005320
for ; Tue, 9 Oct 2007 00:29:46 +0200 (MEST)
Resent-Message-Id: <200710082229.l98MTkQa005320@smtp1.rug.nl>
Received: from
by mail3.rug.nl (CommuniGate Pro RULES 5.1.12)
with RULES id 55899656; Tue, 09 Oct 2007 00:29:46 +0200
X-Autogenerated: Mirror
Resent-From:
Resent-Date: Tue, 09 Oct 2007 00:29:46 +0200
Received: from smtp2.rug.nl ([129.125.50.12] verified)
by mail3.rug.nl (CommuniGate Pro SMTP 5.1.12)
with SMTP id 55899655 for f.b.brokken@rug.nl; Tue, 09 Oct 2007 00:29:46 +0200
Received: from smtp2.rug.nl ([129.125.50.12])
by smtp2.rug.nl (SMSSMTP 4.1.11.41) with SMTP id M2007100900294526988
for ; Tue, 09 Oct 2007 00:29:45 +0200
Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.182])
by smtp2.rug.nl (8.12.11.20060308/8.12.11) with ESMTP id l98MTiRH013056
for ; Tue, 9 Oct 2007 00:29:44 +0200 (MEST)
Received: by py-out-1112.google.com with SMTP id f47so2710922pye
for ; Mon, 08 Oct 2007 15:29:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=beta;
h=domainkey-signature:received:received:subject:from:reply-to:to:in-reply-to:references:content-type:organization:date:message-id:mime-version:x-mailer:content-transfer-encoding;
bh=h3Gfp8lzdKEqJY0jAw7jqzoOPcybb3kAoQ3AYA6Vq3U=;
b=GVlqjHLC5sLillOXZljVFfhCLivTZyduPh/m94ehJfz7ECbSCEVye8UQvi+WhbSBei+PFXiCC5AHsu0SKKZbzbHSCAyDmPWrB7SCmMZDaSJQkS0oi7h5IOQOUVjSNEGeYEqejjfI5i1M8nvHMJspCJvIt80RryoQgk5p8lGqkss=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=beta;
h=received:subject:from:reply-to:to:in-reply-to:references:content-type:organization:date:message-id:mime-version:x-mailer:content-transfer-encoding;
b=ZN59LY0X3K/K0dycwmL5rRC1GNCTbVycF03b6F2HaiuGSUDzViwlAHVjL9Fgv5KcXGCDQc1zhu7FRk1kqqmapIMhrP0Xl46/Hth6+mi2AwshAsqe9CTcQIOzUX2zdXf3qcjw6clQcddRiqNdjjJFoFgxiREL4XJBMKMv+8y6TtE=
Received: by 10.35.33.15 with SMTP id l15mr12560856pyj.1191882583426;
Mon, 08 Oct 2007 15:29:43 -0700 (PDT)
Received: from debian.local ( [70.250.157.38])
by mx.google.com with ESMTPS id y64sm7923418pyg.2007.10.08.15.29.41
(version=SSLv3 cipher=RC4-MD5);
Mon, 08 Oct 2007 15:29:41 -0700 (PDT)
Subject: Re: Small bisonc++ question
From: Dallas Clement
Reply-To: dallas.a.clement@gmail.com
To: f.b.brokken@rug.nl
In-Reply-To: <20071008221446.GD27245@rc.rug.nl>
References: <20070919073747.GC17408@rc.rug.nl>
<1191222419.3468.43.camel@localhost> <20071001190610.GA6195@rc.rug.nl>
<1191278771.3605.15.camel@localhost> <20071003072550.GC29648@rc.rug.nl>
<1191450509.3474.48.camel@localhost> <20071004064310.GB23564@rc.rug.nl>
<1191505247.3505.15.camel@localhost> <20071005101005.GA25725@rc.rug.nl>
<1191853606.3413.47.camel@localhost> <20071008221446.GD27245@rc.rug.nl>
Content-Type: text/plain
Organization: Clements
Date: Mon, 08 Oct 2007 12:29:39 -0500
Message-Id: <1191864579.3413.58.camel@localhost>
Mime-Version: 1.0
X-Mailer: Evolution 2.6.3
Content-Transfer-Encoding: 7bit
X-Spam-Flag: NO
X-Scanned-By: milter-spamc/1.4.366 (smtp1.rug.nl [129.125.50.11]); Tue, 09 Oct 2007 00:29:46 +0200
X-Scanned-By: milter-spamc/1.4.366 (smtp2.rug.nl [129.125.50.12]); Tue, 09 Oct 2007 00:29:45 +0200
X-Spam-Status: NO, hits=-7.00 required=4.00
X-Spam-Report: Spam detection software on "smtp1.rug.nl". Questions: postmaster@rug.nl
Content analysis details: (-7.0 points, 4.0 required)
USER_IN_WHITELIST=-7
____
Status: RO
Content-Length: 1238
Lines: 54
Frank,
I've narrowed things down to one particular rule. It seems that the
following rule with all of its alternatives is causing problems.
scoped_identifier:
TOK_IDENTIFIER
{
}
|
TOK_SCOPE_OPERATOR TOK_IDENTIFIER
{
}
|
scoped_identifier TOK_SCOPE_OPERATOR TOK_IDENTIFIER
{
}
;
If I simplify this rule to the following, I do not have any problems
with semantic values not being saved on the stack correctly.
scoped_identifier:
TOK_IDENTIFIER
{
}
;
It seems that these extra alternatives are confusing the parser. Do you
have any idea why this could be?
Thanks,
Dallas
On Tue, 2007-10-09 at 00:14 +0200, Frank B. Brokken wrote:
> Dear Dallas Clement, you wrote:
> >
> > Hello Frank,
> >
> > I just wanted to give you another update. I took the example that you
> > provided and started tweaking it to resemble my grammar which manifested
> > the problem I reported earlier.
> >
> > The good news is that I am unable to reproduce the problem, using the
> > Base and SemVal classes you defined in the example.
>
> Apparently this e-mail and my answer to your previous one crossed each other
> :-)
>
> Thanks for this e-mail, and good luck. Don't hesitate to call again!
>
> Cheers,
>
bisonc++-4.05.00/documentation/regression/polymorphic/scanner/ 0000755 0001750 0001750 00000000000 12161014762 023276 5 ustar frank frank bisonc++-4.05.00/documentation/regression/polymorphic/scanner/lexer 0000644 0001750 0001750 00000000651 12161014762 024342 0 ustar frank frank // %interactive
%filenames scanner
// %debug
%%
[ \t]+ // Often used: skip white space
\n // same
const return Parser::CONST;
[a-zA-Z_][a-zA-Z0-9_]* {
*d_semval = new Ident(matched());
return Parser::IDENTIFIER;
}
. return matched()[0];
%%
bisonc++-4.05.00/documentation/regression/polymorphic/scanner/scanner.ih 0000644 0001750 0001750 00000000072 12161014762 025250 0 ustar frank frank #include "../parser/parserbase.h"
#include "scanner.h"
bisonc++-4.05.00/documentation/regression/polymorphic/scanner/scanner.h 0000644 0001750 0001750 00000002001 12161014762 025071 0 ustar frank frank // Generated by Flexc++ V0.93.00 on Mon, 20 Feb 2012 13:48:09 +0100
#ifndef Scanner_H_INCLUDED_
#define Scanner_H_INCLUDED_
#include "../semval/semval.h"
// $insert baseclass_h
#include "scannerbase.h"
// $insert classHead
class Scanner: public ScannerBase
{
SemVal *d_semval;
public:
Scanner(SemVal *semval);
// $insert lexFunctionDecl
int lex();
private:
int lex__();
int executeAction__(size_t ruleNr);
void print();
void preCode(); // re-implement this function for code that must
// be exec'ed before the patternmatching starts
};
// $insert scannerConstructors
inline Scanner::Scanner(SemVal *semval)
:
ScannerBase(std::cin, std::cout),
d_semval(semval)
{}
// $insert inlineLexFunction
inline int Scanner::lex()
{
return lex__();
}
inline void Scanner::preCode()
{
// optionally replace by your own code
}
inline void Scanner::print()
{
print__();
}
#endif // Scanner_H_INCLUDED_
bisonc++-4.05.00/documentation/regression/polymorphic/ident/ 0000755 0001750 0001750 00000000000 12161014762 022750 5 ustar frank frank bisonc++-4.05.00/documentation/regression/polymorphic/ident/ident.ih 0000644 0001750 0001750 00000000052 11714551317 024377 0 ustar frank frank #include "ident.h"
using namespace std;
bisonc++-4.05.00/documentation/regression/polymorphic/ident/ident.h 0000644 0001750 0001750 00000001262 12161014762 024225 0 ustar frank frank #ifndef _INCLUDED_IDENT_
#define _INCLUDED_IDENT_
#include
#include "../base/base.h"
class Ident: public Base
{
std::string d_ident;
public:
Ident(std::string const &id);
virtual Base *clone() const;
string const &id() const; // directly access the name.
virtual ostream &insert(ostream &os) const;
};
inline Ident::Ident(std::string const &id)
:
d_ident(id)
{}
inline Base *Ident::clone() const
{
return new Ident(*this); // default CopyCons is ok.
}
inline string const &Ident::id() const
{
return d_ident;
}
inline ostream &Ident::insert(ostream &out) const
{
return out << d_ident;
}
#endif
bisonc++-4.05.00/documentation/regression/polymorphic/dallas 0000644 0001750 0001750 00000014634 11714551317 023045 0 ustar frank frank From dallas.a.clement@gmail.com Tue Oct 9 01:20:26 2007
Received: from smtp1.rug.nl (smtp1.rug.nl [129.125.50.11])
by suffix.rc.rug.nl (8.14.1/8.14.1/Debian-9) with SMTP id l98NKQcR032365
for ; Tue, 9 Oct 2007 01:20:26 +0200
Received: from smtp1.rug.nl ([129.125.50.11])
by smtp1.rug.nl (SMSSMTP 4.1.0.19) with SMTP id M2007100901201923923
for ; Tue, 09 Oct 2007 01:20:19 +0200
Received: from mail3.rug.nl (mail3.rug.nl [129.125.50.14])
by smtp1.rug.nl (8.12.11.20060308/8.12.11) with ESMTP id l98NKI5a008704
for ; Tue, 9 Oct 2007 01:20:18 +0200 (MEST)
Resent-Message-Id: <200710082320.l98NKI5a008704@smtp1.rug.nl>
Received: from
by mail3.rug.nl (CommuniGate Pro RULES 5.1.12)
with RULES id 55901028; Tue, 09 Oct 2007 01:20:18 +0200
X-Autogenerated: Mirror
Resent-From:
Resent-Date: Tue, 09 Oct 2007 01:20:18 +0200
Received: from smtp2.rug.nl ([129.125.50.12] verified)
by mail3.rug.nl (CommuniGate Pro SMTP 5.1.12)
with SMTP id 55901027 for f.b.brokken@rug.nl; Tue, 09 Oct 2007 01:20:18 +0200
Received: from smtp2.rug.nl ([129.125.50.12])
by smtp2.rug.nl (SMSSMTP 4.1.11.41) with SMTP id M2007100901201828757
for ; Tue, 09 Oct 2007 01:20:18 +0200
Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.178])
by smtp2.rug.nl (8.12.11.20060308/8.12.11) with ESMTP id l98NKG2I028040
for ; Tue, 9 Oct 2007 01:20:16 +0200 (MEST)
Received: by py-out-1112.google.com with SMTP id f47so2729326pye
for ; Mon, 08 Oct 2007 16:20:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=beta;
h=domainkey-signature:received:received:subject:from:reply-to:to:in-reply-to:references:content-type:organization:date:message-id:mime-version:x-mailer;
bh=LD3uTVyoVRXS18cMbdAEH/t5RfGGUuSFs6pDmj1RxTc=;
b=g0vH8DPCx3xG8SSKvAsd4Fw+E5FDBMFsf5KJSXGmIlR64OzH7Q/BxeRjntgyy/FVfcXhCId/6fvCEqOOOx9SLcZ+s1gWWMQr2R0Xsd8CpNP9vsCpfGTwkFw0UsHxWQG8+QTaooMqcdEB9C0qnmO9OJblnTStirnqtWNMxfz0gW0=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=beta;
h=received:subject:from:reply-to:to:in-reply-to:references:content-type:organization:date:message-id:mime-version:x-mailer;
b=Tkh422JxTs39Ghh5NhfwxU0szS4qz06ycc6wi7XKd6WfdyZHVC0ohGdo46UsTQ3qFdF4mk9naD3h9O1A3V0+oaHFT7a3AJag6owDD+lnc4310BTPSMj+DO6oZ/vksn2hDx4hJAERTyde35adMlqHiM0WdNIH6OJs79os9sCGS/0=
Received: by 10.35.87.10 with SMTP id p10mr2102442pyl.1191885615791;
Mon, 08 Oct 2007 16:20:15 -0700 (PDT)
Received: from debian.local ( [70.250.157.38])
by mx.google.com with ESMTPS id w29sm8012125pyg.2007.10.08.16.20.12
(version=SSLv3 cipher=RC4-MD5);
Mon, 08 Oct 2007 16:20:13 -0700 (PDT)
Subject: Re: Small bisonc++ question
From: Dallas Clement
Reply-To: dallas.a.clement@gmail.com
To: f.b.brokken@rug.nl
In-Reply-To: <20071008221446.GD27245@rc.rug.nl>
References: <20070919073747.GC17408@rc.rug.nl>
<1191222419.3468.43.camel@localhost> <20071001190610.GA6195@rc.rug.nl>
<1191278771.3605.15.camel@localhost> <20071003072550.GC29648@rc.rug.nl>
<1191450509.3474.48.camel@localhost> <20071004064310.GB23564@rc.rug.nl>
<1191505247.3505.15.camel@localhost> <20071005101005.GA25725@rc.rug.nl>
<1191853606.3413.47.camel@localhost> <20071008221446.GD27245@rc.rug.nl>
Content-Type: multipart/mixed; boundary="=-WkuJNQQGw+AXQ14kxZP8"
Organization: Clements
Date: Mon, 08 Oct 2007 13:20:10 -0500
Message-Id: <1191867610.3413.66.camel@localhost>
Mime-Version: 1.0
X-Mailer: Evolution 2.6.3
X-Spam-Flag: NO
X-Scanned-By: milter-spamc/1.4.366 (smtp1.rug.nl [129.125.50.11]); Tue, 09 Oct 2007 01:20:19 +0200
X-Scanned-By: milter-spamc/1.4.366 (smtp2.rug.nl [129.125.50.12]); Tue, 09 Oct 2007 01:20:18 +0200
X-Spam-Status: NO, hits=-7.00 required=4.00
X-Spam-Report: Spam detection software on "smtp1.rug.nl". Questions: postmaster@rug.nl
Content analysis details: (-7.0 points, 4.0 required)
USER_IN_WHITELIST=-7
____
Status: RO
Content-Length: 2401
Lines: 129
--=-WkuJNQQGw+AXQ14kxZP8
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hello Frank,
I have been able to reproduce the mysterious problem I have been
bothering you about this past many days. I can do it with a slight
modification of the example code you provided. I have attached the
modified grammar file.
This grammar should be able to parse the following expression:
const abc j = xyz;
The output of the parsing should produce:
type_specifier j scoped_identifier
This is exactly what I would expect.
However, if you were to uncomment the last two alternatives in the
'scoped_identifier' rule, you will observe a completely different
output.
Please uncomment as follows:
scoped_identifier:
IDENTIFIER
{
$$ = new Ident("scoped_identifier");
}
|
':' IDENTIFIER
{
$$ = new Ident("scoped_identifier");
}
|
scoped_identifier ':' IDENTIFIER
{
$$ = new Ident("scoped_identifier");
}
;
Now you will observe the following output when executed:
type_specifier type_specifier scoped_identifier
This is definitely not what I would expect. The identifier 'j' is
definitely not a 'type_specifier'.
This example reproduces the exact problem I have been struggling to
explain to you this past several days.
Now I may be doing something really stupid, but I'm not able to
recognize what it is. What do you think?
Thanks,
Dallas
--=-WkuJNQQGw+AXQ14kxZP8
Content-Disposition: attachment; filename=grammar
Content-Type: text/plain; name=grammar; charset=utf-8
Content-Transfer-Encoding: 7bit
%class-name Parser
%filenames parser
%parsefun-source parse.cc
%scanner ../scanner/scanner.h
%baseclass-preinclude preinclude.h
%stype SemVal
%token BOOL INT ENUM CONST IDENTIFIER
%%
constant_definition:
CONST type_specifier IDENTIFIER '=' scoped_identifier ';'
{
cout << $2 << " " << $3 << " " << $5 << endl;
}
;
type_specifier:
BOOL
{
$$ = new Ident("type_specifier");
}
|
INT
{
$$ = new Ident("type_specifier");
}
|
scoped_identifier
{
$$ = new Ident("type_specifier");
}
;
scoped_identifier:
IDENTIFIER
{
$$ = new Ident("scoped_identifier");
}
/*
|
':' IDENTIFIER
{
$$ = new Ident("scoped_identifier");
}
|
scoped_identifier ':' IDENTIFIER
{
$$ = new Ident("scoped_identifier");
}
*/
;
--=-WkuJNQQGw+AXQ14kxZP8--
bisonc++-4.05.00/documentation/regression/polymorphic/input 0000644 0001750 0001750 00000000024 11714551317 022730 0 ustar frank frank const abc j = xyz;
bisonc++-4.05.00/documentation/regression/polymorphic/parser/ 0000755 0001750 0001750 00000000000 12161014762 023141 5 ustar frank frank bisonc++-4.05.00/documentation/regression/polymorphic/parser/parser.h 0000644 0001750 0001750 00000002250 12161014762 024605 0 ustar frank frank // Generated by Bisonc++ V3.00.00 on Mon, 20 Feb 2012 13:35:48 +0100
#ifndef Parser_h_included
#define Parser_h_included
// $insert baseclass
#include "parserbase.h"
// $insert scanner.h
#include "../scanner/scanner.h"
#undef Parser
class Parser: public ParserBase
{
// $insert scannerobject
Scanner d_scanner;
public:
Parser();
int parse();
private:
void error(char const *msg); // called on (syntax) errors
int lex(); // returns the next token from the
// lexical scanner.
void print(); // use, e.g., d_token, d_loc
// support functions for parse():
void executeAction(int ruleNr);
void errorRecovery();
int lookup(bool recovery);
void nextToken();
void print__();
};
inline void Parser::error(char const *msg)
{
std::cerr << msg << '\n';
}
// $insert lex
inline int Parser::lex()
{
return d_scanner.lex();
}
inline void Parser::print()
{
print__(); // displays tokens if --print was specified
}
inline Parser::Parser()
:
d_scanner(&d_val__)
{}
#endif
bisonc++-4.05.00/documentation/regression/polymorphic/parser/grammar 0000644 0001750 0001750 00000001607 12161014762 024516 0 ustar frank frank %filenames parser
%scanner ../scanner/scanner.h
%debug
%baseclass-preinclude preinclude.h
%stype SemVal
%token BOOL INT CONST IDENTIFIER
%%
// at: const abc j = xyz;
// output should be: type_specifier j scoped_identifier
constant_definition:
CONST type_specifier IDENTIFIER
{
cout << "Mid-rule: " << $2 << ", " << $3 << endl;
}
'=' scoped_identifier ';'
{
cout << $2 << " " << $3 << " " << $6 << endl;
}
;
type_specifier:
BOOL
{
$$ = new Ident("type_specifier");
}
|
INT
{
$$ = new Ident("type_specifier");
}
|
scoped_identifier
{
$$ = new Ident("s-type");
}
;
scoped_identifier:
IDENTIFIER
{
$$ = new Ident("scoped");
}
|
':' IDENTIFIER
{
$$ = new Ident("scoped");
}
|
scoped_identifier ':' IDENTIFIER
{
$$ = new Ident("scoped");
}
;
bisonc++-4.05.00/documentation/regression/polymorphic/parser/parser.ih 0000644 0001750 0001750 00000000560 11714551317 024765 0 ustar frank frank // Include this file in the sources of the class Parser.
// $insert class.h
#include "parser.h"
// Add below here any includes etc. that are only
// required for the compilation of Parser's sources.
// UN-comment the next using-declaration if you want to use
// symbols from the namespace std without specifying std::
//using namespace std;
bisonc++-4.05.00/documentation/regression/polymorphic/parser/preinclude.h 0000644 0001750 0001750 00000000124 11714551317 025446 0 ustar frank frank #include "../enum/enum.h"
#include "../ident/ident.h"
#include "../semval/semval.h"
bisonc++-4.05.00/documentation/regression/polymorphic/doc 0000644 0001750 0001750 00000000560 11714551317 022343 0 ustar frank frank This is the original example resulting from a discussion I had with
Dallas A. Clement about polymorphic semantic values. The program creates a
simple parser that can be run as follows:
demo < input
When run as
demo x < input
debug output is shown, including selected semantic values on the semantic
value stack.
Also: see the files `dallas' and `dallas2'
bisonc++-4.05.00/documentation/regression/polymorphic/semval/ 0000755 0001750 0001750 00000000000 11714551317 023141 5 ustar frank frank bisonc++-4.05.00/documentation/regression/polymorphic/semval/semval.h 0000644 0001750 0001750 00000002673 11714551317 024611 0 ustar frank frank #ifndef _INCLUDED_SEMVAL_
#define _INCLUDED_SEMVAL_
#include "../base/base.h"
class SemVal
{
Base *d_bp;
public:
SemVal(); // Never used by me, but needed to
// enlarge the semantic value stack
SemVal(Base *bp); // Semval will own bp
SemVal(SemVal const &other);
~SemVal();
SemVal &operator=(SemVal const &other);
Base const &base() const;
template
Class const &downcast();
private:
void copy(SemVal const &other);
void destroy();
};
inline Base const &SemVal::base() const
{
return *d_bp;
}
inline SemVal::SemVal()
:
d_bp(0)
{}
inline SemVal::SemVal(Base *bp)
:
d_bp(bp)
{}
inline SemVal::~SemVal()
{
destroy();
}
inline SemVal::SemVal(SemVal const &other)
{
copy(other);
}
inline SemVal &SemVal::operator=(SemVal const &other)
{
if (this != &other)
{
destroy();
copy(other);
}
return *this;
}
inline void SemVal::copy(SemVal const &other)
{
d_bp = other.d_bp ? other.d_bp->clone() : 0;
}
inline void SemVal::destroy()
{
delete d_bp;
}
template
inline Class const &SemVal::downcast()
{
return dynamic_cast(*d_bp);
}
inline ostream &operator<<(ostream &out, SemVal const &obj)
{
if (&obj.base())
return out << obj.base();
return out << "<0>";
}
#endif
bisonc++-4.05.00/documentation/regression/polymorphic/main.ih 0000644 0001750 0001750 00000000264 12161014762 023115 0 ustar frank frank #include
#include
#include
#include
#include "semval/semval.h"
#include "ident/ident.h"
#include "enum/enum.h"
#include "parser/parser.h"
bisonc++-4.05.00/documentation/regression/polymorphic/enum/ 0000755 0001750 0001750 00000000000 11714551317 022616 5 ustar frank frank bisonc++-4.05.00/documentation/regression/polymorphic/enum/enum.ih 0000644 0001750 0001750 00000000051 11714551317 024100 0 ustar frank frank #include "enum.h"
using namespace std;
bisonc++-4.05.00/documentation/regression/polymorphic/enum/enum.h 0000644 0001750 0001750 00000001311 11714551317 023727 0 ustar frank frank #ifndef _INCLUDED_ENUM_
#define _INCLUDED_ENUM_
#include "../base/base.h"
class Enum: public Base
{
public:
enum Value
{
ZERO,
ONE,
TWO
};
private:
Value d_value;
public:
Enum(Value v);
virtual Base *clone() const;
Value value() const; // directly access the value
virtual ostream &insert(ostream &os) const;
};
inline Enum::Enum(Value v)
:
d_value(v)
{}
inline Base *Enum::clone() const
{
return new Enum(*this);
}
inline Enum::Value Enum::value() const
{
return d_value;
}
inline ostream &Enum::insert(ostream &out) const
{
return out << d_value;
}
#endif
bisonc++-4.05.00/documentation/regression/polymorphic/base/ 0000755 0001750 0001750 00000000000 11720221647 022561 5 ustar frank frank bisonc++-4.05.00/documentation/regression/polymorphic/base/base.ih 0000644 0001750 0001750 00000000051 11714551317 024014 0 ustar frank frank #include "base.h"
using namespace std;
bisonc++-4.05.00/documentation/regression/polymorphic/base/base.h 0000644 0001750 0001750 00000000604 11720221647 023644 0 ustar frank frank #ifndef _INCLUDED_BASE_
#define _INCLUDED_BASE_
// DON'T do this in real life:
using namespace std;
class Base
{
public:
virtual ~Base();
virtual Base *clone() const = 0;
virtual ostream &insert(ostream &os) const = 0;
};
inline Base::~Base()
{}
inline ostream &operator<<(ostream &out, Base const &obj)
{
return obj.insert(out);
}
#endif
bisonc++-4.05.00/documentation/regression/polymorphic/demo.cc 0000644 0001750 0001750 00000001251 11714551317 023104 0 ustar frank frank /*
demo.cc
*/
#include "main.ih"
int main(int argc, char **argv)
{
if (isatty(STDIN_FILENO))
{
cout << "Run the program as `demo < input'\n"
"Use any program argument to view parser's debug output\n";
}
Parser parser;
parser.setDebug(argc > 1);
cout << "When input-redirecting `input' (e.g., `demo < input') the output"
" should be:\n"
" Mid-rule: s-type, j\n"
" s-type j scoped\n"
"\n";
int ret = parser.parse();
cout << "\n"
"Parser returns " << ret << endl;
return 0;
}
bisonc++-4.05.00/documentation/regression/danglingelse/ 0000755 0001750 0001750 00000000000 11714551317 021741 5 ustar frank frank bisonc++-4.05.00/documentation/regression/danglingelse/parser/ 0000755 0001750 0001750 00000000000 11720221307 023223 5 ustar frank frank bisonc++-4.05.00/documentation/regression/danglingelse/parser/bgram 0000644 0001750 0001750 00000000132 11714551317 024244 0 ustar frank frank %token EXPR ELSE
%%
stmnt:
EXPR stmnt
|
EXPR stmnt ELSE stmnt
|
EXPR ';'
;
bisonc++-4.05.00/documentation/regression/danglingelse/parser/grammar 0000644 0001750 0001750 00000000132 11714551317 024602 0 ustar frank frank %token EXPR ELSE
%%
stmnt:
EXPR stmnt
|
EXPR stmnt ELSE stmnt
|
EXPR ';'
;
bisonc++-4.05.00/documentation/regression/danglingelse/doc 0000644 0001750 0001750 00000000314 11714551317 022427 0 ustar frank frank The well-known dangling-else problem. This grammar shows one S/R conflict,
which is solved as SHIFT, using the default S/R conflict resolution method.
By using %expect 1 the S/R warning can be prevented
bisonc++-4.05.00/documentation/regression/error/ 0000755 0001750 0001750 00000000000 11720414111 020421 5 ustar frank frank bisonc++-4.05.00/documentation/regression/error/scanner/ 0000755 0001750 0001750 00000000000 12161014762 022062 5 ustar frank frank bisonc++-4.05.00/documentation/regression/error/scanner/lexer 0000644 0001750 0001750 00000000317 12161014762 023125 0 ustar frank frank %filenames scanner
%interactive
%%
[ \t]+ // Often used: skip white space
[0-9]+ return Parser::NR;
.|\n return matched()[0];
bisonc++-4.05.00/documentation/regression/error/scanner/scanner.ih 0000644 0001750 0001750 00000000070 12161014762 024032 0 ustar frank frank #include "scanner.h"
#include "../parser/Parserbase.h"
bisonc++-4.05.00/documentation/regression/error/scanner/scanner.h 0000644 0001750 0001750 00000001605 12161014762 023666 0 ustar frank frank #ifndef Scanner_H_INCLUDED_
#define Scanner_H_INCLUDED_
// $insert baseclass_h
#include "scannerbase.h"
// $insert classHead
class Scanner: public ScannerBase
{
public:
explicit Scanner(std::istream &in = std::cin,
std::ostream &out = std::cout);
// $insert lexFunctionDecl
int lex();
private:
int lex__();
int executeAction__(size_t ruleNr);
void print();
void preCode(); // re-implement this function for code that must
// be exec'ed before the patternmatching starts
};
// $insert scannerConstructors
inline Scanner::Scanner(std::istream &in, std::ostream &out)
:
ScannerBase(in, out)
{}
inline void Scanner::preCode()
{
// optionally replace by your own code
}
inline void Scanner::print()
{
print__();
}
#endif // Scanner_H_INCLUDED_
bisonc++-4.05.00/documentation/regression/error/parser/ 0000755 0001750 0001750 00000000000 12161014762 021725 5 ustar frank frank bisonc++-4.05.00/documentation/regression/error/parser/bgram 0000644 0001750 0001750 00000000131 11714551317 022740 0 ustar frank frank
%token NR
%%
lines:
lines line
|
line
;
line:
NR '\n'
|
error '\n'
;
bisonc++-4.05.00/documentation/regression/error/parser/grammar 0000644 0001750 0001750 00000000336 12161014762 023300 0 ustar frank frank %scanner ../scanner/scanner.h
%token NR
%print-tokens
%%
lines:
lines line
|
line
;
line:
NR '\n'
{
std::cout << " OK\n";
}
|
error '\n'
{
std::cout << " ERROR\n";
}
;
bisonc++-4.05.00/documentation/regression/error/doc 0000644 0001750 0001750 00000000436 11714551317 021131 0 ustar frank frank This example offers a demonstration of error-handling.
Enter lines, each containing one integral value. Use ^C to end the program
other line content should result in a `syntax error'
blanks and tabs are ignored (and thus OK)
An empty line, however, *will* result in a `syntax error'
bisonc++-4.05.00/documentation/regression/error/demo.cc 0000644 0001750 0001750 00000001122 11714551317 021665 0 ustar frank frank /*
error.cc
*/
#include
#include "parser/Parser.h"
using namespace std;
int main(int argc, char **argv)
{
cout << "Enter lines, each containing one integral value.\n"
"Other lines (also empty lines) should result in a "
"`syntax error'\n"
"Blanks and tabs are ignored. Use ^c or ^d to end the program\n"
"Use any program argument to view parser debug output\n";
Parser parser;
parser.setDebug(argc > 1);
parser.parse();
return 0;
}
bisonc++-4.05.00/documentation/regression/fun/ 0000755 0001750 0001750 00000000000 11720435245 020073 5 ustar frank frank bisonc++-4.05.00/documentation/regression/fun/scanner/ 0000755 0001750 0001750 00000000000 12161014762 021521 5 ustar frank frank bisonc++-4.05.00/documentation/regression/fun/scanner/lexer 0000644 0001750 0001750 00000004121 12161014762 022561 0 ustar frank frank %interactive
%filenames scanner
digits [0-9]+
e [eE]
sign [-+]
%%
[ \t]+
{digits} return Parser::INT;
{digits}"." |
{digits}"."{digits} |
{digits}{e}{sign}{digits} |
{digits}"."{e}{sign}{digits} |
{digits}"."{digits}{e}{sign}{digits} |
"."{digits} |
"."{e}{sign}{digits} |
"."{digits}{e}{sign}{digits} return Parser::DOUBLE;
"'"."'" return Parser::CHAR;
"+=" return Parser::ADDA;
"-=" return Parser::SUBA;
"*=" return Parser::MULA;
"/=" return Parser::DIVA;
"%=" return Parser::MODA;
"&=" return Parser::ANDA;
"^=" return Parser::XORA;
"|=" return Parser::ORA;
"<<=" return Parser::LSHIFTA;
">>=" return Parser::RSHIFTA;
"<<" return Parser::LEFTSHIFT;
">>" return Parser::RIGHTSHIFT;
char |
int |
double return Parser::DATATYPE;
help return Parser::HELP;
rad |
deg |
grad return Parser::ANGLETYPE;
list return Parser::LIST;
stop |
quit |
exit return Parser::QUIT;
PI |
E return Parser::MATHCONST;
[a-zA-Z_][a-zA-Z_0-9]* return Parser::IDENT;
\n|. return matched()[0];
%%
bisonc++-4.05.00/documentation/regression/fun/scanner/scanner.ih 0000644 0001750 0001750 00000000067 12161014762 023477 0 ustar frank frank #include "scanner.h"
#include "../parser/parserbase.h"
bisonc++-4.05.00/documentation/regression/fun/scanner/scanner.h 0000644 0001750 0001750 00000001714 12161014762 023326 0 ustar frank frank // Generated by Flexc++ V0.93.00 on Mon, 20 Feb 2012 13:06:48 +0100
#ifndef Scanner_H_INCLUDED_
#define Scanner_H_INCLUDED_
// $insert baseclass_h
#include "scannerbase.h"
// $insert classHead
class Scanner: public ScannerBase
{
public:
explicit Scanner(std::istream &in = std::cin,
std::ostream &out = std::cout);
// $insert lexFunctionDecl
int lex();
private:
int lex__();
int executeAction__(size_t ruleNr);
void print();
void preCode(); // re-implement this function for code that must
// be exec'ed before the patternmatching starts
};
// $insert scannerConstructors
inline Scanner::Scanner(std::istream &in, std::ostream &out)
:
ScannerBase(in, out)
{}
inline void Scanner::preCode()
{
// optionally replace by your own code
}
inline void Scanner::print()
{
print__();
}
#endif // Scanner_H_INCLUDED_
bisonc++-4.05.00/documentation/regression/fun/parser/ 0000755 0001750 0001750 00000000000 12161014762 021364 5 ustar frank frank bisonc++-4.05.00/documentation/regression/fun/parser/_storeident.cc 0000644 0001750 0001750 00000000133 12161014762 024207 0 ustar frank frank #include "parser.ih"
void Parser::storeIdent()
{
d_lastIdent = d_scanner.matched();
}
bisonc++-4.05.00/documentation/regression/fun/parser/_lvalue.cc 0000644 0001750 0001750 00000000544 11714551317 023332 0 ustar frank frank #include "parser.ih"
RuleValue &Parser::lvalue(RuleValue &e)
{
return e.tag() == RuleValue::VARIABLE ?
d_value[e.varIdx()]
:
e;
}
RuleValue const &Parser::rvalue(RuleValue const &e) const
{
return e.tag() == RuleValue::VARIABLE ?
d_value[e.varIdx()]
:
e;
}
bisonc++-4.05.00/documentation/regression/fun/parser/_unary.cc 0000644 0001750 0001750 00000001432 11714551317 023175 0 ustar frank frank #include "parser.ih"
RuleValue Parser::unary(int operation, RuleValue const &e)
{
if (d_error)
return e;
error(e.tag() == RuleValue::FUNCTION,
"Function names have no values. Forgot argument(s)?");
RuleValue value = rvalue(e);
switch (operation)
{
case RuleValue::CHAR:
return RuleValue(value.asChar());
case RuleValue::INT:
return RuleValue(value.asInt());
case RuleValue::DOUBLE:
return RuleValue(value.asDouble());
case '-':
return RuleValue(-value);
case '~':
integral(value);
return RuleValue(~value);
default:
error(true, "Illegal operand for unary operator");
break;
}
return value; // not reached
}
bisonc++-4.05.00/documentation/regression/fun/parser/bgram 0000644 0001750 0001750 00000006200 11714551317 022402 0 ustar frank frank %token IDENT
QUIT
LIST
INT CHAR
DOUBLE
DATATYPE
ANGLETYPE
MATHCONST
HELP
// A of 'assignment'. Priorities: see C book, p. 518
%right '=' ADDA SUBA MULA DIVA MODA ANDA XORA ORA LSHIFTA RSHIFTA
%left '|'
%left '^'
%left '&'
%left LEFTSHIFT RIGHTSHIFT
%left '+' '-'
%left '*' '/' '%'
%right uMinus
%left '('
%%
start:
prompt
lines
;
lines:
lines line
|
line
;
line:
action
prompt
;
action:
cmd
'\n'
|
error
;
prompt:
{
prompt();
}
;
cmd:
QUIT
{
ACCEPT();
}
|
LIST
{
list();
}
|
help
{
help();
}
|
angletype
|
expr
{
display($1);
}
|
// empty
;
angletype:
ANGLETYPE
{
setAngleType();
}
;
expr:
MATHCONST
{
$$ = mathConst();
}
|
CHAR
{
$$ = newValue(CHAR);
}
|
INT
{
$$ = newValue(INT);
}
|
DOUBLE
{
$$ = newValue(DOUBLE);
}
|
IDENT
{
$$ = newValue(IDENT);
}
|
expr '(' arglist ')'
{
$$ = call($1, $3);
}
|
'-' expr %prec uMinus
{
$$ = unary('-', $2);
}
|
'~' expr %prec uMinus
{
$$ = unary('~', $2);
}
|
'(' type ')' expr %prec uMinus
{
$$ = unary($2.value().getInt(), $4);
}
|
expr '+' expr
{
$$ = binary($1, '+', $3);
}
|
expr '-' expr
{
$$ = binary($1, '-', $3);
}
|
expr '*' expr
{
$$ = binary($1, '*', $3);
}
|
expr '/' expr
{
$$ = binary($1, '/', $3);
}
|
expr '%' expr
{
$$ = binary($1, '%', $3);
}
|
expr '&' expr
{
$$ = binary($1, '&', $3);
}
|
expr '^' expr
{
$$ = binary($1, '^', $3);
}
|
expr '|' expr
{
$$ = binary($1, '|', $3);
}
|
expr RIGHTSHIFT expr
{
$$ = binary($1, RIGHTSHIFT, $3);
}
|
expr LEFTSHIFT expr
{
$$ = binary($1, LEFTSHIFT, $3);
}
|
'(' expr ')'
{
$$ = $2;
}
|
expr '=' expr
{
$$ = assign($1, '=', $3);
}
|
expr ADDA expr
{
$$ = assign($1, ADDA, $3);
}
|
expr SUBA expr
{
$$ = assign($1, SUBA, $3);
}
|
expr MULA expr
{
$$ = assign($1, MULA, $3);
}
|
expr DIVA expr
{
$$ = assign($1, DIVA, $3);
}
|
expr MODA expr
{
$$ = assign($1, MODA, $3);
}
|
expr ANDA expr
{
$$ = assign($1, ANDA, $3);
}
|
expr ORA expr
{
$$ = assign($1, ORA, $3);
}
|
expr XORA expr
{
$$ = assign($1, XORA, $3);
}
|
expr LSHIFTA expr
{
$$ = assign($1, LSHIFTA, $3);
}
|
expr RSHIFTA expr
{
$$ = assign($1, RSHIFTA, $3);
}
;
arglist:
arglist ',' expr
{
$$ = addArg($1, $3);
}
|
expr
{
$$ = firstArg($1);
}
;
type:
DATATYPE
{
$$ = setDataType();
}
;
help:
'?'
|
HELP
;
bisonc++-4.05.00/documentation/regression/fun/parser/_angle.cc 0000644 0001750 0001750 00000000446 11714551317 023131 0 ustar frank frank #include "parser.ih"
double Parser::angle(double radians) // convert radians to angle type
{
return
d_angleType == RADIANS ? radians :
d_angleType == DEG360 ? 180 / M_PI * radians :
200 / M_PI * radians;
}
bisonc++-4.05.00/documentation/regression/fun/parser/parser.h 0000644 0001750 0001750 00000007542 12161014762 023041 0 ustar frank frank // Generated by Bisonc++ V3.00.00 on Mon, 20 Feb 2012 13:09:44 +0100
#ifndef Parser_h_included
#define Parser_h_included
#include
#include
#include