YACC(1) YACC(1) NAME yacc, eyacc - yet another compiler-compiler SYNOPSIS yacc [ option ... ] grammar eyacc [ -v ] [ grammar ] DESCRIPTION Yacc converts a context-free grammar and translation code into a set of tables for an LR(1) parser and translator. The grammar may be ambiguous; specified precedence rules are used to break ambiguities. The output file, must be compiled by the C compiler to pro- duce a program `yyparse'. This program must be loaded with a lexical analyzer function, yylex() (often generated by lex(1)), with a main() program, and with an error handling routine, yyerror(). Simple default versions of the last two are loaded by option -ly of ld(1). The options are -o output Direct output to the specified file instead of -D Create file containing diagnostic messages. To incor- porate them in the parser, compile it with preprocessor symbol YYDEBUG defined. The amount of diagnostic out- put from the parser is regulated by values of an exter- nal variable `yydebug': 0 Report errors. 1 Also report reductions. 2 Also report the name of each token returned by `yylex'. -v Create file containing a description of the parsing tables and of conflicts arising from ambiguities in the grammar. -d Create file containing #define statements that associ- ate yacc-assigned `token codes' with user-declared `token names'. Include it in source files other than to give access to the token codes. -s stem Change the prefix `y' of the file names and to stem. YACC(1) YACC(1) Eyacc is a special version of yacc, with systematic error recovery. It is used to compile pascal(A). FILES .rm]B