Name

bison

Synopsis

    bison [options]file

Given a file containing a context-free grammar, convert it into tables for subsequent parsing while sending output to file.c. This utility is to a large extent compatible with yacc, and in fact is named for it. All input files should use the suffix .y; output files will use the original prefix.

URL: http://www.gnu.org/software/bison.

Options

-bprefix, --file-prefix=prefix

Use prefix for all output files.

-dfile, --defines=file

Generate file (usually with a .h suffix), producing #define statements that relate bison’s token codes to the token names declared by the user.

-h, --help

Print a help message and exit.

-k, --token-table

Include token names and values of YYNTOKENS, YYNNTS, YYNRULES, and YYNSTATES in file.c.

-l, --no-lines

Exclude #line constructs from code produced in file.c. (Use after debugging is complete.)

-n, --no-parser

Suppress parser code in output, allowing only declarations. Assemble all translations into a switch statement body and print it to file .act.

-ofile, --output-file=file

Output to file.

-pprefix, --name-prefix=prefix

Substitute prefix for yy in all external symbols.

-r, --raw

Use bison token numbers, not yacc-compatible translations, in file.h.

-t, --debug

Compile runtime debugging code.

-v, --verbose

Verbose mode. Print diagnostics and notes about parsing tables to file .output.

-V, --version

Display version number.

-y, --yacc, --fixed-output-files

Duplicate yacc’s conventions for naming output files.

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.