MySQL++ SSQLS v2 Translator
3.2.5
|
Holds information about an SSQLS v2 file we're parsing. More...
#include <parsev2.h>
Public Member Functions | |
File (const char *file_name) | |
Open a file for reading, using the search path to file the file if the direct path isn't readable. | |
void | error (const std::string &msg) const |
Throw a FileException containing the given message. | |
void | error (const std::ostringstream &msg) const |
const char * | name () const |
Return the file's name. | |
void | parse_error (const std::string &msg) const |
Throw a ParseException containing the given message and our stored info about the file name and current line. | |
void | parse_error (const std::ostringstream &msg) const |
bool | read_line (std::string &line, bool &subdirective) |
Read a line in from a file. More... | |
Holds information about an SSQLS v2 file we're parsing.
This class exists simply because there's so much file-related processing in the parser, and it's confusing to have it scattered about.
|
inline |
References error().
|
inline |
References error().
bool ParseV2::File::read_line | ( | std::string & | line, |
bool & | subdirective | ||
) |
Read a line in from a file.
We read the line from our internal file object, trimming any trailing comment. Does not trim whitespace; we depend on ParseV2::tokenize() to cope with that. Sets subdirective flag if we see leading whitespace before we trim it away, as indented lines are interpreted differently by File's users.
Referenced by ParseV2::ParseV2().