Add a simple protocol generator for AS. Fixed a protocol decoding bug.