68 CDriver(
bool strace,
bool ptrace);
71 static void error(
const std::string& m);
98 const std::vector<std::string>&
all_tokens() const noexcept {
102 bool has_token(
const std::string& token)
const noexcept {
Class that binds all pieces together for parsing C verbatim blocks.
bool has_token(const std::string &token) const noexcept
std::vector< std::string > tokens
all tokens encountered
std::string streamname
file or input stream name (used by scanner for position), see todo
std::map< std::string, std::string > typedefs
all typedefs
static void error(const std::string &m)
bool is_enum_constant(const std::string &constant) const noexcept
void set_verbose(bool b) noexcept
bool trace_parser
enable debug output in the bison parser
bool trace_scanner
enable debug output in the flex scanner
bool verbose
print messages from lexer/parser
bool is_verbose() const noexcept
bool parse_stream(std::istream &in)
parse c file provided as istream
bool parse_string(const std::string &input)
parser c provided as string (used for testing)
std::vector< std::string > enum_constants
constants defined in enum
const std::vector< std::string > & all_tokens() const noexcept
void add_token(const std::string &)
void scan_string(const std::string &text)
bool parse_file(const std::string &filename)
std::unique_ptr< CLexer > lexer
pointer to the lexer instance being used
std::unique_ptr< CParser > parser
pointer to the parser instance being used
bool is_typedef(const std::string &type) const noexcept
static double location(void *v)
encapsulates code generation backend implementations
int find(const int, const int, const int, const int, const int)