From d99d80e862c2799d0dc9a567b710c7b05d6a47a4 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Thu, 30 Jan 2020 08:47:51 +0100 Subject: Fix alternatives handling --- grammer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'grammer.h') diff --git a/grammer.h b/grammer.h index 18719cd..996d023 100644 --- a/grammer.h +++ b/grammer.h @@ -4,6 +4,7 @@ #include "minicc.h" #include +#include namespace Gram { @@ -16,7 +17,7 @@ struct TreeNode { std::string type; index_t variant; // bnf[type][variant] - std::deque alternative_types; // alternatives that we can consider if type fails. Discard after parsing! + std::deque> alternatives; // [type][value] alternatives that we can consider on fail. Discard after parsing! std::vector child_ids; // < 0: terminal: token_id; >= 0: non-terminal: node_id; fill token by token }; -- cgit v1.2.3