Commit Graph

138 Commits

Author SHA1 Message Date
davidc
583bf78cf8 Add __unused to the declaration of yyrcsid. 2003-02-07 03:39:27 +00:00
ru
e7bd2cb66e mdoc(7) police: back out unproved changes from previous revision.
Approved by:	re
2002-11-26 15:34:18 +00:00
charnier
bdf2708e48 Add section number to .Xr directive. 2002-10-16 15:46:43 +00:00
charnier
7dd9d47059 Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
robert
f85d0f0060 Use the constants from <limits.h> for the sizes of integral C types
rather than defining them ourselves.
2002-06-11 11:27:20 +00:00
jmallett
241a475e6f Note that this appeared at least as early as PWB UNIX.
Use the literal string 'PWB UNIX', as we still have no .At macro for it.
2002-06-10 22:59:59 +00:00
ru
67d93076d6 mdoc(7) police: tidy up the markup. 2002-05-30 06:56:43 +00:00
obrien
3311fa2aba Restore some of the original variable names, but fix the warnings their
renaming addressed by removing the global variants instead.
2002-04-23 20:30:30 +00:00
charnier
ad8a79e6a5 Use `The .Nm utility' 2002-04-20 12:18:28 +00:00
fenner
798d62af10 mdoc police: use .El to end the list in the ENVIRONMENT section. 2002-04-17 21:34:47 +00:00
obrien
8c178db49d Quiet uninitialized warnings. 2002-04-10 03:00:50 +00:00
ru
6d38d7dc3c No longer needed to #ifdef __FBSDID, this is now handled by Makefile.inc1. 2002-04-09 11:39:05 +00:00
obrien
1f93d739ef Revert the "tell the program name in diagnostics". What was I thinking??
warnx() already does this for us.
2002-04-05 03:21:41 +00:00
obrien
ef28acc1be Minor reordering of declarations to reduce diffs to OpenBSD/NetBSD. 2002-04-04 22:25:04 +00:00
obrien
30affec10e Allow to compile errorlessly with GCC 3.1. 2002-04-04 22:15:56 +00:00
obrien
6d04a5e00d Fix signal race.
Use strlen() rather than magic number.
Use _PATH_TMP.

Obtained from:	OpenBSD rev 1.13 (sig race) & rev 1.9 (strlen)
2002-04-04 22:15:13 +00:00
obrien
e14f194d59 Revert revision 1.3. This is WARNS=4 clean w/o it and it only increases
the diffs to Open/NetBSD.
2002-04-04 22:10:23 +00:00
obrien
6cdcffea17 Fix style regression introduced in rev 1.11 during a WARNS cleanup. 2002-04-04 21:59:10 +00:00
obrien
cc9830e3c2 Add STANDARDS, ENVIRONMENT, and TABLES sections.
Obtained from:	OpenBSD
2002-04-04 21:31:03 +00:00
obrien
efdbbdd9ce Minor word smithing. 2002-04-04 21:24:19 +00:00
obrien
430aedfb79 Follow suit with OpenBSD and NetBSD and tell the program name in diagnostics. 2002-04-04 21:09:06 +00:00
obrien
5b964d2945 Follow suit with OpenBSD and NetBSD and tell the program name in diagnostics. 2002-04-04 20:58:27 +00:00
imp
0b20191705 remove __P 2002-03-22 01:42:45 +00:00
markm
31d81e4fbc Remove NO_WERRORs and WARNS=n's. To be revisited after GCC3. 2002-02-08 23:07:37 +00:00
markm
9c9a045dca WARNS=2 fix, but do not set this im Makefile, because this ill be the
default for src/usr.bin/
2001-12-11 22:13:02 +00:00
dwmalone
d9613ea383 Style improvements recommended by Bruce as a follow up to some
of the recent WARNS commits. The idea is:

1) FreeBSD id tags should follow vendor tags.
2) Vendor tags should not be compiled (though copyrights probably should).
3) There should be no blank line between including cdefs and __FBSDIF.
2001-12-10 21:13:08 +00:00
imp
8f226dc222 Only use __FBSDID if it is defined. This fixes the 4.4-release (but
not stable) -> current upgrade path.

Reviewed by: markm
2001-12-08 02:28:16 +00:00
markm
c73844e02d Use __FBSDID(). 2001-12-02 21:24:03 +00:00
markm
4a974575ba WARNS=2 and s/register//.
Set NO_WERROR=true because there are some flex(1) issues that need
to be dealt with.
2001-12-01 17:34:42 +00:00
obrien
be3ae37c00 Properly static'ize increase_maxtable().
Submitted by:	db@db.net
2001-10-05 03:02:04 +00:00
obrien
1547f1d07f Fix the output so it really does dynamically resize the table.
Submitted by:	Diane Bruce <db@db.net>
2001-10-05 02:09:43 +00:00
obrien
7d2463e9d1 Increase the table size by an order of magnitude.
The previous version was too small and YACC core dumped on the during the
hybrid-7 build.

Submitted by:	Diane Bruce <db@db.net>
2001-10-05 00:46:22 +00:00
ru
36f138439b mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 14:16:33 +00:00
ru
ef2dbc1fb0 beforeinstall -> SCRIPTS. 2001-04-07 11:21:35 +00:00
ru
89596e4538 MAN[1-9] -> MAN. 2001-03-27 10:52:19 +00:00
peter
589564befb Have yacc use a prototype for yygrowstack(void) on ANSI compilers.
This fixes a gcc warning with -Wmissing-prototypes.
2001-02-19 01:10:01 +00:00
kris
b64f677da6 Constify 2000-11-26 11:07:45 +00:00
n_hibma
5240cf8e35 Fix breakage introduced in rev.1.7. yystacksize and yysslim are global and
should be prefixed by YYPREFIX as well.

Only relevant if -p <yyprefix> is used. Used in cases where multiple parsers
are used in executable.
2000-09-07 15:01:18 +00:00
bde
668e3ec014 Fixed breakage of K&R support in rev.1.26. yyparse() was defined as
`int yyparse(;) ; { ... }' in K&R mode.  Getting rid of the second
unwanted semicolon in this made the ifdef tangle more tangled than
before.  Fixed a backwards comment in the tangle.
2000-01-17 02:04:06 +00:00
bde
6b3da1fe21 Fixed breakage of K&R support in rev.1.8 of output.c: don't generate
#elif.  Cleaned up rev.1.8 a bit more: generate the #include of
<stdio.h> closer to the code that needs it.
2000-01-17 01:51:29 +00:00
kris
98f787026a malloc more space for temp file name
Noticed by:	marcel
2000-01-10 20:26:24 +00:00
kris
5cc62bc93f Feed mkstemp() some more X's to keep it safe. 2000-01-10 08:54:09 +00:00
obrien
811b0ef57d Make "YYPARSE_PARAM" and "YYPARSE_PARAM_TYPE" C++/ANSI-C clean. 1999-10-28 15:18:05 +00:00
obrien
3a2839fec9 Allow a user specified parameter to 'yyparse()', in a manner similar to
that used by bison.  The names are consistent with the bison implementation
but this one also allows the type of the parameter to be specified.

