Hello,
On Tue, Aug 31, 2021 at 02:40:57PM +1000, David Gwynne wrote:
> handling the "no" option with a token, and "yes" via a string made my
> eye twitch.
>
> ok? or is the helpful yyerror a nice feature?
>
I actually think it's a nice feature. below is output
for current pfctl we have in tree:
lumpy$ pfctl -n -f /tmp/pf.conf
/tmp/pf.conf:6: invalid value 'nope', expected 'yes' or 'no'
and output with diff applied:
lumpy$ ./pfctl -n -f /tmp/pf.conf
/tmp/pf.conf:6: syntax error
the /tmp/pf.conf for test looks as follows:
--------8<---------------8<---------------8<------------------8<--------
lumpy$ cat /tmp/pf.conf
# $OpenBSD: pf.conf,v 1.55 2017/12/03 20:40:04 sthen Exp $
#
# See pf.conf(5) and /etc/examples/pf.conf
set skip on lo
set reassemble nope
block return # block stateless traffic
pass out # establish keep-state
# By default, do not permit remote connections to X11
block return in on ! lo0 proto tcp to port 6000:6010
# Port build user does not need network
block return out log proto {tcp udp} user _pbuild
--------8<---------------8<---------------8<------------------8<--------
the 'syntax error', which comes from bison, does not seem to be that helpful.
thanks and
regards
sashan