MAN page from Trustix byacc-1.9-18tr.i586.rpm
Section: User Commands (1)
Updated: July 15, 1990Index
Yacc - an LALR
(1) parser generator
SYNOPSISyacc [ -dlrtv ] [ -bfile_prefix] [ -psymbol_prefix]filename
reads the grammar specification in the filefilename
and generates an LR
(1) parser for it.The parsers consist of a set of LALR
(1) parsing tables and a driver routinewritten in the C programming language.Yacc
normally writes the parse tables and the driver routine to the filey.tab.c.
The following options are available:
- -b file_prefix
- The-boption changes the prefix prepended to the output file names tothe string denoted byfile_prefix.The default prefix is the charactery.
- The -d option causes the header filey.tab.hto be written.
- If the-loption is not specified,yaccwill insert #line directives in the generated code.The #line directives let the C compiler relate errors in thegenerated code to the user's original code.If the -l option is specified,yaccwill not insert the #line directives.#line directives specified by the user will be retained.
- -p symbol_prefix
- The-poption changes the prefix prepended to yacc-generated symbols tothe string denoted bysymbol_prefix.The default prefix is the stringyy.
- The-roption causesyaccto produce separate files for code and tables. The code fileis namedy.code.c,and the tables file is namedy.tab.c.
- The-toption changes the preprocessor directives generated byyaccso that debugging statements will be incorporated in the compiled code.
- The-voption causes a human-readable description of the generated parser tobe written to the filey.output.
If the environment variable TMPDIR is set, the string denoted byTMPDIR will be used as the name of the directory where the temporaryfiles are created.
If there are rules that are never reduced, the number of such rules isreported on standard error.If there are any LALR
(1) conflicts, the number of conflicts is reportedon standard error.
This document was created byman2html,using the manual pages.