rpcs3/parser.cpp
2008-06-30 06:51:22 +00:00

33 lines
585 B
C++

#include "parser.h"
#include "node.h"
#include "token.h"
#include <iostream>
namespace YAML
{
Parser::Parser(std::istream& in): m_scanner(in)
{
// eat the stream start token
// TODO: check?
Token *pToken = m_scanner.GetNextToken();
}
Parser::~Parser()
{
}
void Parser::GetNextDocument(Document& document)
{
// scan and output, for now
while(1) {
Token *pToken = m_scanner.GetNextToken();
if(!pToken)
break;
std::cout << typeid(*pToken).name() << ": " << *pToken << std::endl;
delete pToken;
}
getchar();
}
}