The Erlang Bit Syntax extends pattern matching to (de)constructing chunks of binary data, such as the bit-encoded headers in network protocols and file formats. It's an amazingly handy language extension.
This paper describes the prototype developed by Claes Wikstrom and Tony Rogvall in the course of implementing a couple of dozen internet and telecoms protocols.
The Bit Syntax is a standard part of Erlang now, though it doesn't have all the features of the prototype. For details see The Bit Syntax - The Released Version, or Erlang Extensions since 4.4.
The binary-types package for Common Lisp implements a similar extension.
Posted to general by Luke Gorrie on 12/1/02; 4:24:29 PM