Open In App

bison command in Linux with Examples

bison command is an replacement for the yacc. It is basically a parser generator similar to yacc. Input files should follow the yacc convention of ending in .y format. Similar to yacc, the generated files do not have fixed names, but instead use the prefix of the input file. Moreover, if you need to put C++ code in the input file, you can end his name by a C++-like extension as .ypp or .y++, then bison will follow your extension to name the output file as .cpp or .c++.

Syntax:



bison [OPTION]... FILE

Operation modes:

Parser:



Output:

Example:

Note:

Article Tags :