> > Is the BNF used directly "as-is" with YACC to generate a 
> parser, or is 
> > the BNF in pf.conf manpage an edited excerpt?
> 
> The parser is not generated from the BNF syntax (never was), 
> but rather the BNF is a manual excerpt (not all productions 
> are listed), hence the possible discrepancies.
> 

ok, so the syntax parser is "hand crafted"? nice :)

I was looking trough the source for the "original" BNF, but 
could not find one... now I know why.

another suggestion to the BNF:

in the filteropt rule; the "fragment" keyword could be removed, 
and the rule fragmentation could be changed from:

    fragmentation  = [ "fragment reassemble" | "fragment crop" |
                       "fragment drop-ovl" ]
to:
    fragmentation  = "fragment" [ "reassemble" | "crop" | 
                                  "drop-ovl" ]

and in the filteropt rule :

    filteropt = ...
                | "fragment"   <-- drop this
                ...
                | fragmentation 
                ...

still not important, but the "fragment" keyword is redundant and 
the fragmentation rule is not referenced anywhere else...
Hm, the fragmentation rule is used in scrub rules, but I have no
idea what the standalone "fragment" keyword does...

also, the "number" keyword in the bandwidth-spec rule should probably
not be quoted, as it refers to a number and not the string..

The hex-key and the string-key in the pooltype rule is never explained 
or defined, nor are they defined as keywords. Of course one could
assume the complete obvious; it's a hexadecimal key and a string key.

my last comment on the BNF for now is the sticky-address option 
also in pooltype... I'm assuming the author was tired, and nearing 
the end of this extreeemly long BNF and forgot to define it as a 
keyword: "sticky-address"? 

I am a bit tired myself now, so I could of course be wrong...


Magne

Reply via email to