Syntax diagram of ADC BNF

I went ahead and generated some syntax diagrams for the ADC BNF at http://www-cgi.uni-regensburg.de/~brf09510/syntax.html.

I used the W3C-BNF since that is what the ADC specification (almost) states its BNF in. The following is the input;

...

[1] message ::= message_body? eol
[2] message_body ::= (b_message_header | cih_message_header | de_message_header | f_message_header | u_message_header | message_header)
(separator positional_parameter)* (separator named_parameter)*
[3] b_message_header ::= 'B' command_name separator my_sid
[4] cih_message_header ::= ('C' | 'I' | 'H') command_name
[5] de_message_header ::= ('D' | 'E') command_name separator my_sid separator target_sid
[6] f_message_header ::= 'F' command_name separator my_sid separator (('+'|'-') feature_name)+
[7] u_message_header ::= 'U' command_name separator my_cid
[8] command_name ::= simple_alpha simple_alphanum simple_alphanum
[9] positional_parameter ::= parameter_value
[10] named_parameter ::= parameter_name parameter_value?
[11] parameter_name ::= simple_alpha simple_alphanum
[12] parameter_value ::= escaped_letter+
[13] target_sid ::= encoded_sid
[14] my_sid ::= encoded_sid
[15] encoded_sid ::= base32_character base32_character base32_character base32_character
[16] my_cid ::= encoded_cid
[17] encoded_cid ::= base32_character+
[18] base32_character ::= simple_alpha | [2-7]
[19] feature_name ::= simple_alpha simple_alphanum simple_alphanum simple_alphanum
[20] escaped_letter ::= [^ \#x0a] | escape 's' | escape 'n' | escape escape
[21] escape ::= '\\'
[22] simple_alpha ::= [A-Z]
[23] simple_alphanum ::= [A-Z0-9]
[24] eol ::= #x0a
[25] separator ::= ' '

...

(Note that the W3C-BNF doesn’t support ‘{3}’ etc so I had to extend those instances.)

The following is the output;

Don’t forget that you can make topic suggestions for blog posts in our “Blog Topic Suggestion Box!”

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: