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