blob: e5be0599117342582eeec7e328aee7676f414f65 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<tikzpicture> ::= "\begin{tikzpicture}" <properties>?
<expression>*
"\end{tikzpicture}"
<expression> ::= <ignore> | <node> | <edge> | <bounding box>
<ignore> ::= "\begin{pgfonlayer}" DELIMITED_STRING |
"\end{pgfonlayer}"
<properties> ::= "[" <property> ("," <property>)* "]"
<property> ::= <symbol>* "=" <value> | <symbol>*
<symbol> ::= WORD | number
<value> ::= <symbol>* | QUOTED_STRING
<node> ::= "\node" <properties>? <node name>
"at" <coords> DELIMITED_STRING ";"
<node name> ::= "(" (NATURAL_NUMBER | WORD) (".center")? ")"
<coords> ::= "(" NUMBER "," NUMBER ")"
<edge> ::= "\draw" <properties>? <node name>
"to" <edge node>? (<node name> | "()") ";"
<edge node> ::= "node" <properties>? DELIMITED_STRING
<bounding box> ::= "\path" "[use as bounding box]" <coords>
"rectangle" <coords> ";"
|