Commit Graph

15 Commits

Author SHA1 Message Date
Joel E. Denny
9ca7f077a0 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
* data/push.c: Rename to...
* data/yacc.c: ... this, overwriting it.
* etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
`%push-pull-parser' -> `%define api.push_pull "both"'.
Remove old yacc.c tests, and update push.c tests to yacc.c.
2008-02-17 19:55:48 +00:00
Paul Eggert
f16b08196c Update to GPLv3.
* doc/gpl-3.0.texi: New file.
* doc/gpl.texi: Remove.
* COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
* Makefile.maint, NEWS, PACKAGING, README, README-alpha:
* README-hacking, TODO, bootstrap, bootstrap.conf:
* configure.ac, data/Makefile.am, data/README, data/bison.m4:
* data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
* data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
* data/lalr1.cc, data/lalr1.java, data/location.cc:
* data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
* djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
* djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
* djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
* djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
* doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
* etc/bench.pl.in, examples/Makefile.am, examples/extexi:
* examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
* lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
* lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
* lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
* lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
* lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
* lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
* lib/timevar.c, lib/timevar.def, lib/timevar.h:
* lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
* m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
* m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
* src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
* src/complain.c, src/complain.h, src/conflicts.c:
* src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
* src/files.h, src/flex-scanner.h, src/getargs.c:
* src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
* src/lalr.c, src/lalr.h, src/location.c, src/location.h:
* src/main.c, src/muscle_tab.c, src/muscle_tab.h:
* src/nullable.c, src/nullable.h, src/output.c, src/output.h:
* src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
* src/print.c, src/print.h, src/print_graph.c:
* src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
* src/reduce.h, src/relation.c, src/relation.h:
* src/revision.h, src/scan-code.h, src/scan-code.l:
* src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
* src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
* src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
* src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
* tests/Makefile.am, tests/actions.at, tests/c++.at:
* tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
* tests/existing.at, tests/glr-regression.at:
* tests/headers.at, tests/input.at, tests/java.at:
* tests/local.at, tests/output.at, tests/push.at:
* tests/reduce.at, tests/regression.at, tests/sets.at:
* tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
* tests/torture.at:
Update to GPLv3.
2007-08-15 20:21:33 +00:00
Joel E. Denny
9603498306 * etc/.cvsignore: New. 2007-01-02 05:13:27 +00:00
Joel E. Denny
7172e23e8f For push mode, convert yyparse from a macro to a function, invoke yylex
instead of passing a yylexp argument to yypull_parse, and don't
generate yypull_parse or yyparse unless %push-pull-parser is declared.
Discussed starting at
<http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
* data/bison.m4 (b4_pull_if): New.
* data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
* data/push.c: Improve M4 quoting a little.
(b4_generate_macro_args, b4_parenthesize): Remove.
(yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
any time a pull parser is requested.
Don't #define this as a wrapper around yypull_parse.  Instead, when
both push and pull are requested, make it a function that does that
same thing.
(yypull_parse): If there's a b4_prefix, #define this to
b4_prefix[pull_parse] when both push and pull are requested.
Don't define this as a function unless both push and pull are
requested.
Remove the yylexp argument and hard-code yylex invocation instead.
* etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
%push-parser.
* src/getargs.c (pull_parser): New global initialized to true.
* getargs.h (pull_parser): extern it.
* src/output.c (prepare): Insert pull_flag muscle.
* src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
(prologue_declaration): Set both push_parser and pull_parser = true for
%push-pull-parser.  Set push_parser = true and pull_parser = false for
%push-parser.
* src/scan-gram.l: Don't accept %push_parser as an alternative to
%push-parser since there's no backward-compatibility concern here.
Scan %push-pull-parser.
* tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
instead of %push-parser.
* tests/headers.at (export YYLTYPE): Make yylex static, and don't
prototype it in the module that calls yyparse.
* tests/input.at (Torturing the Scanner): Likewise.
* tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
2006-12-31 20:29:48 +00:00
Joel E. Denny
2e7944cbb2 Update etc/bench.pl. Optimize push mode a little (the yyn change
deserves most of the credit).
* Makefile.am (SUBDIRS): Add etc subdirectory.
* configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
* data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
yytoken, yyval, and yyloc declarations to...
(yyparse or yypush_parse): ... here to improve performance.  For
yypush_parse invocations after the first, be sure to assign yyn its old
value again.
(yypstate_new): Don't bother initializing the yyresult field since the
initial value isn't used.
(yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
remove the #define that, in push mode, set it to yyps->NAME.
* etc/Makefile.am: New.
* etc/bench.pl: Remove and build it instead from...
* etc/bench.pl.in: ... this new file.  Use @abs_top_builddir@ to invoke
"tests/bison" from the build directory by default rather than just
invoking "bison" from $PATH.
(calc_grammar): Update push parser code: don't declare yylval globally,
don't define yyparse_wrapper, and don't #define yyparse.
(bench_grammar): Update to check all working combinations of yacc.c,
push.c, impure, pure, pull, and push.
2006-12-26 18:09:53 +00:00
Akim Demaille
ba9ecd1910 * etc/bench.pm: Shorten bench names. 2006-05-14 20:39:18 +00:00
Akim Demaille
3cedc2dc0d * etc/README, etc/bench.pl: New. 2006-04-24 08:35:44 +00:00
Paul Eggert
040984073a * NEWS: Version 2.0b.
* data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
the user's name space.  All uses changed to __attribute__
((__unused__)).
(yyFail, yyMemoryExhausted, yyreportAmbiguity):
Add __attribute__ ((__noreturn__)).

* etc/clcommit: Remove.  We weren't using it, and it failed
"make maintainer-distcheck".
* Makefile.maint: Merge from coreutils.
(CVS_LIST, CVS_LIST_EXCEPT): New macros.
(syntax-check-rules): Change list of rules as described below.
(sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
(sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
(sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
(sc_trailing_space): New rules.
(sc_xalloc_h_in_src): Remove.
(sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
(sc_space_tab, sc_error_exit_success, sc_changelog):
(sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
(makefile-check, po-check, author_mark_check):
(makefile_path_separator_check, copyright-check):
Use grep -n, to make it easier to find violations.
Use CVS_LIST and CVS_LIST_EXCEPT.
(header_regexp, h_re): Remove.
(dd_c): New macro.
(sc_dd_max_sym_length, .re-list, news-date-check): New rules.
(my-distcheck): Use more-modern GCC flags.
(signatures, %.asc): Remove.
(rel-files, announcement): Remove signatures.
Restore old updating code, even though we don't use it, so
that we're the same as coreutils.
(alpha, beta, major): Depend on news-date-check.
Make the upload commands.

* data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
* lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
* lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
* lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
* src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
* src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
* src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
* tests/sets.at: Likewise.

* data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
we comment out the Autoconf version number.
* doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
it's error-prone and "make maintainer-distcheck" rejects it.

* lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
Indent calls to "error" to pacify "make maintainer-distcheck",
when the calls are not intended to be translated.
* m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.

* src/Makefile.am (DEFS): Use +=, to pacify
"make maintainer-distcheck".
(bison_SOURCES): Add scan-skel.h.
(sc_tight_scope): New rule, from coreutils.

* src/files.c (src_extension, header_extension):
Now static, not extern.
* src/getargs.c (short_options): Likewise.
* src/muscle_tab.c (muscle_table): Likewise.
* src/parse-gram.y (current_class, current_type, current_prec):
Likewise.
* src/reader.c (grammar_end, previous_rule_end): Likewise.
* src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
* src/main.c (main): Cast bindtextdomain and textdomain calls to
void, to avoid warning when NLS is disabled.
* src/output.c: Include scan-skel.h.
(scan_skel): Remove decl, since scan-skel.h does this.
(output_skeleton):
Indent calls to "error" to pacify "make maintainer-distcheck".
* src/print_graph.c: Don't include <obstack.h>, as system.h does this.
* src/reader.h (gram_end, gram_lineno): New decls to pacify
"make maintainer-distcheck".
* src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
(skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
(skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
(skel_lex_destroy, scan_skel): Move these decls to...
* src/scan-skel.h: New file.
* src/uniqstr.c (uniqstr_assert):
Indent calls to "error" to pacify "make maintainer-distcheck".

* tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
not @VAR@.

* tests/torture.at: Revamp to avoid misuse of atoi that
"make maintainer-distcheck" complained about.
2005-07-24 07:24:22 +00:00
Robert Anisko
bbb5bcc6f8 Revert to 1.28c 2001-08-25 13:13:14 +00:00
Pascal Bart
713fa62a74 Fix clcommit. 2001-08-21 20:44:16 +00:00
Robert Anisko
83cd972a1a 2001-08-20 Robert Anisko <robert.anisko@epita.fr>
* src/output.c (prepare): Add prefixed names.
	(output_parser): Output semantic actions.
	(output_parser): Fix bug on '%%line' directives.

2001-08-19  Robert Anisko  <robert.anisko@epita.fr>

	* src/output.c (output_rule_data): Do not output tables to
	the table obstack.

	* src/reader.c (reader): Remove calls to 'output_headers' and
	'output_trailers'. Remove some C output.
	(readgram): Disable a piece of code that was writing a default
	definition for 'YYSTYPE'.
	(reader_output_yylsp): Remove.
	(packsymbols): Output token defintions to a macro.
	(copy_definition): Disable C output.

	* src/output.c (output_headers): Remove. The C code printed by this
	function should now be in the skeletons.
	(output_trailers): Remove.
	(output): Disable call to 'reader_output_yylsp'.

2001-08-18  Robert Anisko  <robert.anisko@epita.fr>

	* src/output.c: Remove some C dedicated output.

2001-08-18  Robert Anisko  <robert.anisko@epita.fr>

	* src/output.c (output_defines): Remove.

2001-08-18  Robert Anisko  <robert.anisko@epita.fr>

	* src/output.c: Improve the use of macro and output obstacks.

2001-08-18  Robert Anisko  <robert.anisko@epita.fr>

	* src/output.c (output_token_translations): Associate 'translate' table
	with a macro. No output to the table obstack.
	(output_gram): Same for 'rhs' and 'prhs'.
	(output_stos): Same for 'stos'.
	(output_rule_data): Same for 'r1' and 'r2'.
	(token_actions): Same for 'defact'.
	(goto_actions): Same for 'defgoto'.
	(output_base): Same for 'pact' and 'pgoto'.
	(output_table): Same for 'table'.
	(output_check): Same for 'check'.

2001-08-18  Robert Anisko  <robert.anisko@epita.fr>

	* src/output.c (output_table_data): New function.
	(output_short_table): Remove.
	(output_short_or_char_table): Remove.

2001-08-17  Robert Anisko  <robert.anisko@epita.fr>

	* src/main.c (main): Initialize the macro table.

2001-08-17  Robert Anisko  <robert.anisko@epita.fr>

	* src/output.c (output_parser): Use the macro table.
	* src/macrotab.c: New file.
	* src/macrotab.h: New file.

2001-08-17  Robert Anisko  <robert.anisko@epita.fr>

	* lib/xalloc.h (CALLOC, MALLOC, REALLOC): New macros.

2001-08-17  Robert Anisko  <robert.anisko@epita.fr>

	* lib/hash.c: New file.
	* lib/hash.h: New file.

2001-08-16  Robert Anisko  <robert.anisko@epita.fr>

	* src/reader.c (parse_macro_decl): Read macro identifiers using
	copy_identifier rather than lex.

2001-08-16  Robert Anisko  <robert.anisko@epita.fr>

	* src/reader.c (copy_identifier): New.

2001-08-16  Robert Anisko  <robert.anisko@epita.fr>

	* src/reader.c (read_declarations): Add case for macro definition.
	* src/lex.c (percent_table): Add tok_define.
	* src/lex.h: Add tok_define.

2001-08-16  Robert Anisko  <robert.anisko@epita.fr>

	* src/reader.c (parse_macro_decl): New function used to parse macro
	declarations.
	(copy_string2): Put the body of copy_string into this new function.
	Add a parameter to let the caller choose whether he wants to copy the
	string delimiters or not.
	(copy_string): Be a simple call to copy_string2 with the last argument
	bound to true.

2001-08-15  Robert Anisko  <robert.anisko@epita.fr>

	* src/output.c (output_parser): Replace most of the skeleton copy code
	with something new. Skeletons are now processed character by character
	rather than line by line, and Bison looks for '%%' macros. This is the
	first step in making Bison's output process (a lot) more flexible.
2001-08-21 19:47:13 +00:00
Akim Demaille
4e8ef709e6 Update. 2001-08-09 06:57:09 +00:00
Akim Demaille
f95997e708 Added ChangeLog to the repository.
Covers ./, src/, doc/, and po/.
2000-03-16 15:33:46 +00:00
Jesse Thilo
aefb051ce0 # Added clcommit script. 2000-03-10 21:15:47 +00:00
Jesse Thilo
65c7d7aa04 # Added script to build ChangeLogs 2000-03-09 18:01:20 +00:00