CVS commit: src/external/bsd/byacc/bin

2020-07-26 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Mon Jul 27 00:34:56 UTC 2020

Modified Files:
src/external/bsd/byacc/bin: yacc.1

Log Message:
Improve PostScript output.

Some highlights in no particular order:

%destructor was somehow lost from the list that follows, it should be
part of it.

Use .Ic for yacc directives when they are defined, .Ql otherwise.

Use explicit .Sq Li (instead of .Ql) in description of %destructor to
make sure the result is consistently quoted.  It more readable that
way.

Use .Va and .Vt where appropriate.

C preprocessor directives are marked up with .No (a nop), so that it's
easy to switch them to something else if need be.  For now just use
them as plain words.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 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.8 src/external/bsd/byacc/bin/yacc.1:1.9
--- src/external/bsd/byacc/bin/yacc.1:1.8	Sun Jul 26 23:18:06 2020
+++ src/external/bsd/byacc/bin/yacc.1	Mon Jul 27 00:34:56 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: yacc.1,v 1.8 2020/07/26 23:18:06 uwe Exp $
+.\"	$NetBSD: yacc.1,v 1.9 2020/07/27 00:34:56 uwe Exp $
 .\"
 .\" Copyright (c) 1989, 1990 The Regents of the University of California.
 .\" All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\"	from: @(#)yacc.1	5.7 (Berkeley) 7/30/91
 .\"	from: Id: yacc.1,v 1.24 2014/10/06 00:03:48 tom Exp
-.\"	$NetBSD: yacc.1,v 1.8 2020/07/26 23:18:06 uwe Exp $
+.\"	$NetBSD: yacc.1,v 1.9 2020/07/27 00:34:56 uwe Exp $
 .\"
 .Dd October 5, 2014
 .Dt YACC 1
@@ -40,7 +40,7 @@
 .Sh NAME
 .Nm yacc
 .Nd an
-.Tn LALR(1)
+.Tn LALR Ns (1)
 parser generator
 .Sh SYNOPSIS
 .Nm
@@ -54,10 +54,10 @@ parser generator
 reads the grammar specification in the file
 .Ar filename
 and generates an
-.Tn LALR(1)
+.Tn LALR Ns (1)
 parser for it.
 The parsers consist of a set of
-.Tn LALR(1)
+.Tn LALR Ns (1)
 parsing tables and a driver routine
 written in the C programming language.
 .Nm
@@ -65,7 +65,7 @@ normally writes the parse tables and the
 .Pa y.tab.c .
 .Pp
 The following options are available:
-.Bl -tag -width symbol_prefixXXX
+.Bl -tag -width Fl
 .It Fl b Ar file_prefix
 The
 .Fl b
@@ -73,7 +73,7 @@ option changes the prefix prepended to t
 the string denoted by
 .Ar file_prefix .
 The default prefix is the character
-.Ar y .
+.Ql y .
 .It Fl B
 Create a backtracking parser (compile-type configuration for
 .Nm ) .
@@ -83,12 +83,14 @@ The
 option causes the header file
 .Pa y.tab.h
 to be written.
-It contains #define's for the token identifiers.
+It contains
+.No #define Ns 's
+for the token identifiers.
 .It Fl g
 The
 .Fl g
 option causes a graphical description of the generated
-.Tn LALR(1)
+.Tn LALR Ns (1)
 parser to be written to the file
 .Pa y.dot
 in graphviz format, ready to be processed by
@@ -100,15 +102,19 @@ option causes a supplementary header fil
 .Pa y.tab.i
 to be written.
 It contains extern declarations
-and supplementary #define's as needed to map the conventional
+and supplementary
+.No #define Ns 's
+as needed to map the conventional
 .Nm
-yy-prefixed names to whatever the
+.Va yy Ns \&-prefixed
+names to whatever the
 .Fl p
 option may specify.
 The code file, e.g.,
 .Pa y.tab.c
-is modified to #include this file
-as well as the
+is modified to
+.No #include
+this file as well as the
 .Pa y.tab.h
 file, enforcing consistent usage of the symbols defined in those files.
 The supplementary header file makes it simpler to separate compilation
@@ -118,18 +124,25 @@ If the
 .Fl l
 option is not specified,
 .Nm
