Commit 31f7db5a by Jesse Beder

More simple scalar scanning.

parent a3961d04
......@@ -36,8 +36,9 @@ namespace YAML
try {
scanner.Scan();
} catch(const UnknownToken& e) {
} catch(const Exception& e) {
}
getchar();
// if(!scanner)
// return;
......
......@@ -11,4 +11,5 @@ namespace YAML
class IllegalMapKey: public Exception {};
class IllegalMapValue: public Exception {};
class IllegalScalar: public Exception {};
class IllegalTabInScalar: public Exception {};
}
......@@ -43,13 +43,14 @@ namespace YAML
private:
char GetChar();
void Eat(int n = 1);
std::string Peek(int n);
void EatLineBreak();
void EatDocumentStart();
void EatDocumentEnd();
bool IsWhitespaceToBeEaten();
bool IsLineBreak();
bool IsBlank();
bool IsWhitespaceToBeEaten(char ch);
bool IsLineBreak(char ch);
bool IsBlank(char ch);
bool IsDocumentStart();
bool IsDocumentEnd();
bool IsBlockEntry();
......
......@@ -2,7 +2,7 @@
namespace YAML
{
class Token {};
class Token { public: virtual ~Token() {} };
class StreamStartToken: public Token {};
class StreamEndToken: public Token {};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment