The yacc utility shall conform to the Base Definitions volume of
POSIX.1‐2017, Section 12.2, Utility Syntax Guidelines, except for
Guideline 9.
The following options shall be supported:
-b
file_prefix
Use file_prefix instead of y
as the prefix for all
output filenames. The code file y.tab.c
, the header
file y.tab.h
(created when -d
is specified), and the
description file y.output
(created when -v
is
specified), shall be changed to file_prefix.tab.c
,
file_prefix.tab.h
, and file_prefix.output
,
respectively.
-d
Write the header file; by default only the code file is
written. See the OUTPUT FILES section.
-l
Produce a code file that does not contain any #line
constructs. If this option is not present, it is
unspecified whether the code file or header file
contains #line
directives. This should only be used
after the grammar and the associated actions are fully
debugged.
-p
sym_prefix
Use sym_prefix instead of yy
as the prefix for all
external names produced by yacc. The names affected
shall include the functions yyparse(), yylex(), and
yyerror(), and the variables yylval, yychar, and
yydebug. (In the remainder of this section, the six
symbols cited are referenced using their default names
only as a notational convenience.) Local names may also
be affected by the -p
option; however, the -p
option
shall not affect #define
symbols generated by yacc.
-t
Modify conditional compilation directives to permit
compilation of debugging code in the code file. Runtime
debugging statements shall always be contained in the
code file, but by default conditional compilation
directives prevent their compilation.
-v
Write a file containing a description of the parser and
a report of conflicts generated by ambiguities in the
grammar.