Files
bison/lib/.cvsignore
Joel E. Denny 9611cfa20b Miscellaneous %define and %code cleanup.
* data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
values are interpreted.
* doc/bison.texinfo (Decl Summary): Clean up and extend %define
documentation a little more.
* src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
muscle_percent_define_insert, muscle_percent_code_grow): New
functions/macros.
* src/muscle_tab.h (muscle_percent_define_insert,
muscle_percent_code_grow): Prototype.
* src/parse-gram.y (prologue_declaration): Use
muscle_percent_define_insert and muscle_percent_code_grow when parsing
%define and %code directives.

Make it easy to share %define boolean variables between the front-end
and back-end.  Though not used yet, this will be useful in the future.
* data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
Bison uses of names rather than just skeleton uses of names.
(b4_percent_define_get, b4_percent_define_ifdef): Rename
b4_percent_define_skeleton_variables(VARIABLE) to
b4_percent_define_bison_variables(VARIABLE).
(b4_percent_code_get, b4_percent_code_ifdef): Rename
b4_percent_code_skeleton_qualifiers(QUALIFIER) to
b4_percent_code_bison_qualifiers(QUALIFIER).
(b4_check_user_names_wrap): Update for renames.
* src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
muscle_percent_define_default): New functions mimicking
b4_percent_define_flag_if and b4_percent_define_default.

For %define variables, report locations for invalid values and
redefinitions.
* data/bison.m4 (b4_percent_define_flag_if): Read
b4_percent_define_loc(VARIABLE) to report the location of an invalid
value for VARIABLE.
(b4_percent_define_default): Save a special location in
b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
must later be reported as invalid.
* src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
functions.
(muscle_percent_define_insert): Record the location of VARIABLE in
muscle percent_define_loc(VARIABLE), and use it to report the previous
location for a redefinition.
(muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
(muscle_percent_define_default): Update like b4_percent_define_default.
(muscle_grow_user_name_list): Rename to...
(muscle_user_name_list_grow): ... this for consistency and use
muscle_location_grow.
* src/muscle_tab.h (muscle_location_grow): Prototype.
* tests/input.at (%define errors): Update expected output.
* tests/skeletons.at (%define boolean variables: invalid skeleton
defaults): New test case.
2007-03-02 06:26:28 +00:00

80 lines
828 B
Plaintext

.deps
Makefile
Makefile.in
argmatch.c
argmatch.h
basename.c
c-ctype.c
c-ctype.h
c-strcase.h
c-strcasecmp.c
c-strncasecmp.c
config.h
config.hin
configmake.h
dirname.c
dirname.h
dup-safer.c
error.c
error.h
exit.h
exitfail.c
exitfail.h
fd-safer.c
fopen-safer.c
getopt.c
getopt.h
getopt1.c
getopt_.h
getopt_int.h
gettext.h
gnulib.mk
hash.c
hash.h
inttypes.h
inttypes_.h
malloc.c
mbswidth.c
mbswidth.h
obstack.c
obstack.h
pipe-safer.c
quote.c
quote.h
quotearg.c
quotearg.h
stamp-h1
stdbool.h
stdbool_.h
stdint.h
stdint_.h
stdio--.h
stdio-safer.h
stdlib.h
stdlib_.h
stpcpy.c
strerror.c
string.h
string_.h
stripslash.c
strndup.c
strnlen.c
strtol.c
strtoul.c
strverscmp.c
strverscmp.h
unistd--.h
unistd-safer.h
unistd.h
unistd_.h
unlocked-io.h
verify.h
wchar_.h
wctype_.h
wcwidth.h
xalloc-die.c
xalloc.h
xmalloc.c
xstrndup.c
xstrndup.h