Refactor the binary parser.
authorDavid Neto <dneto@google.com>
Fri, 30 Oct 2015 20:06:15 +0000 (16:06 -0400)
committerDavid Neto <dneto@google.com>
Tue, 10 Nov 2015 20:57:33 +0000 (15:57 -0500)
commit0ca6b59bfd568d34273ac41e09ee33da65f3d962
treec25492003e01d29e40bd66ee71ad6f3806ebb4d1
parent0981b1514efb7eb89d27acfd481374c5d99e494a
Refactor the binary parser.

The binary parser has a C API, described in binary.h.
Eventually we will make it public in libspirv.h.
The API is event-driven in the sense that a callback is called
when a valid header is parsed, and for each parsed instruction.

Classify some operand types as "concrete".  The binary parser uses
only concrete operand types to describe parsed instructions.

The old disassembler APIs are moved into disassemble.cpp

TODO: Add unit tests for spvBinaryParse.
CMakeLists.txt
include/libspirv/libspirv.h
source/assembly_grammar.cpp
source/assembly_grammar.h
source/binary.cpp
source/binary.h
source/disassemble.cpp
test/BinaryHeaderGet.cpp
test/BinaryParse.cpp [new file with mode: 0644]
test/BinaryToText.cpp