*** Welcome to piglix ***

GNU bison

GNU Bison
Developer(s) Robert Corbett, The GNU Project
Stable release 3.0.4 (January 23, 2015; 2 years ago (2015-01-23))
Operating system Cross-platform
Type Parser generator
License GPL (free software)
Website www.gnu.org/software/bison/

GNU bison, commonly known as Bison, is a parser generator that is part of the GNU Project. Bison reads a specification of a context-free language, warns about any parsing ambiguities, and generates a parser (either in C, C++, or Java) which reads sequences of tokens and decides whether the sequence conforms to the syntax specified by the grammar. Bison by default generates LALR parsers but can also create GLR parsers.

In POSIX mode, Bison is compatible with yacc, but also has several extensions over this earlier program. flex, an automatic lexical analyser, is often used with Bison, to tokenise input data and provide Bison with tokens.

Bison was originally written by Robert Corbett in 1988. Later, in 1990, Robert Corbett wrote another parser generator named Berkeley Yacc. Bison was made Yacc-compatible by Richard Stallman.

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.

The following example shows how to use Bison and flex to write a simple calculator program (only addition and multiplication) and a program for creating an abstract syntax tree. The next two files provide definition and implementation of the syntax tree functions.


...
Wikipedia

...