libvariant
 All Classes Namespaces Files Functions Enumerations Groups
Public Member Functions | List of all members
libvariant::YAMLParserImpl Class Reference
Inheritance diagram for libvariant::YAMLParserImpl:
libvariant::ParserImpl

Public Member Functions

 YAMLParserImpl (shared_ptr< ParserInput > in)
 
virtual int Run ()
 
virtual bool Done () const
 
virtual bool Error () const
 
virtual bool Ok () const
 
virtual std::string ErrorStr () const
 Return a string describing the last error suitable for presentation to a user.
 
virtual void Reset ()
 Reset the parser.
 
- Public Member Functions inherited from libvariant::ParserImpl
virtual void PushAction (shared_ptr< ParserActions > action)
 
virtual shared_ptr< ParserActionsPopAction ()
 
ParserActionsTopAction ()
 

Additional Inherited Members

- Protected Attributes inherited from libvariant::ParserImpl
std::deque< shared_ptr
< ParserActions > > 
action_stack
 

Member Function Documentation

bool libvariant::YAMLParserImpl::Done ( ) const
virtual

These three functiosn can be used to query the state later. Done means that a call to Process will immediately return 1 Error if Process threw an exception last Ok if everything looks good (Process never been called, or last return 0 or possibly -1)

Implements libvariant::ParserImpl.

int libvariant::YAMLParserImpl::Run ( )
virtual

Attempt to parse some actions. At least one ParserActions should be on the action stack.

Run is not guaranteed to be recursively callable from inside a ParserActions callback. Do not do that.

return 0 on success return 1 when done return -1 if needing more data is detected (not all parsers support this; can be treated as an error) throw on error

An empty event.

A STREAM-START event.

A STREAM-END event.

A DOCUMENT-START event.

A DOCUMENT-END event.

An ALIAS event.

A SCALAR event.

A SEQUENCE-START event.

A SEQUENCE-END event.

A MAPPING-START event.

A MAPPING-END event.

Implements libvariant::ParserImpl.


The documentation for this class was generated from the following files: