Lots of small bugfixes re:parser. pimpl now works with ast keep and new_id

This commit is contained in:
Jonathan Turner
2009-05-27 21:01:56 +00:00
parent 10491e4ed8
commit 2ca701aa32
3 changed files with 47 additions and 40 deletions

View File

@@ -48,15 +48,15 @@ std::string load_file(const char *filename) {
}
void parse(std::vector<TokenPtr> &tokens) {
/*
Rule lhs;
Rule rhs;
Rule rule = lhs & rhs;
Rule rule = lhs << rhs;
lhs = Str("def", true);
rhs = Id(TokenType::Identifier, true);
*/
Rule rule = Str("def") & Id(TokenType::Identifier, true);
//Rule rule = Str("def", false) << Id(TokenType::Identifier, true);
Token_Iterator iter = tokens.begin(), end = tokens.end();
TokenPtr parent(new Token("Root", 0, "test"));