rpcs3/parser.cpp

31 lines
454 B
C++
Raw Normal View History

#include "parser.h"
#include "node.h"
2008-06-30 06:51:22 +00:00
#include "token.h"
#include <iostream>
namespace YAML
{
2008-06-30 06:51:22 +00:00
Parser::Parser(std::istream& in): m_scanner(in)
{
}
Parser::~Parser()
{
}
2008-06-30 06:51:22 +00:00
void Parser::GetNextDocument(Document& document)
{
2008-06-30 06:51:22 +00:00
// scan and output, for now
while(1) {
Token *pToken = m_scanner.GetNextToken();
if(!pToken)
break;
std::cout << *pToken << std::endl;
2008-06-30 06:51:22 +00:00
delete pToken;
}
2008-06-30 06:51:22 +00:00
getchar();
}
}