Ok, I'm wondering about how a protocol such as ACAP could be implemented as a grammar. For those not familiar with ACAP, it bears some resemblance to IMAP (and a more distant resemblance to POP3 and SMTP), with the difference that the server can send information to the client unsolicited (think of something like "you have new mail", without it being asked).

The first thing I'm wondering is how to go about writing a call-and-response grammar. Take a basic SMTP transaction as an example. You'd send something like a HELO command, and get a response. Then "MAIL FROM", "RCPT TO", "DATA", and the like, each with an appropriate response. Is there some way to write a single grammar that encapsulates the whole thing, a grammar that could be used one way by a client, and another way by a server?

        I guess my real question is, how should grammars of protocols be done?

        :)


---------------------------------------------------------------------
| Name: Tim Nelson                 | Because the Creator is,        |
| E-mail: wayl...@wayland.id.au    | I am                           |
---------------------------------------------------------------------

----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-
-----END GEEK CODE BLOCK-----

Reply via email to