#include <wtk/antlr/Parser.h>
ANTLR Parser API
Include this API as
Members of this API live in the following namespaces
namespace wtk { namespace antlr { ...
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::antlr::Parser<Number_T>
implements the wtk::Parser<Number_T>
.
It parses text and produces line numbering.
However, the ANTLR runtime has been known to use large quantities of memory.
Additionally, it cannot truly stream parse either IR-Simple or input streams (instance/short witness).
While, it does implement the parseStream(…)
API, it must read the entire relation ahead of time.
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);