yyaacccc -- Command

Parser generator
yyaacccc [_o_p_t_i_o_n ...] _f_i_l_e
cccc yy.ttaabb.cc [-llyy]

Many  programs process  highly structured input  according to  given rules.
Compilers are  a familiar  example.  Two of  the most complicated  parts of
such  programs are  _l_e_x_i_c_a_l _a_n_a_l_y_s_i_s and  _p_a_r_s_i_n_g (sometimes  called _s_y_n_t_a_x
_a_n_a_l_y_s_i_s). The  COHERENT system includes two powerful  tools called lleexx and
yyaacccc to assist  you in performing these tasks.  lleexx  takes a set of lexical
rules and  writes a lexical analyzer,  whereas yyaacccc takes a  set of parsing
rules and writes  a parser; both output C source  code that can be compiled
into a full program.

The  term _y_a_c_c  is an  acronym for  ``yet another  compiler-compiler''.  In
brief, the  yyaacccc input _f_i_l_e describes  a context free grammar  using a BNF-
like syntax.  The output is a file yy.ttaabb.cc; it contains the definition of a
C  function yyyyppaarrssee(),  which parses  the language  described in  _f_i_l_e. The
output is  ready for processing  by the C  compiler cccc. Ambiguities  in the
grammar are reported to  the user, but resolved automatically by precedence
rules.   The user  must provide  a lexical scanner  yyyylleexx(), which  you may
generate with  lleexx. The yyaacccc library includes  default definitions of mmaaiinn,
yyyylleexx,  and yyyyeerrrroorr,  and may  be included  with the option  -llyy on  the cccc
command line.

yyaacccc recognizes the following options:

-dd   Enable debugging output; implies -vv.

-hhddrr _h_e_a_d_e_r_f_i_l_e
     Put the header output in _h_e_a_d_e_r_f_i_l_e instead of yy.ttaabb.hh.

-iitteemmss _N
     Allow _N items  per state.  This option is designed  to help yyaacccc users
     deal with the ANSI C grammar.

-ll _l_i_s_t_f_i_l_e
     Place a description of the state machine, tokens, parsing actions, and
     statistics in file _l_i_s_t_f_i_l_e.

-sspprroodd _N
     Allow _N symbols per  production; default, 20.  This option is designed
     to help yyaacccc users deal with the ANSI C grammar.

-sstt  Print statistics on the standard output.

-vv   Verbose option.   Like -ll, but places the listing  in file yy.oouuttppuutt by
     default.

The following options are useful if table overflow messages appear:

-nntteerrmmss _N
     Allow for _N nonterminals; default, 100.

-pprrooddss _N
     Allow for _N productions (rules); default, 350.

-ssttaatteess _N
     Allow for _N states; default, 300.

-tteerrmmss _N
     Allow for _N terminal symbols; default 100.

-ttyyppeess _N
     Allow for _N types; default, ten.

_F_i_l_e_s
yy.ttaabb.cc -- C source output
yy.ttaabb.hh -- Default C header output
yy.oouuttppuutt -- Default listing output
/lliibb/yyyyppaarrssee.cc -- Protoparser
/ttmmpp/yy[aaoo]* -- Temporaries
/uussrr/lliibb/lliibbyy.aa -- Library

_S_e_e _A_l_s_o
cccc, ccoommmmaannddss, lleexx
_I_n_t_r_o_d_u_c_t_i_o_n _t_o _y_a_c_c, _Y_e_t _A_n_o_t_h_e_r _C_o_m_p_i_l_e_r-_C_o_m_p_i_l_e_r
DeRemer F,  Pennello TJ: _E_f_f_i_c_i_e_n_t  _c_o_m_p_u_t_a_t_i_o_n _o_f _L_A_L_R(_1)  _l_o_o_k_a_h_e_a_d _s_e_t_s.
SIGPLAN conference, 1979.

_D_i_a_g_n_o_s_t_i_c_s
yyaacccc  reports the  number  of R/R  (reduce/reduce)  and S/R  (shift/reduce)
conflicts (ambiguities) on the standard error stream.

_N_o_t_e_s
The version of  yyaacccc shipped prior to release 4.2  of COHERENT included the
header file <aaccttiioonn.hh> in its output.   This file's data are now built into
parser skeleton in /lliibb/yyyyppaarrssee, thus obviating <aaccttiioonn.hh>. This header has
been dropped  from COHERENT.  You  should re-run yyaacccc to  update the source
files generated by previous versions of yyaacccc.
