Commit Graph

71 Commits

Author SHA1 Message Date
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