Commit Graph

  • de366a2f6b Fix latest changelog entry: the "who" was missing. Paul Eggert 2006-01-09 06:49:18 +00:00
  • 2781dbd121 * tests/glr-regression.at: Update copyright year to 2006. Joel E. Denny 2006-01-08 23:16:51 +00:00
  • bf70fa8729 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to use during nondeterministic operation to track which stacks have actually needed the current lookahead. (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack): Allocate, deallocate, resize, and otherwise shuffle space for yylookaheadStatuses in parallel with yystates member of yyGLRStateSet. (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status appropriately during nondeterministic operation. (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc members to store the current lookahead to be used by the deferred user action. (yyaddDeferredAction): Add size_t yyk parameter specifying the stack from which the RHS is taken. Set the lookahead members of the new yySemanticOption according to the lookahead status for stack yyk. (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to yyaddDeferredAction. (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead members of yySemanticOption before invoking yyuserAction, and then set them back to their current values afterward. (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY. (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint. * tests/glr-regression.at: Remove `.' from the ends of recent test case titles for consistency. (Leaked merged semantic value if user action cuts parse): In order to suppress lint warnings, use arguments in merge function, and assign char value < 128 in main. (Incorrect lookahead during deterministic GLR): New test case. (Incorrect lookahead during nondeterministic GLR): New test case. Joel E. Denny 2006-01-06 20:48:33 +00:00
  • 05449a2c1b * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept !yyvaluep as signal that no semantic value is available to print. * data/glr.c (yydestroyGLRState): If state is not resolved, don't try to print a semantic value. Joel E. Denny 2006-01-06 20:09:31 +00:00
  • fd2493f7c4 * ChangeLog: Correct formatting. Joel E. Denny 2006-01-06 01:14:49 +00:00
  • 4158e0a143 * tests/glr-regression.at: For consistency with my newer test cases, don't thank myself. Joel E. Denny 2006-01-06 01:07:37 +00:00
  • d659304d0a * data/glr.c (yyresolveValue): When merging semantic options, if at least one user action succeeds but a later one cuts the parse, then destroy the semantic value before returning rather than leaking it. (yyresolveStates): If a user action cuts the parse and thus yyresolveValue fails, ignore the (unset) semantic value rather than corrupting the yyGLRState, and empty the semantic options list since the user actions should have called all necessary destructors. Simplify code with YYCHK. * tests/glr-regression.at (Corrupted semantic options if user action cuts parse): New test case. (Undesirable destructors if user action cuts parse): New test case. Before applying any of this patch, this test case never actually failed for me... but only because the corrupted semantic options usually masked this bug. (Leaked merged semantic value if user action cuts parse): New test case. Joel E. Denny 2006-01-05 21:07:54 +00:00
  • 6ec2c0f295 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/. Akim Demaille 2006-01-05 13:38:58 +00:00
  • 7a0db73e6f Remove stray "*/". Paul Eggert 2006-01-04 23:42:53 +00:00
  • 2e4c30fa07 Regenerate. Paul Eggert 2006-01-04 23:40:11 +00:00
  • dd9010375b Use ususual GNU style. Paul Eggert 2006-01-04 23:39:06 +00:00
  • a2a3e98977 (b4_c_modern): Parenthesize. Paul Eggert 2006-01-04 23:37:07 +00:00
  • 1b9c21fb18 * data/c.m4 (b4_c_modern): New macro, with a new provision for _MSC_VER. (b4_c_function_def): Use it. * data/yacc.c (YYMODERN_C): Remove. All uses replaced by b4_c_modern. (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather than rolling our own. Paul Eggert 2006-01-04 23:35:43 +00:00
  • 8486615972 Also warn about non-used mid-rule values. * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule member. (symbol_list_new): Adjust. * src/reader.c (symbol_typed_p): New. (grammar_rule_check): Use it. (grammar_midrule_action): Bind a mid-rule LHS to its rule. Check its rule. * tests/input.at (AT_CHECK_UNUSED_VALUES): New. Use it. * tests/actions.at (Exotic Dollars): Adjust. Akim Demaille 2006-01-04 09:18:37 +00:00
  • 378f4bd846 * src/reader.c (grammar_midrule_action): If $$ is set in a mid-rule, move the `used' bit to its lhs. * tests/input.at (Unused values): New. * tests/actions.at (Exotic Dollars): Adjust: exp is not typed. Akim Demaille 2006-01-04 08:32:46 +00:00
  • f52b276c55 Regenerate. Paul Eggert 2006-01-03 22:39:33 +00:00
  • 5466269793 * doc/bison.texinfo (Bison Options): Say more accurately what --yacc does. * src/parse-gram.y (rules_or_grammar_declaration): Don't complain about declarations in the grammar when in Yacc mode, as POSIX does not require a diagnostic when the grammar uses extensions. Paul Eggert 2006-01-03 22:35:45 +00:00
  • 9ae1f0c6a9 Update copyright. Paul Eggert 2006-01-03 22:25:58 +00:00
  • 4d56beff96 (reduce_grammar): Remove unnecessary cast to bool. Paul Eggert 2006-01-03 22:24:43 +00:00
  • 073f92889f Warn about dubious constructions like "%token T T". * src/symtab.h (struct symbol.declared): New member. * src/symtab.c (symbol_new): Initialize it to false. (symbol_class_set): New arg DECLARING, specifying whether this is a declaration that we want to warn about, if there is more than one of them. All uses changed. Paul Eggert 2006-01-03 21:31:57 +00:00
  • 1221b78adb * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c: Allow multiple %union directives, whose contents concatenate. * src/parse-gram.y (grammar_declaration): Likewise. Use muscle_code_grow, so that we don't need stype_line any more. All uses changed. Paul Eggert 2006-01-03 20:25:54 +00:00
  • ff5150d9a4 (muscle_grow): Fix comment. Paul Eggert 2006-01-03 20:19:41 +00:00
  • e2a21b6f0c Update copyright year to 2006. Paul Eggert 2006-01-03 19:12:55 +00:00
  • 8f7e3cf9d0 Have glr.cc pass (some of) the calc.at tests. * data/glr.cc (b4_parse_param_orig): New. (b4_parse_param): Improve its definition, and bound it more clearly in the skeleton. (b4_epilogue): Append, instead of prepending, in order to keep #line consistency. Simplify the generation of auxiliary functions: locations and purity are mandated. (b4_global_tokens_and_yystype): Honor it. * data/location.cc (c++.m4): Don't include it. * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF and AT_SKEL_CC_IF. * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of AT_LALR1_CC_IF. Be sure to initialize the first position's filename. (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are mandated anyway. (AT_CHECK_CALC_GLR_CC): New. Use it to exercise glr.cc as a lalr1.cc drop-in replacement. Akim Demaille 2006-01-03 09:06:22 +00:00
  • 0a96ba819f * src/output.c (output_skeleton): Don't hard wire the inclusion of c.m4. * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4. * data/glr.cc: Do not include stack.hh. Akim Demaille 2006-01-02 16:26:17 +00:00
  • 3953ed882a * src/output.c (output_skeleton): Don't hard wire the inclusion of c.m4. * data/c++.m4: Include c.m4. * data/glr.cc: Do not include stack.hh. Akim Demaille 2006-01-02 16:06:11 +00:00
  • 9ecafbbfe7 * data/glr.c: Reformat whitespace with tabs. (b4_lpure_formals): Remove this unused m4 macro. * tests/cxx-type.at: Reformat whitespace with tabs. (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo since it's a member. Rename type to isNterm for clarity. Akim Demaille 2006-01-02 15:28:03 +00:00
  • c4d497a010 Let glr.cc catch up with symbol_value_print. * data/glr.cc (b4_yysymprint_generate): Replace by... (b4_yy_symbol_print_generate): this. (yy_symbol_print, yy_symbol_value_print): Declare them. Akim Demaille 2005-12-29 11:06:33 +00:00
  • a51d426a63 Update copyright. Paul Eggert 2005-12-28 08:51:34 +00:00
  • 4517da3757 * src/location.h (boundary): Note that a line or column equal to INT_MAX indicates an overflow. * src/scan-gram.l: Include verify.h. Don't include get-errno.h. (rule_length_overflow, increment_rule_length, add_column_width): New functions. (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"): (<SC_BRACED_CODE>"}"): Use increment_rule_length rather than incrementing it by hand. (adjust_location, handle_syncline): Diagnose overflow. (handle_action_dollar, handle_action_at): Fix bug with monstrosities like $-2147483648. Remove now-unnecessary checks. (scan_integer): Verify assumptions and remove now-unnecessary checks. (convert_ucn_to_byte): Verify assumptions. (handle_syncline): New arg LOC. All callers changed. Don't store through a value derived from char const * pointer. Paul Eggert 2005-12-28 08:45:47 +00:00
  • 668c5d1927 (grammar_rule_check): Rewrite slightly to avoid GCC warnings. Paul Eggert 2005-12-28 08:31:22 +00:00
  • e3233bf6b6 * src/reader.c (grammar_midrule_action, grammar_symbol_append): Remove unnecessary forward static decls. Paul Eggert 2005-12-27 19:54:41 +00:00
  • 8f3596a633 * src/reader.c (grammar_current_rule_check): Also check that $$ is used. Take the rule to check as argument, hence rename as... (grammar_rule_check): this. * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end): Rename as... (grammar_rule_begin, grammar_rule_end): these, for consistency. (grammar_midrule_action, grammar_symbol_append): Now static. * tests/torture.at (input): Don't rely on the default action being always performed. * tests/calc.at: "Set" $$ even when the action is "cut" with YYERROR or other. * tests/actions.at (Exotic Dollars): Instead of using unused values, check that the warning is issued. Akim Demaille 2005-12-27 17:50:00 +00:00
  • f8e1c9e55b Some wrapping. Akim Demaille 2005-12-27 15:42:44 +00:00
  • 3b0ffc7ec1 Regenerate. Paul Eggert 2005-12-23 00:24:39 +00:00
  • 721be13c5b * NEWS: Improve wording for unused-value warnings. Paul Eggert 2005-12-23 00:13:11 +00:00
  • a0af42fce6 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4 (b4_yysymprint_generate): Rename as... (b4_yy_symbol_print_generate): this. Generate yy_symbol_print instead of yysymprint. Generate also yy_symbol_value_print, and use it. Akim Demaille 2005-12-22 13:01:50 +00:00
  • affac6132a Warn about unused values. * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add a `used' member. (symbol_list_n_get, symbol_list_n_used_set): New. (symbol_list_n_type_name_get): Use symbol_list_n_get. * src/scan-gram.l (handle_action_dollar): Flag used symbols. * src/reader.c (grammar_current_rule_check): Check that values are used. * src/symtab.c (symbol_print): Accept 0. * tests/existing.at: Remove the type information. Empty the actions. Remove useless actions (beware of mid-rule actions: perl -000 -pi -e 's/s*{}(?=[ns]*[|;])//g'). * tests/actions.at (Exotic Dollars): Use unused values. * tests/calc.at: Likewise. * tests/glr-regression.at (No users destructors if stack 0 deleted): Likewise. * src/gram.c (rule_useful_p, rule_never_reduced_p): Use rule_useful_p. Akim Demaille 2005-12-22 11:40:05 +00:00
  • 8bb4c753e2 Undo 2005-12-01 tentative license wording change. Paul Eggert 2005-12-22 04:38:26 +00:00
  • 9d9b8b7006 * NEWS: Reword %destructor vs YYABORT etc. * data/glr.c: Use American spacing, for consistency. * data/glr.cc: Likewise. * data/lalr1.cc: Likewise. * data/yacc.c: Likewise. * data/yacc.c: Reformat comments slightly. * doc/bison.texinfo: Replace "non-" with "non" when that makes sense, for consistency. Fix some spelling errors and reword recently-included text slightly. * tests/cxx-type.at: Cast results of malloc, for C++. Paul Eggert 2005-12-22 00:24:40 +00:00
  • 2c3b392a9a * tests/cxx-type.at: Construct a tree, count the parents of shared nodes, and free each node once and only once. Previously, the memory for semantic values was leaked instead. Akim Demaille 2005-12-21 15:45:17 +00:00
  • d6cff4dc6f * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members. (yylval, yylloc): If pure, #define to yystackp->yyval and yystackp->yyloc similar to yychar and yynerrs. (yyparse): If pure, remove local yylval and yylloc. Add local yystackp to accommodate pure definitions of yylval and yylloc. (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change yylvalp and yyllocp to &yylval and &yylloc. (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[] namespace. Previously, nerrs and char were missing, but lval and lloc weren't necessary. (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove yylvalp and yyllocp parameters since, if pure, these are now always accessible through yystackp. If not pure, they are still accessible globally. * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change if (N)' to if (YYID (N))' to pacify lint. Akim Demaille 2005-12-21 15:33:13 +00:00
  • a85284cfbd YYACCEPT, YYERROR, and YYABORT, as user actions, should not destroy the RHS symbols of a rule. * data/yacc.c (yylen): Initialize to 0. Keep its value to the number of items to possibly shift. In particular, a regular successful parse that ends on YYFINAL by a (internal) YYACCEPT must not have yylen != 0. (yyerrorlab, yyreturn): Pop the RHS. Reorder a bit to emphasize the `shifting' bits of code. (YYPOPSTACK): Now accept a number of items to pop. * data/lalr1.cc: Likewise. * data/glr.c: Formatting changes. Use goto instead of fall through. * doc/bison.texinfo (Destructor Decl): Complete. Akim Demaille 2005-12-21 15:28:30 +00:00
  • e14d0ab687 Fix NEWS. Akim Demaille 2005-12-21 13:49:44 +00:00
  • d508c2816f * Makefile.am: DJGPP specific files added to EXTRA_DIST. * djgpp/Makefile.maint: Fix PACKAGE variable computation. * djgpp/config.bat: Replace every occurence of the file name scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS. * djgpp/config.sed: Replace every occurence of the file name scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS. * djgpp/djunpack.bat: DJGPP specific file. * djgpp/fnchange.lst: DJGPP specific file. * djgpp/README.in: Add new information about how to unpack the bison source on MSDOS and other systems which have 8.3 file name restrictions using djunpack.bat and fnchange.lst. Juan Manuel Guerrero 2005-12-21 00:24:54 +00:00
  • 375234d9ff DJGPP specific files added to EXTRA_DIST. Juan Manuel Guerrero 2005-12-21 00:11:44 +00:00
  • bf60087f69 Add new information about how to unpack the bison source on MSDOS and other systems which have 8.3 file name restrictions using djunpack.bat and fnchange.lst. Juan Manuel Guerrero 2005-12-21 00:01:40 +00:00
  • 90ddbd5eed Replace file name scan-gram-c.c with scangram-c.c and scan-skel-c.c with /src/scanskel-c.c to conform with the 8.3 file name restriction on MSDOS. Juan Manuel Guerrero 2005-12-21 00:01:28 +00:00
  • 69474954ac Fix PACKAGE variable computation. Juan Manuel Guerrero 2005-12-20 23:59:50 +00:00
  • b09a18c50d DJGPP specific file. Juan Manuel Guerrero 2005-12-20 23:58:00 +00:00
  • 3e7a2cd95f * data/glr.c: Reorder typedef declarations for structs to match order of struct declarations. Rename yystack everywhere to yystackp except in yyparse where it's not a pointer. (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for consistency. (yyis_table_ninf): Change 0 to YYID (0) to pacify lint. (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint. (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify lint. Paul Eggert 2005-12-12 21:04:39 +00:00
  • 26546b4258 (build_cvs_prefix): Remove; unused. (CVS_PREFIX): Adjust to yesterday's Savannah reorganization when getting gnulib. Paul Eggert 2005-12-12 20:59:30 +00:00
  • 0eca5a39a7 * tests/sets.at (Accept): Fix typos in regular expression used to sed out the final state number. Paul Eggert 2005-12-10 00:25:27 +00:00
  • 72c4d3365a Regenerate. Paul Eggert 2005-12-09 23:53:57 +00:00
  • 6c65b1525f Work around flex portability bug. Paul Eggert 2005-12-09 23:53:14 +00:00
  • 2cec9080f6 Work around portability problem on Solaris 10: flex-generated files include <stdio.h> before <config.h>, which messes up because the latter defines __EXTENSIONS__. Address the problem by creating two new little files that include <config.h> first, then include the flex-generated files. Rewrite everyone else to include <config.h> first, as well. * lib/timevar.c: Always include "config.h". * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with scan-gram-c.c, and scan-skel.l with scan-skel-c.c. (EXTRA_bison_SOURCES): New macro. * src/scan-gram-c.c, src/scan-skel-c.c: New files. * src/system.h: Don't include config.h. * src/LR0.c: Include <config.h> first. * src/assoc.c: Likewise. * src/closure.c: Likewise. * src/complain.c: Likewise. * src/conflicts.c: Likewise. * src/derives.c: Likewise. * src/files.c: Likewise. * src/getargs.c: Likewise. * src/gram.c: Likewise. * src/lalr.c: Likewise. * src/location.c: Likewise. * src/main.c: Likewise. * src/muscle_tab.c: Likewise. * src/nullable.c: Likewise. * src/output.c: Likewise. * src/parse-gram.y: Likewise. * src/print.c: Likewise. * src/print_graph.c: Likewise. * src/reader.c: Likewise. * src/reduce.c: Likewise. * src/relation.c: Likewise. * src/state.c: Likewise. * src/symlist.c: Likewise. * src/symtab.c: Likewise. * src/tables.c: Likewise. * src/uniqstr.c: Likewise. * src/vcg.c: Likewise. Paul Eggert 2005-12-09 23:51:26 +00:00
  • 7029f8927f Regenerate. Paul Eggert 2005-12-09 22:44:37 +00:00
  • 877519f839 * src/parse-gram.y: Fix minor problems uncovered by lint. (current_lhs, current_lhs_location): Now static. (current_assoc): Remove unused variable. Paul Eggert 2005-12-09 22:43:00 +00:00
  • 12ce2df60d Cleanups so that Bison-generated parsers have less lint. * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Prepend /*ARGSUSED*/, for lint's sake. * data/glr.c (YYUSE): Properly parenthesize, and use an alternate definition if 'lint' is defined. (YYID): New macro (or function, if lint). All uses of /*CONSTCOND*/0 replaced by YYID(0). * data/yacc.c: Likewise. * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print): (yyrecoverSyntaxError): Prepend /*ARGSUSED*/. * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code is C++ only. * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only. * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]: Use YYID(0) rather than 0, for lint. (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow. (yysyntax_error): Rewrite to avoid lint warnings about parenthesization. Paul Eggert 2005-12-09 22:14:36 +00:00
  • f5228370c5 * tests/glr-regression.at (Improper handling of embedded actions and dollar(-N) in GLR parsers): Close memory leak reported by twlevo. Paul Eggert 2005-12-08 06:52:43 +00:00
  • 6ff9971122 Mention yyparse, too. Paul Eggert 2005-12-07 07:47:52 +00:00
  • 69ce078b8c * data/glr.c (yyprocessOneStack): Synchronize the shift for all stacks, and iterate another stack in order to call user destructors. * tests/glr-regression.at (No users destructors if stack 0 deleted): New test case. (Duplicated user destructor for lookahead): This test now is expected to succeed. Paul Eggert 2005-12-06 19:38:25 +00:00
  • 32b5b719e4 Document the license change. Paul Eggert 2005-12-01 20:08:35 +00:00
  • 66809587a7 Regenerate. Paul Eggert 2005-12-01 20:04:06 +00:00
  • af3412cdea * data/yacc.c: Say "parser skeleton" rather than "file", since it's no longer just a file. * data/glr.c: Grant a special exception for C GLR parsers, that reads like the already-existing exception for C LALR(1) parsers. * data/glr.cc: Likewise. * data/lalr1.cc: Likewise. * data/location.cc: Likewise. * data/yacc.c: Reword the "written by" statement to clarify that it was the parser skeleton, not the entire output file. * data/glr.c: Written by Paul Hilfinger. * data/glr.cc: Written by Akim Demaille. * data/lalr1.cc: Likewise. Paul Eggert 2005-12-01 20:03:55 +00:00
  • d9963c8597 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT): Fix typos in previous change that broke 'make check'. YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't supported in C. * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR): Don't check NUM-STDERR-LINES, since the output format is fluctuating. We can revert this once things settle down. Paul Eggert 2005-11-18 19:37:13 +00:00
  • 035aa4a0bb * src/conflicts.c (conflicts_print): Don't print file name twice when %expect fails because there were no conflicts. * doc/bison.texinfo (Expect Decl): Tighten up wording in previous change. * tests/conflicts.at (%expect not enough, %expect too much): (%expect with reduce conflicts): Adjust to new behavior. Paul Eggert 2005-11-18 18:16:44 +00:00
  • d1ff7a7cc6 Generalize the display of semantic values and locations in traces. * data/glr.c (yy_reduce_print): Fix indices (again). * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect literal integers. * data/lalr1.cc (yyreduce_print): Rename as... (yy_reduce_print): this. Display values and locations. * data/yacc.c (yy_reduce_print): Likewise. (YY_REDUCE_PRINT): Adjust to pass the required arguments. (yysymprint): Move higher to be visible from yy_reduce_print). (yyparse): Adjust. * tests/calc.at: Adjust the expected length of the traces. Akim Demaille 2005-11-16 14:20:48 +00:00
  • 6de5398de3 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are from 1 to N, while values and location start at 0. (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2. Akim Demaille 2005-11-14 17:20:28 +00:00
  • a1373f559a * data/glr.c (yy_reduce_print): Fix the $ number. Akim Demaille 2005-11-14 15:33:18 +00:00
  • 3dc4aa8c36 Fix incorrect comment. Akim Demaille 2005-11-14 15:19:16 +00:00
  • 613d8952e3 "Use" parse parameters. * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New. * data/glr.c, data/glr.cc: Use them. * data/glr.c (YYUSE): Have a C++ definition that supports non-pointer types. Akim Demaille 2005-11-14 15:18:34 +00:00
  • b2741627b1 * data/glr.c (yyexpandGLRStack): Declare only if defined. Akim Demaille 2005-11-14 14:34:38 +00:00
  • 422494834c * data/glr.cc: New. * data/m4sugar/m4sugar.m4 (m4_prepend): New. Akim Demaille 2005-11-14 08:13:07 +00:00
  • 5059b5c887 Have glr.c include its header file when created. * data/glr.c (b4_shared_declarations): New. Output them verbatim in the parser if !%defines, otherwise output then in the header file, and include it instead. Akim Demaille 2005-11-14 08:09:00 +00:00
  • 4626a15dd1 Let position and location be PODs. * data/location.cc (position::initialize, location::initialize): New. (position::position, location::location): Define only if b4_location_constructors is defined. * data/lalr1.cc (b4_location_constructors): Define it for backward compatibility. * doc/bison.texinfo (Initial Action Decl): Use initialize. Akim Demaille 2005-11-12 14:13:03 +00:00
  • 98ae96438e * data/lalr1.cc: Move the body of the ctor and dtor into the parser file (instead of the header). Wrap the implementations in a "namespace yy". Akim Demaille 2005-11-12 11:32:46 +00:00
  • 1989d9476c * data/glr.c: Comment changes. Akim Demaille 2005-11-11 10:39:35 +00:00
  • 62b08cfcd7 When yydebug, report semantic and location values for reductions. * data/glr.c (yy_reduce_print): Report the semantic values and the locations. (YY_REDUCE_PRINT): Adjust. (yyglrReduce): Use them. (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations. * data/c.m4 (b4_yysymprint_generate): Specify the const arguments. * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction traces. Akim Demaille 2005-11-11 10:36:24 +00:00
  • 0299809431 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New. (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them. (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE. Akim Demaille 2005-11-11 09:20:03 +00:00
  • 5210672f6b * m4/cxx.m4, examples/Makefile.am: Don't build examples/calc++ if no C++ compiler is available. Paul Eggert 2005-11-10 00:33:04 +00:00
  • a8991a1da4 * src/scan-skel.l: Use a couple of asserts. Akim Demaille 2005-11-09 16:11:25 +00:00
  • 36b5e963e6 In some (weird) cases, the final state number is incorrect. Reported by Alexandre Duret-Lutz. * src/LR0.c (state_list_append): Remove the computation of final_state. (save_reductions): Do it here. (get_state): Alpha conversion. (generate_states): Use a for loop. * src/gram.h (item_number_is_rule_number) (item_number_is_symbol_number): New. * src/state.c: Use assert. * src/system.h: Include assert.h. * tests/sets.at (Accept): New. Akim Demaille 2005-11-09 15:48:05 +00:00
  • 317fce927c Typo. Akim Demaille 2005-11-03 16:23:21 +00:00
  • 44e7ead165 data/glr.c (yyfill): Adjust comment. (yyresolveAction): Initialize default location properly for empty right-hand sides. (yydoAction): Ditto. Add comment explaining apparently dead code. * tests/glr-regression.at (Incorrectly initialized location for empty right-hand side in GLR): New test. Paul Hilfinger 2005-10-31 01:16:32 +00:00
  • e10a80eeac * bootstrap (cleanup_gnulib): New function. Use it to clean up gnulib when interrupted. This fixes some race conditions and works around some portability problems (one noted by Paul Hilfinger). Paul Eggert 2005-10-31 00:11:48 +00:00
  • 067b32eef4 * Makefile.cfg: Adjust to config -> build-aux. Reported by twledo. Akim Demaille 2005-10-22 06:44:35 +00:00
  • 4b3673159e * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass the %parse-params. * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust. * data/yacc.c (b4_Pure_if): Rename as... (b4_yacc_pure_if): this. (YY_SYMBOL_PRINT, yyparse): Adjust. * doc/bison.texinfo: Formatting changes. Akim Demaille 2005-10-21 11:36:22 +00:00
  • 24cc23d96d Finish the transition config -> build-aux. * configure.ac, Makefile.am: Use build-aux. * config/prev-version, config/announce-gen, config/Makefile.am: Move to... * build-aux/prev-version, build-aux/announce-gen, * build-aux/Makefile.am: here. Akim Demaille 2005-10-21 09:13:01 +00:00
  • d4476375cf * examples/calc++/test: Use set -x only when VERBOSE. Akim Demaille 2005-10-14 06:10:54 +00:00
  • 302c0aeeba * NEWS: Bison now warns if it finds a stray $' or @' in an action. * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this. Paul Eggert 2005-10-13 19:38:46 +00:00
  • 7625ec2c83 * src/scan-skel.l: Output the base name parts of the parser and header file names. * tests/output.at (AT_CHECK_OUTPUT): Support subdirectorioes, and additional checks. Use this to exercise C++ outputs in subdirs. Reported by Oleg Smolsky. Akim Demaille 2005-10-13 10:13:24 +00:00
  • 2ed284440f Regenerate. Paul Eggert 2005-10-13 06:24:04 +00:00
  • ba0fe3c710 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either. Problem reported by John P. Hartmann. * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has already defined it. Paul Eggert 2005-10-13 06:23:54 +00:00
  • 9b8a5ce03b * src/parse-gram.y (version_check): Exit 63 to please missing (stands for "version mismatch). * tests/input.at, doc/bison.texinfo: Adjust. Akim Demaille 2005-10-12 10:15:12 +00:00
  • 52d9d4112f Regenerate. Paul Eggert 2005-10-11 05:39:59 +00:00
  • 4d7aa45e75 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well as __STDC__, as IBM cc defines the former but not the latter. * data/yacc.c (YYMODERN_C): New macro, which also looks at __STDC_VERSION__. Use it everywhere instead of looking at __STDC__ and __cplusplus. Paul Eggert 2005-10-11 05:36:04 +00:00
  • 4f6e011e2e Work around portability problems with Visual Age C compiler (xlc and xlC_r) reported by John P. Hartmann. * data/location.cc (initial_column, initial_line): Remove. All uses replaced by 0 and 1. * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31 that xlc complains about. * src/scan-skel.l (skel_wrap): Likewise. Paul Eggert 2005-10-11 05:06:16 +00:00
  • a1b3bf8c21 * examples/calc++/test: Be quiet unless VERBOSE. Akim Demaille 2005-10-10 11:41:27 +00:00
  • e764d4df76 Regenerate. Paul Eggert 2005-10-06 07:18:53 +00:00