Beginning of first attempt to parse.

Will be completely wiped, I think, in favor of a Scanner (to tokens), then Parser mechanism.
This commit is contained in:
Jesse Beder 2008-06-26 06:49:50 +00:00
parent 4ed7f62431
commit bcbca461de
11 changed files with 247 additions and 9 deletions

View file

@ -1,10 +1,12 @@
#include "sequence.h"
#include "node.h"
#include "parser.h"
namespace YAML
{
Sequence::Sequence()
Sequence::Sequence(Parser *pParser)
{
Read(pParser);
}
Sequence::~Sequence()
@ -12,4 +14,12 @@ namespace YAML
for(unsigned i=0;i<m_data.size();i++)
delete m_data[i];
}
void Sequence::Read(Parser *pParser)
{
do {
Node *pNode = pParser->ReadNextNode();
m_data.push_back(pNode);
} while(pParser->SeqContinues());
}
}