The recent request for better comments in pf.conf files
as well as #include functionality points out a basic flaw
in the input language design:

    The newline delimited input without /* */ comments.

And a basic flaw in the parser/lexer:

    Comment handling at parse level not lexer level.

A better input language which is a true SUPERSET of the current
input language is easy to make with the following changes:

1) move comment and #include functions into the lexer from the parser
2) remove newline as an end-of-statement operator
3) add /* */ comments to the lexer

This would simplify the parser and lexer slightly.

In addition, adding error productions to the grammar to reduce
the occurrence of "line 19: syntax error" is pretty easy too.
The input grammar is sufficiently complex that the program should
give the user a good hint about what it saw and what it wants instead.

I'd be glad to donate these changes if they have any hope of
adoption.  Note that any existing pf.conf files would work without
any changes.

   geoff steckel

Reply via email to