comby/lib/kernel/language
2021-04-19 02:00:00 -07:00
..
ast.ml simple script parser and rule syntax additions (#273) 2021-04-10 19:36:59 -07:00
dune separate comby-kernel (#271) 2021-04-06 23:04:31 -07:00
evaluate.ml merge rule evaluation (#278) 2021-04-19 02:00:00 -07:00
options.ml separate comby-kernel (#271) 2021-04-06 23:04:31 -07:00
options.mli separate comby-kernel (#271) 2021-04-06 23:04:31 -07:00
parser.ml simple script parser and rule syntax additions (#273) 2021-04-10 19:36:59 -07:00
README.md separate comby-kernel (#271) 2021-04-06 23:04:31 -07:00
rule.ml merge rule evaluation (#278) 2021-04-19 02:00:00 -07:00
rule.mli merge rule evaluation (#278) 2021-04-19 02:00:00 -07:00
script.ml simple script parser and rule syntax additions (#273) 2021-04-10 19:36:59 -07:00
syntax.ml simple script parser and rule syntax additions (#273) 2021-04-10 19:36:59 -07:00
types.ml Rewrite template refactor (#277) 2021-04-19 01:17:42 -07:00

Rule language grammar

grammar ::= "where" sequence

sequence ::= expression ("," expression)*

expression ::= 
| bool
| atom "==" atom 
| atom "!=" atom
| "rewrite" atom "{" qstring "->" atom "}"
| "match" atom "{" ("|" branch )+ "}"

bool ::= "true" | "false"
atom ::= hole | qstring
qstring ::= '"' quoted-string '"'
hole ::= ":[" hole-identifier "]"
branch ::= qstring "->" sequence

See the page for hole-identifier syntax if it matters.