Flashnux

GNU/Linux man pages

Livre :
Expressions régulières,
Syntaxe et mise en oeuvre :

ISBN : 978-2-7460-9712-4
EAN : 9782746097124
(Editions ENI)

Unix

Unix v6

yacc(1)



yacc yet another compiler-compiler [ ] [ grammar ] converts a context-free grammar into a set of tables for a simple automaton which executes an LR(1) parsing algorithm. The grammar may be ambiguous; specified precedence rules are used to break ambiguities. The output is which must be compiled by the C compiler and loaded with any other routines required (perhaps a lexical analyzer) and the Yacc library: cc y.tab.c other.o ly If the flag is given, the file is prepared, which contains a description of the parsing tables and a report on conflicts generated by ambiguities in the grammar. The flag calls an optimizer for the tables; the optimized tables, with parser included, appear on file The flag causes Yacc to accept grammars with Ratfor actions, and produce Ratfor output on implies the flag. Typical usage is then rc y.tab.r other.o ‘‘LR Parsing’’, by A. V. Aho and S. C. Johnson, Computing Surveys, June, 1974. ‘‘The YACC Compiler-compiler’’, internal memorandum. S. C. Johnson y.output
y.tab.c

y.tab.r

when ratfor output is obtained

yacc.tmp

when optimizer is called

/lib/liby.a

runtime library for compiler

/usr/yacc/fpar.r

ratfor parser

/usr/yacc/opar.c

parser for optimized tables

/usr/yacc/yopti

optimizer postpass The number of reduce-reduce and shift-reduce conflicts is reported on the standard output; a more detailed report is found in the file. Because file names are fixed, at most one Yacc process can be active in a given directory at a time.



yacc(1)