-will insert #line directives in the generated code.
-The #line directives let the C compiler relate errors in the
+will insert
+.No #line
+directives in the generated code.
+The
+.No #line
+directives let the C compiler relate errors in the
 generated code to the user's original code.
 If the
 .Fl l
 option is specified,
 .Nm
-will not insert the #line directives.
-#line directives specified by the user will be retained.
+will not insert the
+.No #line
+directives.
+.No #line
+directives specified by the user will be retained.
 .It Fl L
 Enable position processing, e.g.,
-.Dq %locations
+.Ql %locations
 (compile-type configuration for
 .Nm ) .
 .It Fl o Ar output_file
@@ -146,7 +159,7 @@ The
 options instructs
 .Nm
 to create a reentrant parser, like
-.Dq %pure-parser
+.Ql %pure-parser
 does.
 .It Fl p Ar symbol_prefix
 The
@@ -155,7 +168,7 @@ option changes the prefix prepended to y
 the string denoted by
 .Ar symbol_prefix .
 The default prefix is the string
-.Ar yy .
+.Ql yy .
 .It Fl r
 The
 .Fl r
@@ -167,15 +180,15 @@ The code file is named
 and the tables file is named
 .Pa y.tab.c .
 The prefix
-.Dq y .
+.Ql y
 can be overridden using the
 .Fl b
 option.
 .It Fl s
 Suppress
-.Dq #define
+.No #define
 statements generated for string literals in a
-.Dq %token
+.Q

CVS commit: src/external/bsd/byacc/bin

2020-07-26 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Sun Jul 26 23:18:06 UTC 2020

Modified Files:
src/external/bsd/byacc/bin: yacc.1

Log Message:
Fix markup errors.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 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.7 src/external/bsd/byacc/bin/yacc.1:1.8
--- src/external/bsd/byacc/bin/yacc.1:1.7	Tue Jul 24 05:40:15 2018
+++ src/external/bsd/byacc/bin/yacc.1	Sun Jul 26 23:18:06 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: yacc.1,v 1.7 2018/07/24 05:40:15 wiz Exp $
+.\"	$NetBSD: yacc.1,v 1.8 2020/07/26 23:18:06 uwe Exp $
 .\"
 .\" Copyright (c) 1989, 1990 The Regents of the University of California.
 .\" All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\"	from: @(#)yacc.1	5.7 (Berkeley) 7/30/91
 .\"	from: Id: yacc.1,v 1.24 2014/10/06 00:03:48 tom Exp
-.\"	$NetBSD: yacc.1,v 1.7 2018/07/24 05:40:15 wiz Exp $
+.\"	$NetBSD: yacc.1,v 1.8 2020/07/26 23:18:06 uwe Exp $
 .\"
 .Dd October 5, 2014
 .Dt YACC 1
@@ -424,7 +424,7 @@ in this array.
 .El
 .Sh PORTABILITY
 According to Robert Corbett:
-.Bd -offset indent
+.Bd -filled -offset indent
 Berkeley Yacc is an LALR(1) parser generator.
 Berkeley Yacc has been made as compatible as possible with AT\*[Am]T Yacc.
 Berkeley Yacc can accept any input specification that conforms to the
@@ -475,7 +475,7 @@ delete that directive.
 .Pp
 .Xr bison 1
 no equivalent for some of
-.Nm 's
+.Nm Ns 's
 command-line options, relying on directives embedded in the grammar file.
 .Pp
 .Xr bison 1
@@ -522,7 +522,6 @@ but
 for destructors.
 .Nm
 matches this behavior.
-.El
 .Sh ENVIRONMENT
 The following environment variable is referenced by
 .Nm :



CVS commit: src/external/bsd/byacc/bin

2018-07-23 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul 24 05:40:15 UTC 2018

Modified Files:
src/external/bsd/byacc/bin: yacc.1

Log Message:
Fix applyo.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 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.6 src/external/bsd/byacc/bin/yacc.1:1.7
--- src/external/bsd/byacc/bin/yacc.1:1.6	Mon Jun  6 08:22:52 2016
+++ src/external/bsd/byacc/bin/yacc.1	Tue Jul 24 05:40:15 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: yacc.1,v 1.6 2016/06/06 08:22:52 wiz Exp $
+.\"	$NetBSD: yacc.1,v 1.7 2018/07/24 05:40:15 wiz Exp $
 .\"
 .\" Copyright (c) 1989, 1990 The Regents of the University of California.
 .\" All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\"	from: @(#)yacc.1	5.7 (Berkeley) 7/30/91
 .\"	from: Id: yacc.1,v 1.24 2014/10/06 00:03:48 tom Exp
