Wrote some tests, but they don't work because it doesn't output maps in a canonical form.

This commit is contained in:
Jesse Beder
2008-07-05 19:00:58 +00:00
parent dacc631968
commit 2a0ddc8cb2
8 changed files with 167 additions and 14 deletions

View File

@@ -8,8 +8,7 @@ namespace YAML
{
Parser::Parser(std::istream& in): m_pScanner(0)
{
m_pScanner = new Scanner(in);
m_state.Reset();
Load(in);
}
Parser::~Parser()
@@ -22,6 +21,13 @@ namespace YAML
return m_pScanner->PeekNextToken() != 0;
}
void Parser::Load(std::istream& in)
{
delete m_pScanner;
m_pScanner = new Scanner(in);
m_state.Reset();
}
// GetNextDocument
// . Reads the next document in the queue (of tokens).
// . Throws (ScannerException|ParserException)s on errors.