(*

Each order:

begins with "Order <Hex2Digit>\n"
terminated by: beginning of other order | EOF

*)

HEXDIGIT = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "A" | "B" | "C" | "D" | "E" | "F" ;
HEX2DIGIT = HEXDIGIT, HEXDIGIT ;
ORDER_HEADER = "Order ", HEX2DIGIT ;

MUSICAL_NOTE_LETTER = "A" | "B" | "C" | "D" | "E" | "F" | "G" ;
MUSICAL_NOTE_SHARP = "#" | "-" ;
MUSICAL_NOTE_OCTAVE = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
MUSICAL_NOTE_NOOP = "..." ;
MUSICAL_NOTE_OFF = "===" ;
MUSICAL_NOTE = MUSICAL_NOTE_LETTER, MUSICAL_NOTE_SHARP, MUSICAL_NOTE_OCTAVE | MUSICAL_NOTE_NOOP | MUSICAL_NOTE_OFF ;
NOTE_EFFECT = HEXDIGIT, HEXDIGIT, HEXDIGIT | MUSICAL_NOTE_NOOP ;

ROW_NUMBER = HEX2DIGIT;

ONE_VOICE = " | " MUSICAL_NOTE, NOTE_EFFECT ; 
ONE_ROW = ROW_NUMBER, ONE_VOICE, [ { ONE_VOICE } ] ;

ORDER_HEADER = "Order ", HEX2DIGIT ;