summaryrefslogtreecommitdiff
path: root/tests/implicit.pest
diff options
context:
space:
mode:
Diffstat (limited to 'tests/implicit.pest')
-rw-r--r--tests/implicit.pest14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/implicit.pest b/tests/implicit.pest
new file mode 100644
index 0000000..18ebf7e
--- /dev/null
+++ b/tests/implicit.pest
@@ -0,0 +1,14 @@
+program = _{ SOI ~ implicit ~ EOI }
+implicit= ${ or ~ (WHITESPACE+ ~ or )* }
+
+or = !{ and ~ (or_op ~ and)+ | and }
+and = { comp ~ (and_op ~ comp)+ | comp }
+comp = { array ~ eq_op ~ array | array }
+
+array = ${ term }
+
+term = _{ ASCII_ALPHANUMERIC+ }
+or_op = { "||" }
+and_op = { "&&" }
+eq_op = { "=" }
+WHITESPACE = _{ " " | "\t" | NEWLINE } \ No newline at end of file