4 ms·
How would you explain it?
by ad93611 13y ago
How would you explain it?
- andor 13y ago1) BNF [0] is a notation [1] for formally defining languages [2], e.g. the syntax [3] of programming languages like C [4] or Java [5], or in this case, the IRC protocol. Every BNF definition is a bunch of strings. BNF is not a data model [6][7], a serialization format or a language for representing IRC messages (as XML is for XMPP). You are correct in that IRC is a much simpler protocol than IRC, though. 2) There is no difference between commands and messages in IRC, because to send a message, the command PRIVMSG [8] is invoked: JOIN #channel NAMES #channel PRIVMSG #channel :Hello interwebs! The fact that commands in IRC clients begin with a slash is a UI convention, and unrelated to the protocol. [0] http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form [1] http://en.wikipedia.org/wiki/Mathematical_notation http://en.wikipedia.org/wiki/Mathematical_notation [2] http://en.wikipedia.org/wiki/Formal_language http://en.wikipedia.org/wiki/Formal_language [3] http://en.wikipedia.org/wiki/Syntax_(programming_languages) http://en.wikipedia.org/wiki/Syntax_(programming_languages) [4] http://www.cs.wmich.edu/~gupta/teaching/cs4850/sumII06/The%20syntax%20of%20C%20in%20Backus-Naur%20form.htm http://www.cs.wmich.edu/~gupta/teaching/cs4850/sumII06/The%2... [5] http://www.cs.au.dk/~stm/RegAut/JavaBNF.html http://www.cs.au.dk/~stm/RegAut/JavaBNF.html [6] http://en.wikipedia.org/wiki/Abstract_data_type http://en.wikipedia.org/wiki/Abstract_data_type [7] http://en.wikipedia.org/wiki/Data_structure http://en.wikipedia.org/wiki/Data_structure [8] http://tools.ietf.org/html/rfc1459.html#section-4.4 http://tools.ietf.org/html/rfc1459.html#section-4.4