Updated BNF

Rickard Schoultz <schoultz@sunet.se> Fri, 08 April 1994 08:53 UTC

Received: from ietf.nri.reston.va.us by IETF.CNRI.Reston.VA.US id aa01417; 8 Apr 94 4:53 EDT
Received: from CNRI.RESTON.VA.US by IETF.CNRI.Reston.VA.US id aa01411; 8 Apr 94 4:53 EDT
Received: from ucdavis.ucdavis.edu by CNRI.Reston.VA.US id aa02667; 8 Apr 94 4:53 EDT
Received: by ucdavis.ucdavis.edu (8.6.8/UCD2.50) id BAA27967; Fri, 8 Apr 1994 01:30:28 -0700
X-Orig-Sender: ietf-wnils-request@ucdavis.edu
Received: from sunic.sunet.se by ucdavis.ucdavis.edu (8.6.8/UCD2.50) id BAA27701; Fri, 8 Apr 1994 01:28:05 -0700
Received: from localhost.sunet.se by sunic.sunet.se (8.6.8/2.03) id KAA19489; Fri, 8 Apr 1994 10:28:02 +0200
Message-ID: <199404080828.KAA19489@sunic.sunet.se>
To: ietf-wnils@ucdavis.edu
Subject: Updated BNF
Date: Fri, 08 Apr 94 10:28:02 +0200
Sender: ietf-archive-request@IETF.CNRI.Reston.VA.US
From: Rickard Schoultz <schoultz@sunet.se>

I got some feedback on the BNF and found a couple of typos
and minor errors in the BNF, so here is an update. (Changes
were: "describe" put in, better definition of logical
exprs, global constraints separated with semicolon, more
special characters and string lengths defined to be ZERO or
more characters. )

-Rickard
---------------------------------------------------------------------

		Appendix F - The WHOIS++ BNF Grammar


whois-command   =   ( system-command [":" "hold"]
                    / terms [":" globalcnstrnts] ) NL

system-command  =   "constraints"
		    / "describe"
                    / "commands"
                    / "polled-by"
                    / "polled-for"
                    / "list" [string]
                    / "show" [string]
                    / "help" [string]
                    / "?" [string]

terms           =   and-expr *("or" and-expr)

and-expr        =   not-expr *(("and" / ";") not-expr)

not-expr        =   ["not"] (term / ( "(" terms ")" ))

term            =   generalterm / specificterm
                    / shorthandle / combinedterm

generalterm     =   string *("," localcnstrnt)

specificterm    =   specificname "=" string
                    *("," localcnstrnt)

specificname    =   "handle" / "value"

shorthandle     =   "!" string *("," localcnstrnt)

combinedterm    =   string "=" string *("," localcnstrnt)

globalcnstrnts  =   globalcnstrnt *(";" globalcnstrnt)

globalcnstrnt   =   localcnstrnt
                    / "format" "=" format
                    / "maxfull" "=" 1*digit
                    / "maxhits" "=" 1*digit
                    / opt-globalcnst

opt-globalcnst  =   "hold"
                    / "authenticate" "=" auth-method
                    / "name" "=" string
                    / "password" "=" string
                    / "language" "=" language
                    / "incharset" "=" characterset
                    / "ignore" "=" string
                    / "include" "=" string

format          =   "full" / "abridged" / "handle" / "summary"
                    / "servers-to-ask" / "mime"

language        =   <two-letter acronym according to ISO 639:1988>

characterset    =   "us-ascii" / "iso-8859-1" / "iso-8859-2" /
                    "iso-8859-3" / "iso-8859-4" / "iso-8859-5" /
                    "iso-8859-6" / "iso-8859-7" / "iso-8859-8" /
                    "iso-8859-9" / "iso-8859-10"

localcnstrnt    =   "search" "=" searchvalue /
                    "case" "=" casevalue

searchvalue     =   "exact" / "substring" / "regex" / "fuzzy"
                    / "lstring"

casevalue       =   "ignore" / "consider"

auth-method     =   "password"

string          =   0*char

char            =   "\\" specialchar
                    / <Characters 0-255 (decimal) except specialchar>


specialchar     =   " " / <tab> / "=" / "," / ":" / ";" / "\\" /
                    "*" / "." / "(" / ")" / "[" / "]" / "^" /
                    "$" / "!" / "?"

digit           =   "0" / "1" / "2" / "3" / "4" /
                    "5" / "6" / "7" / "8" / "9"

NL              =   <CR LF (decimal 13 10)>