Akim Demaille
6fedd4d1d6
* src/LR0.c (allocate_itemsets): kernel_size contains ints, not
...
size_ts.
Reported by Hans Aberg.
2001-11-26 13:01:10 +00:00
Akim Demaille
f0451dba71
* src/print_graph.c (print_actions): Remove `rule', unused.
...
* src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
pacify GCC's signed < unsigned warnings.
* src/closure.c (itemsetsize): Likewise.
* src/reader.c (symbol_list_new): Static.
2001-11-23 14:04:08 +00:00
Akim Demaille
146ad4c8d0
* src/closure.c (itemsetend): Remove, replaced with...
...
(itemsetsize): new.
2001-11-19 09:26:57 +00:00
Akim Demaille
f2a4c94506
* src/LR0.c (kernel_end): Remove, replaced with...
...
(kernel_size): new.
2001-11-19 09:26:43 +00:00
Akim Demaille
64fabbb49f
* src/closure.c, src/derives.c, src/nullable.c: Adjust various
...
trace messages.
* src/LR0.c: Likewise.
(allocate_itemsets): Use arrays instead of pointers to clarify.
2001-11-19 09:25:36 +00:00
Akim Demaille
3b2925a060
* src/getargs.c (statistics_flag): Replace with...
...
(trace_flag): New.
(longopts): Accept --trace instead of --statistics.
* src/getargs.h: Adjust.
* src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
* src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
2001-11-19 09:21:26 +00:00
Akim Demaille
83bcf86639
* src/LR0.c (new_itemsets, get_state): Use more arrays and less
...
pointers to clarify the code.
(save_reductions, save_shifts): Factor common parts of alternatives.
2001-11-19 09:17:53 +00:00
Akim Demaille
8639df64a6
* src/LR0.c (new_state, get_state): Complete TRACE code.
...
* src/closure.c: Include `reader.h' to get `tags', needed by the
trace code.
Rename the conditional DEBUG as TRACE.
Output consistently TRACEs to stderr, not stdout.
* src/derives.c: Likewise.
* src/reduce.c: (inaccessable_symbols): Using if is better style
than goto.
Use `#if TRACE' instead of `#if 0' for tracing code.
2001-11-19 09:16:24 +00:00
Akim Demaille
377bd7c9a2
* src/system.h (LIST_FREE, shortcpy): New.
...
* src/LR0.c: Use them.
* src/output.c (free_itemsets, free_reductions, free_shifts):
Remove, replaced by LIST_FREE.
2001-11-19 09:14:54 +00:00
Akim Demaille
b4a7a230f1
* src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
...
(REDUCTIONS_ALLOC): New.
* src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
allocation.
2001-11-19 09:14:26 +00:00
Akim Demaille
c1586e58fe
* src/LR0.c (new_state): Complete trace code.
...
* src/nullable.c (set_nullable): Don't translate traces.
2001-11-19 09:14:07 +00:00
Akim Demaille
7ba81a101f
* src/system.h: Include `xalloc.h'.
...
Remove it from the C files.
* src/files.c (output_files): Free the obstacks.
* src/lex.c (init_lex): Rename as...
(lex_init): this.
(lex_free): New.
* src/main.c (main): Use it.
2001-09-25 18:35:04 +00:00
Akim Demaille
f2632e420f
* configure.in: Invoke AM_LIB_DMALLOC.
...
* src/system.h: Use dmalloc.
* src/LR0.c: Be sure to have pointers initialized to NULL.
(allocate_itemsets): Allocate kernel_items only if needed.
2001-09-22 17:19:03 +00:00
Akim Demaille
aa7815f5c6
* src: s/Copyright (C)/Copyright/g.
2000-11-07 16:28:47 +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
340ef48922
Various anti-`extern in *.c' changes.
...
* src/system.h: Include `assert.h'.
2000-10-02 08:35:47 +00:00
Akim Demaille
403b315bb1
* src/LR0.h: New file.
...
Propagate its use.
2000-10-02 08:14:22 +00:00
Akim Demaille
3519ec76a3
* src/nullable.h: New file.
...
Propagate its inclusion.
* src/nullable.c: Formatting changes.
2000-10-02 08:06:43 +00:00
Akim Demaille
2fa6973e6f
* src/closure.h: New file.
...
* src/closure.c: Formatting changes, topological sort over the
functions, use of closure.h.
(initialize_closure, finalize_closure): Rename as...
(new_closure, free_closure): these. Adjust dependencies.
* src/LR0.c: Formatting changes, topological sort, use of
cloture.h.
(initialize_states): Rename as...
(new_states): this.
* src/Makefile.am (noinst_HEADERS): Adjust.
2000-09-20 15:43:39 +00:00
Akim Demaille
ceed8467b7
* src/output.c: Formatting changes.
...
* src/machine.h: Remove, leaving its contents in...
* src/system.h: here.
Include stdio.h.
Adjust all dependencies on stdio.h and machine.h.
* src/getargs.h: New file.
Let all `extern' declarations about getargs.c be replaced with
inclusion of `getargs.h'.
* src/Makefile.am (noinst_HEADERS): Adjust.
* tests/calc.m4 (yyin): Be initialized in main, not on the global
scope.
(yyerror): Returns void, not int.
* doc/bison.texinfo: Formatting changes.
2000-09-19 18:10:41 +00:00
Jesse Thilo
4a120d45e6
More explicit use of "const", "extern", and "static", particularly to
...
limit the scope of many local variables and functions.
2000-07-04 03:29:02 +00:00
Akim Demaille
3628146521
s/return (foo)/return foo/
2000-03-31 14:27:06 +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
2686a6e713
Hush a few compiler warnings.
1999-01-20 22:55:06 +00:00
Jesse Thilo
c49a8e71ce
Update FSF address.
1999-01-14 14:58:38 +00:00
Jesse Thilo
d2729d44ab
Use prototypes if the compiler understands them.
1998-12-30 05:27:11 +00:00
Richard M. Stallman
7612000cb0
new.h renamed to alloc.h.
1997-06-18 06:40:45 +00:00
David MacKenzie
40675e7cc9
entered into RCS
1993-04-20 05:55:54 +00:00