Commit Graph

84 Commits

Author SHA1 Message Date
Akim Demaille
386642761d Update. 2002-11-04 07:30:28 +00:00
Akim Demaille
f0e48240c9 Update. 2002-10-22 11:19:45 +00:00
Akim Demaille
c19988b766 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
Use them to have `calc.y' ready for %pure-parser.
* data/yacc.c (YYLEX): Pass a yylex return type to
b4_c_function_call.
2002-10-19 14:39:07 +00:00
Akim Demaille
ae7453f2ba Prototype support of %lex-param and %parse-param.
* src/parse-gram.y: Add the definition of the %lex-param and
%parse-param tokens, plus their rules.
Drop the `_' version of %glr-parser.
Add the "," token.
* src/scan-gram.l (INITIAL): Scan them.
* src/muscle_tab.c: Comment changes.
(muscle_insert, muscle_find): Rename `pair' as `probe'.
* src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
(muscle_entry_s): The `value' member is no longer const.
Adjust all dependencies.
* src/muscle_tab.c (muscle_init): Adjust: use
MUSCLE_INSERT_STRING.
Initialize the obstack earlier.
* src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
(muscle_pair_list_grow): New.
* data/c.m4 (b4_c_function_call, b4_c_args): New.
* data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
* tests/calc.at: Use %locations, not --locations.
(AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
2002-10-19 14:38:06 +00:00
Akim Demaille
d43baf71a7 * tests/Makefile.am (maintainer-check-posix): New. 2002-10-14 15:09:15 +00:00
Akim Demaille
32f0598d06 * Makefile.maint: Update from Autoconf 2.54.
* m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
2002-10-13 19:39:29 +00:00
Akim Demaille
f414d77d38 More about Java. 2002-09-11 08:50:55 +00:00
Akim Demaille
3c146b5e6f Header guard bug. 2002-09-04 09:41:48 +00:00
Paul Eggert
948be909e9 Add "Java, Fortran, etc." Mention the already-existing hack that supports Bison for Java.
Fix some misspellings.
2002-08-30 11:27:05 +00:00
Akim Demaille
217598dadc In verbose parse error message, don't report `error' as an
expected token.
* tests/actions.at (Printers and Destructors): Adjust.
* tests/calc.at (Calculator $1): Adjust.
* data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
error message, do not report the parser accepts the error token in
that state.
2002-07-30 11:56:44 +00:00
Akim Demaille
88bce5a2ef Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
* src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
(endtoken, accept): these.
* src/reader.c (reader): Set endtoken's default tag to "$end".
Set undeftoken's tag to "$undefined" instead of "$undefined.".
* doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
Adjust.
2002-07-29 17:30:33 +00:00
Akim Demaille
2ab9a04ffc Update. 2002-07-09 10:41:44 +00:00
Akim Demaille
bc933ef16d * src/print.c (state_default_rule_compute): New, extracted from...
(print_reductions): here.
Pessimize, but clarify the code.
* tests/conflicts.at (Defaulted Conflicted Reduction): New.
2002-06-30 17:32:47 +00:00
Akim Demaille
976e627098 Update. 2002-06-20 12:23:54 +00:00
Akim Demaille
3424c3868f Update. 2002-06-20 12:19:42 +00:00
Akim Demaille
8c165d891d * src/files.c (compute_base_names): When computing the output file
names from the input file name, strip the directory part.
2002-06-18 12:39:54 +00:00
Akim Demaille
271efced67 Update. 2002-06-17 18:04:11 +00:00
Akim Demaille
d7215705ee Update. 2002-06-11 10:12:31 +00:00
Akim Demaille
3ae2b51f08 * src/symtab.c, src/symtab.c (symbol_type_set)
(symbol_precedence_set): New.
* src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
(value_components_used): Remove, unused.
2002-06-10 08:36:49 +00:00
Akim Demaille
efea623135 Update. 2002-05-28 12:03:11 +00:00
Akim Demaille
b408954b40 * src/state.h (state_t): `solved_conflicts' is a new member.
* src/LR0.c (new_state): Set it to 0.
* src/conflicts.h, src/conflicts.c (print_conflicts)
(free_conflicts, solve_conflicts): Rename as...
(conflicts_print, conflicts_free, conflicts_solve): these.
Adjust callers.
* src/conflicts.c (enum conflict_resolution_e)
(solved_conflicts_obstack): New, used by...
(log_resolution): this.
Adjust to attach the conflict resolution to each state.
Complete the description with the precedence/associativity
information.
(resolve_sr_conflict): Adjust.
* src/print.c (print_state): Output its solved_conflicts.
* tests/conflicts.at (Unresolved SR Conflicts)
(Solved SR Conflicts): Exercise --report=all.
2002-05-26 20:25:52 +00:00
Akim Demaille
ec3bc3961d * doc/bison.texinfo (Debugging): Split into...
(Tracing): this new section, its former contents, and...
(Understanding): this new section.
* src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
by...
(report_flag): this.
Adjust all dependencies.
(report_args, report_types, report_argmatch): New.
(usage, getargs): Report/support -r, --report.
* src/options.h
(struct option_table_struct): Rename as..,
(struct option_table_s): this.
Rename the `set_flag' member to `flag' to match with getopt_long's
struct.
* src/options.c (option_table): Split verbose into an entry for
%verbose, and another for --verbose.
Support --report/-r, so remove -r from the obsolete --raw.
* src/print.c: Attach full item sets and lookaheads reports to
report_flag instead of trace_flag.
* lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
2002-05-25 16:12:40 +00:00
Akim Demaille
308a2f7637 More. 2002-05-07 09:31:01 +00:00
Akim Demaille
d4e7d3a191 New experimental feature: display the lookaheads in the report and
graph.
* src/print (print_core): When --trace-flag, display the rules
lookaheads.
* src/print_graph.c (print_core): Likewise.
Swap the arguments.
Adjust caller.
2002-05-05 11:56:49 +00:00
Akim Demaille
b87f8b2159 * src/symtab.h (SALIAS, SUNDEF): Rename as...
(USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
Adjust dependencies.
* src/output.c (token_definitions_output): Be sure not to output a
`#define 'a'' when fed with `%token 'a' "a"'.
* tests/regression.at (Token definitions): New.
2002-05-04 08:48:04 +00:00
Akim Demaille
9306c70c63 More. 2002-05-03 17:09:50 +00:00
Akim Demaille
3c9160d912 More. 2002-05-03 16:53:07 +00:00
Akim Demaille
0164db681e Warnings. 2002-05-03 15:07:35 +00:00
Akim Demaille
83ccf991a6 * data/bison.simple (b4_token_enum): New.
(b4_token_defines): Use it to output tokens both as #define and
enums.
Suggested by Paul Eggert.
* src/output.c (token_definitions_output): Don't output spurious
white spaces.
2002-05-03 08:42:48 +00:00
Akim Demaille
2243f537c6 Update. 2002-05-02 16:12:35 +00:00
Akim Demaille
fdbcd8e289 Remove the so called hairy (semantic) parsers.
* src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
* src/gram.h, src/gram.c (semantic_parser): Remove.
(rule_t): Remove the guard and guard_line members.
* src/lex.h (token_t): remove tok_guard.
* src/options.c (option_table): Remove %guard and %semantic_parser
support.
* src/output.c, src/output.h (guards_output): Remove.
(prepare): Adjust.
(token_definitions_output): Don't output the `T'
tokens (???).
(output_skeleton): Don't output the guards.
* src/files.c, src/files.c (attrsfile): Remove.
* src/reader.c (symbol_list): Remove the guard and guard_line
members.
Adjust dependencies.
(parse_guard): Remove.
* data/bison.hairy: Remove.
* doc/bison.texinfo (Environment Variables): Remove occurrences of
BISON_HAIRY.
2002-05-02 15:06:46 +00:00
Akim Demaille
82b6cb3fb2 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
(parse_guard): Rename the formal argument `stack_offset' as
`rule_length', which is more readable.
Adjust callers.
(copy_at, copy_dollar): Instead of outputting the hard coded
values of $$, $n and so forth, output invocation to b4_lhs_value,
b4_lhs_location, b4_rhs_value, and b4_rhs_location.
* data/bison.simple, data/bison.c++ (b4_lhs_value)
(b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
2002-05-02 14:33:48 +00:00
Akim Demaille
6cbfbcc58c * configure.in (AC_INIT): Bump to 1.49b.
(AM_INIT_AUTOMAKE): Short invocation.
2002-05-02 09:25:54 +00:00
Akim Demaille
b98ec53ee4 Remove a dead item. 2002-04-24 12:04:53 +00:00
Akim Demaille
b4cbf822eb Language independent actions. 2002-04-24 11:23:13 +00:00
Akim Demaille
5c0a0514da More. 2002-04-23 14:07:56 +00:00
Akim Demaille
7655146399 Update. 2002-04-22 12:36:15 +00:00
Akim Demaille
69991a5827 more. 2002-04-19 14:52:00 +00:00
Akim Demaille
20c37f213a More. 2002-04-19 14:14:11 +00:00
Akim Demaille
6b44f458f2 More. 2002-04-19 08:41:46 +00:00
Akim Demaille
01c56de45c Add bootstrap. 2002-04-18 16:41:19 +00:00
Akim Demaille
8b3ba7ff05 More. 2002-04-12 10:35:07 +00:00
Akim Demaille
f294a2c217 Add copyright notice. 2002-04-11 16:31:03 +00:00
Akim Demaille
4358321afa More. 2002-04-11 16:30:18 +00:00
Akim Demaille
eaff5ee3c5 More ideas. 2002-04-10 11:03:39 +00:00
Akim Demaille
aef1ffd56f More ideas. 2002-04-10 08:55:43 +00:00
Akim Demaille
51dec47b37 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
full stderr, and strip it according to the bison options, instead
of composing the error message from different bits.
This makes it easier to check for several error messages.
Adjust all the invocations.
Add an invocation exercising the error token.
Add an invocation demonstrating a stupid error message.
(_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
Adjust the tests.
Error message are for stderr, not stdout.
2002-04-09 19:20:10 +00:00
Akim Demaille
0e95c1ddc1 More ideas. 2002-04-08 10:02:19 +00:00
Akim Demaille
680e8701b5 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
* src/output.c (output_table_data): Return the longest number.
(prepare_tokens): Output `token_number_max').
* data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
New.
Use them to define yy_token_number_type/TokenNumberType.
Use this type for yytranslate.
* tests/torture.at (Big triangle): Push the limit from 124 to
253.
* tests/regression.at (Web2c Actions): Adjust.
2002-04-07 17:44:59 +00:00
Akim Demaille
817e9f41d1 * tests/torture.at (Big triangle): New.
(GNU AWK Grammar, GNU Cim Grammar): Move to...
* tests/existing.at: here.
2002-04-07 17:44:38 +00:00