On Sat, Apr 21, 2012 at 08:45:25PM +0200, Florian Obser wrote:
> 
> Keywords need to be quoted, too.
> This does not work (syntax error)
>     include tag
> while this works:
>     include "tag"
> 
> What got me thinking about this: Is that sentence supposed to describe
> quoting rules for the "include" keyword (I'm reading it that way) or
> should it apply to the whole pf.conf grammar?
> 
> I think it should apply to the whole grammar:
> This does not work (syntax error)
>     pass in tag tag
>     pass in tag /foo
> while this works:
>     pass in tag "tag"
>     pass in tag "/foo"
> 
> One other thing: Are you aiming for an exhaustive list of things that
> need to quoted? For example at first I thought that spaces need to be
> quoted, it turns out that assumption was wrong, this works:
>     pass in tag foo bar
> 
> I don't know if your sentence + something about keywords would be an
> exhaustive list.
> 
> florian
> 

the sentence was supposed to describe pf grammar (not just "include").
but you've spotted an ambiguity ;( i'd hoped to get away with not making
this too verbose, but i guess it's inevitable.

it's tricky because the grammar is so large. it's not meant to be
exhaustive - just a start. for example, in pf.conf we have to quote "{"
but not "<". i haven;t found a simple way to describe everything.

rewrite below.
jmc

Index: pf.conf.5
===================================================================
RCS file: /cvs/src/share/man/man5/pf.conf.5,v
retrieving revision 1.513
diff -u -r1.513 pf.conf.5
--- pf.conf.5   31 Jan 2012 07:46:32 -0000      1.513
+++ pf.conf.5   21 Apr 2012 20:39:17 -0000
@@ -70,6 +70,9 @@
 Care should be taken when commenting out multi-line text:
 the comment is effective until the end of the entire block.
 .Pp
+Argument names not beginning with a letter, digit, or underscore
+must be quoted.
+.Pp
 Additional configuration files can be included with the
 .Ic include
 keyword, for example:
@@ -78,8 +81,8 @@
 .Ed
 .Pp
 Macros can be defined that will later be expanded in context.
-Macro names must start with a letter, and may contain letters, digits
-and underscores.
+Macro names must start with a letter, digit, or underscore,
+and may contain any of those characters.
 Macro names may not be reserved words (for example
 .Ar pass ,
 .Ar in ,

Reply via email to