YACC(1)                     NetBSD Reference Manual                    YACC(1)

NNAAMMEE
     yyaacccc - an LALR(1) parser generator

SSYYNNOOPPSSIISS
     yyaacccc [--ddllrrttvv] [--bb _p_r_e_f_i_x] [--pp _s_y_m_b_o_l___p_r_e_f_i_x] _f_i_l_e_n_a_m_e

DDEESSCCRRIIPPTTIIOONN
     YYaacccc reads the grammar specification in the file _f_i_l_e_n_a_m_e and generates
     an LR(1) parser for it.  The parsers consist of a set of LALR(1) parsing
     tables and a driver routine written in the C programming language.  YYaacccc
     normally writes the parse tables and the driver routine to the file
     _y_._t_a_b_._c.

     The following options are available:

     --bb _p_r_e_f_i_x     The --bb option changes the prefix prepended to the output
                   file names to the string denoted by _p_r_e_f_i_x. The default
                   prefix is the character _y.

     --dd            The --dd option causes the header file _y_._t_a_b_._h to be written.

     --ll            If the --ll option is not specified, yyaacccc will insert #line
                   directives in the generated code.  The #line directives let
                   the C compiler relate errors in the generated code to the
                   user's original code.  If the --ll option is specified, yyaacccc
                   will not insert the #line directives.  #line directives
                   specified by the user will be retained.

     --pp _s_y_m_b_o_l___p_r_e_f_i_x
                   The --pp option changes the prefix prepended to yacc-
                   generated symbols to the string denoted by _s_y_m_b_o_l___p_r_e_f_i_x.
                   The default prefix is the string _y_y.

     --rr            The --rr option causes yyaacccc to produce separate files for
                   code and tables.  The code file is named _y_._c_o_d_e_._c, and the
                   tables file is named _y_._t_a_b_._c.

     --tt            The --tt option changes the preprocessor directives generated
                   by yyaacccc so that debugging statements will be incorporated
                   in the compiled code.

     --vv            The --vv option causes a human-readable description of the
                   generated parser to be written to the file _y_._o_u_t_p_u_t.

EENNVVIIRROONNMMEENNTT
     The following environment variable is referenced by yyaacccc:

     TMPDIR  If the environment variable TMPDIR is set, the string denoted by
             TMPDIR will be used as the name of the directory where the tempo-
             rary files are created.

TTAABBLLEESS
     The names of the tables generated by this version of yyaacccc are ``yylhs'',
     ``yylen'', ``yydefred'', ``yydgoto'', ``yysindex'', ``yyrindex'',
     ``yygindex'', ``yytable'', and ``yycheck''. Two additional tables,
     ``yyname'' and ``yyrule'', are created if YYDEBUG is defined and non-
     zero.

FFIILLEESS
     y.code.c
     y.tab.c


     y.tab.h
     y.output
     /tmp/yacc.aXXXXXX
     /tmp/yacc.tXXXXXX
     /tmp/yacc.uXXXXXX

DDIIAAGGNNOOSSTTIICCSS
     If there are rules that are never reduced, the number of such rules is
     written to the standard error.  If there are any LALR(1) conflicts, the
     number of conflicts is also written to the standard error.

SSTTAANNDDAARRDDSS
     The yyaacccc utility conforms to IEEE Std1003.2 (``POSIX.2'').

BSD Experimental              September 15, 1996                             2