-.\"	$NetBSD: yacc.1,v 1.6 2016/06/06 08:22:52 wiz Exp $
+.\"	$NetBSD: yacc.1,v 1.7 2018/07/24 05:40:15 wiz Exp $
 .\"
 .Dd October 5, 2014
 .Dt YACC 1
@@ -507,7 +507,7 @@ to
 .Fn yyparse ,
 .Fn yyerror
 and (if configured for back-tracking)
-+to the destructor declared using
+to the destructor declared using
 .Dq %destructor .
 .Pp
 .Xr bison 1



CVS commit: src/external/bsd/byacc/bin

2016-06-06 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jun  6 08:22:52 UTC 2016

Modified Files:
src/external/bsd/byacc/bin: yacc.1

Log Message:
Whitespace and punctuation nits.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 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.5 src/external/bsd/byacc/bin/yacc.1:1.6
--- src/external/bsd/byacc/bin/yacc.1:1.5	Sun Jun  5 16:24:34 2016
+++ src/external/bsd/byacc/bin/yacc.1	Mon Jun  6 08:22:52 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: yacc.1,v 1.5 2016/06/05 16:24:34 christos Exp $
+.\"	$NetBSD: yacc.1,v 1.6 2016/06/06 08:22:52 wiz Exp $
 .\"
 .\" Copyright (c) 1989, 1990 The Regents of the University of California.
 .\" All rights reserved.
@@ -31,8 +31,8 @@
 .\" SUCH DAMAGE.
 .\"
 .\"	from: @(#)yacc.1	5.7 (Berkeley) 7/30/91
-.\"	from: Id: yacc.1,v 1.24 2014/10/06 00:03:48 tom Exp 
-.\"	$NetBSD: yacc.1,v 1.5 2016/06/05 16:24:34 christos Exp $
+.\"	from: Id: yacc.1,v 1.24 2014/10/06 00:03:48 tom Exp
+.\"	$NetBSD: yacc.1,v 1.6 2016/06/06 08:22:52 wiz Exp $
 .\"
 .Dd October 5, 2014
 .Dt YACC 1
@@ -94,7 +94,7 @@ parser to be written to the file
 in graphviz format, ready to be processed by
 .Xr dot 1 .
 .It Fl i
-The 
+The
 .Fl i
 option causes a supplementary header file
 .Pa y.tab.i
@@ -105,7 +105,7 @@ and supplementary #define's as needed to
 yy-prefixed names to whatever the
 .Fl p
 option may specify.
-The code file, e.g., 
+The code file, e.g.,
 .Pa y.tab.c
 is modified to #include this file
 as well as the
@@ -128,7 +128,7 @@ option is specified,
 will not insert the #line directives.
 #line directives specified by the user will be retained.
 .It Fl L
-Enable position processing, e.g., 
+Enable position processing, e.g.,
 .Dq %locations
 (compile-type configuration for
 .Nm ) .
@@ -139,7 +139,7 @@ the file prefix concatenated with the fi
 .Pa y.tab.c .
 This overrides the
 .Fl b
-option. 
+option.
 .It Fl P
 The
 .Fl P
@@ -166,29 +166,29 @@ The code file is named
 .Pa y.code.c ,
 and the tables file is named
 .Pa y.tab.c .
-The prefix 
-.Dq y.
+The prefix
+.Dq y .
 can be overridden using the
 .Fl b
 option.
 .It Fl s
-Suppress 
+Suppress
 .Dq #define
 statements generated for string literals in a
 .Dq %token
 statement, to more closely match original
-.Nm 
+.Nm
 behavior.
 .Pp
 Normally when
-.Nm 
+.Nm
 sees a line such as
 .Dq %token OP_ADD "ADD"
 it notices that the quoted
 .Dq ADD
-is a valid C identifier, and generates a #define not only for 
+is a valid C identifier, and generates a #define not only for
 .Dv OP_ADD ,
-but for 
+but for
 .Dv ADD
 as well,
 e.g.,
@@ -200,7 +200,7 @@ The original
 .Nm
 does not generate the second
 .Dq #define .
-The 
+The
 .Fl s
 option suppresses this
 .Dq #define .
