Akim Demaille
4a38e61393
* src/LR0.c (shifts_new): New.
...
(save_shifts, insert_start_shift, augment_automaton): Use it.
2001-11-28 14:53:29 +00:00
Akim Demaille
0e41b407b9
* src/LR0.c (allocate_itemsets): kernel_size contains ints, not
...
size_ts.
2001-11-26 13:01:17 +00:00
Akim Demaille
6255b43511
* 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:13:20 +00:00
Akim Demaille
fb9087861f
* src/closure.c (itemsetend): Remove, replaced with...
...
(itemsetsize): new.
2001-11-19 10:39:07 +00:00
Akim Demaille
125ecb5684
* src/LR0.c (kernel_end): Remove, replaced with...
...
(kernel_size): new.
2001-11-19 10:38:53 +00:00
Akim Demaille
c87d4863f6
* 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 10:38:12 +00:00
Akim Demaille
9bfe901c33
* src/getargs.c (statistics_flag): Replace with...
...
(trace_flag): New.
(longopts): Accept --trace instead of --statistics.
* src/getargs.h, src/options.c: 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 10:37:58 +00:00
Akim Demaille
97db7bd4a1
* 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 10:33:54 +00:00
Akim Demaille
2c5f66eda7
* 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 10:33:40 +00:00
Akim Demaille
300f275f23
* 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 10:31:49 +00:00
Akim Demaille
f59c437a25
* 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 10:29:17 +00:00
Akim Demaille
6986fd9e3b
* src/LR0.c (new_state): Complete trace code.
...
* src/nullable.c (set_nullable): Don't translate traces.
2001-11-19 10:28:57 +00:00
Akim Demaille
342b8b6e21
Merge in branch-1_29.
2001-10-04 14:55:21 +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