Write the message grammar in a notation instead of prose — one line per message, per direction.
Write the message grammar in a notation instead of prose — one line per message, per direction.
Answer
C: choice = 1*DIGIT CRLF S: greeting = "200 Poem of the Day," SP count SP "poems" CRLF S: listing = 1*( index "." SP title CRLF ) S: prompt = "Enter a number 1-" count CRLF S: error = "400" SP reason CRLF
ABNF-flavoured notation: C: is what the client may send, S: what the server may send, 1* means one or more, SP is a space, CRLF is the terminator. Five lines remove every ambiguity that a paragraph of English would leave in — including whether the index is zero- or one-based.