For a desired prototype of:

	int yyparse __P((struct yyresult *));

and compile like this:

	yacc -dv grammar.y
	cc -c -DYYPARSE_PARAM_TYPE="struct yyresult *" \
	      -DYYPARSE_PARAM="parm" y.tab.c

and use like this:

	${
	#include "usrtypes.h"
	#include "usrproto.h"
	}$

	%token NUMBER

	%%

	goal : NUMBER
		{
		parm->value = yylval;
		} ;

If YYPARSE_PARAM_TYPE isn't specified then "void *" is the default type.
If YYPARSE_PARAM is not specified then the generated code behaves exactly
as traditional byacc.

PR:		13562
Submitted by:	W Gerald Hicks <wghicks@bellsouth.net>
1999-10-27 17:51:37 +00:00
obrien
f7ea0f8cc3 Emit YYERRCODE into y.tab.h to help `lex' report scanning errors back to
Yacc.

PR:		13562
Submitted by:	W Gerald Hicks <wghicks@bellsouth.net>
1999-10-27 17:46:41 +00:00
peter
3b842d34e8 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
obrien
a0aa5ed261 Revert the past 3 commits to what should have been the rev 1.18 -> rev 1.19
change.  (doesn't anybody read commit logs and look at the diffs?)
1999-07-30 15:05:32 +00:00
des
ac38154cc5 Hyphens are not legal characters in a C identifier.
Broken by:	hoek
1999-07-30 14:52:23 +00:00
hoek
eb38eb9c63 Even better fix for last commit: rename rcsid[] to _yacc-parser_rcsid[]
(one always gets these ideas just after the commit).
1999-07-30 13:04:19 +00:00
hoek
32b04adb4f Don't output rcsid into the output parser. It may have already been
defined in an input file such as src/bin/sh/arith.y.  #if 0 it out.  I did
not add $Id$ back into the comment header (as removed from last commit).
1999-07-30 12:53:21 +00:00
obrien
ffffe6481b Only output `rcsid' (set to our Id string) into the resulting parser file.
Don't output `sccsid' (set to an anchient UCB Id string) into the parser file.

