Renamed 'Nop' to 'Epsilon' to match spirit. Debugged non-moving parsers. Added 'Wrap' rule that will allow a Rule to wrap a single other Rule and get a tree for the node.

This commit is contained in:
Jonathan Turner
2009-06-10 14:10:15 +00:00
parent c4e3328bb1
commit e7a0bf70fd
4 changed files with 92 additions and 27 deletions

View File

@@ -96,7 +96,7 @@ void parse(std::vector<TokenPtr> &tokens, const char *filename) {
return_statement = Ign(Str("return")) >> expression;
*/
Rule rule(TokenType::Equation);
rule = Str("break");
rule = Wrap(Str("break"));
std::cout << "Check: " << rule.impl->new_id << std::endl;