Date: Thu, 4 Apr 2002 01:11:31 -0500 From: The Anarcat <anarcat@anarcat.dyndns.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: docs/36724: ipnat(5) manpage grammar is incomplete and inconsistent Message-ID: <20020404061232.9F7C718B9@khan.anarcat.dyndns.org>
index | next in thread | raw e-mail
>Number: 36724
>Category: docs
>Synopsis: ipnat(5) manpage grammar is incomplete and inconsistent
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-doc
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed Apr 03 22:20:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: The Anarcat
>Release: FreeBSD 4.5-STABLE i386
>Organization:
Nada, Inc
>Environment:
System: FreeBSD lenny.anarcat.dyndns.org 4.5-STABLE FreeBSD 4.5-STABLE #1: Wed Mar 27 12:55:29 EST 2002 anarcat@lenny.anarcat.dyndns.org:/usr/src/sys/compile/LENNY i386
>Description:
The ipnat(5) manpage features, on -stable, a section wrt the grammar
recognized by the ipnat parser.
This grammar is incomplete and does not represent properly ipnat
behavior.
1- Undefined non-terminals:
a- Major:
these actually prevent one from clearly knowing what the syntax is
- portnum (which I guess is portnumbers)
- numports (idem)
- nummask
b- Minor (we can easily guess what these are):
bits, mask, ip, host-name, ipaddr, hexnumber, numbers
Note that ip and ipaddr seem to be redundant here.
2- inconsistence in the syntax
In the same grammar, curly brackets and brackest are used to represent
repetition, at least I guess.
For example, I guessed that:
ip [ "," ip ]
meant that ip could be repeated, seperated by commas.
But, on the other hand, we havge:
fname ::= 'A' - 'Z' { 'A' - 'Z' } numbers .
which I guessed means that "'A' - 'Z'" can be repeated any number of
times.
I think this section of the manpage needs a complete rewrite.
>How-To-Repeat:
Follow the grammar given in the grammar.
Also see:
docs/33371 guido ipnat(5) requires mapped-to port in rdr rules
docs/36127 darrenr ipnat(5) man page glitches
for other glitches.
>Fix:
Unknown. I will inspect the parser if I find the time, but since it's a
flat .c file (natparse.c) and not a .y, it's harder. ;)
Any idea why ipnat doesn't use something like yacc or bison?
I'm not sure what format the grammar is following right now, but it
would gain at following a standard notation such as the BNF.
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020404061232.9F7C718B9>
