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!
{{Short description|Yacc-compatible parser generator program}} {{Infobox software | name = GNU Bison | logo = Heckert GNU white.svg | logo size = 100px | author = Robert Corbett | developer = The [[GNU Project]] | released = {{Start date and age|1985|06}}<ref name="Corbett85"/> | discontinued = <!-- Set to yes if software is discontinued, otherwise omit. --> | ver layout = <!-- simple (default) or stacked --> | latest release version = {{wikidata|property|preferred|references|edit|Q1071969|P348|P548=Q2804309}} | latest release date = {{wikidata|qualifier|preferred|single|Q1071969|P348|P548=Q2804309|P577}} | latest preview version = {{wikidata|property|preferred|references|edit|Q1071969|P348|P548=Q51930650}} | latest preview date = {{wikidata|qualifier|preferred|single|Q1071969|P348|P548=Q51930650|P577}} | programming language = [[C (programming language)|C]] and [[m4 (computer language)|m4]] | operating system = [[Unix-like]] | platform = | genre = [[Parser generator]] | license = [[GNU General Public License|GPL]] }} '''GNU Bison''', commonly known as '''Bison''', is a [[parser generator]] that is part of the [[GNU Project]]. Bison reads a specification in Bison syntax (described as "machine-readable [[Backus–Naur form|BNF]]"<ref>{{Cite web|title=Language and Grammar (Bison 3.8.1)|url=https://www.gnu.org/software/bison/manual/html_node/Language-and-Grammar.html|access-date=2021-12-26|website=www.gnu.org}}</ref>), warns about any [[parsing]] ambiguities, and generates a parser that reads sequences of [[Lexical analysis#Token|token]]s and decides whether the sequence conforms to the syntax specified by the grammar. The generated parsers are portable: they do not require any specific compilers. Bison by default generates [[LALR parser|LALR(1) parsers]] but it can also generate [[canonical LR parser|canonical LR]], IELR(1) and [[GLR parser|GLR]] parsers.<ref>[https://www.gnu.org/software/bison/manual/html_node/Introduction.html Bison Manual: Introduction.]</ref> In [[POSIX]] mode, Bison is compatible with [[Yacc]], but also has several extensions over this earlier program, including * Generation of counterexamples for conflicts * Location tracking (e.g., file, line, column) * Rich and internationalizable syntax error messages in the generated parsers * Customizable syntax error generation, * Reentrant parsers * Push parsers, with autocompletion * Support for named references * Several types of reports (graphical, XML) on the generated parser * Support for several programming languages ([[C (programming language)|C]], [[C++]], [[D (programming language)|D]], or [[Java (programming language)|Java]]) [[Flex (lexical analyser generator)|Flex]], an automatic [[Lexical analysis|lexical analyser]], is often used with Bison, to tokenise input data and provide Bison with tokens.<ref>{{Cite book | last=Levine | first=John | author-link=John R. Levine | title=flex & bison | publisher = O'Reilly Media | date=August 2009 | url=http://oreilly.com/catalog/9780596155988 | isbn=978-0-596-15597-1}}</ref> Bison was originally written by Robert Corbett in 1985.<ref name="Corbett85">{{cite thesis |last1=Corbett |first1=Robert Paul |date=June 1985 |title=Static Semantics and Compiler Error Recovery |type=Ph.D. |publisher=[[University of California, Berkeley]] |id=[[Defense Technical Information Center|DTIC]] [https://web.archive.org/web/20170608112235/http://www.dtic.mil/docs/citations/ADA611756 ADA611756]{{cbignore|bot=medic}}}}</ref> Later, in 1989, Robert Corbett released another parser generator named [[Berkeley Yacc]]. Bison was made Yacc-compatible by [[Richard Stallman]].<ref name="authors">{{cite web |title=AUTHORS |url=http://git.savannah.gnu.org/cgit/bison.git/tree/AUTHORS |department=bison.git |work=[[GNU Savannah]] |access-date=2017-08-26}}</ref> Bison is [[free software]] and is available under the [[GNU General Public License]], with an exception (discussed below) allowing its generated code to be used without triggering the [[copyleft]] requirements of the licence.
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)