Added a unit test and updated playground

This commit is contained in:
yhirose 2022-06-07 20:27:26 -04:00
parent 93d0489098
commit 3a56a15b0d
3 changed files with 11 additions and 1 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -233,6 +233,16 @@ TEST(InfiniteLoopTest, in_sequence) {
EXPECT_FALSE(pg); EXPECT_FALSE(pg);
} }
TEST(InfiniteLoopTest, in_prioritized_choice) {
parser pg(R"(
S <- A*
A <- 'a' / 'b' B
B <- 'a' ''*
)");
EXPECT_FALSE(pg);
}
TEST(PrecedenceTest, Precedence_climbing) { TEST(PrecedenceTest, Precedence_climbing) {
parser parser(R"( parser parser(R"(
START <- _ EXPRESSION START <- _ EXPRESSION