24 lines
1.1 KiB
BNF
24 lines
1.1 KiB
BNF
|
<digit> ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
|
||
|
<positive-number> ::= <digit>+
|
||
|
<negative-number> ::= "-" <positive-number>
|
||
|
<number> ::= <negative-number> | <positive-number>
|
||
|
|
||
|
<name> ::= (<letter> | <mark>) (<letter> | <mark> | <digit>)*
|
||
|
|
||
|
<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>
|