+2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ Instead of having skeletons declare all valid %define variables and
+ %code qualifiers, provide macros that retrieve the associated values
+ and build these lists automatically. Thus Bison will now warn when a
+ variable or qualifier is not used by the skeleton in the current
+ invocation regardless of whether it might sometimes be used by that
+ skeleton in other invocations. Also, move all %define value macros to
+ the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
+ form, which is replaced by %code.
+ * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
+ (b4_check_user_names): ... this, and change the series of valid name
+ arguments to a single list argument for names used in the skeleton
+ similar to the existing list argument for names used in the grammar.
+ Warn instead of complaining.
+ (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
+ values and %code code, to format %code code properly, and to build
+ lists of all %define variables and %code qualifiers used in the
+ skeleton: b4_skeleton_percent_define_variables and
+ b4_skeleton_percent_code_qualifiers.
+ (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
+ Remove, and...
+ (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
+ the skeleton names lists can finish building first. In place of
+ b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
+ expect the lists b4_user_percent_define_variables and
+ b4_user_percent_code_qualifiers.
+ * data/c++.m4: Where setting default values for b4_parser_class_name,
+ b4_location_type, b4_filename_type, b4_namespace, and
+ b4_define_location_comparison, update their names to the
+ b4_percent_define_ namespace.
+ * data/glr.c: Don't use b4_check_percent_define_variables and
+ b4_check_percent_code_qualifiers. Use b4_get_percent_code.
+ * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
+ (b4_parser_class_name, b4_namespace): Define these using
+ b4_get_percent_define for parser_class_name and namespace. Normally
+ this would be a bad idea since there might be cases when the variables
+ aren't used, but these variables are too pervasive in these skeletons
+ for that to be a problem.
+ * data/location.cc: Use b4_get_percent_define.
+ * data/push.c: Don't use b4_check_percent_define_variables and
+ b4_check_percent_code_qualifiers. Use b4_get_percent_code.
+ * data/yacc.c: Likewise, and don't call m4_exit in
+ b4_use_push_for_pull_if or m4_wrap code will never execute.
+ * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
+ Rename to...
+ (muscle_grow_user_name_list): ... this for consistency with the
+ terminology used in bison.m4.
+ * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
+ %define variable names, and rename muscle used_percent_define_variables
+ to user_percent_define_variables.
+ (grammar_declaration): Rename muscle used_percent_code_qualifiers to
+ user_percent_code_qualifiers.
+ (content): Remove.
+ (content.opt): Replace content RHS with STRING RHS so %define "NAME"
+ {CODE} form is no longer accepted.
+ * tests/input.at (Reject bad %code qualifiers): Rename to...
+ (Reject unused %code qualifiers): ... this, and update test output.
+ (%define error): Update test output.
+
+2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ Check for unrecognized %define variables similar to checking for
+ unrecognized %code qualifiers. Check for redefined %define variables.
+ * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
+ generalizes...
+ (b4_check_percent_code_qualifiers): ... this, which now wraps it.
+ (b4_check_percent_define_variables): New, also wraps it.
+ * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
+ variables using b4_check_percent_define_variables.
+ * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
+ all those exercised in the test suite and all those listed in the
+ `Default values' section of c++.m4. Are there others?
+ * data/push.c, data/yacc.c: Declare no valid %define variables.
+ * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
+ similar to muscle_find, but it works even when the muscle stores a
+ const value.
+ (muscle_grow_used_name_list): New function for constructing the used
+ name list muscles that b4_check_for_unrecognized_names requires.
+ * src/parse-gram.y (prologue_declaration): Warn if a variable is
+ %define'd more than once. Define the b4_used_percent_define_variables
+ muscle with muscle_grow_used_name_list.
+ (grammar_declaration): Abbreviate %code code with
+ muscle_grow_used_name_list.
+ * tests/input.at (%define errors): New.
+
+2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ Provide warn_at, complain_at, and fatal_at function callbacks to the
+ skeletons, and use this for %code qualifier complaints.
+ * data/bison.m4 (b4_error_at): New, invoked by...
+ (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
+ the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
+ @fatal_at(...@) directives.
+ (b4_check_percent_code_qualifiers): Rewrite to expect locations for
+ qualifiers in b4_used_percent_code_qualifiers and to use
+ b4_complain_at.
+ * src/location.c, src/location.h (boundary_set_from_string): New global
+ function.
+ * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
+ function.
+ * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
+ to b4_used_percent_code_qualifiers.
+ * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
+ function.
+ (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
+ (lineno): Rename to...
+ (out_lineno): ... this so I don't misunderstand it again.
+ (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
+ here; these newlines are in the input but not the output file.
+ (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
+ (at_directive_perform): ... this new static function, and add handling
+ of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
+ directives.
+ * tests/input.at (Reject bad %code qualifiers): Update test output with
+ locations and extend.
+
+ * tests/output.at (Output file name: [, Output file name: ]): Remove
+ bogus comment about these tests failing.
+
+2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ Clean up b4_check_percent_code_qualifiers a little.
+ * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
+ in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
+ documentation and add examples.
+ * src/parse-gram.y (grammar_declaration): Double-M4-quote those
+ qualifiers here.
+
2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
Don't use m4_divert since it makes m4_divert_push and m4_divert_pop