The public parser interface. More...
#include <Variant/Parser.h>
Public Member Functions | |
| Parser (shared_ptr< ParserImpl > pi) | |
| int | Run () |
| void | PushAction (shared_ptr< ParserActions > action) |
| Push an action handler onto the action stack. | |
| shared_ptr< ParserActions > | PopAction () |
| Pop the top action handler off the stack. | |
| bool | Done () const |
| Query state. | |
| bool | Error () const |
| bool | Ok () const |
| std::string | ErrorStr () const |
| Return a string describing the last error suitable for presentation to a user. | |
| void | Reset () |
| Reset the parser if applicable (some types will throw) | |
| shared_ptr< ParserImpl > | GetImpl () |
| Internal/advanced function to get the underlying implementation. | |
The public parser interface.
|
inline |
0 on success, 1 when done, -1 other problem, throw on error The parser has a action stack, the parser events go to the action on the top of the stack. At any time a new action class can be pushed or popped from the action stack and if the stack is empty the parser stops processing events and run returns.
1.8.7