@@ -209,7 +209,7 @@ option suppresses this
 documents only names and numbers for
 .Dq %token ,
 though the original
-.Nm 
+.Nm
 and
 .Xr bison 1
 also accept string literals.
@@ -242,11 +242,11 @@ provides some extensions for
 compatibility with
 .Xr bison 1
 and other implementations of yacc.
-The 
+The
 .Dq %destructor
-and 
+and
 .Dq %locations
-features are available only if 
+features are available only if
 .Nm yacc
 has been configured and compiled to support the back-tracking functionality.
 The remaining features are always available:
@@ -270,11 +270,11 @@ if the
 .Dq YYSTYPE
 value is, or contains, pointers to dynamically allocated memory.
 .Pp
-The bracketed 
+The bracketed
 .Dv code
 is invoked whenever the parser discards one of the symbols.
 Within
-.Dv  code , 
+.Dv  code ,
 .Dq $$
 or
 .Dq $\*[Lt]tag\*[Gt]$
@@ -285,7 +285,7 @@ designates its location (see
 directive).
 .Pp
 A per-symbol destructor is defined by listing a grammar symbol
-in 
+in
 .Dv symbol+ .
 A per-type destructor is defined  by listing a semantic type tag (e.g.,
 .Dq \*[Lt]some_tag\*[Gt] )
@@ -304,10 +304,10 @@ The code for
 .Dq \*[Lt]*\*[Gt]
 is used
 for grammar symbols that have an explicitly declared semantic type tag