Submitted by:	bde
1999-07-30 06:40:00 +00:00
obrien
d291b1f656 Follow the directions in the comments and add our Id string to the output
file.
1999-07-29 09:59:06 +00:00
obrien
b10abbc3c0 Check that user supplied the required argument; and if not, show usage().
Obtained from:	OpenBSD
1999-07-29 09:47:33 +00:00
obrien
ecc95f8e7b * Don't assume realloc() can take NULL as first arg. Yacc needs to
generate portable code...
* Correctly define yyparse() (ie, K&R vs. C++/ANSI-C)

Obtained from:	OpenBSD revs 1.5 & 1.10
1999-07-29 09:42:14 +00:00
obrien
0f208ce6bb YYRECOVERING(), not YYRECOVERING.
Obtained from:	OpenBSD rev 1.8 (approved by Robert Corbett)
1999-07-29 08:47:30 +00:00
obrien
d7c5d95faa Add support for Bison's "%expect <int>" directive.
I originally coded this myself, and now I realize {Net,Open}BSD had already
coded this.  I have tossed my version to reduce diffs between the projects.

Obtained from:	OpenBSD 2.5
1999-07-29 08:42:21 +00:00
hoek
6520007244 Regenerate to match changes made in the embedded yacc parser. 1999-07-23 23:13:44 +00:00
hoek
2258385cd9 Regenerate this file. This fixes a y2k bogon. As an unintentional side-effect,
it also fixes that fact that this file badly needed to be regenerated due
to changes in yacc.

