I must produce a reconnaissor automat of SPDH protocol .
SPDH defines the structure of request and response messages exchanged between an electronic payment terminal and the server of the bank
The specifications of this protocol are described in this document : http://www.trauco.com/docs/SPDH-specification_070212.pdf
I specified the following grammar for this protocol:
Frame : = header fids etx ;
header : = fields ;
fields : = field fields | epsilon ;
field : = string | number ;
fids : = fid FieldSeparator fids | epsilon ;
fid : = exp | subfids ;
exp : = string | number| whitespace ;
subfids : = exp RecordSeparator subfids |epsilon ;
whitespace : = space whitespace | epsilon ;
space : = ' ' ;
string : = letter string | digits string | '-' string | period string |epsilon ;
FieldSeparator : = period | epsilon ;
RecordSeparator : = '!'| epsilon ;
number : = digits number | epsilon ;
digits : = '0'|'1'|...|'8'| '9' ;
letter : = 'a'|...|'z'|'A'|...|'Z' ;
period : = '.' ;
etx : = 'ETX'| epsilon ;
I need some help to conceive my application and to implement my grammar.
thank you