(CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
Gettext doesn't compile cleanly, and dies with -Werror.
* src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
Include WARNING_CFLAGS here.
* lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
before being defined.
First arg is int, not unsigned.
* lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
(SIZE_MAX, UINT_MAX): New macros.
(quotearg_n_options): Abort if N is negative.
Avoid overflow check on hosts where size_t is 64 bits and int
is 32 bits, as overflow is impossible there.
Fix off-by-one typo that caused unnecessary reallocation.
* 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.
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.
(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.
* 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.
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.
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.