summaryrefslogtreecommitdiff
path: root/tests/implicit.pest
blob: 18ebf7eaf431c7ffa3b70eb8ea24dcd4ab28d1f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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 }