Not done by: pst (in misc/1380)
Almost done by: danny (in ftp.y)
1999-07-23 23:10:34 +00:00
billf
4822432874 Clean up some ambiguous nested if/elses. 1999-07-04 17:26:16 +00:00
peter
31da8353e2 Clean up the skeleton code a little. There was a #ifdef to avoid
stdlib.h unless on C++.  However, we already included it above, so there
was no point using the redundant declarations instead.
1999-04-18 13:37:49 +00:00
danny
9926c0023b "19%02", tm.year -> "%d", tm.year+1900 1999-01-18 22:42:05 +00:00
imp
765f577232 Use mkstemp rather than mktemp for yacc's temp files. This change was made
to OpenBSD a long time ago and to my tree shortly thereafter.  I think theo
made this change, or one similar to it, but I could be wrong.
1998-06-09 04:20:51 +00:00
jb
0c290fd53e Add #include <string.h> to get prototypes. 1998-02-20 04:33:03 +00:00
charnier
0497c512b6 Use err(3). Rewrote man page in mdoc format. The user visible change is that
report of s/r and r/r conflicts is now printed in two separate lines beginning
by `yacc: '.
1997-08-28 06:33:53 +00:00
steve
8e2246d8a6 Add back the description of the -o option.
Threatened PR by: Tim Vanderhoek :)
1997-05-14 02:33:08 +00:00
steve
ae132dac72 #include <stdlib.h> in the C++ case and declare getenv and realloc
in the C case so that we don't have to depend on stdlib.h being
present.

Submitted by:	Bruce Evans <bde@freefall.freebsd.org>
1997-04-29 03:07:45 +00:00
steve
df56a86d0b Keep style consistent.
Submitted by:	Bruce Evans <bde@freefall.freebsd.org>
1997-04-29 03:05:38 +00:00
steve
bafc3a0eb8 Fix problems using -Wwrite-strings and -Wcast-qual with yacc generated
parsers.  Closes PR #2792.

Submitted by:	Tim Vanderhoek
1997-04-28 03:36:13 +00:00
jmg
4deb06a037 `appears'' -> `appeared'' (closes PR#3393, Submitted-by: Josh Gilliam)
add missing Id's
other minor clean ups
1997-04-27 08:45:46 +00:00
bde
d8c04b9e65 Don't generate invalid C++ code (for implicit conversion from `void *' in
assignment).
1997-03-22 01:48:17 +00:00
peter
f390c26dd9 Revert $FreeBSD$ to $Id$ 1997-02-22 19:58:13 +00:00
steve
372a452bba Implement the -o commandline switch. This does almost exactly
what bison does with -o, except it DTRT with respect to naming
the .code file when the -r switch is also used.

Submitted by: bde
1997-02-16 01:50:25 +00:00
jkh
808a36ef65 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
steve
62621e3ce1 Add RCS id's since these files have left the default branch. 1997-01-12 21:29:55 +00:00
steve
9ea5e02672 This doesn't change any functionality, it simple makes yacc(1)
compile -Wall clean.
1997-01-12 21:16:25 +00:00
steve
f68e14d696 Revert the '-o output_file_name' option changes. 1997-01-12 04:04:52 +00:00
steve
e4dc8d0d85 Merge Lite2 mods. 1997-01-06 03:07:20 +00:00
steve
1b086b5eb3 Implement and document a '-o output_file_name' option to
allow the generated code to be written to a file other
than the default, y.tab.c.

Inspired by: bde and brian@mediacity.com
1997-01-06 02:05:28 +00:00
hsu
aa2308001f Add YYLEX and YYEMPTY macros to make byacc look more like bison.
Obtained from:  Cygnus source tree, with permission.
		Original commit by Jim Wilson, wilson@cygnus.com.
1996-11-04 21:54:52 +00:00
steve
29accf9e0f Fix for PR# 1427, yacc-generated parser generates warnings
with -Wall.  Tim's work with some minor additions by me.

Submitted by:	Tim Vanderhoek <hoek@freenet.hamilton.on.ca>
1996-09-22 02:05:53 +00:00
peter
90c8dabe75 Fix -Wall warning in skeleton parser 1996-09-03 10:56:32 +00:00
joerg
ae3ee69e4d Make the yacc skeleton aware of C++. It was previously broken in the
YYDEBUG case (getenv() declared wrong).
1996-09-03 08:00:26 +00:00
peter
a09220052f Install yacc with a link as byacc (and the man page). Some gnu autoconf
scripts that check for features/fixes in bison also check for byacc and
dont find it unless there is a 'byacc' in the path.
1996-01-08 09:20:16 +00:00
phk
bdd1ce3cab Make all the tables "const" so that they don't clutter our data-segment. 1996-01-07 22:30:13 +00:00
bde
f5284ed86d Change install' to ${INSTALL}' so that default install flags can be
specified in the top level Makefiles.
1995-07-25 00:37:58 +00:00
rgrimes
a14d555c87 Remove trailing whitespace. 1995-05-30 06:41:30 +00:00
jkh
c2d34a8a21 Fix man extents from .0 to .1
Submitted by:	jkh
1994-08-11 01:42:28 +00:00
rgrimes
f9ab90d9d6 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00