Continued working on scanner.

We're now using exceptions for errors, and scanning/pushing tokens is exception-safe (using a set of "limbo tokens").
This commit is contained in:
Jesse Beder 2008-06-26 19:30:11 +00:00
parent 8ae7b48188
commit a3961d047f
6 changed files with 461 additions and 16 deletions

View file

@ -2,6 +2,7 @@
#include "node.h"
#include "parser.h"
#include "scanner.h"
#include "exceptions.h"
#include <fstream>
namespace YAML
@ -32,7 +33,11 @@ namespace YAML
std::ifstream fin(fileName.c_str());
Scanner scanner(fin);
scanner.Scan();
try {
scanner.Scan();
} catch(const UnknownToken& e) {
}
// if(!scanner)
// return;