summaryrefslogtreecommitdiffstats
path: root/usr.bin/yacc/skeleton.c
Commit message (Collapse)AuthorAgeFilesLines
* Fixed breakage of K&R support in rev.1.26. yyparse() was defined asbde2000-01-171-7/+7
| | | | | | `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.
* Fixed breakage of K&R support in rev.1.8 of output.c: don't generatebde2000-01-171-0/+3
| | | | | #elif. Cleaned up rev.1.8 a bit more: generate the #include of <stdio.h> closer to the code that needs it.
* Make "YYPARSE_PARAM" and "YYPARSE_PARAM_TYPE" C++/ANSI-C clean.obrien1999-10-281-4/+15
|
* Allow a user specified parameter to 'yyparse()', in a manner similar toobrien1999-10-271-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Revert the past 3 commits to what should have been the rev 1.18 -> rev 1.19obrien1999-07-301-1/+1
| | | | change. (doesn't anybody read commit logs and look at the diffs?)
* Hyphens are not legal characters in a C identifier.des1999-07-301-1/+1
| | | | Broken by: hoek
* Even better fix for last commit: rename rcsid[] to _yacc-parser_rcsid[]hoek1999-07-301-2/+2
| | | | (one always gets these ideas just after the commit).
* Don't output rcsid into the output parser. It may have already beenhoek1999-07-301-2/+2
| | | | | 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).
* Only output `rcsid' (set to our Id string) into the resulting parser file.obrien1999-07-301-4/+2
| | | | | | Don't output `sccsid' (set to an anchient UCB Id string) into the parser file. Submitted by: bde
* Follow the directions in the comments and add our Id string to the outputobrien1999-07-291-1/+2
| | | | file.
* * Don't assume realloc() can take NULL as first arg. Yacc needs toobrien1999-07-291-3/+11
| | | | | | | generate portable code... * Correctly define yyparse() (ie, K&R vs. C++/ANSI-C) Obtained from: OpenBSD revs 1.5 & 1.10
* YYRECOVERING(), not YYRECOVERING.obrien1999-07-291-2/+2
| | | | Obtained from: OpenBSD rev 1.8 (approved by Robert Corbett)
* Clean up the skeleton code a little. There was a #ifdef to avoidpeter1999-04-181-9/+1
| | | | | stdlib.h unless on C++. However, we already included it above, so there was no point using the redundant declarations instead.
* #include <stdlib.h> in the C++ case and declare getenv and reallocsteve1997-04-291-1/+11
| | | | | | | 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>
* Fix problems using -Wwrite-strings and -Wcast-qual with yacc generatedsteve1997-04-281-13/+3
| | | | | | parsers. Closes PR #2792. Submitted by: Tim Vanderhoek
* Don't generate invalid C++ code (for implicit conversion from `void *' inbde1997-03-221-3/+3
| | | | assignment).
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | 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.
* Add RCS id's since these files have left the default branch.steve1997-01-121-0/+2
|
* This doesn't change any functionality, it simple makes yacc(1)steve1997-01-121-3/+4
| | | | compile -Wall clean.
* Merge Lite2 mods.steve1997-01-061-9/+40
|
* Add YYLEX and YYEMPTY macros to make byacc look more like bison.hsu1996-11-041-1/+3
| | | | | Obtained from: Cygnus source tree, with permission. Original commit by Jim Wilson, wilson@cygnus.com.
* Fix for PR# 1427, yacc-generated parser generates warningssteve1996-09-221-15/+17
| | | | | | with -Wall. Tim's work with some minor additions by me. Submitted by: Tim Vanderhoek <hoek@freenet.hamilton.on.ca>
* Fix -Wall warning in skeleton parserpeter1996-09-031-1/+1
|
* Make the yacc skeleton aware of C++. It was previously broken in thejoerg1996-09-031-1/+12
| | | | YYDEBUG case (getenv() declared wrong).
* Make all the tables "const" so that they don't clutter our data-segment.phk1996-01-071-9/+9
|
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-271-0/+346
OpenPOWER on IntegriCloud