12 lines
335 B
Plaintext
12 lines
335 B
Plaintext
boolean_algebra = { SOI ~ expression ~ EOI }
|
|
expression = { negatable_term ~ (binop ~ negatable_term)* }
|
|
negatable_term = _{ negated | term }
|
|
negated = ${ negation ~ term }
|
|
term = _{ label | "(" ~ expression ~ ")" }
|
|
|
|
negation = _{ "!" | "~" }
|
|
binop = @{ or_op | and_op }
|
|
and_op = _{ "" }
|
|
or_op = _{ "+" }
|
|
|
|
label = @{ ASCII_ALPHA } |