DM84 Command Grammar Rules
Augmented BNF[1] Rules for the LecNet2 command grammar:
OCTET
CHAR
UPALPHA
LOALPHA
DIGIT
LF
CR
SP
HT
DQUOTE
QCHAR
WS
SIGN
OFFSET
ALPHA
ALPHANUM
HEX
DIGIT
STR_TOK
INT_TOK
FLT_TOK
QSTR_TOK
CRLF
OK_TOK
ERROR_TOK
input
output
request
verb_request
query
hquery
update
status
response
verb_response = status *WS (target / update)
argument
hargument
target
arraydims
memloc
arrayoffsets
intarray
intsequence
fltarray
fltsequence
[1] c.f. RFC 2234 <http://www.ietf.org/rfc/rfc2234.txt>
= %x00-FF
; <any 8-bit sequence of data>
= %x01-7F
; any US-ASCII character except NUL (1 - 127)
= %x41-5A
; any US-ASCII uppercase letter "A".."Z"
= %x61-7A
; any US-ASCII lowercase letter "a".."z"
= %x31-39
; any US-ASCII digit "0".."9">
= %x0A
; US-ASCII LF, linefeed (10)
= %x0D
; US-ASCII CR, carriage return (13)
= %x20
; US-ASCII SP, space (32)
= %x09
; US-ASCII HT, horizontal tab (9)
= %x22
; US-ASCII double-quote mark (34)
= %x01-21 / %x23-7F
= SP / HT
= "-" / "+"
= 1*DIGIT / "*"
= UPALPHA / LOALPHA
= ALPHA / DIGIT
= "A" | "B" | "C" | "D" | "E" | "F" | "a" | "b" | "c" | "d" | "e" | "f" |
= ALPHA *(ALPHANUM)
= *1SIGN 1*DIGIT
= *1SIGN *DIGIT "." *DIGIT ; note that bare "." is valid
= DQUOTE *(QCHAR) DQUOTE
= CR LF
= %x4F %x4B ; uppercase string "OK"
= %x45 %x52 %x52 %x4F %x52 ; uppercase string "ERROR"
= (request / verb_request) *WS CR
= (response / verb_response) *WS CRLF
= (query / hquery / update / target)
= "!" *WS (query / hquery / update / target)
= target *WS "?"
= target *WS "?" *WS "$"
= target *WS "=" *WS (argument / hargument)
= OK_TOK / ERROR_TOK
= status *WS *1(argument / hargument)
= INT_TOK / FLT_TOK / QSTR_TOK / intarray / fltarray
= "$" 1*(*WS 2HEX) ; note that size of data must be > 0
= STR_TOK *1(*WS (arraydims | memloc))
= "(" *WS arrayoffsets *WS ")"
= "[" *WS 4HEX *WS "]"
= OFFSET [ *WS "," *WS OFFSET ]
= "{" *WS intsequence *WS "}"
= INT_TOK *( *WS "," *WS INT_TOK)
= "{" *WS fltsequence *WS "}" )
= FLT_TOK *( *WS "," *WS FLT_TOK)
; any CHAR except DQUOTE
Need help?
Do you have a question about the DM84 and is the answer not in the manual?
Questions and answers