From owner-svn-src-head@FreeBSD.ORG Tue Nov 9 00:04:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 3F9DB1065675; Tue, 9 Nov 2010 00:04:31 +0000 (UTC) Date: Tue, 9 Nov 2010 00:04:31 +0000 From: Alexander Best To: "David E. O'Brien" Message-ID: <20101109000431.GB76051@freebsd.org> References: <201011072344.oA7Nifh9094328@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201011072344.oA7Nifh9094328@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r214964 - head/usr.bin/yacc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Nov 2010 00:04:31 -0000 On Sun Nov 7 10, David E. O'Brien wrote: > Author: obrien > Date: Sun Nov 7 23:44:40 2010 > New Revision: 214964 > URL: http://svn.freebsd.org/changeset/base/214964 > > Log: > Add '-y' for bison compatibility. > > Obtained from: http://invisible-island.net could you take a look at PR 140309? it's a simple one line fix to prevent yacc from segfaulting in certain cases. cheers. alex > > Modified: > head/usr.bin/yacc/main.c > head/usr.bin/yacc/yacc.1 > > Modified: head/usr.bin/yacc/main.c > ============================================================================== > --- head/usr.bin/yacc/main.c Sun Nov 7 23:34:05 2010 (r214963) > +++ head/usr.bin/yacc/main.c Sun Nov 7 23:44:40 2010 (r214964) > @@ -166,7 +166,7 @@ getargs(int argc, char *argv[]) > { > int ch; > > - while ((ch = getopt(argc, argv, "b:dlo:p:rtv")) != -1) > + while ((ch = getopt(argc, argv, "b:dlo:p:rtvy")) != -1) > { > switch (ch) > { > @@ -202,6 +202,10 @@ getargs(int argc, char *argv[]) > vflag = 1; > break; > > + case 'y': > + /* for bison compatibility -- byacc is already POSIX compatible */ > + break; > + > default: > usage(); > } > > Modified: head/usr.bin/yacc/yacc.1 > ============================================================================== > --- head/usr.bin/yacc/yacc.1 Sun Nov 7 23:34:05 2010 (r214963) > +++ head/usr.bin/yacc/yacc.1 Sun Nov 7 23:44:40 2010 (r214964) > @@ -44,7 +44,7 @@ > .Nd an LALR(1) parser generator > .Sh SYNOPSIS > .Nm > -.Op Fl dlrtv > +.Op Fl dlrtvy > .Op Fl b Ar file_prefix > .Op Fl o Ar output_filename > .Op Fl p Ar symbol_prefix > @@ -118,6 +118,10 @@ so that debugging statements will be inc > Cause a human-readable description of the generated parser to > be written to the file > .Pa y.output . > +.It Fl y > +NOOP for bison compatibility. > +.Nm > +is already designed to be POSIX yacc compatible. > .El > .Sh ENVIRONMENT > .Bl -tag -width ".Ev TMPDIR" -- a13x