git.droids-corp.org
/
protos
/
libecoli.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
yaml: more examples
[protos/libecoli.git]
/
examples
/
parse-yaml
/
cross.yaml
diff --git a/examples/parse-yaml/cross.yaml
b/examples/parse-yaml/cross.yaml
new file mode 100644
(file)
index 0000000..
e6e35fa
--- /dev/null
+++ b/
examples/parse-yaml/cross.yaml
@@ -0,0
+1,16
@@
+# matches "x", "x + x", "x + x + x", ...
+&term
+id: term
+type: or
+children:
+- type: seq
+ children:
+ - &value
+ id: value
+ type: str
+ string: x
+ - id: operator
+ type: str
+ string: +
+ - *term
+- *value