Commit Graph

35 Commits

Author SHA1 Message Date
Akim Demaille
5e147124b5 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
* lib/Makefile.am (libbison_a_SOURCES): Adjust.
2001-11-26 09:35:38 +00:00
Akim Demaille
c64a20f3dc * lib/alloca.c: Update, from fileutils. 2001-11-23 14:56:30 +00:00
Akim Demaille
5b0d29bb52 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@. 2001-11-23 14:19:09 +00:00
Paul Eggert
4a0d893695 Sync with fileutils 4.1.1. 2001-10-26 07:26:00 +00:00
Akim Demaille
490abf53b1 More ignores. 2001-10-18 15:27:30 +00:00
Akim Demaille
004b178558 Remove. 2001-10-10 15:36:26 +00:00
Akim Demaille
ee006e3a4c Adjust. 2001-10-04 15:12:55 +00:00
Akim Demaille
342b8b6e21 Merge in branch-1_29. 2001-10-04 14:55:21 +00:00
Akim Demaille
3a7bc75ff7 Remove for the repo. 2001-10-04 13:21:02 +00:00
Pascal Bart
a474de9b9a Regen. 2001-09-20 19:11:28 +00:00
Robert Anisko
944bc6ce43 Regen. 2001-08-25 15:40:51 +00:00
Robert Anisko
9c76d118cc * lib/Makefile.am: Adjust. 2001-08-25 15:28:07 +00:00
Robert Anisko
68bd3b6bfa * lib/hash.c: New file.
* lib/hash.h: New file.
* lib/Makefile.am: Update.
2001-08-25 14:15:11 +00:00
Robert Anisko
bbb5bcc6f8 Revert to 1.28c 2001-08-25 13:13:14 +00:00
Pascal Bart
667a550e7b More cvsignore. 2001-08-23 22:51:37 +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
79282c6c57 alloca.c, alloca.h and allocate.c are really to be removed. 2001-08-13 14:54:50 +00:00
Akim Demaille
b0ce604668 * src/getargs.c, src/getarg.h (skeleton)): Constify.
* src/lex.c (literalchar): Avoid name clashes on `buf'.
* src/getargs.c: Include complain.h.
* src/files.c, src/files.h (skeleton_find): Avoid name clashes.
* lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
2001-08-03 08:48:49 +00:00
Akim Demaille
53b74c0c4c * lib/strspn.c: New. 2001-08-03 08:09:03 +00:00
Akim Demaille
1e24cc5b41 * config/: New.
* configure.in: Require Autoconf 2.50.
Update to gettext 0.10.38.
2001-07-14 17:27:59 +00:00
Akim Demaille
5141b01619 * m4/strerror_r.m4: New.
* m4/error.m4: Run AC_FUNC_STRERROR_R.
* lib/error.h, lib/error.c: Update.
2001-03-16 14:50:40 +00:00
Akim Demaille
18569462db * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
New, from fileutils 4.0.37.
* configure.in: Require Autoconf 2.49c.  I took some time before
making this decision.  This is the only way out for portability
issues in Bison, it would mean way too much duplicate effort to
import in Bison features implemented in 2.49c since 2.13.
AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
2001-02-08 14:32:10 +00:00
Akim Demaille
0d8f3c8a7a * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
* lib/xalloc.h, lib/xmalloc.c@ Update.
2001-02-02 14:56:44 +00:00
Jesse Thilo
7400308fa3 Added remaining files needed to build from a clean check-out. 2001-01-21 16:43:58 +00:00
Akim Demaille
705db0b507 Hopefully added to the repository all the distributed files. 2001-01-15 13:46:43 +00:00
Akim Demaille
d7045ec672 * lib/obstack.h: Formatting changes.
(obstack_grow, obstack_grow0): Don't cast WHERE at all: it
prevents type checking.
(obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
cast the value to (void *): assigning a `foo *' to a `void *'
variable is valid.
(obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
* src/reader.c (parse_union_decl): Typo: use obstack_1grow to
append characters.
2000-11-17 14:14:36 +00:00
Akim Demaille
8a4f41d6ed * src/output.c (output): Remove useless variables.
* lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
argument `data' for consistency with the prototypes.
Qualify it `const'.
(obstack_copy, obstack_copy0): Rename the second argument as
`address' for consistency.  Qualify it `const'.
* lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
(obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
`const' their input argument (`data' or `address').
Adjust the corresponding macros to include `const' in casts.
2000-11-07 11:54:01 +00:00
Akim Demaille
8c7ebe4946 Introduce obstacks.
Change each use of `faction' into a use of `action_obstack'.
* lib/obstack.h, lib/obstack.c: New files.
* src/files.c (faction): Remove.
(action_obstack): New.
Adjust all dependencies.
2000-11-01 16:03:50 +00:00
Akim Demaille
77aee78982 * lib/quote.h (PARAMS): New macro. Use it. 2000-10-20 09:22:45 +00:00
Akim Demaille
ff4a34be27 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
* m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
New files, from Fileutils 4.0.27.
* src/main.c (printable_version): Remove.
* src/lex.c, src/reader.c: Use `quote'.


* lib/error.c, lib/error.h: New files, needed by xmalloc.c.
2000-10-16 17:28:41 +00:00
Akim Demaille
95e36146a5 * lib/xstrdup.c: New file, from the fileutils.
* src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
(parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
instead of strlen + xmalloc + strcpy.
* src/symtab.c (copys): Remove, use xstrdup instead.
2000-10-02 09:01:19 +00:00
Akim Demaille
d7913476c4 Use the more standard files xalloc.h' and xmalloc.c' instead of
Bison's `allocate.c' and `alloc.h'.  This patch was surprisingly
difficult and introduced a lot of core dump.  It turns out that
Bison used an implementation of `xmalloc' based on `calloc', and
at various places it does depend upon the initialization to 0.  I
have not tried to isolate the pertinent places, and all the former
calls to Bison's `xmalloc' are now using `XCALLOC'.  Someday,
someone should address this issue.
* src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
* lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
files.
Adjust dependencies.
* src/warshall.h: New file.
Propagate.
2000-10-02 08:48:32 +00:00
Akim Demaille
a0f6b07611 Clean the error reporting functions.
* src/report.c: New file.
* src/report.h: Likewise.
* src/Makefile.am: Adjust.
* m4/error.m4: New file.
* m4/Makefile.am: Adjust.
* configure.in (jm_PREREQ_ERROR): Call it.
* src/main.c (int_to_string, banner, fatal_banner, warn_banner):
Remove.
(fatal, fatals): Remove.  All callers use complain.c::fatal.
(warn, warni, warns, warnss, warnss): Remove.  All callers use
complain.c::complain.
(toomany): Remove, use fatal instead.
* src/files.c (done): No argument, use complain_message_count.
* src/main.c (main): Register `done' to `atexit'.

* src/getargs.c (usage): More `fputs', less `fprintf'.
2000-03-31 13:54:30 +00:00
Jesse Thilo
10a9273b34 # updates. 2000-03-28 18:13:42 +00:00
Akim Demaille
1853982561 * lib/: New directory.
* Makefile.am (SUBDIRS): Adjust.
* configure.in: Adjust.
(LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
useless.
* src/alloca.c: Moved to lib/.
* src/getopt.c: Likewise.
* src/getopt1.c: Likewise.
* src/getopt.h: Likewise.
* src/ansi2knr.c: Likewise.
* src/ansi2knr.1: Likewise.
* src/Makefile.am: Adjust.
* lib/Makefile.am: New file.
2000-03-28 13:30:57 +00:00