byacc/CHANGES
2014-04-22 23:36:31 -04:00

1352 lines
38 KiB
Plaintext

2014-04-19 Thomas E. Dickey <dickey@invisible-island.net>
* config.sub: 2014-04-03
* config.guess: 2014-03-23
2014-04-09 Rick.Spates
* main.c, defs.h: patch to allow DEBUG build with WIN32 system
2014-04-09 Thomas E. Dickey <dickey@invisible-island.net>
* output.c, reader.c: gcc warnings
* reader.c: fix const-cast warnings
* output.c:
fix a few clang --analyze warnings; one was a case where output_ctable emitted
an empty table (which should be an error).
* reader.c: appease clang --analyze
* defs.h: mark two functions as no-return.
* VERSION: bump
* makefile.in: use $LINT_OPTS from environment via configure script
* yaccpar.c: regen
* yacc.1:
clarify relationship of btyacc features to default configuration.
2014-04-08 Thomas E. Dickey <dickey@invisible-island.net>
* mstring.c: minor reformatting to make coverage analysis simpler
2014-04-07 Thomas E. Dickey <dickey@invisible-island.net>
* main.c:
change CREATE_FILE_NAMES() to use local function rather than inline code,
to simplify coverage analysis.
* error.c: ifdef'd non-btyacc function
* lr0.c: ifdef'd debug-code
* yaccpar.skel: use YYINT's to replace short's as in btyaccpar.skel
* output.c:
2010/11/26 simplification of output.c using putc_code() and putl_code()
omitted an adjustment of the #line value used for code-file. Fix that.
Also, amend 2005/05/04 change to run_test.sh to retain a dummy line for
YYPATCH #define's to make test-outputs easier to compare #line's (report
by Tom Shields)
2014-04-06 Thomas E. Dickey <dickey@invisible-island.net>
* reader.c: fix for valgrind
(the calloc's are intentional - valgrind reported use of uninitialized memory)
* lr0.c, output.c: fix for valgrind
* output.c: don't call exit() without giving a chance to cleanup.
* mstring.c: ifdef'd functions not used in byacc
* btyaccpar.c: generated from btyaccpar.skel
* yaccpar.c: generated from yaccpar.skel
* skel2c:
change the generated-by comment to show which version of this script (and
which version of the given skeleton file) were used to produce the C-file.
* configure: regen
* makefile.in:
add rules to generate byacc and btyacc parser skeleton files independently
* aclocal.m4: CF_PROG_AWK - add to byacc's configure script
CF_INTEL_COMPILER
cleanup the -no-gcc option which was leftover from testing - prcs does
not build with this option.
CF_MAKE_DOCS
protect $2 from substitution, for luit's "$(manext)"
CF_XOPEN_SOURCE
for Solaris (tested with gcc/g++ 3.4.3 on Solaris 10 and gcc/g++ 4.5.2
on Solaris 11), suppress the followup check for defining _XOPEN_SOURCE
because it is not needed, as well as because g++ 4.7.3 (no package,
used in Sage for Solaris 10) has some unspecified header breakage which
is triggered by the duplicate definition.
* configure.in:
modify so skeleton-source is determined by configure options rather than by
having developer rename yaccpar.skel.old to yaccpar.skel
* descrip.mms: rename skeleton
* vmsbuild.com:
fwiw, renamed the skeleton for consistency with makefile
* skel2c, skeleton.c: resync skeleton and its generating files
* yaccpar.skel:
renamed yaccpar.skel.old to yaccpar.skel, to allow using makefile suffix rules
* yaccpar.skel.old: resync skeleton and its generating files
* output.c, skeleton.c, defs.h:
use improvement from Tom Shield's btyacc changes, getting rid of special cases for generating two yyerror calls in skeleton
* output.c: simplify output_yyerror_decl()
* output.c:
add second "const" to string-table declarations, from Tom Shield's btyacc changes
* output.c:
use YYINT typedef from Tom Shield's btyacc changes to replace explicit "short"
* output.c:
use fix from Tom Shield's btyacc changes: remove redundant extern-declaration for YYPARSE_DECL()
* output.c:
use fix from Tom Shield's btyacc changes: prefix-definitions went to the
output (.tab.c) file in a case where they should have gone to the code
(.code.c) file. Remove now-redundant call to output_prefix().
* main.c: do the same for help-message
* main.c: use OUTPUT_SUFFIX symbol in an overlooked case
2014-04-05 Thomas E. Dickey <dickey@invisible-island.net>
* output.c:
add Tom Shield's change to allow definition of YYSTYPE_IS_DECLARED symbol to
override fallback typedef for YYSTYPE when that symbol is undefined
* output.c:
integrate Tom Shield's btyacc changes which introduce the YYUNDFTOKEN symbol
(I changed order of output to keep this adjacent to YYMAXTOKEN)
* reader.c:
merge all but one small change from Tom Shield's btyacc changes - that
changes the order of code-file in the tests.
2014-04-04 Thomas E. Dickey <dickey@invisible-island.net>
* reader.c, defs.h, main.c:
more merging of Tom Shield's btyacc changes. In the merge, I moved the
symbol_pval inside the btyacc ifdef's and added some more btyacc ifdefs
2014-04-03 Thomas E. Dickey <dickey@invisible-island.net>
* reader.c:
merge-in 3/4 of btyacc's changes, deferring those which change test-outputs.
Tom Shield's changes split-out copy_string() and copy_comment() functions
to simplify some logic, as well as adding btyacc-only chunks
* makefile.in: build mstring.o, needed for changes in reader.c
* output.c:
merge-in all of btyacc's changes which do not change byacc's test-output.
Some of the merge uses ifdef-changes which I applied to ongoing resync,
e.g., the introduction of PER_STATE.
2014-04-02 Thomas E. Dickey <dickey@invisible-island.net>
* output.c: fix typo
* output.c, reader.c:
merge in some chunks of reader and output files which do not affect byacc tests
* skeleton.c: incorporate YYENOMEM and YYEOF symbols from btyacc
* output.c: merge chunk from btyacc changes for header-guards
* btyaccpar.skel: RCS_BASE
* yaccpar.skel: comment-out yysccsid[], for FreeBSD build-issues
remove GCC_UNUSED to reduce name-pollution as well as being simpler
* main.c:
move a btyacc symbol outside ifdef to work around current state of merge
* defs.h:
add USE_HEADER_GUARDS to defer whether to modify byacc's header-output
2014-04-02 Tom.Shields
* main.c: changes for btyacc
2014-04-01 Thomas E. Dickey <dickey@invisible-island.net>
* reader.c:
integrate change by Tom Shields to use bsearch rather than successive
calls to matchec()
* defs.h: typedef __compar_fn_t is unnecessary
2014-04-01 Tom.Shields
* verbose.c: changes for btyacc, ifdef'd
2014-04-01 Thomas E. Dickey <dickey@invisible-island.net>
* mkpar.c: eliminate most of the ifdef's using macros
2014-04-01 Tom.Shields
* mkpar.c: merge btyacc changes (ifdef'd - no change to byacc)
* error.c:
new functions used for reporting errors from the btyacc configuration
(I reordered some, and ifdef'd the new ones -TD)
2014-03-29 Thomas E. Dickey <dickey@invisible-island.net>
* skeleton.c:
comment-out yysccsid in the banner because it produces unnecessary compiler
warnings. The suggested alternative (using #pragma ident) in the preceding
comment is also obsolete; remove that comment (request by Gleb Smirnoff).
2014-03-28 Tom.Shields
* defs.h: new functions/variables for btyacc
(I reordered and ifdef'd -TD)
2014-03-25 Tom.Shields
* symtab.c: extra initialization needed for btyacc
(I ifdef'd -TD)
* yacc.1: document -L/-B features from btyacc
2014-03-25 Thomas E. Dickey <dickey@invisible-island.net>
* yacc.1: typo
* configure: regen
* configure.in:
modified new options to act like those in my other configure-scripts, e.g.,
showing what option is being tested, and the resulting value. Put the
definitions in config.h rather than in the makefile.
2014-03-25 Tom.Shields
* makefile.in: add/use LINTFLAGS variable
make all of the objects (not just skeleton) rebuild if makefile changes
modify check-rule to reflect updates to run_test.sh vs subdirectory
* mstring.c: byacc-btyacc-20140323
2014-03-25 Thomas E. Dickey <dickey@invisible-island.net>
* config_h.in: updated with autoheader-252
2014-03-25 Tom.Shields
* README.BTYACC: byacc-btyacc-20140323
2014-03-24 Thomas E. Dickey <dickey@invisible-island.net>
* defs.h: fix compiler warnings due to mputc()
2014-03-19 Tom.Shields
* output.c: rename MAXSHORT to MAXYYINT
2014-03-18 Tom.Shields
* yaccpar.skel: skeleton with btyacc additions
* NOTES-btyacc-Changes: byacc-btyacc-20140323
* defs.h:
several changes to help decouple the use of 'short' as the type of value
used in yacc parsers.
* NOTES-btyacc-Disposition: byacc-btyacc-20140323
2014-03-17 Tom.Shields
* skel2c, yaccpar.skel, yaccpar.skel.old: RCS_BASE
* configure.in: add --with-max-table-size and --enable-btyacc options
2014-03-16 Tom.Shields
* main.c: use Value_t rather than short
2014-02-18 Tom.Shields
* lr0.c, graph.c: use Value_t rather than short
* closure.c: use Value_t rather than short
ifdef'd forward-reference prototypes to match ifdef'ing of the actual functions
* lalr.c: rename MAXSHORT to MAXYYINT
2014-01-01 Thomas E. Dickey <dickey@invisible-island.net>
* yacc.1: document %token-table, improve presentation of double-quotes
* VERSION: bump
* output.c, skeleton.c:
amend the last change so that yytname is #define'd as needed rather than
permanent - to avoid breaking cproto for instance.
2014-01-01 Christos.Zoulas
* output.c, defs.h, main.c, reader.c, skeleton.c:
changes to build ntpd using byacc:
- rename yyname[] to yytname[]
- add YYTRANSLATE() macro
- recognize bison's %token-table declaration
2014-01-01 Thomas E. Dickey <dickey@invisible-island.net>
* configure: regen
* yacc.1: s/EE/XE/ to work around groff bug on Debian 6
* makefile.in: use CF_MAKE_DOCS
* aclocal.m4: add CF_MAKE_DOCS
* configure.in: use CF_MAKE_DOCS
2013-12-26 Thomas E. Dickey <dickey@invisible-island.net>
* config.guess: 2013-11-29
2013-11-19 Thomas E. Dickey <dickey@invisible-island.net>
* aclocal.m4: resync with my-autoconf (fixes for clang and mingw)
2013-10-25 Thomas E. Dickey <dickey@invisible-island.net>
* config.sub: 2013-10-01
2013-09-25 Thomas E. Dickey <dickey@invisible-island.net>
* reader.c: fix two loop-limits found by clang 3.3 --analyze
* configure: regen
* aclocal.m4:
tweaks to CF_MIXEDCASE_FILENAMES and CF_XOPEN_SOURCE for msys from ncurses
* skeleton.c:
Increase default stack-size to match FreeBSD version noted as from
"BSD 4.4 Lite Usr.bin Sources". See
http://svnweb.freebsd.org/base/vendor/CSRG/dist/usr.bin/yacc/
http://svnweb.freebsd.org/base/head/usr.bin/yacc/
http://svnweb.freebsd.org/base/vendor/byacc/
The original 1.9 sources (on which I based development) used 500 for
stacksize; the BSD Lite sources (a year or two later) used 10000.
This is a change to default values; the YYMAXDEPTH and YYSTACKSIZE
symbols have "always" been overridable by applications, but rarely
needed to do this. RedHat began using the FreeBSD source in 2000,
and switched to this source in 2007 using the 20050813 snapshot.
RedHat #743343 misattributed the change in default stacksize to
a regression in byacc, but did not report the issue upstream.
* VERSION: bump
2013-09-07 Thomas E. Dickey <dickey@invisible-island.net>
* config.sub: update to 2013-09-15
* config.guess: update to 2013-06-10
2013-03-04 Thomas E. Dickey <dickey@invisible-island.net>
* VERSION: bump
* aclocal.m4:
adapt tweak from Dave Becket to work around long-ago breakage in "new" autoconf.
* output.c:
fix bogus #include if "-i" is given but not "-d" (report by Richard Mitton).
also while testing that, found a case where the union_file is unused; added
a check for address that.
* skeleton.c: quiet a gcc conversion-warning in yygrowstack()
* configure: regen
* aclocal.m4:
another fix for CF_GCC_VERSION to handle Debian's modification of gcc message.
2013-02-10 Thomas E. Dickey <dickey@invisible-island.net>
* config.sub, config.guess: update to 2013-02-04
2012-10-03 Thomas E. Dickey <dickey@invisible-island.net>
* VERSION: bump
* configure: regen
* configure.in: moved AC_PROG_CC_STDC call into CF_PROG_CC
* aclocal.m4:
moved AC_PROG_CC_STDC call into CF_PROG_CC and (for other uses than byacc)
the CF_PROG_CC macro provides the CF_ANSI_CC_REQD for the 2.13 flavor.
* aclocal.m4, configure.in:
Arian's change dropped my check for misused $CC variable - restore that with
alternate macro CF_PROG_CC.
2012-10-03 Adrian.Bunk
* aclocal.m4:
suggested patch: drop CF_ANSI_CC_REQD, CF_ANSI_CC_CHECK, CF_PROG_EXT since
they are not needed.
2012-10-03 Thomas E. Dickey <dickey@invisible-island.net>
* aclocal.m4:
split-out CF_CC_ENV_FLAGS from CF_ANSI_CC_CHECK to avoid losing it in
Adrian's suggested changes.
* aclocal.m4:
CF_CLANG_COMPILER - check if the given compiler is really clang.
* aclocal.m4:
add check for clang to CF_GCC_WARNINGS. modify CF_GCC_WARNINGS to work around
old gcc warning: ncurses change to (try to) use gnatgcc exposed gnatgcc 2.8.1
on my Sarge system (versus 3.3.5 for the normal gcc). The 2.8.1's
pointer-arithmetic checks fell afoul of gcc's misuse of void* in string.h; work
around by excluding that check for pre-3.x compilers.
* aclocal.m4:
modify CF_GCC_ATTRIBUTES so that autoheader is able to see the definitions
provided by this macro. use AC_DEFINE_UNQUOTED() in CF_GCC_ATTRIBUTES rather
than appending to confdefs.h, since long-ago concern about the ability to
pass-through parameterized macros appears to be not a problem, testing with
2.13 and 2.52
2012-10-03 Adrian.Bunk
* aclocal.m4:
add parameter to AC_DEFINE_UNQUOTED() to allow it to be recognized by
autoheader, updated macros:
CF_CHECK_CACHE
CF_DISABLE_LEAKS
CF_MKSTEMP
CF_MIXEDCASE_FILENAMES
CF_NO_LEAKS_OPTION
2012-10-03 Thomas E. Dickey <dickey@invisible-island.net>
* aclocal.m4:
move existence-check for mkstemp out of the AC_TRY_RUN, to help with
cross-compiles
2012-10-02 Thomas E. Dickey <dickey@invisible-island.net>
* config_h.in:
Adrian Bunk request - replace this with the output from autoheader
2012-09-29 Adrian.Bunk
* configure.in:
suggested change: replace CF_ANSI_CC_REQD by AC_PROG_CC_STDC (since no
check is needed anymore for standard C compilers), drop AC_CONST (same
reason), modify AC_OUTPUT to rely upon template generated by autoheader.
bump requirement to autoconf 2.52.20011201 and drop check for CF_PROG_EXT
as being obsolete with autoconf 2.52x
* configure.in, main.c: drop check for atexit, because it is standard C
* makefile.in: add assignment for datarootdir variable.
2012-05-26 Thomas E. Dickey <dickey@invisible-island.net>
* VERSION: bump
* reader.c:
some versions of gcc may warn that bp is not set in mark_symbol, e.g.,
if GCC_NORETURN is not handled; appease the compiler.
* reader.c:
use the declared types Assoc_t and Value_t in some places where compiler only
cared about char versus short.
* reader.c:
use TMALLOC() and TREALLOC() macros to simplify allocation/reallocation
(no object change)
* defs.h:
add fallbacks for GCC_NORETURN and GCC_UNUSED to make it simpler for *BSD
packagers to build without configure script. Also remove duplicate declaration
of pure_parser variable (prompted by patch by Baptiste Daroussin).
Also define new TMALLOC and TREALLOC macros to simplify/replace MALLOC and
REALLOC macros.
* symtab.c:
use TMALLOC() and TREALLOC() macros to simplify allocation/reallocation
(no object change)
2012-05-25 Thomas E. Dickey <dickey@invisible-island.net>
* output.c, main.c, verbose.c, mkpar.c, lr0.c:
use TMALLOC() and TREALLOC() macros to simplify allocation/reallocation
(no object change)
2012-01-15 Thomas E. Dickey <dickey@invisible-island.net>
* VERSION: bump
* makefile.in:
ensure that check_make rule depends on having byacc built.
* yacc.1:
in testing, found that %expect did not work as documented for bison.
do not recommend it for portable code.
* yacc.1: comment on "-y" and "-P" options.
* yacc.1: comment on portability
2012-01-14 Thomas E. Dickey <dickey@invisible-island.net>
* output.c: Several changes:
a) add YYLEX_PARAM_TYPE, like YYPARSE_PARAM_TYPE, but for yylex.
b) modify definitions for YYLEX_DECL to be more like YYPARSE_DECL,
using YYLEX_PARAM_TYPE and YYLEX_PARAM.
c) add ifdef's around #define's for YYERROR_DECL and YYERROR_CALL,
to help with redefinitions.
2012-01-13 Thomas E. Dickey <dickey@invisible-island.net>
* VERSION: bump
* yacc.1: improve documentation of -s option
* yacc.1: note that yacc ignores -y
* main.c: add -s option to usage message.
* configure: regen
* aclocal.m4: resync with my-autoconf, i.e., fixes for CF_XOPEN_SOURCE
2011-12-19 Thomas E. Dickey <dickey@invisible-island.net>
* VERSION: bump
* yacc.1, output.c, main.c, defs.h:
add "-s" option to suppress generating #define's based on string contents
in a %token statement. For instance
%token EQLS "Equals"
would generate
#define EQLS 256
#define Equals 257
Simply suppressing the second #define makes the behavior closer to yacc.
(report by Paulo Andrade).
2011-09-08 Thomas E. Dickey <dickey@invisible-island.net>
* VERSION: bump
* output.c:
fix some more interaction between -i and -d flags to ensure YYERRCODE
and YYSTYPE are declared, tested with cproto.
2011-09-07 Thomas E. Dickey <dickey@invisible-island.net>
* yacc.1: document "-i" option.
* VERSION: bump
* output.c: fix an interaction between -i and -d
* skeleton.c, output.c, defs.h: changes to support "-i" option.
2011-09-06 Thomas E. Dickey <dickey@invisible-island.net>
* reader.c: pass explicit file-pointer to write_section()
* main.c:
add "-i" option, to generate interface-file (suggested by Denis M. Wilson)
2011-09-05 Thomas E. Dickey <dickey@invisible-island.net>
* configure: regen
* aclocal.m4:
resync with my-autoconf: CF_ANSI_CC_CHECK (check for $CFLAGS in $CC)
and CF_XOPEN_SOURCE (update aix, cygwin and netbsd checks)
* defs.h, error.c, reader.c:
add check for missing "}" on %parse-param and %lex-param lines (report by Denis M Wilson)
2011-04-01 Thomas E. Dickey <dickey@invisible-island.net>
* config.sub: update to 2011-04-01
2011-02-02 Thomas E. Dickey <dickey@invisible-island.net>
* config.guess: update to 2011-01-01
2010-12-29 Thomas E. Dickey <dickey@invisible-island.net>
* defs.h, skeleton.c:
add const qualifier to skeleton data, per NetBSD changes (report by Christos Zoulas)
* defs.h:
mark all of the error-functions as non-returning (report by Christos Zoulas)
* skeleton.c:
use only realloc() rather than realloc+malloc, agree that systems needing this
are very rare (prompted by NetBSD change).
* skeleton.c:
remove explicit prototype for yylex() via YYLEX_DECL() macro, since that
would prevent declaring yylex() static (request by Christos Zoulas).
2010-12-29 Christos.Zoulas
* output.c: correct definition for YYERROR_DECL()
2010-12-29 Thomas E. Dickey <dickey@invisible-island.net>
* VERSION: bump
2010-12-26 Thomas E. Dickey <dickey@invisible-island.net>
* defs.h, main.c:
change return-type of allocate() to avoid warnings of alignment problems
* main.c: Solaris declares chmod() in <sys/stat.h>
* configure: regen
* main.c: ifdef'd use of fcntl.h
* configure.in: add configure checks for fcntl.h, atexit and mkstemp
* main.c: for cases where mkstemp() is not available, use tempnam/open
* aclocal.m4: add CF_MKSTEMP
* aclocal.m4:
improve quoting, deprecate ${name-value} in favor of standard ${name:-value}
2010-12-25 Thomas E. Dickey <dickey@invisible-island.net>
* main.c:
start revising use of tmpfile(), to make this work with MinGW. Start by
implementing a mkstemp() alternative - noting that mkstemp() also is broken
for MinGW.
* VERSION: bump
2010-11-27 Thomas E. Dickey <dickey@invisible-island.net>
* VERSION: bump
* output.c:
corrected use of %parse-param value in yyerror(); it doesn't use &yylval
(report by Clifford Yapp)
2010-11-26 Thomas E. Dickey <dickey@invisible-island.net>
* skeleton.c: typo
* output.c:
correct line-numbering when "-r" option is used; the 'outline' variable
should only be incremented when writing to the code-file.
* yacc.1: bump date
* yacc.1: comment on -b option vs -r
* output.c:
improve on YYERROR_DECL(), adding dummy params which can be used for the
actual function declaration. Also add YYERROR_CALL(). The two macros
simplify maintaining sets of grammars which may/may not be pure.
* output.c: generate yyerror() calls in output.c
This is for compatibility with bison, which passes the yylval to yyerror
when the %parse-param feature is used.
* skeleton.c, defs.h: generate yyerror() calls in output.c
* output.c: simplified a little, using putc_code() and putl_code()
* reader.c:
improve ifdef for YYSTYPE union declaration (report by Clifford Yapp)
* reader.c:
accept underscore as a replacement for dash in command names, e.g.,
"%pure_parser" vs "%pure-parser".
* output.c, reader.c:
also ifdef YYSTYPE declaration in the generated code (report by Clifford Yapp)
* VERSION: bump
2010-11-24 Thomas E. Dickey <dickey@invisible-island.net>
* main.c, defs.h, symtab.c, error.c: reduce global variables
* VERSION: bump
* reader.c:
amend fix for Redhat #112617 to still call default_action_warning() for
empty rules (report by Bruce Cran).
2010-11-22 Thomas E. Dickey <dickey@invisible-island.net>
* output.c:
add ifdef to guard against redefinition of YYSTYPE union (request by Clifford Yapp).
* output.c: compensate for fix in reader.c
* reader.c:
add/use putc_both() and puts_both(), incidentally fixing a place where
a union copied to the union_file may be missing the end of the last line.
* VERSION: bump
2010-09-28 Thomas E. Dickey <dickey@invisible-island.net>
* config.guess: update to 2010-09-24
2010-09-10 Thomas E. Dickey <dickey@invisible-island.net>
* config.sub: update to 2010-09-11
2010-06-10 Thomas E. Dickey <dickey@invisible-island.net>
* yacc.1, VERSION: bump to 2010/06/10
2010-06-09 Thomas E. Dickey <dickey@invisible-island.net>
* reader.c: free declarations in leak-testing code.
* main.c: close code_file if -r option used, for leak-testing
* defs.h, reader.c, output.c:
improve %lex-param / %parse-param implementation by allowing for arrays to
be passed as parameters, e.g., "int regs[26]".
* makefile.in: add docs-rule, for html/pdf/txt form of manpage
* configure: regen
* aclocal.m4: add CF_XOPEN_SOURCE, etc.
* configure.in:
use CF_XOPEN_SOURCE check to ensure that strdup is in scope, e.g., for c89
* reader.c, symtab.c, verbose.c, lr0.c, main.c, mkpar.c, output.c, defs.h, closure.c:
fix warnings from clang --analyze
2010-06-08 Thomas E. Dickey <dickey@invisible-island.net>
* output.c: fix to build with c89, etc.
* reader.c: gcc warning
* output.c:
move call for output_stype() earlier since it is used in pure-parser declarations
* yacc.1: document %lex-param and %parse-param
* makefile.in:
add check_make and check_lint rules to help validate the generated files
in the test-directory
2010-06-07 Thomas E. Dickey <dickey@invisible-island.net>
* main.c: add "-P" to usage message
* reader.c: use UCH() macro to hide casts.
2010-06-07 Andres.Mejia
* main.c, output.c, reader.c, defs.h, skeleton.c:
Fix the output order of the generated parse code file. This allows for
the use of YYPARSE_PARAM, by having the output that checks for
YYPARSE_PARAM to be defined come after the C code block in the
definitions section of a yacc file.
Implement support for YYLEX_PARAM, similar to bison. This is useful for
support for building reentrant lexers with flex.
Fix a compatibility issue with bison's pure-parser option. Bison
defines yylex as sending at least one parameter, &yylval, as the first
parameter and doesn't seem to have an easy way to remove that parameter.
This on the other hand is rather convenient to support saving to yylval
from flex when building reentrant lexers and parsers.
Add support for the %parse-param and %lex-param directives used in
bison. This change bears some similarity to NetBSD's changes to byacc
at http://www.mail-archive.com/source-changes-full@netbsd.org/msg08143.html
Bison allows for POSIX yacc emulation via a yacc directive in the yacc
file, and also via a command line switch. Implement this feature as a
no-op for byacc, since byacc is designed to be POSIX yacc compatible
anyway. This allows for better compatibility with yacc sources written
for bison.
2010-06-07 Thomas E. Dickey <dickey@invisible-island.net>
* VERSION: bump to 2010/06/07
2010-06-06 Thomas E. Dickey <dickey@invisible-island.net>
* configure: regen
* skeleton.c:
move #include's down into the generated code, to allow user-defined code
to override feature definitions, particularly with stdlib.h (request by
Marcus Kool).
* lr0.c, error.c, reader.c, defs.h:
strict gcc 3.4.6 warnings on 64-bit platform
* aclocal.m4, configure.in: add check for lint
* makefile.in: add lint rule
* defs.h, closure.c, lr0.c, warshall.c, main.c:
fix gcc warnings, mostly for 64-bit platform
* aclocal.m4:
add macros for checking ctags/etags, e.g., to work with NetBSD pkgsrc
* makefile.in: add etags/TAGS if available
* configure.in: add configure check for actual ctags and etags programs
* makefile.in: drop mkdirs.sh, just use "mkdir -p"
* AUTHORS: nicknames for some contributors (see CHANGES for details)
* VERSION: bump to 2010/06/06
* aclocal.m4: add copyright notice, from "my-autoconf" macros
http://invisible-island.net/autoconf/autoconf.html
* aclocal.m4: resync with my-autoconf. summary of changes:
a) CF_ADD_CFLAGS, etc., improve quoting of ifelse() parameter
b) CF_DISABLE_ECHO, change indent-convention for substituted makefile
c) CF_GCC_VERSION, ignore stderr
d) CF_GCC_WARNINGS, adjust options to work with c89 wrapper of gcc
2010-02-16 Thomas E. Dickey <dickey@invisible-island.net>
* yacc.1: document -P and bison-extensions
* output.c: implement %pure-parser
* skeleton.c:
implement %pure-parser, like bison. To help with this, changed the stack
variables, putting them into a struct.
* reader.c: implement %pure-parser
* defs.h: modified skeleton to support %pure-parser feature
* main.c: add -P option to set %pure-parser
* output.c:
make -r and -p options work together. The -r option splits the generated
parser into code/table files; for this case we cannot use static data.
Also, we have to repeat the #define's used for prefix (-p) as well as the
redeclaration of yyparse(). Finally, allow any of the prefixed names to
be overridden, e.g., by passing a -D option to the compiler. Make that
a little more readable by putting a blank line before each chunk.
* defs.h: add definitions for %pure-parser
* skeleton.c:
put blank line before/after the redeclaration of yyparse()
* output.c: allow for other program redefining yylex()
* skeleton.c:
split-off xdecls[] array, to move declaration of yyparse() after #define's
* defs.h: split-out xdecls[]
* VERSION: bump
* configure: regen
* aclocal.m4: add CF_REMOVE_DEFINE, needed by CF_ADD_CFLAGS
* aclocal.m4:
resync with my-autoconf CF_ADD_CFLAGS and CF_DISABLE_ECHO changes.
2010-02-16 Ostap.Cherkashi
* skeleton.c: fix a memory leak in the generated skeleton
2009-12-31 Thomas E. Dickey <dickey@invisible-island.net>
* config.guess: update to 2009-12-30
* config.sub: update to 2009-12-31
2009-10-27 Thomas E. Dickey <dickey@invisible-island.net>
* VERSION: 20091027
* output.c, mkpar.c, defs.h, lalr.c, closure.c, graph.c, lr0.c, verbose.c, main.c, reader.c:
strict compiler warnings
2009-10-26 Thomas E. Dickey <dickey@invisible-island.net>
* main.c, defs.h: introduce some typedefs for portability, etc.
* makefile.in:
don't remove "*.log" in mostlyclean rule since it interferes with regression
script.
* configure: regen
* aclocal.m4: resync with my-autoconf
2009-08-25 Thomas E. Dickey <dickey@invisible-island.net>
* config.guess, config.sub: update to 2009-08-19
2009-02-21 Thomas E. Dickey <dickey@invisible-island.net>
* VERSION: bump
* output.c: restore "yylval" symbol, omitted in cleanup on 2008/8/25
2008-12-26 Thomas E. Dickey <dickey@invisible-island.net>
* configure: regen with autoconf-2.52 (patched)
2008-12-24 Thomas E. Dickey <dickey@invisible-island.net>
* VERSION: bump
* skeleton.c:
remove ifdef-lint from goto yyerrlab, to quiet gcc warning
2008-11-26 Thomas E. Dickey <dickey@invisible-island.net>
* verbose.c, main.c, defs.h, mkpar.c, reader.c:
completed implementation of "%expect" (report by Perry E. Metzger).
add "%expect-rr", which is (unlike bison) allowable in LALR parsers.
2008-11-24 Thomas E. Dickey <dickey@invisible-island.net>
* closure.c, defs.h, error.c, graph.c, lalr.c, lr0.c, main.c, mkpar.c, output.c, reader.c, skeleton.c, symtab.c, verbose.c, warshall.c:
change indent-style (request by Perry E. Metzger)
2008-08-27 Thomas E. Dickey <dickey@invisible-island.net>
* VERSION: bump
* skeleton.c:
better implementation of YYPARSE_PARAM, using YYPARSE_DECL() macro
* skeleton.c:
change YYRECOVERING to YYRECOVERING(), for compatibility with other yacc's.
* configure: regen'd
* configure.in: add -Wwrite-strings to warnings
* skeleton.c:
add YYPARSE_PARAM (bison) and YYPARSE_PARAM_TYPE (FreeBSD) features.
* main.c, defs.h, output.c, skeleton.c, symtab.c, error.c, reader.c:
fixes for gcc -Wwrite-strings
* output.c: realign columns in start_table()
* output.c:
generate the tables as static-const (this is an interface change)
* output.c: reorder functions to eliminate forward-references
2008-08-26 Thomas E. Dickey <dickey@invisible-island.net>
* warshall.c, verbose.c, symtab.c, skeleton.c, reader.c, output.c, mkpar.c, main.c, lr0.c, lalr.c, graph.c, error.c, closure.c:
remove 'register' keywords
2008-08-25 Thomas E. Dickey <dickey@invisible-island.net>
* reader.c:
improve the left-curly fix by testing after blanks, to avoid having a
" {" at the beginning of a line.
* output.c:
move the remaining newline-counting into write_XXX functions.
* output.c:
simplify part of the output_file formatting using new functions, e.g.,
start_int_table(), output_newline().
* reader.c:
modify copy_action() to indent the first character, it if is is left-curly
brace. That makes the output look more like the original, as well as makes
it simpler to edit (not confuse editors which look for a left-curly in the
first column as if it were the beginning of a function).
* skeleton.c: minor fixes to avoid gcc -Wconversion warnings
* output.c: align the #define's produced for "-p" option
* output.c: simplify output_prefix() with new define_prefixed()
* skeleton.c: include string.h, for memset()
change stack size to unsigned to fix gcc -Wconversion warnings.
* VERSION: bump to 2008/8/25
* makefile.in: add dependency on VERSION file.
2008-08-24 Thomas E. Dickey <dickey@invisible-island.net>
* VERSION: bump
* lalr.c: improved memory-leak checking by freeing data in includes[]
* configure: regen'd
* skeleton.c: Add fix for stack discussed
http://undeadly.org/cgi?action=article&sid=20080708155228
and applied
http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/yacc/skeleton.c.diff?r1=1.28&r2=1.29
* aclocal.m4: resync with my-autoconf (no major changes)
2008-03-14 Thomas E. Dickey <dickey@invisible-island.net>
* config.sub: update to 2008-03-08
* config.guess: update to 2008-03-12
2007-05-09 Thomas E. Dickey <dickey@invisible-island.net>
* main.c: close graph, verbose files if opened, on exit.
* main.c:
audit memory leaks - valgrind reported some memory still in use on exit.
* lalr.c, output.c, reader.c, mkpar.c, lr0.c:
add hook for auditing memory leaks
* defs.h: add hooks for auditing memory leaks
* configure: regen'd
* configure.in:
use CF_DISABLE_LEAKS, which combines --disable-leaks, --with-valgrind,
--with-dbmalloc and --with-dmalloc
* aclocal.m4: add CF_DISABLE_LEAKS and CF_WITH_VALGRIND
* aclocal.m4: improve version-checking in CF_GCC_VERSION
rework dbmalloc/dmalloc options using CF_NO_LEAKS_OPTION macro
* VERSION: 2007/5/9
* main.c: file_prefix did not always have a trailing null.
2007-03-25 Thomas E. Dickey <dickey@invisible-island.net>
* mkdirs.sh: improved version for "make -j"
2006-12-22 Thomas E. Dickey <dickey@invisible-island.net>
* config.guess: update to 2006/12/22
2006-12-08 Thomas E. Dickey <dickey@invisible-island.net>
* config.sub: update to 2006/12/08
2005-08-13 Thomas E. Dickey <dickey@invisible-island.net>
* main.c: add -V to usage message
* makefile.in: remove -t option from ctags
* VERSION: 2005/8/13
2005-08-13 schmitz
* main.c: Sylvain Schmitz:
modify the '-o' option to work like bison's, which sets the file-prefix.
2005-08-13 Matt.Kraai
* output.c:
Debian #322858 (don't close union_file, which contained data).
This feature is used in groff.
2005-08-13 Thomas E. Dickey <dickey@invisible-island.net>
* configure: regenerated
* aclocal.m4: improve checks for Intel compiler warnings
2005-06-25 Thomas E. Dickey <dickey@invisible-island.net>
* config.sub: update to 2005/6/2
* config.guess: update to 2005/5/27
2005-05-05 Thomas E. Dickey <dickey@invisible-island.net>
* defs.h: add a fallback for GCC_UNUSED
2005-05-04 Thomas E. Dickey <dickey@invisible-island.net>
* makefile.in: add "." to include-path to pickup config.h
* reader.c:
apply fix suggested by Steve Dum for end_rule() in Redhat Bugzilla #112617.
* output.c:
correct a limit check in pack_vector() - report/analysis by William Evans
* main.c:
exit after printing version. Otherwise "yacc -V" will exit with an erro
after printing the usage message.
* skeleton.c: replace a few -1's with YYEMPTY
* skeleton.c:
delete yynewerror (no one uses it any more, and it just makes compiler warnings)
* skeleton.c: adapt yygrowstack() and related definitions from FreeBSD
* yacc.1: add -V option
* main.c: add -V option to print the version.
simplify option-parsing by moving the duplicate logic for setting flags into
new function setflag().
* skeleton.c:
move the actual definition of YYMAJOR and YYMINOR to defs.h (as numbers).
add YYPATCH here so it can be tested by applications.
* defs.h:
add macros to define VERSION in terms of the (numeric) YYMAJOR, YYMINOR and
YYPATCH symbols.
* lalr.c, lr0.c, mkpar.c, defs.h, closure.c, warshall.c, output.c, verbose.c, graph.c, reader.c, main.c, symtab.c:
reduce externs by making static the procedures that are not referenced outside
the module in which they are defined.
* makefile.in:
the VERSION file holds the patch-date. Define YYPATCH, so this will be
compiled into the skeleton.
* VERSION: patch-level for byacc
* main.c:
add "-o" to usage message. It is too long for a single line; rewrite usage()
to show one option per line.
2005-05-03 Thomas E. Dickey <dickey@invisible-island.net>
* main.c: add -o option, to work with scripts that assume bison.
simplify create_file_names() with a macro.
simplify done() with a macro.
adapt fix from FreeBSD for signal race, e.g., if done() is interrupted by
onintr(), do not flush output via exit(), but use _exit() instead.
* defs.h: remove unnecessary externs for main.c
* yacc.1: add -o option
* graph.c: remove unused parameter
* mkpar.c, defs.h, reader.c:
add support for "%expect", a bison feature from FreeBSD sources
* lr0.c, reader.c, main.c, skeleton.c, graph.c, symtab.c, closure.c, mkpar.c, lalr.c, error.c, warshall.c, verbose.c, output.c:
indent'd
* configure: regenerated for 2005/5/5
* aclocal.m4: miscellaneous updates (adds CF_INTEL_COMPILER)
2005-04-27 schmitz
* defs.h, graph.c, lr0.c, main.c, makefile.in, reader.c, yacc.1:
Sylvain Schmitz <schmitz@i3s.unice.fr>:
add graphical output of the LALR(1) automaton for graphviz,
associated with command-line option `-g'
2005-04-16 Thomas E. Dickey <dickey@invisible-island.net>
* config.sub: update to 2005/2/10
* config.guess: update to 2005/3/24
2004-03-28 Thomas E. Dickey <dickey@invisible-island.net>
* configure: RCS_BASE
* configure.in:
add AC_ARG_PROGRAM to make --program-prefix, etc., work.
* makefile.in: first cut of script to support --program-prefix
* configure.in:
reorder AC_INIT/AC_CONFIG_HEADER to make this "work" with autoconf 2.52
* makefile.in: modify so DESTDIR works
* makefile.in: use EXEEXT and OBJEXT
* configure.in: use CF_PROG_EXT
generate a config.h
* defs.h: make this use the generated config.h
* skeleton.c: add a forward-reference for yyparse()
* aclocal.m4: add CF_CHECK_CACHE, needed for CF_PROG_EXT
* yacc.1: remove the discussion of TMPDIR since it is obsolete
* skeleton.c: fix a couple of minor compiler-warnings in the skeleton
* defs.h: remove action_file_name, etc., since we use tmpfile() now.
* main.c:
use tmpfile() for opening the working files. This quiets a warning
advising the use of mkstemp().
* output.c:
Do not close temporary-files here, since they are opened with tmpfile().
Just rewind them, and they're ready to read back the data stored in them.
* makefile.in: turn on "make check" rule
* yacc.1: various typography fixes prompted by Debian #100947
* aclocal.m4, makefile.in, configure.in: RCS_BASE
* README: updated to note that this is not the original
2004-02-23 Thomas E. Dickey <dickey@invisible-island.net>
* config.sub: RCS_BASE
2004-02-17 Thomas E. Dickey <dickey@invisible-island.net>
* config.guess: RCS_BASE
2003-11-29 Thomas E. Dickey <dickey@invisible-island.net>
* install-sh: improved quoting
2002-06-29 Thomas E. Dickey <dickey@invisible-island.net>
* mkdirs.sh:
don't use character range, since some locales don't work as expected
2001-06-22 Thomas E. Dickey <dickey@clark.net>
* install-sh: RCS_BASE
2000-11-20 Thomas E. Dickey <dickey@clark.net>
* vmsbuild.com: original version
2000-02-14 Thomas E. Dickey <dickey@clark.net>
* main.c: fix for VMS port - making pathname for temp-file
* descrip.mms: original version
2000-02-13 Thomas E. Dickey <dickey@clark.net>
* defs.h, verbose.c, reader.c, main.c, skeleton.c, warshall.c, symtab.c, closure.c, mkpar.c, lalr.c, lr0.c, output.c, error.c:
ansify
1999-11-30 Thomas E. Dickey <dickey@clark.net>
* mkdirs.sh: RCS_BASE
1995-01-01 Thomas E. Dickey <dickey@clark.net>
* config_h.in: RCS_BASE
1993-12-23 unknown
* README.DOS, main.c: MSDOS-port
1993-12-22 unknown
* reader.c, defs.h: MSDOS-port
1993-03-02 unknown
* README: original version
1993-02-22 unknown
* skeleton.c, warshall.c, main.c, output.c, reader.c, closure.c, NOTES:
original version
1992-10-12 unknown
* yacc.1: original version
1992-10-11 unknown
* defs.h: original version
1991-01-20 unknown
* mkpar.c, verbose.c: original version
1991-01-14 unknown
* lr0.c, Makefile, Makefile.old: original version
1990-07-16 unknown
* NEW_FEATURES: original version
1990-06-03 unknown
* ACKNOWLEDGEMENTS: original version
1990-02-05 unknown
* symtab.c, lalr.c, error.c: original version
1989-11-22 unknown
* NO_WARRANTY: original version