summaryrefslogtreecommitdiff
path: root/tests/grammar.pest
diff options
context:
space:
mode:
Diffstat (limited to 'tests/grammar.pest')
-rw-r--r--tests/grammar.pest9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/grammar.pest b/tests/grammar.pest
index 43a7b8c..b24d477 100644
--- a/tests/grammar.pest
+++ b/tests/grammar.pest
@@ -22,6 +22,7 @@ sequence_atomic_compound = @{ sequence_compound }
sequence_nested = { string ~ string }
sequence_compound_nested = ${ sequence_nested }
choice = { string | range }
+choice_prefix = { | string | range }
optional = { string? }
repeat = { string* }
repeat_atomic = @{ string* }
@@ -36,6 +37,9 @@ repeat_max = { string{, 2} }
repeat_max_atomic = @{ string{, 2} }
soi_at_start = { SOI ~ string }
repeat_mutate_stack = { (PUSH('a'..'c') ~ ",")* ~ POP ~ POP ~ POP }
+repeat_mutate_stack_pop_all = { (PUSH('a'..'c') ~ ",")* ~ POP_ALL }
+will_fail = { repeat_mutate_stack_pop_all ~ "FAIL" }
+stack_resume_after_fail = { will_fail | repeat_mutate_stack_pop_all }
peek_ = { PUSH(range) ~ PUSH(range) ~ PEEK ~ PEEK }
peek_all = { PUSH(range) ~ PUSH(range) ~ PEEK_ALL }
peek_slice_23 = { PUSH(range) ~ PUSH(range) ~ PUSH(range) ~ PUSH(range) ~ PUSH(range) ~ PEEK[1..-2] }
@@ -59,6 +63,11 @@ newline = { NEWLINE+ }
unicode = { XID_START ~ XID_CONTINUE* }
SYMBOL = { "shadows builtin" }
+han = { HAN+ }
+hangul = { HANGUL+ }
+hiragana = { HIRAGANA+ }
+arabic = { ARABIC+ }
+
WHITESPACE = _{ " " }
COMMENT = _{ "$"+ }