Added parsing of anchors, aliases, and tags (still no semantics yet).

Fixed a silly bug in the simple key pushing (queues are FIFO!).
This commit is contained in:
beder
2008-07-01 01:17:10 +00:00
parent d41503da5a
commit 104da5c244
10 changed files with 167 additions and 34 deletions

View File

@@ -1,5 +1,7 @@
#include "parser.h"
#include "scanner.h"
#include "token.h"
#include <iostream>
namespace YAML
{
@@ -17,4 +19,15 @@ namespace YAML
{
document.Parse(m_pScanner);
}
void Parser::PrintTokens()
{
while(1) {
Token *pToken = m_pScanner->GetNextToken();
if(!pToken)
break;
std::cout << *pToken << std::endl;
}
}
}