Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/byacc/bin update for new yacc.
details: https://anonhg.NetBSD.org/src/rev/799fe564f610
branches: trunk
changeset: 760039:799fe564f610
user: christos <christos%NetBSD.org@localhost>
date: Fri Dec 24 23:27:14 2010 +0000
description:
update for new yacc.
diffstat:
external/bsd/byacc/bin/yacc.1 | 68 ++++++++++++++++++++++++++++++++++++++----
1 files changed, 61 insertions(+), 7 deletions(-)
diffs (125 lines):
diff -r 16c4509969b3 -r 799fe564f610 external/bsd/byacc/bin/yacc.1
--- a/external/bsd/byacc/bin/yacc.1 Fri Dec 24 23:12:28 2010 +0000
+++ b/external/bsd/byacc/bin/yacc.1 Fri Dec 24 23:27:14 2010 +0000
@@ -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 :
Home |
Main Index |
Thread Index |
Old Index