#include <tinyap.h>
Public Member Functions | |
Parser () | |
create a new parser with default context. create a parser with "explicit" metagrammar dialect, " \r\t\n" whitespaces, and input from stdin. | |
~Parser () | |
delete an instance of a parser | |
const char * | getGrammar () const |
Parser & | setGrammar (const char *gs) |
const char * | getWhitespace () const |
Parser & | setWhitespace (const char *ws) |
Parser & | setWhitespaceRegexp (const char *wsre) |
AstNode * | getGrammarAst () const |
Parser & | setGrammarAST (const AstNode *gast) |
const char * | getSourceFile () const |
const char * | getSourceBuffer () const |
unsigned int | getSourceBufferLength () const |
Parser & | setSourceFile (const char *fnam) |
Parser & | setSourceBuffer (const char *buf, const unsigned int len) |
bool | parse () |
bool | parseAsGrammar () |
bool | parsedOK () const |
AstNode * | getOutput () const |
int | getErrorCol () const |
int | getErrorRow () const |
const char * | getError () const |
tinyap_t | getHandle () const |
Static Public Member Functions | |
static Parser & | New () |
create a new parser with default context. create a parser with "explicit" metagrammar dialect, " \r\t\n" whitespaces, and input from stdin. this call may be used to chain setter calls. |
Definition at line 379 of file tinyap.h.
TinyaP::Parser::Parser | ( | ) | [inline] |
TinyaP::Parser::~Parser | ( | ) | [inline] |
static Parser& TinyaP::Parser::New | ( | ) | [inline, static] |
const char* TinyaP::Parser::getGrammar | ( | ) | const [inline] |
Definition at line 400 of file tinyap.h.
References tinyap_get_grammar().
Parser& TinyaP::Parser::setGrammar | ( | const char * | gs | ) | [inline] |
Definition at line 403 of file tinyap.h.
References tinyap_get_grammar_ast(), and tinyap_set_grammar().
const char* TinyaP::Parser::getWhitespace | ( | ) | const [inline] |
Definition at line 411 of file tinyap.h.
References tinyap_get_whitespace().
Parser& TinyaP::Parser::setWhitespace | ( | const char * | ws | ) | [inline] |
Definition at line 414 of file tinyap.h.
References tinyap_set_whitespace().
Parser& TinyaP::Parser::setWhitespaceRegexp | ( | const char * | wsre | ) | [inline] |
Definition at line 417 of file tinyap.h.
References tinyap_set_whitespace_regexp().
Definition at line 423 of file tinyap.h.
References TinyaP::AstNode::getHandle(), and tinyap_set_grammar_ast().
const char* TinyaP::Parser::getSourceFile | ( | ) | const [inline] |
Definition at line 431 of file tinyap.h.
References tinyap_get_source_file().
const char* TinyaP::Parser::getSourceBuffer | ( | ) | const [inline] |
Definition at line 434 of file tinyap.h.
References tinyap_get_source_buffer().
unsigned int TinyaP::Parser::getSourceBufferLength | ( | ) | const [inline] |
Definition at line 437 of file tinyap.h.
References tinyap_get_source_buffer_length().
Parser& TinyaP::Parser::setSourceFile | ( | const char * | fnam | ) | [inline] |
Definition at line 440 of file tinyap.h.
References tinyap_set_source_file().
Parser& TinyaP::Parser::setSourceBuffer | ( | const char * | buf, | |
const unsigned int | len | |||
) | [inline] |
Definition at line 443 of file tinyap.h.
References tinyap_set_source_buffer().
bool TinyaP::Parser::parse | ( | ) | [inline] |
Definition at line 446 of file tinyap.h.
References tinyap_get_output(), tinyap_parse(), and tinyap_parsed_ok().
bool TinyaP::Parser::parseAsGrammar | ( | ) | [inline] |
Definition at line 454 of file tinyap.h.
References tinyap_get_grammar_ast(), tinyap_get_output(), tinyap_parse_as_grammar(), and tinyap_parsed_ok().
bool TinyaP::Parser::parsedOK | ( | ) | const [inline] |
Definition at line 466 of file tinyap.h.
References tinyap_parsed_ok().
int TinyaP::Parser::getErrorCol | ( | ) | const [inline] |
Definition at line 472 of file tinyap.h.
References tinyap_get_error_col().
int TinyaP::Parser::getErrorRow | ( | ) | const [inline] |
Definition at line 475 of file tinyap.h.
References tinyap_get_error_row().
const char* TinyaP::Parser::getError | ( | ) | const [inline] |
Definition at line 478 of file tinyap.h.
References tinyap_get_error().