Implemented a generic protocol stream parser with ragel.