diff options
| author | Baptiste Daroussin <bapt@FreeBSD.org> | 2025-06-26 06:57:37 +0000 |
|---|---|---|
| committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2025-07-08 14:06:59 +0000 |
| commit | e52f11f4bbc89df8114715a210adf2411ca4936d (patch) | |
| tree | 86b48d9f4788d3ab3e94b2bf3ddb55cf4e497a71 /contrib/libyaml/examples | |
| parent | a9475bf3dfb23782ce9e1d4da16473b2f9597d6b (diff) | |
libyaml: import libyaml vendor version 0.2.5
The yaml parser used in nuageinit is too incomplete, import libyaml
in order to be able to use as a complete parser for nuageinit.
(cherry picked from commit 0f5c86ddb0257f4b7620f1d8e898289be30b19bf)
Diffstat (limited to 'contrib/libyaml/examples')
| -rw-r--r-- | contrib/libyaml/examples/anchors.yaml | 10 | ||||
| -rw-r--r-- | contrib/libyaml/examples/array.yaml | 2 | ||||
| -rw-r--r-- | contrib/libyaml/examples/global-tag.yaml | 14 | ||||
| -rw-r--r-- | contrib/libyaml/examples/json.yaml | 1 | ||||
| -rw-r--r-- | contrib/libyaml/examples/mapping.yaml | 2 | ||||
| -rw-r--r-- | contrib/libyaml/examples/numbers.yaml | 1 | ||||
| -rw-r--r-- | contrib/libyaml/examples/strings.yaml | 7 | ||||
| -rw-r--r-- | contrib/libyaml/examples/tags.yaml | 7 | ||||
| -rw-r--r-- | contrib/libyaml/examples/yaml-version.yaml | 3 |
9 files changed, 47 insertions, 0 deletions
diff --git a/contrib/libyaml/examples/anchors.yaml b/contrib/libyaml/examples/anchors.yaml new file mode 100644 index 000000000000..875585317000 --- /dev/null +++ b/contrib/libyaml/examples/anchors.yaml @@ -0,0 +1,10 @@ +base: &base + name: Everyone has same name + +foo: &foo + <<: *base + age: 10 + +bar: &bar + <<: *base + age: 20 diff --git a/contrib/libyaml/examples/array.yaml b/contrib/libyaml/examples/array.yaml new file mode 100644 index 000000000000..18efd12efbde --- /dev/null +++ b/contrib/libyaml/examples/array.yaml @@ -0,0 +1,2 @@ +- member +- member2 diff --git a/contrib/libyaml/examples/global-tag.yaml b/contrib/libyaml/examples/global-tag.yaml new file mode 100644 index 000000000000..1180757d81cb --- /dev/null +++ b/contrib/libyaml/examples/global-tag.yaml @@ -0,0 +1,14 @@ +%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. diff --git a/contrib/libyaml/examples/json.yaml b/contrib/libyaml/examples/json.yaml new file mode 100644 index 000000000000..7822ddc8342f --- /dev/null +++ b/contrib/libyaml/examples/json.yaml @@ -0,0 +1 @@ +{"key": ["value", 3]} diff --git a/contrib/libyaml/examples/mapping.yaml b/contrib/libyaml/examples/mapping.yaml new file mode 100644 index 000000000000..53d256787c9f --- /dev/null +++ b/contrib/libyaml/examples/mapping.yaml @@ -0,0 +1,2 @@ +key: value +other-key: other-value diff --git a/contrib/libyaml/examples/numbers.yaml b/contrib/libyaml/examples/numbers.yaml new file mode 100644 index 000000000000..45d2bf01b2ff --- /dev/null +++ b/contrib/libyaml/examples/numbers.yaml @@ -0,0 +1 @@ +[100, 12.5, -130, 1.3e+9] diff --git a/contrib/libyaml/examples/strings.yaml b/contrib/libyaml/examples/strings.yaml new file mode 100644 index 000000000000..31b641f4f3cd --- /dev/null +++ b/contrib/libyaml/examples/strings.yaml @@ -0,0 +1,7 @@ +unqouted: string +literal-block: | + This entire block of text will be the value of the 'literal-block' key, + with line breaks being preserved. +folded: > + This entire block of text will be the value of 'folded', but this + time, all newlines will be replaced with a single space. diff --git a/contrib/libyaml/examples/tags.yaml b/contrib/libyaml/examples/tags.yaml new file mode 100644 index 000000000000..3d5a010ac0a6 --- /dev/null +++ b/contrib/libyaml/examples/tags.yaml @@ -0,0 +1,7 @@ +gif_file: !!binary | + R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5 + OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+ + +f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC + AgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs= +explicit_string: !!str 0.5 +python_tag: !!python/complex '1.0+2.0j' diff --git a/contrib/libyaml/examples/yaml-version.yaml b/contrib/libyaml/examples/yaml-version.yaml new file mode 100644 index 000000000000..122b5082b6a7 --- /dev/null +++ b/contrib/libyaml/examples/yaml-version.yaml @@ -0,0 +1,3 @@ +%YAML 1.1 +--- +[1, 2, 3] |
