/
C4HZ.tml
103 lines (99 loc) · 1.76 KB
/
C4HZ.tml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
=== Spec Example 2.24. Global Tags
--- from: http://www.yaml.org/spec/1.2/spec.html#id2761719
--- tags: spec tag alias directive local-tag
--- in-yaml(<)
%TAG ! tag:clarkevans.com,2002:
--- !shape
# Use the ! handle for presenting
# tag:clarkevans.com,2002:circle
- !circle
center: &ORIGIN {x: 73, y: 129}
radius: 7
- !line
start: *ORIGIN
finish: { x: 89, y: 102 }
- !label
start: *ORIGIN
color: 0xFFEEBB
text: Pretty vector drawing.
--- out-yaml(<)
--- !<tag:clarkevans.com,2002:shape>
- !<tag:clarkevans.com,2002:circle>
center: &ORIGIN
x: 73
y: 129
radius: 7
- !<tag:clarkevans.com,2002:line>
start: *ORIGIN
finish:
x: 89
y: 102
- !<tag:clarkevans.com,2002:label>
start: *ORIGIN
color: 0xFFEEBB
text: Pretty vector drawing.
--- in-json(<)
[
{
"center": {
"x": 73,
"y": 129
},
"radius": 7
},
{
"start": {
"x": 73,
"y": 129
},
"finish": {
"x": 89,
"y": 102
}
},
{
"start": {
"x": 73,
"y": 129
},
"color": 16772795,
"text": "Pretty vector drawing."
}
]
--- test-event
+STR
+DOC ---
+SEQ <tag:clarkevans.com,2002:shape>
+MAP <tag:clarkevans.com,2002:circle>
=VAL :center
+MAP &ORIGIN
=VAL :x
=VAL :73
=VAL :y
=VAL :129
-MAP
=VAL :radius
=VAL :7
-MAP
+MAP <tag:clarkevans.com,2002:line>
=VAL :start
=ALI *ORIGIN
=VAL :finish
+MAP
=VAL :x
=VAL :89
=VAL :y
=VAL :102
-MAP
-MAP
+MAP <tag:clarkevans.com,2002:label>
=VAL :start
=ALI *ORIGIN
=VAL :color
=VAL :0xFFEEBB
=VAL :text
=VAL :Pretty vector drawing.
-MAP
-SEQ
-DOC
-STR