Software development · Editors and developer tools

Bison (parser generator)

In Spanish: Bison
See in the galaxyCopy link
Updated: 12/11/2026Reading: 2 min

Description

Bison is a parser generator commonly used in programming and software development. It is a tool that allows developers to define grammars for programming languages and other text formats, facilitating the creation of parsers. Bison takes a grammar description as input and generates C or C++ code that can be used to parse text strings according to the defined rules. This tool is especially valuable in the development of compilers, interpreters, and other applications that require the processing of formal languages. Bison is known for its compatibility with Yacc (Yet Another Compiler Compiler), which allows Yacc users to migrate easily to Bison. Additionally, Bison offers advanced features such as the ability to handle ambiguous grammars and optimized code generation, making it a popular choice among programmers working on complex projects.

History

Bison was developed by Robert Corbett and Richard Stallman in 1985 as an alternative to Yacc. Since its creation, it has evolved to include additional features and improvements in code generation. Over the years, Bison has been adopted in numerous free and open-source software projects, becoming a standard tool in compiler and programming language development.

Uses

Bison is primarily used in the creation of compilers and interpreters, where it is necessary to parse and process source code written in a programming language. It is also employed in text processing tools and in the implementation of domain-specific languages. Its ability to handle complex grammars makes it ideal for projects requiring rigorous syntactic analysis.

Examples

An example of Bison's use is in the GCC compiler, where it is used to parse the source code of languages such as C and C++. Another example is in the creation of custom programming languages, where developers can define their own grammar and use Bison to generate the corresponding parser.

Glosarix on your device

Install
×
Enable Notifications Ok No