YACC(1) BSD Reference Manual YACC(1) NNAAMMEE yacc - an LALR(1) parser generator SSYYNNOOPPSSIISS yyaacccc [[ --ddllrrttvv ]] [[ --bb _f_i_l_e___p_r_e_f_i_x ]] [[ --pp _s_y_m_b_o_l___p_r_e_f_i_x ]] _f_i_l_e_n_a_m_e DDEESSCCRRIIPPTTIIOONN _Y_a_c_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_a_c_c normally writes the parse tables and the driver routine to the file _y_._t_a_b_._c_. The following options are available: --bb _f_i_l_e___p_r_e_f_i_x The --bb option changes the prefix prepended to the output file names to the string denoted by _f_i_l_e___p_r_e_f_i_x_. The default prefix is the character _y_. --dd The --dd option causes the header file _y_._t_a_b_._h to be written. --ll If the --ll option is not specified, _y_a_c_c will insert #line directives in the generated code. The #line directives let the C com- piler relate errors in the generated code to the user's original code. If the --ll option is specified, _y_a_c_c will not insert the #line directives. Any #line directives specified by the user will be retained. --pp _s_y_m_b_o_l___p_r_e_f_i_x The --pp 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 pre- fix is the string _y_y_. --rr The --rr option causes _y_a_c_c to produce sepa- rate 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_. --tt The --tt option changes the preprocessor directives generated by _y_a_c_c so that debug- ging statements will be incorporated in the compiled code. 4.3 Berkeley Distribution May 24, 1993 1 YACC(1) BSD Reference Manual YACC(1) --vv The --vv option causes a human-readable description of the generated parser to be written to the file _y_._o_u_t_p_u_t_. If the environment variable TMPDIR is set, the string denoted by TMPDIR will be used as the name of the direc- tory where the temporary files are created. FFIILLEESS _y_._c_o_d_e_._c _y_._t_a_b_._c _y_._t_a_b_._h _y_._o_u_t_p_u_t _/_t_m_p_/_y_a_c_c_._a_X_X_X_X_X_X _/_t_m_p_/_y_a_c_c_._t_X_X_X_X_X_X _/_t_m_p_/_y_a_c_c_._u_X_X_X_X_X_X DDIIAAGGNNOOSSTTIICCSS If there are rules that are never reduced, the number of such rules is reported on standard error. If there are any LALR(1) conflicts, the number of conflicts is reported on standard error. 4.3 Berkeley Distribution May 24, 1993 2