]> git.saurik.com Git - bison.git/commit - src/muscle_tab.c
Provide warn_at, complain_at, and fatal_at function callbacks to the
authorJoel E. Denny <jdenny@ces.clemson.edu>
Sun, 7 Jan 2007 03:19:21 +0000 (03:19 +0000)
committerJoel E. Denny <jdenny@ces.clemson.edu>
Sun, 7 Jan 2007 03:19:21 +0000 (03:19 +0000)
commit3fc65ead4d318a3dbde92afab9956af14dc73b42
tree71788e91d888618acef92b43008dc4e041429d85
parent1c7b7e1d87f698efb2e3daad0f6484829563d96f
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.
ChangeLog
data/bison.m4
src/location.c
src/location.h
src/muscle_tab.c
src/muscle_tab.h
src/parse-gram.c
src/parse-gram.y
src/scan-skel.l
tests/input.at
tests/output.at