File: implicit.pest

package info (click to toggle)
rust-pest-derive 2.8.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 340 kB
  • sloc: makefile: 4
file content (14 lines) | stat: -rw-r--r-- 430 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
program = _{ SOI ~ implicit ~ EOI  }
implicit= ${ #head = or ~ #tail = (WHITESPACE+ ~ or)* }

or  = !{ #more_and = and ~ (or_op ~ and)+ | #one_and = and }
and = { #more_comp = comp ~ (and_op ~ comp)+ | #one_comp = comp }
comp = { #more_array = array ~ eq_op ~ array | #one_array = array }

array = ${ term }

term = _{ ASCII_ALPHANUMERIC+ }
or_op = { "||" }
and_op = { "&&" }
eq_op = { "=" }
WHITESPACE = _{ " " | "\t" | NEWLINE }