-(via 
+(via
 .Dq %type ) ;
 .Pp
-the code for 
+the code for
 .Dq \*[Lt]\*[Gt]
 is used for grammar symbols that have no declared semantic type tag.
 .Pp
@@ -318,7 +318,7 @@ Tell
 the expected number of shift/reduce conflicts.
 That makes it only report the number if it differs.
 .It Dv %expect-rr Ar number
-Tell 
+Tell
 .Nm
 the expected number of reduce/reduce conflicts.
 That makes it only report the number if it differs.
@@ -329,8 +329,8 @@ allowable in
 parsers.
 .It Dv %locations
 Tell
-.Nm 
-to enable  management of position information associated with each token, 
+.Nm
+to enable  management of position information associated with each token,
 provided by the lexer in the global variable
 .Dv yylloc ,
 similar to management of semantic value information provided in
@@ -339,8 +339,8 @@ similar to management of semantic value 
 As for

CVS commit: src/external/bsd/byacc/bin

2016-06-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun  5 16:24:34 UTC 2016

Modified Files:
src/external/bsd/byacc/bin: yacc.1

Log Message:
Sync mdoc page with the one provided from upstream.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 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.4 src/external/bsd/byacc/bin/yacc.1:1.5
--- src/external/bsd/byacc/bin/yacc.1:1.4	Sat Sep 10 17:38:59 2011
+++ src/external/bsd/byacc/bin/yacc.1	Sun Jun  5 12:24:34 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: yacc.1,v 1.4 2011/09/10 21:38:59 christos Exp $
+.\"	$NetBSD: yacc.1,v 1.5 2016/06/05 16:24:34 christos Exp $
 .\"
 .\" Copyright (c) 1989, 1990 The Regents of the University of California.
 .\" All rights reserved.
@@ -31,10 +31,10 @@
 .\" SUCH DAMAGE.
 .\"
 .\"	from: @(#)yacc.1	5.7 (Berkeley) 7/30/91
-.\"	from: Id: yacc.1,v 1.12 2011/09/08 00:40:44 tom Exp
-.\"	$NetBSD: yacc.1,v 1.4 2011/09/10 21:38:59 christos Exp $
+.\"	from: Id: yacc.1,v 1.24 2014/10/06 00:03:48 tom Exp 
+.\"	$NetBSD: yacc.1,v 1.5 2016/06/05 16:24:34 christos Exp $
 .\"
-.Dd September 7, 2011
+.Dd October 5, 2014
 .Dt YACC 1
 .Os
 .Sh NAME
@@ -44,9 +44,9 @@
 parser generator
 .Sh SYNOPSIS
 .Nm
-.Op Fl dgilPrtVv
-.Op Fl b Ar prefix
-.Op Fl o Ar outputfile
+.Op Fl BdgilLPrtvVy
+.Op Fl b Ar file_prefix
+.Op Fl o Ar output_file
 .Op Fl p Ar symbol_prefix
 .Ar filename
 .Sh DESCRIPTION
@@ -65,15 +65,18 @@ normally writes the parse tables and the
 .Pa y.tab.c .
 .Pp
 The following options are available:
-.Bl -tag -width Ar
-.It Fl b Ar prefix
+.Bl -tag -width symbol_prefixXXX
+.It Fl b Ar file_prefix
 The
 .Fl b
 option changes the prefix prepended to the output file names to
 the string denoted by
-.Ar prefix .
+.Ar file_prefix .
 The default prefix is the character
 .Ar y .
+.It Fl B
+Create a backtracking parser (compile-type configuration for
+.Nm ) .
 .It Fl d
 The
 .Fl d
@@ -124,11 +127,19 @@ option is specified,
 .Nm
 will not insert the #line directives.
 #line directives specified by the user will be retained.
-.It Fl o Ar outputfile
-The
-.Fl o
-option specifies an explicit output file name should be used instead
-of the default.
+.It Fl L
+Enable position processing, e.g., 
+.Dq %locations
+(compile-type configuration for
+.Nm ) .
+.It Fl o Ar output_file
+Specify the filename for the parser file.
+If this option is not given, the output filename is
+the file prefix concatenated with the file suffix, e.g.
+.Pa y.tab.c .
+This overrides the
+.Fl b
+option. 
 .It Fl P
 The
 .Fl P
@@ -155,6 +166,53 @@ The code file is named
 .Pa y.code.c ,
 and the tables file is named
 .Pa y.tab.c .
+The prefix 
+.Dq y.
+can be overridden using the
+.Fl b
+option.
+.It Fl s
+Suppress 
+.Dq #define
+statements generated for string literals in a
+.Dq %token
+statement, to more closely match original
+.Nm 
+behavior.
+.Pp
+Normally when
+.Nm 
+sees a line such as
+.Dq %token OP_ADD "ADD"
+it notices that the quoted
+.Dq ADD
+is a valid C identifier, and generates a #define not only for 
+.Dv OP_ADD ,
+but for 
+.Dv ADD
+as well,
+e.g.,
+.Bd -literal -offset indent
+#define OP_ADD 257
+#define ADD 258
+.Ed
+The original
+.Nm
+does not generate the second
+.Dq #define .
+The 
+.Fl s
+option suppresses this
+.Dq #define .
+.Pp
+.St -p1003.1
+documents only names and numbers for
+.Dq %token ,
+though the original
+.Nm 
+and
+.Xr bison 1
+also accept string literals.
 .It Fl t
 The
 .Fl t
@@ -171,14 +229,87 @@ The
 option causes a human-readable description of the generated parser to
 be written to the file
 .Pa y.output .
+.It Fl y
+.Nm
+ignores this option,
+which
+.Xr bison 1
+supports for ostensible POSIX compatibility.
 .El
 .Sh EXTENSIONS
 .Nm
-provides some extensions for compatibility with 
+provides some extensions for
+compatibility with
 .Xr bison 1
-and other implementations
-of 
-.Nm :
+and other implementations of yacc.
+The 
+.Dq %destructor
+and 
+.Dq %locations
+features are available only if 
+.Nm yacc
+has been configured and compiled to support the back-tracking functionality.
+The remaining features are always available:
+.Pp
+.Dv %destructor {
+.Dv code }
+.Dv symbol+
+.Pp
+Defines code that is invoked when a symbol is automatically
+discarded during error recovery.
+This code can be used to
+reclaim dynamically allocated memory associated with the corresponding
+semantic value for cases where user actions cannot manage the memory
+explicitly.
+.Pp
+On encountering a parse error, the generated parser
+discards symbols on the stack and input tokens until it reaches a state
+that will allow parsing to continue.
+This error recovery approach results in a memory leak
+if the
+.Dq YYSTYPE
+value is, or contains, pointers to dynamically allocated memory.
+.Pp
+The bracketed 
+.Dv code
+is invoked whenever the parser discards on

CVS commit: src/external/bsd/byacc/bin

2015-04-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 14 14:08:36 UTC 2015

Modified Files:
src/external/bsd/byacc/bin: Makefile

Log Message:
use the newer skeleton file.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/byacc/bin/Makefile

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/Makefile
diff -u src/external/bsd/byacc/bin/Makefile:1.5 src/external/bsd/byacc/bin/Makefile:1.6
--- src/external/bsd/byacc/bin/Makefile:1.5	Mon Apr 13 13:15:39 2015
+++ src/external/bsd/byacc/bin/Makefile	Tue Apr 14 10:08:36 2015
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.5 2015/04/13 17:15:39 christos Exp $
+#	$NetBSD: Makefile,v 1.6 2015/04/14 14:08:36 christos Exp $
 
 .include "bsd.own.mk"
 
 PROG=	yacc
 SRCS=	closure.c error.c lalr.c lr0.c main.c mkpar.c output.c reader.c \
-	symtab.c verbose.c warshall.c graph.c mstring.c btyaccpar.c
+	symtab.c verbose.c warshall.c graph.c mstring.c yaccpar.c
 
 CPPFLAGS+=	-DMAXTABLE=INT_MAX
 CPPFLAGS+=	-DGCC_NORETURN=__dead



CVS commit: src/external/bsd/byacc/bin

2015-04-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Apr 13 17:15:39 UTC 2015

Modified Files:
src/external/bsd/byacc/bin: Makefile

Log Message:
bump table to the max value allowed


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/byacc/bin/Makefile

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/Makefile
diff -u src/external/bsd/byacc/bin/Makefile:1.4 src/external/bsd/byacc/bin/Makefile:1.5
--- src/external/bsd/byacc/bin/Makefile:1.4	Sat Jan  3 18:22:52 2015
+++ src/external/bsd/byacc/bin/Makefile	Mon Apr 13 13:15:39 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2015/01/03 23:22:52 christos Exp $
+#	$NetBSD: Makefile,v 1.5 2015/04/13 17:15:39 christos Exp $
 
 .include "bsd.own.mk"
 
@@ -6,6 +6,7 @@ PROG=	yacc
 SRCS=	closure.c error.c lalr.c lr0.c main.c mkpar.c output.c reader.c \
 	symtab.c verbose.c warshall.c graph.c mstring.c btyaccpar.c
 
+CPPFLAGS+=	-DMAXTABLE=INT_MAX
 CPPFLAGS+=	-DGCC_NORETURN=__dead
 
 COPTS.output.c += -Wno-format-nonliteral



CVS commit: src/external/bsd/byacc/bin

2011-09-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep 10 21:38:59 UTC 2011

Modified Files:
src/external/bsd/byacc/bin: yacc.1

Log Message:
document -i


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 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.3 src/external/bsd/byacc/bin/yacc.1:1.4
--- src/external/bsd/byacc/bin/yacc.1:1.3	Fri Dec 24 18:28:14 2010
+++ src/external/bsd/byacc/bin/yacc.1	Sat Sep 10 17:38:59 2011
@@ -1,4 +1,4 @@
-.\"	$NetBSD: yacc.1,v 1.3 2010/12/24 23:28:14 christos Exp $
+.\"	$NetBSD: yacc.1,v 1.4 2011/09/10 21:38:59 christos Exp $
 .\"
 .\" Copyright (c) 1989, 1990 The Regents of the University of California.
 .\" All rights reserved.
@@ -31,9 +31,10 @@
 .\" SUCH DAMAGE.
 .\"
 .\"	from: @(#)yacc.1	5.7 (Berkeley) 7/30/91
-.\"	$NetBSD: yacc.1,v 1.3 2010/12/24 23:28:14 christos Exp $
+.\"	from: Id: yacc.1,v 1.12 2011/09/08 00:40:44 tom Exp
+.\"	$NetBSD: yacc.1,v 1.4 2011/09/10 21:38:59 christos Exp $
 .\"
-.Dd December 23, 2010
+.Dd September 7, 2011
 .Dt YACC 1
 .Os
 .Sh NAME
@@ -43,7 +44,7 @@
 parser generator
 .Sh SYNOPSIS
 .Nm
-.Op Fl dglPrtVv
+.Op Fl dgilPrtVv
 .Op Fl b Ar prefix
 .Op Fl o Ar outputfile
 .Op Fl p Ar symbol_prefix
@@ -79,6 +80,7 @@
 option causes the header file
 .Pa y.tab.h
 to be written.
+It contains #define's for the token identifiers.
 .It Fl g
 The
 .Fl g
@@ -88,6 +90,26 @@
 .Pa y.dot
 in graphviz format, ready to be processed by
 .Xr dot 1 .
+.It Fl i
+The 
+.Fl i
+option causes a supplementary header file
+.Pa y.tab.i
+to be written.
+It contains extern declarations
+and supplementary #define's as needed to map the conventional
+.Nm
+yy-prefixed names to whatever the
+.Fl p
+option may specify.
+The code file, e.g., 
+.Pa y.tab.c
+is modified to #include this file
+as well as the
+.Pa y.tab.h
+file, enforcing consistent usage of the symbols defined in those files.
+The supplementary header file makes it simpler to separate compilation
+of lex- and yacc-files.
 .It Fl l
 If the
 .Fl l



CVS commit: src/external/bsd/byacc/bin

2011-08-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug 14 13:29:26 UTC 2011

Modified Files:
src/external/bsd/byacc/bin: Makefile

Log Message:
document non-literal format strings


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/byacc/bin/Makefile

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/Makefile
diff -u src/external/bsd/byacc/bin/Makefile:1.2 src/external/bsd/byacc/bin/Makefile:1.3
--- src/external/bsd/byacc/bin/Makefile:1.2	Tue May 24 09:48:16 2011
+++ src/external/bsd/byacc/bin/Makefile	Sun Aug 14 09:29:26 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2011/05/24 13:48:16 joerg Exp $
+#	$NetBSD: Makefile,v 1.3 2011/08/14 13:29:26 christos Exp $
 
 .include "bsd.own.mk"
 
@@ -8,4 +8,7 @@
 
 CPPFLAGS+=	-DGCC_NORETURN=__dead
 
+COPTS.output.c += -Wno-format-nonliteral
+COPTS.reader.c += -Wno-format-nonliteral
+
 .include 



CVS commit: src/external/bsd/byacc/bin

2011-05-24 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue May 24 13:48:16 UTC 2011

Modified Files:
src/external/bsd/byacc/bin: Makefile

Log Message:
Provide correct GCC_NORETURN


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/byacc/bin/Makefile

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/Makefile
diff -u src/external/bsd/byacc/bin/Makefile:1.1 src/external/bsd/byacc/bin/Makefile:1.2
--- src/external/bsd/byacc/bin/Makefile:1.1	Thu Oct 29 00:56:35 2009
+++ src/external/bsd/byacc/bin/Makefile	Tue May 24 13:48:16 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2009/10/29 00:56:35 christos Exp $
+#	$NetBSD: Makefile,v 1.2 2011/05/24 13:48:16 joerg Exp $
 
 .include "bsd.own.mk"
 
@@ -6,4 +6,6 @@
 SRCS=	closure.c error.c lalr.c lr0.c main.c mkpar.c output.c reader.c \
 	skeleton.c symtab.c verbose.c warshall.c graph.c
 
+CPPFLAGS+=	-DGCC_NORETURN=__dead
+
 .include 



CVS commit: src/external/bsd/byacc/bin

2010-12-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec 24 23:28:14 UTC 2010

Modified Files:
src/external/bsd/byacc/bin: yacc.1

Log Message:
remove typo.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 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.2 src/external/bsd/byacc/bin/yacc.1:1.3
--- src/external/bsd/byacc/bin/yacc.1:1.2	Fri Dec 24 18:27:14 2010
+++ src/external/bsd/byacc/bin/yacc.1	Fri Dec 24 18:28:14 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: yacc.1,v 1.2 2010/12/24 23:27:14 christos Exp $
+.\"	$NetBSD: yacc.1,v 1.3 2010/12/24 23:28:14 christos Exp $
 .\"
 .\" Copyright (c) 1989, 1990 The Regents of the University of California.
 .\" All rights reserved.
@@ -31,7 +31,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"	from: @(#)yacc.1	5.7 (Berkeley) 7/30/91
-.\"	$NetBSD: yacc.1,v 1.2 2010/12/24 23:27:14 christos Exp $
+.\"	$NetBSD: yacc.1,v 1.3 2010/12/24 23:28:14 christos Exp $
 .\"
 .Dd December 23, 2010
 .Dt YACC 1
@@ -178,7 +178,7 @@
 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 }
+.It Dv %parse-param Ar { Ar argument-declaration Ar }
 By default, the parser accepts no parameters, e.g.,
 .Fn yyparse .
 Use this directive to add parameter declarations for your customized parser.



CVS commit: src/external/bsd/byacc/bin

2010-12-24 Thread Christos Zoulas
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 :