Commit Graph

238 Commits

Author SHA1 Message Date
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
7655146399 Update. 2002-04-22 12:36:15 +00:00
Akim Demaille
133c20e252 * src/output.c (table_size, table_grow): New.
(MAXTABLE): Remove, replace uses with table_size.
(pack_vector): Instead of dying when the table is too big, grow it.
2002-04-22 08:22:39 +00:00
Akim Demaille
23c5a17453 * src/reader.c (token_translations_init): 256 is now the default
value for the error token, i.e., it will be assigned another
number if the user assigned 256 to one of her tokens.
(reader): Don't force 256 to error.
* doc/bison.texinfo (Symbols): Adjust.
* tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
(AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
etc. instead of 10, 20, 30 (which was used to `jump' over error
(256) and undefined (2)).
2002-04-22 08:22:11 +00:00
Akim Demaille
007a50a493 * src/gram.h, src/gram.c (error_token_number): Remove, use
errtoken->number.
* src/reader.c (reader): Don't specify the user token number (2)
for $undefined, as it uselessly prevents using it.
* src/gram.h (token_number_t): Move to...
* src/symtab.h: here.
(state_t.number): Is a token_number_t.
* src/print.c, src/reader.c: Use undeftoken->number instead of
hard coded 2.
(Even though this 2 is not the same as above: the number of the
undeftoken remains being 2, it is its user token number which
might not be 2).
* src/output.c (prepare_tokens): Rename the `maxtok' muscle with
`user_token_number_max'.
Output `undef_token_number'.
* data/bison.simple, data/bison.c++: Use them.
Be sure to map invalid yylex return values to
`undef_token_number'.  This saves us from gratuitous SEGV.
* tests/conflicts.at (Solved SR Conflicts)
(Unresolved SR Conflicts): Adjust.
* tests/regression.at (Web2c Actions): Adjust.
2002-04-09 19:19:59 +00:00
Akim Demaille
62a3e4f0c5 * src/gram.h (item_number_t): New, the type of item numbers in
RITEM.  Note that it must be able to code symbol numbers as
positive number, and the negation of rule numbers as negative
numbers.
Adjust all dependencies (pretty many).
* src/reduce.c (rule): Remove this `short *' pointer: use
item_number_t.
* src/system.h (MINSHORT, MAXSHORT): Remove.
Include `limits.h'.
Adjust dependencies to using SHRT_MAX and SHRT_MIN.
(shortcpy): Remove.
(MAXTABLE): Move to...
* src/output.c (MAXTABLE): here.
(prepare_rules): Use output_int_table to output rhs.
* data/bison.simple, data/bison.c++: Adjust.
* tests/torture.at (Big triangle): Move the limit from 254 to
500.
* tests/regression.at (Web2c Actions): Ajust.
Trying with bigger grammars shows various phenomena: at 3000 (28Mb
of grammar file) bison is killed by my system, at 2000 (12Mb) bison
passes, but produces negative #line number, once fixed, GCC is
killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
C), it passes.
* src/state.h (state_h): Code input lines on ints, not shorts.
2002-04-08 11:46:26 +00:00
Akim Demaille
355e7c1cd1 * src/gram.h (item_number_t): New, the type of item numbers in
RITEM.  Note that it must be able to code symbol numbers as
positive number, and the negation of rule numbers as negative
numbers.
Adjust all dependencies (pretty many).
* src/reduce.c (rule): Remove this `short *' pointer: use
item_number_t.
* src/system.h (MINSHORT, MAXSHORT): Remove.
Include `limits.h'.
Adjust dependencies to using SHRT_MAX and SHRT_MIN.
(shortcpy): Remove.
(MAXTABLE): Move to...
* src/output.c (MAXTABLE): here.
(prepare_rules): Use output_int_table to output rhs.
* data/bison.simple, data/bison.c++: Adjust.
* tests/torture.at (Big triangle): Move the limit from 254 to
500.
* tests/regression.at (Web2c Actions): Ajust.
Trying with bigger grammars shows various phenomena: at 3000 (28Mb
of grammar file) bison is killed by my system, at 2000 (12Mb) bison
passes, but produces negative #line number, once fixed, GCC is
killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
C), it passes.
* src/state.h (state_h): Code input lines on ints, not shorts.
2002-04-08 11:46:05 +00:00
Akim Demaille
643a599471 * src/LR0.c (new_state): Display `nstates' as the name of the
newly created state.
Adjust to initialize first_state and last_state if needed.
Be sure to distinguish the initial from the final state.
(new_states): Create the itemset of the initial state, and use
new_state.
* src/closure.c (closure): Now that the initial state has its
items properly set, there is no need for a special case when
creating `ruleset'.
As a result, now the rule 0, reducing to $axiom, is visible in the
outputs.  Adjust the test suite.
* tests/conflicts.at (Solved SR Conflicts)
(Unresolved SR Conflicts): Adjust.
* tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
* tests/conflicts.at (S/R in initial): New.
2002-04-07 17:40:16 +00:00
Akim Demaille
11652ab3dc * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
lacking `+ 1' to nrules, Bison reported as useless a token if it
was used solely to set the precedence of the last rule...
2002-04-07 15:30:42 +00:00
Paul Eggert
0179dd6542 Revert the C++ namespace changes introduced in 1.31, as they caused too
many portability hassles.
2002-02-14 20:28:37 +00:00
Marc Autret
52d1aeee3d Update. 2002-01-20 14:37:39 +00:00
Akim Demaille
b7c49edf13 * src/main.c (main): If there are complains after grammar
reductions, then output the report anyway if requested, then die.
* src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
* src/reader.c (eoftoken): New.
(parse_token_decl): If the token being defined has value `0', it
is the eoftoken.
(packsymbols): No longer hack `tags' to insert `$' by hand.
Be sure to preserve the value of the eoftoken.
(reader): Make sure eoftoken is defined.
Initialize nsyms to 0: now eoftoken is created just like the others.
* src/print.c (print_grammar): Don't special case the eof token.
* src/regression.at: Adjust: `$' has value 0, not -1, which was a
lie anyway, albeit pleasant.
* tests/calc.at: Exercise error messages with eoftoken.
Change the grammar so that empty input is invalid.
Adjust expectations.
When yyungeting, be sure to use a valid yylloc: use last_yylloc.
2001-12-27 18:13:09 +00:00
Akim Demaille
adc8c84856 * src/reader.c (packgram): Catch nitems overflows. 2001-12-27 18:06:41 +00:00
Akim Demaille
9f4503d6e9 Adjust. 2001-11-05 09:00:17 +00:00
Akim Demaille
f987e9d257 * tests/calc.at: Catch up with 1.30.
* configure.in: Bump to 1.49a.
Adjust to newer Autotest.
2001-11-01 17:47:39 +00:00
Akim Demaille
3c1a79b314 * tests/atlocal.in (GCC): Add.
* tests/calc.at: s/m4_match/m4_bmatch/.
s/m4_patsubst/m4_bpatsubst/.
(AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
* configure.in: AC_SUBST(GCC).
2001-10-18 15:26:56 +00:00
Akim Demaille
342b8b6e21 Merge in branch-1_29. 2001-10-04 14:55:21 +00:00
Pascal Bart
f2b5126e47 Apply GNU Free Documentation License to manual. 2001-08-14 14:13:16 +00:00
Marc Autret
4ecbf79698 Turn on %{source,header}_extension features.
* src/lex.c (percent_table): Un-CPP out header_extension and
source_extension.
* src/files.c (compute_exts_from_gf): Compare pointers with NULL.
(compute_exts_from_src): Remove conditions. It restores priorities
between options.
2001-08-14 11:28:48 +00:00
Marc Autret
6f42a3e682 * doc/bison.texinfo (Locations): Update @$ stuff. 2001-08-10 08:40:02 +00:00
Marc Autret
f1c63ceddc * doc/bison.texinfo (Locations): Update @$ stuff. 2001-08-10 08:16:14 +00:00
Akim Demaille
7333d40316 Add of %source_extension and %header_extension which specify
the source or/and the header output file extension.
* src/files.c (compute_base_names): Remove initialisation of
src_extension and header_extension.
(compute_exts_from_gf): Update.
(compute_exts_from_src): Update.
(output_files): Update.
* src/reader.c (parse_header_extension_decl): New.
(parse_source_extension_decl): New.
(read_declarations): New case statements for the new tokens.
* src/lex.c (percent_table): Add entries for %source_extension
and %header_extension.
* src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
2001-08-06 08:51:41 +00:00
Akim Demaille
2ce1014469 * tests/Makefile.am (check-local): Ship testsuite.
* tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
Include `string.h'.
2001-08-03 10:13:42 +00:00
Akim Demaille
234a3be303 * doc/bison.texinfo: Update.
* doc/bison.1 (mandoc): Update.
* src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
* src/files.c: Support output files extensions computing.
(src_extension): New static variable.
(header_extension): New static variable.
(tr): New function.
(get_extension_index): New function, gets the index of an extension
filename in a string.
(compute_exts_from_gf): New function, computes extensions from the
grammar file extension.
(compute_exts_from_src): New functions, computes extensions from the
C source file extension, file given by ``-o'' option.
(compute_base_names): Update.
(output_files): Update.
2001-08-01 18:08:48 +00:00
Akim Demaille
62ab6972e8 * src/getargs.h (raw_flag): Remove.
* src/getargs.c: Die on `-r'/`--raw'.
* src/lex.c (parse_percent_token): Die on `%raw'.
* src/reader.c (output_token_defines): Suppress call to `raw_flag'.
* tests/calc.at: Suppress test with option `--raw'.
2001-07-18 09:52:35 +00:00
Akim Demaille
cd5bd6ac4f * getargs.c (skeleton): New variable.
(longopts): --skeleton is a new option.
(shortopts, getargs): -S is a new option.
* getargs.h: Declare skeleton.
* output.c (output_parser): Use it.
2001-03-16 15:16:08 +00:00
Akim Demaille
6deb44470e Since we now use obstacks, more % directives can be enabled.
* src/lex.c (percent_table): Also accept `%yacc',
`%fixed_output_files', `%defines', `%no_parser', `%verbose', and
`%debug'.
Handle the actions for `%semantic_parser' and `%pure_parser' here,
instead of returning a token.
* src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
* src/reader.c (read_declarations): Adjust.
* src/files.c (open_files): Don't call `compute_base_names', don't
compute `attrsfile' since they depend upon data which might be
*in* the input file now.
(output_files): Do it here.
* src/output.c (output_headers): Document the fact that this patch
introduces a guaranteed SEGV for semantic parsers.
* doc/bison.texinfo: Document them.
* tests/suite.at: Exercise these %options.
2001-01-18 14:47:09 +00:00
Jeff Bailey
42a0c7760b Gratuitous change to NEWS to test mailout 2000-10-02 20:04:58 +00:00
Akim Demaille
c33638bb30 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
options.
2000-10-02 10:22:19 +00:00
Akim Demaille
8c44d3ec49 Do not hard code values of directories in `configure.in'.
Update the `configure' tool chain.

* configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
src/makefile.am.
(VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
(AC_OUTPUT): Add m4/Makefile.
Bump to bison 1.28a, 1.29 has never been released.
* acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
handled via src/Makefile.am.
(VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
autoheader.
* Makefile.am (SUBDIRS): Add m4.
(ACLOCAL_AM_FLAGS): New variable.
(AUTOMAKE_OPTIONS): Add check-news.
* src/Makefile.am (bison.simple): Use awk to replace #line lines with
the proper line number and file name.
(DEFS): Propagate the location of bison library files and of the
locale files.
(INCLUDES): Added `-I ..' so that one can compile with srcdir !=
builddir.
* acinclude.m4: Remove, replaced by the directory m4.
* m4/Makefile.am (EXTRA_DIST): New variable.
* m4/gettext.m4: New file, from the fileutils.
* m4/lcmessage.m4: Likewise
* m4/progtest.m4: Likewise.
* m4/bison-decl.m4: New file, extracted from former acinclude.m4.
2000-03-16 15:54:46 +00:00
Jesse Thilo
f87a220598 Bison 1.29 released. 1999-12-13 07:48:09 +00:00
Jesse Thilo
d2e00347cb Released version 1.28. 1999-07-06 13:19:44 +00:00
Jesse Thilo
5c31c3c2c8 #Updated NEWS for 1.27. 1999-02-16 11:05:33 +00:00
Jesse Thilo
f51dbca105 #updated. 1999-01-27 03:35:18 +00:00
Jesse Thilo
4be07551f5 Document 1.26 highlights. 1998-12-30 05:24:36 +00:00
Richard M. Stallman
df8878c59b *** empty log message *** 1995-10-16 14:10:22 +00:00
David MacKenzie
4d019228a4 reformat 1994-11-10 22:34:22 +00:00
David MacKenzie
6780ca7ab4 Initial revision 1994-11-10 22:31:09 +00:00