mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
errors: factor b4_error @directives
Instead of @complain, @warn, and @fatal, use a unique @complain directive. This directive's first argument is "complain", "warn", etc. * data/bison.m4 (m4_error): Here. * src/scan-skel.l (at_directive_perform): Adjust. (flag): Replace the switch by safer and more explicit if branches. Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
This commit is contained in:
committed by
Akim Demaille
parent
b999409e09
commit
0505df0cba
@@ -91,7 +91,7 @@ m4_if(m4_sysval, [0], [], [m4_fatal([$0: cannot write to stdout])])])
|
||||
# b4_error([[complain]], [[input.y:2.3]], [[input.y:5.4]],
|
||||
# [[invalid %s]], [[foo]])
|
||||
m4_define([b4_error],
|
||||
[b4_cat([[@]$1[(]$2[@,]$3[@,]$4[]]dnl
|
||||
[b4_cat([[@complain][(]$1[@,]$2[@,]$3[@,]$4[]]dnl
|
||||
[m4_if([$#], [4], [],
|
||||
[m4_foreach([b4_arg],
|
||||
m4_dquote(m4_shift(m4_shift(m4_shift(m4_shift($@))))),
|
||||
|
||||
Reference in New Issue
Block a user