Merged utf branch changes r178:187 into the trunk

This commit is contained in:
Jesse Beder
2009-07-10 03:10:03 +00:00
parent a7b8879494
commit b929eb94a0
13 changed files with 939 additions and 271 deletions

21
util/parse.cpp Normal file
View File

@@ -0,0 +1,21 @@
#include "yaml.h"
#include <fstream>
#include <iostream>
int main(int argc, char **argv)
{
if(argc != 2) {
std::cout << "Usage: " << argv[0] << " input-file\n";
return 0;
}
std::ifstream fin(argv[1]);
try {
YAML::Parser parser(fin);
YAML::Node doc;
parser.GetNextDocument(doc);
} catch(const YAML::Exception& e) {
std::cerr << "Error at line " << e.line << ", col " << e.column << ": " << e.msg << "\n";
}
return 0;
}