#include <wtk/flatbuffer/Parser.h>
FlatBuffer Parser API
Include this API as
Members of this API live in the following namespaces
namespace wtk { namespace flatbuffer { ...
The Parser API is parameterized on a Number_T
template.
Number_T
should be integer-like enough to be parsed from a string.
This API is abstract and implemented by parsers for various IR formats.
template<typename Number_T> struct Parser
The wtk::flatbuffer::Parser<Number_T>
implements the wtk::Parser<Number_T>
.
It parses binary and consequently line-numbering is nonsensical.
It cannot truly stream parse either IR-Simple or input streams (instance/short witness) because FlatBuffers is designed around random access of a buffer.
While, it does implement the parseStream(…)
API, it must read the entire relation ahead of time.
It could (but does not) stream segments of a very large resource (>2GB
) because these resources are split into multiple FlatBuffers.
Parser(std::string& f_name)
Constructor via opening the file named by f_name
.
Undefined behavior occurs if the file does not exist.
Parser(std::string& f_name);