Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 135 lines (90 sloc) 2.232 kB
e064a3a speed up bind function for Variant
myang authored
1
2 <h2>Hierarchical Data Format (HDF)</h2>
3
4 Please use bin/hdf.el for syntax coloring that can help identify syntax errors.
5
6 1. Basic format
7
8 [node] = [value]
9
10 Where, [node] can be an alphanumeric name, and [value] can be
11
12 - booleans: true, false, on, off, yes, no, 1, 0
13 - numbers
14 - strings: without any quoting
15
16 2. Hierarchies
17
18 [node] {
19 [subnode1] = [value]
20 [subnode2] = [value]
21 }
22
23 [node] {
24 [subnode] = [value]
25 [subnode] {
26 [subsubnode1] = [value]
27 [subsubnode2] = [value]
28 }
29 }
30
31 3. Dotted node names
32
33 [node] {
34 [subnode] = [value1]
35 [subnode] {
36 [subsubnode] = [value2]
37 }
38 }
39
40 is the same as,
41
42 [node].[subnode] = [value1]
43 [node].[subnode].[subsubnode] = [value2]
44
45 These dotted node names and paths can appear anywhere a node can be at.
46
47 4. Arrays
48
49 Use '*' for automatically generated node names that you don't care
50
51 [node] {
52 * = [value1]
53 * = [value2]
54 }
55
56 This is fine, too, except it's harder to maintain if one needs to add/delete:
57
58 [node] {
59 0 = [value1]
60 1 = [value2]
61 }
62
63 5. Node alias
64
65 [node] : [another]
66
67 Watch out, this makes those two nodes symbolic linking to each other, so this
68 will modify [another] as well:
69
70 [node] : [another]
71 [node] {
72 extra = value
73 }
74
75 6. Node copying
76
77 To avoid the above accidental modification when aliasing a node, one can do,
78
79 [node] := [another]
80 [node] {
81 extra = value
82 }
83
84 Now, [node] is a different node than [another] and the modification doesn't
85 affect [another]
86
87 7. Node inheritance
88
89 [node] {
90 @[another]
91 extra = value
92 }
93
94 is the same as
95
96 [node] := [another]
97 [node] {
98 extra = value
99 }
100
101 Sometimes it's easier and clearer to write node copying in inheritance format:
102
103 [node] {
104 @[another1]
105 @[another2]
106 extra = value
107 }
108
109 8. Special shell commands
110
111 [node] != [command]
112
113 This will execute shell command and use its return as the node's value.
114
115 9. Include statement
116
117 #include "another.hdf"
118
119 10. Comments
120
121 # only one format of comment is supported
122 # it has to start from line beginning
123
124 Watch out, this is NOT comment:
125
126 [node] = [value] # this will become part of node's value
127
128 11. Multiple-line strings
129
130 [node] << EOM
131 1st line
132 2nd line
133 ...
134 EOM
Something went wrong with that request. Please try again.