Collect worker memory stats
[hiphop-php.git] / hphp / doc / hdf
blob66a4dcf00fb1f848a6ea14ac223cc8c7b07f2416
2 <h2>Hierarchical Data Format (HDF)</h2>
4 Please use bin/hdf.el for syntax coloring that can help identify syntax errors.
6 1. Basic format
8   [node] = [value]
10 Where, [node] can be an alphanumeric name, and [value] can be
12 - booleans:  true, false, on, off, yes, no, 1, 0
13 - numbers
14 - strings: without any quoting
16 2. Hierarchies
18   [node] {
19     [subnode1] = [value]
20     [subnode2] = [value]
21   }
23   [node] {
24     [subnode] = [value]
25     [subnode] {
26       [subsubnode1] = [value]
27       [subsubnode2] = [value]
28     }
29   }
31 3. Dotted node names
33   [node] {
34     [subnode] = [value1]
35     [subnode] {
36       [subsubnode] = [value2]
37     }
38   }
40 is the same as,
42   [node].[subnode] = [value1]
43   [node].[subnode].[subsubnode] = [value2]
45 These dotted node names and paths can appear anywhere a node can be at.
47 4. Arrays
49 Use '*' for automatically generated node names that you don't care
51   [node] {
52     * = [value1]
53     * = [value2]
54   }
56 This is fine, too, except it's harder to maintain if one needs to add/delete:
58   [node] {
59     0 = [value1]
60     1 = [value2]
61   }
63 5. Node alias
65   [node] : [another]
67 Watch out, this makes those two nodes symbolic linking to each other, so this
68 will modify [another] as well:
70   [node] : [another]
71   [node] {
72     extra = value
73   }
75 6. Node copying
77 To avoid the above accidental modification when aliasing a node, one can do,
79   [node] := [another]
80   [node] {
81     extra = value
82   }
84 Now, [node] is a different node than [another] and the modification doesn't
85 affect [another]
87 7. Node inheritance
89   [node] {
90     @[another]
91     extra = value
92   }
94 is the same as
96   [node] := [another]
97   [node] {
98     extra = value
99   }
101 Sometimes it's easier and clearer to write node copying in inheritance format:
103   [node] {
104     @[another1]
105     @[another2]
106     extra = value
107   }
109 8. Special shell commands
111   [node] != [command]
113 This will execute shell command and use its return as the node's value.
115 9. Include statement
117   #include "another.hdf"
119 10. Comments
121   # only one format of comment is supported
122   # it has to start from line beginning
124 Watch out, this is NOT comment:
126   [node] = [value]   # this will become part of node's value
128 11. Multiple-line strings
130   [node] << EOM
131   1st line
132   2nd line
133   ...
134   EOM