⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 yacc.1

📁 unix v7是最后一个广泛发布的研究型UNIX版本
💻 1
字号:
.TH YACC 1 .SH NAMEyacc \- yet another compiler-compiler.SH SYNOPSIS.B yacc[.B \-vd]grammar.SH DESCRIPTION.I Yaccconverts a context-free grammar into a set oftables for a simple automaton which executes an LR(1) parsingalgorithm.The grammar may be ambiguous;specified precedence rules are used to break ambiguities..PPThe output file,.IR y.tab.c ,must be compiled by the C compilerto produce a program.IR yyparse .This program must be loaded with the lexical analyzer program,.IR yylex ,as well as.I mainand.IR yyerror ,an error handling routine.These routines must be supplied by the user;.IR Lex (1)is useful for creating lexical analyzers usable by.IR yacc ..PPIf the.B \-vflag is given, the file.I y.outputis prepared, which contains a description of the parsing tablesand a report onconflicts generated by ambiguities in the grammar..PPIf the \-\fBd\fR flag is used, the file.I y.tab.his generated with the.I definestatements that associate the.I yacc\c-assigned `token codes' with the user-declared `token names'.This allows source files other than.I y.tab.cto access the token codes..SH FILES.ta \w'yacc.tmp, yacc.acts 'uy.output.bry.tab.c.bry.tab.h	defines for token names.bryacc.tmp, yacc.acts	temporary files.br/usr/lib/yaccpar	parser prototype for C programs.br/lib/liby.a	library with default `main' and `yyerror'.SH "SEE ALSO".IR lex (1).br.I "LR Parsing"by A. V. Aho and S. C. Johnson,Computing Surveys, June, 1974..br.I "YACC \- Yet Another Compiler Compiler"by S. C. Johnson..SH DIAGNOSTICSThe number of reduce-reduce and shift-reduce conflictsis reported on the standard output;a more detailed report isfound in the.I y.outputfile.Similarly, if some rules are not reachable from thestart symbol, this is also reported..SH BUGSBecause file names are fixed, at most one.I yaccprocess can be active in a given directory ata time.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -