Added enable_packrat_parsing to precedence expression parsing tests

This commit is contained in:
yhirose 2020-06-06 22:47:50 -04:00
parent ffc61e8a68
commit c1f087a91e

View File

@ -133,6 +133,8 @@ TEST_CASE("Precedence climbing", "[precedence]")
T(S) <- < S > _
)");
parser.enable_packrat_parsing();
// Setup actions
parser["EXPRESSION"] = [](const SemanticValues& sv) -> long {
auto result = any_cast<long>(sv[0]);
@ -189,6 +191,8 @@ TEST_CASE("Precedence climbing with macro", "[precedence]")
%whitespace <- [ \t]*
)");
parser.enable_packrat_parsing();
bool ret = parser;
REQUIRE(ret == true);