ginger/gg/gg.bnf

26 lines
1.1 KiB
BNF
Raw Normal View History

<digit> ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
<positive-number> ::= <digit>+
<negative-number> ::= "-" <positive-number>
<number> ::= <negative-number> | <positive-number>
2023-10-29 20:42:41 +00:00
<name-head> ::= <letter> | <mark> | "!"
<name-tail> ::= <name-head> | <digit>
<name> ::= <name-head> <name-tail>*
<tuple> ::= "(" <tuple-tail>
<tuple-tail> ::= ")" | <tuple-open-edge>
<tuple-open-edge> ::= <value> <tuple-open-edge-value-tail>
| <tuple> <tuple-open-edge-tail>
<tuple-open-edge-tail> ::= ")" | "," <tuple-tail>
<tuple-open-edge-value-tail> ::= <tuple-open-edge-tail> | "<" <tuple-open-edge>
<graph> ::= "{" <graph-tail>
<graph-tail> ::= "}" | <name> "=" <graph-open-edge>
<graph-open-edge> ::= <value> <graph-open-edge-value-tail>
| <tuple> <graph-open-edge-tail>
<graph-open-edge-tail> ::= "}" | ";" <graph-tail>
<graph-open-edge-value-tail> ::= <graph-open-edge-tail> | "<" <graph-open-edge>
<value> ::= <name> | <number> | <graph>
<gg> ::= <eof> | <value> <gg>