Module Name: src
Committed By: christos
Date: Fri Dec 24 23:27:14 UTC 2010
Modified Files:
src/external/bsd/byacc/bin: yacc.1
Log Message:
update for new yacc.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/byacc/bin/yacc.1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/byacc/bin/yacc.1
diff -u src/external/bsd/byacc/bin/yacc.1:1.1 src/external/bsd/byacc/bin/yacc.1:1.2
--- src/external/bsd/byacc/bin/yacc.1:1.1 Wed Oct 28 20:56:35 2009
+++ src/external/bsd/byacc/bin/yacc.1 Fri Dec 24 18:27:14 2010
@@ -1,4 +1,4 @@
-.\" $NetBSD: yacc.1,v 1.1 2009/10/29 00:56:35 christos Exp $
+.\" $NetBSD: yacc.1,v 1.2 2010/12/24 23:27:14 christos Exp $
.\"
.\" Copyright (c) 1989, 1990 The Regents of the University of California.
.\" All rights reserved.
@@ -31,9 +31,9 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)yacc.1 5.7 (Berkeley) 7/30/91
-.\" $NetBSD: yacc.1,v 1.1 2009/10/29 00:56:35 christos Exp $
+.\" $NetBSD: yacc.1,v 1.2 2010/12/24 23:27:14 christos Exp $
.\"
-.Dd October 29, 2009
+.Dd December 23, 2010
.Dt YACC 1
.Os
.Sh NAME
@@ -43,7 +43,7 @@
parser generator
.Sh SYNOPSIS
.Nm
-.Op Fl dglrtv
+.Op Fl dglPrtVv
.Op Fl b Ar prefix
.Op Fl o Ar outputfile
.Op Fl p Ar symbol_prefix
@@ -53,7 +53,7 @@
reads the grammar specification in the file
.Ar filename
and generates an
-.Tn LR(1)
+.Tn LALR(1)
parser for it.
The parsers consist of a set of
.Tn LALR(1)
@@ -82,8 +82,9 @@
.It Fl g
The
.Fl g
-option causes a graphical description of the generated LALR(1) parser to
-be written to the file
+option causes a graphical description of the generated
+.Tn LALR(1)
+parser to be written to the file
.Pa y.dot
in graphviz format, ready to be processed by
.Xr dot 1 .
@@ -106,6 +107,14 @@
.Fl o
option specifies an explicit output file name should be used instead
of the default.
+.It Fl P
+The
+.Fl P
+options instructs
+.Nm
+to create a reentrant parser, like
+.Dq %pure-parser
+does.
.It Fl p Ar symbol_prefix
The
.Fl p
@@ -130,6 +139,10 @@
option changes the preprocessor directives generated by
.Nm
so that debugging statements will be incorporated in the compiled code.
+.It Fl V
+The
+.Fl V
+option prints the version number to the standard output.
.It Fl v
The
.Fl v
@@ -137,6 +150,47 @@
be written to the file
.Pa y.output .
.El
+.Sh EXTENSIONS
+.Nm
+provides some extensions for compatibility with
+.Xr bison 1
+and other implementations
+of
+.Nm :
+.Pp
+.Bl -tag -width "%expect-rr number" -compact
+.It Dv %expect Ar number
+Tell
+.Nm
+the expected number of shift/reduce conflicts.
+That makes it only report the number if it differs.
+.It Dv %expect-rr Ar number
+Tell
+.Nm
+the expected number of reduce/reduce conflicts.
+That makes it only report the number if it differs.
+This is (unlike
+.Xr bison 1 )
+allowable in
+.Tn LALR(1)
+parsers.
+.It Dv %lex-param Ar { Ar argument-declaration Ar }
+By default, the lexer accepts no parameters, e.g.,
+.Fn yylex .
+Use this directive to add parameter declarations for your customized lexer.
+.It Dv %parse-param Ar { Ar Iargument-declaration Ar }
+By default, the parser accepts no parameters, e.g.,
+.Fn yyparse .
+Use this directive to add parameter declarations for your customized parser.
+.It Dv %pure-parser
+Most variables (other than
+.Fa yydebug
+and
+.Fa yynerrs )
+are allocated on the stack within
+.Fn yyparse ,
+making the parser reasonably reentrant.
+.El
.Sh ENVIRONMENT
The following environment variable is referenced by
.Nm :