* Stefan Sperling <s...@stsp.name> [2016-06-21 11:15]: > Generally, I would appreciate more detailed error messages from the pf.conf > parser. I recall several occasions where pfctl threw "syntax error" and more > specific error reporting would have saved me some time with finding the > silly mistake I made. And in this case the ruleset loads successfully even > though, while parsing, we already know it's not going to work as intended...
true, that's shared by all yacc-style parsers, if the grammar doesn't match you just get syntax error without much of a hint what's wrong. however, the ruleset in this case does NOT load. <brahe@quigon> $ echo '"a macro with spaces"="foo"\npass from $a\ macro\ with\ spaces"' | pfctl -nvf - a macro with spaces = "foo" stdin:2: macro 'a' not defined stdin:2: syntax error > Only as long as it doesn't make the parser code overly complex, of course. > But currently the balance is tilted too much towards terse error messages > for my taste. So I liked benno's first diff. it's just a tiny check indeed, which swings the "cost" (not in financial terms) vs benefit pendulum towards the benefit side, yes. -- Henning Brauer, h...@bsws.de, henn...@openbsd.org BS Web Services GmbH, http://bsws.de, Full-Service ISP Secure Hosting, Mail and DNS. Virtual & Dedicated Servers, Root to Fully Managed Henning Brauer Consulting, http://henningbrauer.com/