Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
GNU Bison
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==License and distribution of generated code== Because Bison generates source code that in turn gets added to the source code of other software projects, it raises some simple but interesting copyright questions. ===A GPL-compatible license is not required=== The code generated by Bison includes significant amounts of code from the Bison project itself. The Bison package is distributed under the terms of the [[GNU General Public License]] (GPL) but an exception has been added so that the GPL does not apply to output.<ref>[https://www.gnu.org/software/bison/manual/html_node/Conditions.html Bison Manual: Conditions for Using Bison]</ref><ref>[http://git.savannah.gnu.org/cgit/bison.git/tree/src/parse-gram.c A source code file, parse-gram.c, which includes the exception]</ref> Earlier releases of Bison stipulated that parts of its output were also licensed under the GPL, due to the inclusion of the yyparse() function from the original source code in the output. ===Distribution of packages using Bison=== Free software projects that use Bison may have a choice of whether to distribute the source code which their project feeds into Bison, or the resulting C code made output by Bison. Both are sufficient for a recipient to be able to compile the project source code. However, distributing only the input carries the minor inconvenience that the recipients must have a compatible copy of Bison installed so that they can generate the necessary C code when compiling the project. And distributing only the C code in output, creates the problem of making it very difficult for the recipients to modify the parser since this code was written neither ''by'' a human nor ''for'' humans - its purpose is to be fed directly into a C compiler. These problems can be avoided by distributing both the input files and the generated code. Most people will compile using the generated code, no different from any other software package, but anyone who wants to modify the parser component can modify the input files first and re-generate the generated files before compiling. Projects distributing both usually do not have the generated files in their [[version control]] systems. The files are only generated when making a release. Some licenses, such as the [[GNU General Public License|GPL]], require that the source code be in "''the preferred form of the work for making modifications to it''". GPL'd projects using Bison must thus distribute the files which are the input for Bison. Of course, they can also include the generated files.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)