+18
.gitignore
+18
.gitignore
+1
.ocamlformat
+1
.ocamlformat
···
+49
.tangled/workflows/build.yml
+49
.tangled/workflows/build.yml
···
+15
LICENSE.md
+15
LICENSE.md
···
+94
README.md
+94
README.md
···
+5
bin/dune
+5
bin/dune
+197
bin/yamlcat.ml
+197
bin/yamlcat.ml
···
+4
dune
+4
dune
+52
dune-project
+52
dune-project
···+Provides efficient async YAML parsing and emission using the Eio effects-based concurrency library. \
+46
lib/char_class.ml
+46
lib/char_class.ml
···
+31
lib/chomping.ml
+31
lib/chomping.ml
···
+59
lib/document.ml
+59
lib/document.ml
···
+35
lib/dune
+35
lib/dune
···
+4
lib/eio/dune
+4
lib/eio/dune
+268
lib/eio/yamlrw_eio.ml
+268
lib/eio/yamlrw_eio.ml
···
+265
lib/eio/yamlrw_eio.mli
+265
lib/eio/yamlrw_eio.mli
···
+581
lib/emitter.ml
+581
lib/emitter.ml
···+push_state t In_flow_mapping_value; (* After ] we'll be in value position but sequence handles it *)
+50
lib/encoding.ml
+50
lib/encoding.ml
···
+372
lib/error.ml
+372
lib/error.ml
···+{{:https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases}Section 3.2.2.2 (Anchors and Aliases)}. *)+{{:https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases}Section 3.2.2.2 (Anchors and Aliases)}. *)+{{:https://yaml.org/spec/1.2.2/#683-reserved-directives}Section 6.8.3 (Reserved Directives)}. *)+{{:https://yaml.org/spec/1.2.2/#82-block-collection-styles}Section 8.2 (Block Collection Styles)}. *)+(* Parser errors - see {{:https://yaml.org/spec/1.2.2/#3-processing-yaml-information}Section 3 (Processing)} *)+{{:https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases}Section 3.2.2.2 (Anchors and Aliases)}. *)+{{:https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases}Section 3.2.2.2 (Anchors and Aliases)}. *)+{{:https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases}Section 3.2.2.2 (Anchors and Aliases)}. *)+(* Loader errors - see {{:https://yaml.org/spec/1.2.2/#31-processes}Section 3.1 (Processes)} *)+See {{:https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases}Section 3.2.2.2 (Anchors and Aliases)}. *)+(** Alias expansion exceeded maximum nesting depth (protection against deeply nested aliases).
+82
lib/event.ml
+82
lib/event.ml
···
+272
lib/input.ml
+272
lib/input.ml
···
+30
lib/layout_style.ml
+30
lib/layout_style.ml
···
+416
lib/loader.ml
+416
lib/loader.ml
···
+95
lib/mapping.ml
+95
lib/mapping.ml
···
+789
lib/parser.ml
+789
lib/parser.ml
···+Error.raise_span tok.span (Invalid_directive "directives require explicit document end '...' before them");
+47
lib/position.ml
+47
lib/position.ml
···
+62
lib/quoting.ml
+62
lib/quoting.ml
···
+66
lib/scalar.ml
+66
lib/scalar.ml
···
+39
lib/scalar_style.ml
+39
lib/scalar_style.ml
···
+1575
lib/scanner.ml
+1575
lib/scanner.ml
···+mutable document_has_content : bool; (** True if we've emitted content tokens in current document *)+mutable adjacent_value_allowed_at : Position.t option; (** Position where adjacent : is allowed *)+if not (Input.is_eof t.input) && not (Input.next_is_break t.input) && col <= indent && indent >= 0 then+Error.raise_at (Input.mark t.input) (Invalid_quoted_scalar_indentation "invalid indentation in quoted scalar");+if not (Input.is_eof t.input) && not (Input.next_is_break t.input) && col <= indent && indent >= 0 then+Error.raise_at (Input.mark t.input) (Invalid_quoted_scalar_indentation "invalid indentation in quoted scalar")+Error.raise_at (Input.mark t.input) (Invalid_quoted_scalar_indentation "invalid indentation in quoted scalar");+Error.raise_at (Input.mark t.input) (Invalid_quoted_scalar_indentation "invalid indentation in quoted scalar");+let max_empty_line_indent = ref 0 in (* Track max indent of empty lines before first content *)+Note: we check Input.next_is_blank BEFORE reading content to see if content starts with whitespace. *)+so we should NOT add any back. On subsequent lines, we add only the spaces beyond content_indent. *)+Error.raise_at (Input.mark t.input) (Invalid_directive "expected comment or line break after version");+| _ -> Error.raise_at start (Invalid_directive "content not allowed after document end marker on same line"))+(Unexpected_token "directives must be separated from document content by document end marker (...)");+(* : followed by whitespace in block, or whitespace/flow indicator in flow, or adjacent value *)+(* In block context without simple key, allow simple keys for compact mappings like ": moon: white"+(* Check for tabs after : : patterns like :\t- or :\tkey: are invalid in block context (Y79Y/09)+(* In block context, tabs-only after : followed by indicator or alphanumeric are not allowed *)
+77
lib/sequence.ml
+77
lib/sequence.ml
···
+369
lib/serialize.ml
+369
lib/serialize.ml
···+let documents_to_buffer ?(config = Emitter.default_config) ?(resolve_aliases = true) ?buffer documents =+let documents_to_string ?(config = Emitter.default_config) ?(resolve_aliases = true) documents =+let documents_to_writer ?(config = Emitter.default_config) ?(resolve_aliases = true) ?(eod = true) writer documents =
+40
lib/span.ml
+40
lib/span.ml
···
+73
lib/tag.ml
+73
lib/tag.ml
···
+83
lib/token.ml
+83
lib/token.ml
···
+4
lib/unix/dune
+4
lib/unix/dune
+124
lib/unix/yamlrw_unix.ml
+124
lib/unix/yamlrw_unix.ml
···
+125
lib/unix/yamlrw_unix.mli
+125
lib/unix/yamlrw_unix.mli
···
+167
lib/value.ml
+167
lib/value.ml
···
+311
lib/yaml.ml
+311
lib/yaml.ml
···+@raise Error.Yamlrw_error with {!type:Error.kind} [Alias_expansion_node_limit] if max_nodes is exceeded+@raise Error.Yamlrw_error with {!type:Error.kind} [Alias_expansion_depth_limit] if max_depth is exceeded+let resolve_aliases ?(max_nodes = default_max_alias_nodes) ?(max_depth = default_max_alias_depth) (root : t) : t =+@raise Error.Yamlrw_error with {!type:Error.kind} [Unresolved_alias] if resolve_aliases_first is false and an alias is encountered
+700
lib/yamlrw.ml
+700
lib/yamlrw.ml
···+version : (int * int) option; (** Optional YAML version directive (e.g., (1, 2) for YAML 1.2) *)+Buffer.contents (documents_to_buffer ~encoding ~scalar_style ~layout_style ~resolve_aliases documents)+(Yaml.to_value ~resolve_aliases_first:resolve_aliases ~max_nodes ~max_depth (yaml :> Yaml.t) :> value)
+689
lib/yamlrw.mli
+689
lib/yamlrw.mli
···+version : (int * int) option; (** Optional YAML version directive (e.g., (1, 2) for YAML 1.2) *)+val scalar : emitter -> ?anchor:string -> ?tag:string -> ?style:Scalar_style.t -> string -> unit+val sequence_start : emitter -> ?anchor:string -> ?tag:string -> ?style:Layout_style.t -> unit -> unit+val mapping_start : emitter -> ?anchor:string -> ?tag:string -> ?style:Layout_style.t -> unit -> unit
+24
tests/cram/anchor.yml
+24
tests/cram/anchor.yml
···
+375
tests/cram/anchors.t
+375
tests/cram/anchors.t
···
+125
tests/cram/anchors_basic.yml
+125
tests/cram/anchors_basic.yml
···+# Expected: config.settings should have timeout and retries, config.palette should have the color list
+194
tests/cram/anchors_merge.yml
+194
tests/cram/anchors_merge.yml
···+# Expected: custom should have size and weight from base, but color should be blue, and add shape+# Expected: main_heading should inherit from heading (which inherits from base_style) with overrides
+70
tests/cram/bomb.t
+70
tests/cram/bomb.t
···+{"a": [1, 2, 3, 4, 5, 6, 7, 8, 9], "b": [[1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [+{"defaults": {"timeout": 30, "retries": 3}, "production": {"<<": {"timeout": 30, "retries": 3}, "port": 8080}}
+9
tests/cram/bomb.yml
+9
tests/cram/bomb.yml
···
+6
tests/cram/bomb_small.yml
+6
tests/cram/bomb_small.yml
+23
tests/cram/cohttp.yml
+23
tests/cram/cohttp.yml
···+install: wget https://raw.githubusercontent.com/ocaml/ocaml-travisci-skeleton/master/.travis-docker.sh+- PINS="cohttp-top:. cohttp-async:. cohttp-lwt-unix:. cohttp-lwt-jsoo:. cohttp-lwt:. cohttp-mirage:. cohttp:."
+863
tests/cram/collections.t
+863
tests/cram/collections.t
···+{"simple_sequence": ["apple", "banana", "cherry", "date"], "simple_mapping": {"name": "John Doe", "age": 30, "city": "New York", "country": "USA"}, "nested_sequences": [["alpha", "beta", "gamma"], ["one", "two", "three"], ["red", "green", "blue"]], "nested_mappings": {"person": {"name": "Alice", "contact": {"email": "alice@example.com", "phone": "555-1234"}, "address": {"street": "123 Main St", "city": "Boston"}}}, "mapping_with_sequences": {"colors": ["red", "green", "blue"], "sizes": ["small", "medium", "large"], "numbers": [1, 2, 3]}, "sequence_with_mappings": [{"name": "Alice", "age": 25, "role": "developer"}, {"name": "Bob", "age": 30, "role": "designer"}, {"name": "Charlie", "age": 35, "role": "manager"}], "deep_nesting": {"level1": {"level2": {"level3": {"level4": ["deeply", "nested", "values"], "another_key": "value"}, "items": ["item1", "item2"]}, "metadata": {"created": "2024-01-01", "modified": "2024-12-04"}}}, "complex_structure": {"database": {"connections": [{"host": "db1.example.com", "port": 5432, "credentials": {"username": "admin", "password": "secret"}}, {"host": "db2.example.com", "port": 5432, "credentials": {"username": "readonly", "password": "public"}}]}, "services": [{"name": "api", "endpoints": ["/users", "/posts", "/comments"], "config": {"timeout": 30, "retries": 3}}, {"name": "worker", "tasks": ["email", "reports"], "config": {"concurrency": 10}}]}, "empty_collections": {"empty_sequence": [], "empty_mapping": {}, "sequence_with_empty": ["value1", [], "value2"], "mapping_with_empty": {"key1": "value1", "key2": {}, "key3": "value3"}}}+{simple_sequence: [apple, banana, cherry, date]simple_mapping, {name: John Doe, age: 30, city: New York, country: USA}, nested_sequences: [[alpha, beta, gamma], [one, two, three], [red, green, blue]]nested_mappings, {person: {name: Alice, contact: {email: alice@example.com, phone: 555-1234}address, {street: 123 Main St, city: Boston}}}, mapping_with_sequences: {colors: [red, green, blue]sizes, [small, medium, large], numbers: [1, 2, 3]}sequence_with_mappings, [{name: Alice, age: 25, role: developer}, {name: Bob, age: 30, role: designer}, {name: Charlie, age: 35, role: manager}], deep_nesting: {level1: {level2: {level3: {level4: [deeply, nested, values]another_key, value: }items, [item1, item2]}metadata, {created: 2024-01-01, modified: 2024-12-04}}}complex_structure, {database: {connections: [{host: db1.example.com, port: 5432, credentials: {username: admin, password: secret}}, {host: db2.example.com, port: 5432, credentials: {username: readonly, password: public}}]}services, [{name: api, endpoints: [/users, /posts, /comments]config, {timeout: 30, retries: 3}}, {name: worker, tasks: [email, reports]config, {concurrency: 10}}]}, empty_collections: {empty_sequence: []empty_mapping, {}, sequence_with_empty: [value1, [], value2]mapping_with_empty, {key1: value1, key2: {}key3, value3: }}}+{"compact_sequence": [{"name": "Alice", "age": 25, "city": "Boston"}, {"name": "Bob", "age": 30, "city": "Seattle"}, {"name": "Charlie", "age": 35, "city": "Portland"}], "compact_nested": [{"id": 1, "details": {"type": "admin", "permissions": ["read", "write", "delete"]}}, {"id": 2, "details": {"type": "user", "permissions": ["read"]}}], "compact_complex": [{"key1": "value1", "key2": "value2", "nested": {"sub1": "val1", "sub2": "val2"}}, {"key1": "value3", "key2": "value4", "nested": {"sub1": "val3", "sub2": "val4"}}], "users": [{"username": "alice", "email": "alice@example.com", "active": true}, {"username": "bob", "email": "bob@example.com", "active": false}], "compact_with_flow": [{"name": "service1", "ports": [8080, 8443], "env": {"DEBUG": true, "MODE": "production"}}, {"name": "service2", "ports": [3000], "env": {"DEBUG": false, "MODE": "development"}}], "deep_compact": [{"category": "electronics", "items": [{"name": "laptop", "specs": {"cpu": "Intel i7", "ram": "16GB", "storage": "512GB SSD"}}, {"name": "phone", "specs": {"os": "Android", "ram": "8GB", "storage": "256GB"}}]}, {"category": "furniture", "items": [{"name": "desk", "dimensions": {"width": "150cm", "depth": "75cm", "height": "75cm"}}, {"name": "chair", "dimensions": {"width": "60cm", "depth": "60cm", "height": "120cm"}}]}], "mixed_compact": {"databases": [{"type": "postgresql", "connection": {"host": "localhost", "port": 5432}, "credentials": {"user": "admin", "password": "secret"}}, {"type": "mongodb", "connection": {"host": "localhost", "port": 27017}, "credentials": {"user": "root", "password": "root"}}]}, "single_line_compact": [{"name": "Alice", "age": 25, "role": "developer"}, {"name": "Bob", "age": 30, "role": "designer"}, {"name": "Charlie", "age": 35, "role": "manager"}], "sequences_in_compact": [{"title": "Project A", "members": ["Alice", "Bob", "Charlie"], "tags": ["urgent", "backend"]}, {"title": "Project B", "members": ["David", "Eve"], "tags": ["frontend", "design"]}], "compact_with_empty": [{"id": 1, "data": [], "meta": {}}, {"id": 2, "data": ["item1"], "meta": {"key": "value"}}], "compact_complex_nesting": [{"level": 1, "children": [{"level": "2a", "children": [{"level": "3a", "value": "leaf1"}, {"level": "3b", "value": "leaf2"}]}, {"level": "2b", "children": [{"level": "3c", "value": "leaf3"}]}]}], "api_endpoints": [{"path": "/users", "method": "GET", "auth": "required", "params": [{"name": "page", "type": "integer", "default": 1}, {"name": "limit", "type": "integer", "default": 10}]}, {"path": "/users/:id", "method": "GET", "auth": "required", "params": []}, {"path": "/users", "method": "POST", "auth": "required", "body": {"username": "string", "email": "string", "password": "string"}}], "compact_types": [{"string_val": "hello", "number_val": 42, "float_val": 3.14, "bool_val": true, "null_val": null}, {"string_val": "world", "number_val": 100, "float_val": 2.71, "bool_val": false, "null_val": null}], "minimal": [{"a": 1}, {"b": 2}, {"c": 3}]}+{compact_sequence: [{name: Alice, age: 25, city: Boston}, {name: Bob, age: 30, city: Seattle}, {name: Charlie, age: 35, city: Portland}]compact_nested, [{id: 1, details: {type: admin, permissions: [read, write, delete]}}, {id: 2, details: {type: user, permissions: [read]}}], compact_complex: [{key1: value1, key2: value2, nested: {sub1: val1, sub2: val2}}, {key1: value3, key2: value4, nested: {sub1: val3, sub2: val4}}]users, [{username: alice, email: alice@example.com, active: true}, {username: bob, email: bob@example.com, active: false}], compact_with_flow: [{name: service1, ports: [8080, 8443]env, {DEBUG: true, MODE: production}}, {name: service2, ports: [3000]env, {DEBUG: false, MODE: development}}]deep_compact, [{category: electronics, items: [{name: laptop, specs: {cpu: Intel i7, ram: 16GB, storage: 512GB SSD}}, {name: phone, specs: {os: Android, ram: 8GB, storage: 256GB}}]}, {category: furniture, items: [{name: desk, dimensions: {width: 150cm, depth: 75cm, height: 75cm}}, {name: chair, dimensions: {width: 60cm, depth: 60cm, height: 120cm}}]}], mixed_compact: {databases: [{type: postgresql, connection: {host: localhost, port: 5432}credentials, {user: admin, password: secret}}, {type: mongodb, connection: {host: localhost, port: 27017}credentials, {user: root, password: root}}]}single_line_compact, [{name: Alice, age: 25, role: developer}, {name: Bob, age: 30, role: designer}, {name: Charlie, age: 35, role: manager}], sequences_in_compact: [{title: Project A, members: [Alice, Bob, Charlie]tags, [urgent, backend]}, {title: Project B, members: [David, Eve]tags, [frontend, design]}]compact_with_empty, [{id: 1, data: []meta, {}}, {id: 2, data: [item1]meta, {key: value}}], compact_complex_nesting: [{level: 1, children: [{level: 2a, children: [{level: 3a, value: leaf1}, {level: 3b, value: leaf2}]}, {level: 2b, children: [{level: 3c, value: leaf3}]}]}]api_endpoints, [{path: /users, method: GET, auth: required, params: [{name: page, type: integer, default: 1}, {name: limit, type: integer, default: 10}]}, {path: '/users/:id', method: GET, auth: required, params: []}, {path: /users, method: POST, auth: required, body: {username: string, email: string, password: string}}], compact_types: [{string_val: hello, number_val: 42, float_val: 3.14, bool_val: true, null_val: null}, {string_val: world, number_val: 100, float_val: 2.71, bool_val: false, null_val: null}]minimal, [{a: 1}, {b: 2}, {c: 3}]}+{"simple_flow_sequence": ["apple", "banana", "cherry", "date"], "simple_flow_mapping": {"name": "John", "age": 30, "city": "New York"}, "nested_flow_sequences": [["a", "b", "c"], [1, 2, 3], ["red", "green", "blue"]], "nested_flow_mappings": {"person": {"name": "Alice", "age": 25}, "contact": {"email": "alice@example.com", "phone": "555-1234"}}, "flow_seq_with_maps": [{"name": "Alice", "role": "dev"}, {"name": "Bob", "role": "ops"}, {"name": "Charlie", "role": "qa"}], "flow_map_with_seqs": {"colors": ["red", "green", "blue"], "sizes": ["S", "M", "L"], "numbers": [1, 2, 3]}, "deep_flow_nesting": {"level1": {"level2": {"level3": {"level4": ["a", "b", "c"]}}}}, "empty_flow": {"empty_seq": [], "empty_map": {}, "both": [[], {}]}, "flow_in_block": {"sequence": [1, 2, 3, 4, 5], "mapping": {"a": 1, "b": 2, "c": 3}, "nested": {"items": ["x", "y", "z"], "config": {"timeout": 30, "retries": 3}}}, "block_in_flow": {"users": [{"name": "Alice", "tags": ["dev", "senior"]}, {"name": "Bob", "tags": ["ops", "junior"]}]}, "mixed_structure": {"services": [{"name": "api", "ports": [8080, 8443], "env": {"DEBUG": true, "LOG_LEVEL": "info"}}, {"name": "db", "ports": [5432], "env": {"POSTGRES_DB": "mydb", "POSTGRES_USER": "admin"}}], "config": {"version": 1, "enabled": true}}, "flow_types": {"strings": ["hello", "world", "foo", "bar"], "numbers": [1, 2, 3, 42, 100], "mixed": ["string", 123, true, false, null], "quoted": ["with spaces", "special:chars", "commas, here"]}, "flow_map_types": {"string": "value", "number": 42, "boolean": true, "null_value": null, "float": 3.14}, "nested_mixed": [{"id": 1, "data": ["a", "b", "c"], "meta": {"type": "first"}}, {"id": 2, "data": ["d", "e", "f"], "meta": {"type": "second"}}, {"id": 3, "data": ["g", "h", "i"], "meta": {"type": "third"}}], "multiline_flow": {"long_sequence": ["item1", "item2", "item3", "item4"], "long_mapping": {"key1": "value1", "key2": "value2", "key3": "value3"}}, "edge_cases": {"single_item_seq": ["alone"], "single_item_map": {"only": "one"}, "nested_empty": [[], [{}], [{}, []]], "all_empty": [{}, [], {"a": []}, {"b": {}}]}}+{simple_flow_sequence: [apple, banana, cherry, date]simple_flow_mapping, {name: John, age: 30, city: New York}, nested_flow_sequences: [[a, b, c], [1, 2, 3], [red, green, blue]]nested_flow_mappings, {person: {name: Alice, age: 25}contact, {email: alice@example.com, phone: 555-1234}}, flow_seq_with_maps: [{name: Alice, role: dev}, {name: Bob, role: ops}, {name: Charlie, role: qa}]flow_map_with_seqs, {colors: [red, green, blue]sizes, [S, M, L], numbers: [1, 2, 3]}, deep_flow_nesting: {level1: {level2: {level3: {level4: [a, b, c]}}}}empty_flow, {empty_seq: []empty_map, {}, both: [[], {}]}, flow_in_block: {sequence: [1, 2, 3, 4, 5]mapping, {a: 1, b: 2, c: 3}, nested: {items: [x, y, z]config, {timeout: 30, retries: 3}}}block_in_flow, {users: [{name: Alice, tags: [dev, senior]}, {name: Bob, tags: [ops, junior]}]}, mixed_structure: {services: [{name: api, ports: [8080, 8443]env, {DEBUG: true, LOG_LEVEL: info}}, {name: db, ports: [5432]env, {POSTGRES_DB: mydb, POSTGRES_USER: admin}}]config, {version: 1, enabled: true}}flow_types, {strings: [hello, world, foo, bar]numbers, [1, 2, 3, 42, 100], mixed: [string, 123, true, false, null]quoted, [with spaces, 'special:chars', commas, here]}, flow_map_types: {string: value, number: 42, boolean: true, null_value: null, float: 3.14}nested_mixed, [{id: 1, data: [a, b, c]meta, {type: first}}, {id: 2, data: [d, e, f]meta, {type: second}}, {id: 3, data: [g, h, i]meta, {type: third}}], multiline_flow: {long_sequence: [item1, item2, item3, item4]long_mapping, {key1: value1, key2: value2, key3: value3}}edge_cases, {single_item_seq: [alone]single_item_map, {only: one}, nested_empty: [[], [{}], [{}, []]]all_empty, [{}, [], {a: []}, {b: {}}]}}+[{"id": 1, "tags": ["a", "b", "c"], "config": {"enabled": true}}, {"id": 2, "tags": ["x", "y", "z"], "config": {"enabled": false}}]+[{id: 1, tags: [a, b, c]config, {enabled: true}}, {id: 2, tags: [x, y, z]config, {enabled: false}}]
+126
tests/cram/collections_block.yml
+126
tests/cram/collections_block.yml
···
+198
tests/cram/collections_compact.yml
+198
tests/cram/collections_compact.yml
···
+96
tests/cram/collections_flow.yml
+96
tests/cram/collections_flow.yml
···+nested_flow_mappings: {person: {name: Alice, age: 25}, contact: {email: alice@example.com, phone: 555-1234}}+flow_seq_with_maps: [{name: Alice, role: dev}, {name: Bob, role: ops}, {name: Charlie, role: qa}]
+197
tests/cram/comments.t
+197
tests/cram/comments.t
···+{"name": "John Doe", "age": 30, "address": {"street": "123 Main St", "city": "Springfield", "zip": 12345}, "items": ["apple", "banana", "cherry", "date"], "flow_seq": [1, 2, 3], "flow_map": {"key1": "value1", "key2": "value2"}, "nested": {"level1": {"level2": {"value": "deeply nested"}}}, "multi_comment_key": "value", "special": "value with # hash inside quotes", "empty_value": null, "final_key": "final_value"}+{"literal": "# This looks like a comment\nbut it is part of the literal text\n", "key": "value"}
+53
tests/cram/comments.yml
+53
tests/cram/comments.yml
···
+6
tests/cram/depth_bomb.yml
+6
tests/cram/depth_bomb.yml
+8
tests/cram/directives.yml
+8
tests/cram/directives.yml
+10
tests/cram/directives_tag.yml
+10
tests/cram/directives_tag.yml
+10
tests/cram/directives_yaml11.yml
+10
tests/cram/directives_yaml11.yml
+204
tests/cram/documents.t
+204
tests/cram/documents.t
···+{"key1": "value1", "key2": "value2", "nested": {"inner": "data"}, "list": ["item1", "item2", "item3"]}
+15
tests/cram/documents_multi.yml
+15
tests/cram/documents_multi.yml
+10
tests/cram/documents_multi_empty.yml
+10
tests/cram/documents_multi_empty.yml
+15
tests/cram/documents_multi_three.yml
+15
tests/cram/documents_multi_three.yml
···
+16
tests/cram/documents_multi_with_end.yml
+16
tests/cram/documents_multi_with_end.yml
+11
tests/cram/documents_single.yml
+11
tests/cram/documents_single.yml
+11
tests/cram/documents_single_explicit_both.yml
+11
tests/cram/documents_single_explicit_both.yml
+10
tests/cram/documents_single_explicit_start.yml
+10
tests/cram/documents_single_explicit_start.yml
+11
tests/cram/documents_single_with_directive.yml
+11
tests/cram/documents_single_with_directive.yml
+155
tests/cram/edge_cases.yml
+155
tests/cram/edge_cases.yml
···+very_long_key: "This is a very long value that contains a lot of text to test how the parser handles long lines. It should be able to handle lines that are much longer than typical lines in most YAML files. This continues for quite a while to make sure we test the boundaries of reasonable line lengths. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."+This is a very long literal block that should preserve all the whitespace and newlines exactly as written. It can contain very long lines that go on and on and on without breaking. This tests whether the parser can handle long content in literal blocks properly. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+49
tests/cram/empty_collections.t
+49
tests/cram/empty_collections.t
···
+1
tests/cram/escaped_newline.yml
+1
tests/cram/escaped_newline.yml
···
+45
tests/cram/failing_escapes.t
+45
tests/cram/failing_escapes.t
···
+42
tests/cram/invalid_floats.t
+42
tests/cram/invalid_floats.t
···+{"valid_nan": nan, "valid_nan_title": nan, "valid_nan_upper": nan, "valid_inf": inf, "valid_inf_title": inf, "valid_inf_upper": inf, "valid_neg_inf": -inf, "valid_neg_inf_title": -inf, "valid_neg_inf_upper": -inf, "valid_pos_inf": inf, "invalid_nan": "nan", "invalid_nan_title": "NaN", "invalid_nan_upper": "NAN", "invalid_inf": "inf", "invalid_inf_title": "Inf", "invalid_inf_upper": "INF", "invalid_infinity": "infinity", "invalid_infinity_title": "Infinity", "invalid_infinity_upper": "INFINITY", "invalid_neg_inf": "-inf", "invalid_neg_infinity": "-infinity", "invalid_pos_inf": "+inf", "invalid_pos_infinity": "+infinity", "quoted_nan": "nan", "quoted_inf": "inf", "quoted_infinity": "infinity", "dependencies": {"nan": "2.14.0", "inf": "1.0.0"}}
+40
tests/cram/invalid_floats.yml
+40
tests/cram/invalid_floats.yml
···
+59
tests/cram/linuxkit.yml
+59
tests/cram/linuxkit.yml
···
+407
tests/cram/multidoc.t
+407
tests/cram/multidoc.t
···
+471
tests/cram/scalars.t
+471
tests/cram/scalars.t
···+{"single_simple": "hello world", "single_with_double": "He said \"hello\"", "single_escaped_quote": "It's a single quote: 'example'", "single_multiline": "This is a multi-line single quoted string", "double_simple": "hello world", "double_with_single": "It's easy", "double_escaped_quote": "She said \"hello\"", "escaped_newline": "Line one\nLine two\nLine three", "escaped_tab": "Column1\tColumn2\tColumn3", "escaped_backslash": "Path: C:\\Users\\Name", "escaped_carriage": "Before\rAfter", "escaped+literal_with_indent: "First line\n Indented line\n More indented\n Back to second level\nBack to first level\n"+folded_basic: "This is a long paragraph that will be folded into a single line with the newlines converted to spaces.\n"+folded_paragraph: "First paragraph flows together into a single line.\nSecond paragraph after blank line also flows together.\n"+complex_literal: "First level\n Second level\n Third level\n Back to second\nBack to first\n\nNew paragraph\n With indent\n\nFinal paragraph\n"+complex_folded: "This paragraph flows together.\nThis is separate.\n This line starts more indented\n and continues.\n\nFinal thoughts here.\n"+special_chars_literal: "Special: @#$%^&*()\nQuotes: \"double\" 'single'\nBrackets: [array] {object}\nSymbols: | > & * ? : -\n"+"folded_basic": "This is a long paragraph that will be folded into a single line with the newlines c+"literal_indent_2": " Two space indentation\n is preserved here\n Extra indent\n Back to two\n"+{"outer": {"inner": {"description": "This is a folded description.\n", "code": "def test():\n return True\n"}}}+{"text": "Normal paragraph continues here.\n\n Indented block\n preserved.\n\nBack to normal.\n"}
+192
tests/cram/scalars_block.yml
+192
tests/cram/scalars_block.yml
···
+60
tests/cram/scalars_plain.yml
+60
tests/cram/scalars_plain.yml
···
+81
tests/cram/scalars_quoted.yml
+81
tests/cram/scalars_quoted.yml
···
+6
tests/cram/valid_alias.yml
+6
tests/cram/valid_alias.yml
+85
tests/cram/valid_floats.t
+85
tests/cram/valid_floats.t
···+{"basic_positive": 3.14, "basic_negative": -3.14, "basic_zero": 0, "small_positive": 0.5, "small_negative": -0.5, "leading_dot": 0.5, "leading_dot_negative": -0.5, "leading_dot_positive": 0.5, "leading_dot_long": 0.123457, "trailing_zero": 1, "trailing_zeros": 1, "many_trailing": 3.14, "sci_positive": 10000000000, "sci_negative": 1e-10, "sci_explicit_positive": 10000000000, "sci_with_decimal": 15000000000, "sci_small": 6.022e+23, "sci_tiny": 1.6e-19, "sci_upper": 10000000000, "sci_upper_negative": 1e-10, "sci_upper_explicit": 10000000000, "sci_upper_decimal": 250000000, "neg_sci": -10000000000, "neg_sci_negative_exp": -1e-10, "neg_sci_decimal": -314000, "positive_sign": 3.14, "positive_sci": 10000000000, "positive_small": 0.001, "very_large": 1e+100, "very_small": 1e-100, "large_decimal": 1e+09, "small_decimal": 1e-09, "negative_zero": -0, "positive_zero": 0, "one": 1, "minus_one": -1, "pi": 3.14159, "euler": 2.71828, "golden_ratio": 1.61803, "planck": 6.62607e-34, "avogadro": 6.02214e+23, "speed_of_light": 299792458, "gravitational_constant": 6.674e-11, "coordinates": {"latitude": 37.7749, "longitude": -122.419, "altitude": 16}, "prices": {"item1": 19.99, "item2": 0.99, "discount": -5, "tax_rate": 0.0825}, "measurements": {"temperature_c": 23.5, "temperature_f": 74.3, "humidity": 0.65, "pressure_hpa": 1013.25}, "float_sequence": [1, -1, 0.5, -0.5, 10000000000, 1e-10, 0.5, -0.5], "integers": {"simple": 42, "negative": -17, "zero": 0, "hex": 26, "octal": 12}}
+103
tests/cram/valid_floats.yml
+103
tests/cram/valid_floats.yml
···
+286
tests/cram/values.t
+286
tests/cram/values.t
···+{"explicit_null": null, "tilde_null": null, "empty_null": null, "flow_null": [null, null], "sequence_nulls": [null, null, null, {"explicit": null}, {"tilde": null}, {"empty": null}], "mapping_nulls": {"key1": null, "key2": null, "key3": null}, "null": "null key with string value", "~": "tilde key with string value", "nested": {"level1": {"null_value": null, "tilde_value": null, "empty_value": null, "list": [null, null, null, "some_value"], "map": {"a": null, "b": null, "c": null}}}, "string_nulls": {"quoted_null": "null", "quoted_tilde": "~", "null_in_string": "this is null", "word_null": "null"}}+{"bool_true": true, "bool_false": false, "capitalized_true": true, "capitalized_false": false, "yes_value": true, "no_value": false, "Yes_value": true, "No_value": false, "YES_value": true, "NO_value": false, "on_value": true, "off_value": false, "On_value": true, "Off_value": false, "ON_value": true, "OFF_value": false, "bool_sequence": [true, false, true, false, true, false], "flow_bools": [true, false, true, false], "bool_mapping": {"active": true, "disabled": false, "enabled": true, "stopped": false}, "quoted_bools": {"quoted_true": "true", "quoted_false": "false", "quoted_yes": "yes", "quoted_no": "no", "single_true": "true", "single_false": "false"}, "nested_bools": {"settings": {"debug": true, "verbose": false, "legacy_yes": true, "legacy_no": false}, "flags": [true, false, true, false]}, "mixed_case": {"TRUE": true, "FALSE": false, "TrUe": true, "FaLsE": false}, "bool_like_strings": {"truthy": "truely", "falsy": "falsetto", "yes_sir": "yessir", "no_way": "noway"}}+{"int_zero": 0, "int_positive": 42, "int_negative": -17, "int_large": 1000000, "int_with_underscores": 1000000, "octal_value": 12, "octal_zero": 0, "octal_large": 511, "hex_lowercase": 26, "hex_uppercase": 26, "hex_mixed": 3735928559, "hex_zero": 0, "float_simple": 3.14, "float_negative": -0.5, "float_zero": 0, "float_leading_dot": 0.5, "float_trailing_zero": 1, "scientific_positive": 10000000000, "scientific_negative": 0.0015, "scientific_uppercase": 250, "scientific_no_sign": 300000, "positive_infinity": inf, "negative_infinity": -inf, "not_a_number": nan, "infinity_upper": inf, "infinity_caps": inf, "nan_upper": nan, "nan_caps": nan, "number_sequence": [0, 42, -17, 3.14, 10000000000, inf, nan], "flow_numbers": [0, 42, -17, 3.14, 26, 12], "number_mapping": {"count": 100, "price": 19.99, "discount": -5, "hex_color": 16734003, "octal_perms": 493, "scientific": 6.022e+23}, "quoted_numbers": {"string_int": "42", "string_float": "3.14", "string_hex": "0x1A", "string_octal": "0o14", "string_inf": ".inf", "string_nan": ".nan"}, "numeric_strings": {"phone": "555-1234", "version": "1.2.3", "code": 123, "leading_zero": 7, "plus_sign": 123}, "edge_cases": {"min_int": -9.22337e+18, "max_int": 9.22337e+18, "very_small": 1e-100, "very_large": 1e+100, "negative_zero": -0, "positive_zero": 0}, "nested_numbers": {"coordinates": {"x": 10.5, "y": -20.3, "z": 0}, "measurements": [1.1, 2.2, 3.3], "stats": {"count": 1000, "average": 45.67, "max": inf, "min": -inf}}, "legacy_octal": 14, "binary_like": 10, "format_tests": {"no_decimal": 42, "with_decimal": 42, "leading_zero_decimal": 0.42, "no_leading_digit": 0.42, "trailing_decimal": 42}}+{"date_simple": "2001-12-15", "date_earliest": "1970-01-01", "date_leap_year": "2020-02-29", "date_current": "2025-12-04", "datetime_utc": "2001-12-15T02:59:43.1Z", "datetime_utc_full": "2001-12-15T02:59:43.123456Z", "datetime_utc_no_frac": "2001-12-15T02:59:43Z", "datetime_offset_pos": "2001-12-15T02:59:43.1+05:30", "datetime_offset_neg": "2001-12-15T02:59:43.1-05:00", "datetime_offset_hours": "2001-12-15T02:59:43+05", "datetime_spaced": "2001-12-14 21:59:43.10 -5", "datetime_spaced_utc": "2001-12-15 02:59:43.1 Z", "datetime_spaced_offset": "2001-12-14 21:59:43.10 -05:00", "datetime_no_frac": "2001-12-15T14:30:00Z", "date_only": "2001-12-15", "timestamp_formats": {"iso_date": "2001-12-15", "iso_datetime_z": "2001-12-15T02:59:43Z", "iso_datetime_offset": "2001-12-15T02:59:43+00:00", "spaced_datetime": "2001-12-14 21:59:43.10 -5", "canonical": "2001-12-15T02:59:43.1Z"}, "timestamp_sequence": ["2001-12-15", "2001-12-15T02:59:43.1Z", "2001-12-14 21:59:43.10 -5", "2025-01-01T00:00:00Z"], "events": {"created": "2001-12-15T02:59:43.1Z", "modified": "2001-12-16T10:30:00Z", "published": "2001-12-14 21:59:43.10 -5"}, "quoted_timestamps": {"string_date": "2001-12-15", "string_datetime": "2001-12-15T02:59:43.1Z", "string_spaced": "2001-12-14 21:59:43.10 -5"}, "edge_cases": {"midnight": "2001-12-15T00:00:00Z", "end_of_day": "2001-12-15T23:59:59Z", "microseconds": "2001-12-15T02:59:43.123456Z", "no_seconds": "2001-12-15T02:59Z", "hour_only": "2001-12-15T02Z"}, "nested_timestamps": {"project": {"start_date": "2001-12-15", "milestones": [{"date": "2001-12-20", "time": "2001-12-20T14:00:00Z"}, {"date": "2002-01-15", "time": "2002-01-15T09:30:00-05:00"}], "metadata": {"created": "2001-12-14 21:59:43.10 -5", "updated": "2001-12-15T02:59:43.1Z"}}}, "invalid_timestamps": {"bad_date": "2001-13-45", "bad_time": "2001-12-15T25:99:99Z", "incomplete": "2001-12", "no_leading_zero": "2001-1-5"}, "timezones": {"utc_z": "2001-12-15T02:59:43Z", "utc_offset": "2001-12-15T02:59:43+00:00", "est": "2001-12-14T21:59:43-05:00", "ist": "2001-12-15T08:29:43+05:30", "jst": "2001-12-15T11:59:43+09:00"}, "date_range": {"past": "1900-01-01", "unix_epoch": "1970-01-01T00:00:00Z", "y2k": "2000-01-01T00:00:00Z", "present": "2025-12-04", "future": "2099-12-31T23:59:59Z"}}
+82
tests/cram/values_bool.yml
+82
tests/cram/values_bool.yml
···
+55
tests/cram/values_null.yml
+55
tests/cram/values_null.yml
···
+120
tests/cram/values_numbers.yml
+120
tests/cram/values_numbers.yml
···
+101
tests/cram/values_timestamps.yml
+101
tests/cram/values_timestamps.yml
···
+105
tests/cram/whitespace.yml
+105
tests/cram/whitespace.yml
···
+3
tests/cram/yaml-1.2.yml
+3
tests/cram/yaml-1.2.yml
···+- {?"a key can be looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooger": "than 1024 when parsing is unambiguous before seeing the colon."}
+161
tests/cram/yamlcat.t
+161
tests/cram/yamlcat.t
···+install: 'wget https://raw.githubusercontent.com/ocaml/ocaml-travisci-skeleton/master/.travis-docker.sh'+- "PINS=\"cohttp-top:. cohttp-async:. cohttp-lwt-unix:. cohttp-lwt-jsoo:. cohttp-lwt:. cohttp-mirage:. cohttp:.\""+{"language": "c", "sudo": false, "services": ["docker"], "install": "wget https://raw.githubusercontent.com/ocaml/ocaml-travisci-skeleton/master/.travis-docker.sh", "script": "bash -ex ./.travis-docker.sh", "env": {"global": ["EXTRA_REMOTES=\"https://github.com/mirage/mirage-dev.git\"", "PINS=\"cohttp-top:. cohttp-async:. cohttp-lwt-unix:. cohttp-lwt-jsoo:. cohttp-lwt:. cohttp-mirage:. cohttp:.\""], "matrix": ["PACKAGE=\"cohttp\" DISTRO=\"alpine-3.5\" OCAML_VERSION=\"4.06.0\"", "PACKAGE=\"cohttp-async\" DISTRO=\"alpine\" OCAML_VERSION=\"4.06.0\"", "PACKAGE=\"cohttp-lwt\" DISTRO=\"debian-unstable\" OCAML_VERSION=\"4.03.0\"", "PACKAGE=\"cohttp-mirage\" DISTRO=\"debian-unstable\" OCAML_VERSION=\"4.03.0\""]}, "notifications": {"webhooks": {"urls": ["https://webhooks.gitter.im/e/6ee5059c7420709f4ad1"], "on_success": "change", "on_failure": "always", "on_start": false}}}
+488
tests/run_all_tests.ml
+488
tests/run_all_tests.ml
···+let fail_count = List.length (List.filter (fun r -> match r.status with `Fail _ -> true | _ -> false) results) in+let json_fail_count = List.length (List.filter (fun r -> match r.json_status with `Fail _ -> true | _ -> false) results) in+let json_badge = Printf.sprintf {|<span class="badge %s" style="margin-left: 4px;">JSON: %s</span>|}+Printf.fprintf oc {| <div class="test" data-status="%s" data-json-status="%s" data-id="%s" data-name="%s">+let fail_count = List.length (List.filter (fun r -> match r.status with `Fail _ -> true | _ -> false) results) in+let json_fail_count = List.length (List.filter (fun r -> match r.json_status with `Fail _ -> true | _ -> false) results) in
+532
tests/run_all_tests_eio.ml
+532
tests/run_all_tests_eio.ml
···+let fail_count = List.length (List.filter (fun r -> match r.status with `Fail _ -> true | _ -> false) results) in+let json_fail_count = List.length (List.filter (fun r -> match r.json_status with `Fail _ -> true | _ -> false) results) in+let json_badge = Printf.sprintf {|<span class="badge %s" style="margin-left: 4px;">JSON: %s</span>|}+Printf.bprintf buf {| <div class="test" data-status="%s" data-json-status="%s" data-id="%s" data-name="%s">+Arg.parse args (fun _ -> ()) "Usage: run_all_tests_eio [--html <file>] [--show-skipped] [--sequential]";+Printf.printf "Loaded %d tests in %.3fs\n%!" (List.length all_tests) (load_time -. start_time);+let fail_count = List.length (List.filter (fun r -> match r.status with `Fail _ -> true | _ -> false) results) in+let json_fail_count = List.length (List.filter (fun r -> match r.json_status with `Fail _ -> true | _ -> false) results) in
+9
tests/test_suite_lib/dune
+9
tests/test_suite_lib/dune
+146
tests/test_suite_lib/json_compare.ml
+146
tests/test_suite_lib/json_compare.ml
···
+69
tests/test_suite_lib/json_format.ml
+69
tests/test_suite_lib/json_format.ml
···+else if f = Float.infinity || f = Float.neg_infinity then "null" (* JSON doesn't support Inf *)
+45
tests/test_suite_lib/test_suite_loader.ml
+45
tests/test_suite_lib/test_suite_loader.ml
···
+67
tests/test_suite_lib/test_suite_loader_eio.ml
+67
tests/test_suite_lib/test_suite_loader_eio.ml
···
+121
tests/test_suite_lib/test_suite_loader_generic.ml
+121
tests/test_suite_lib/test_suite_loader_generic.ml
···
+74
tests/test_suite_lib/tree_format.ml
+74
tests/test_suite_lib/tree_format.ml
···
+358
tests/test_yamlrw.ml
+358
tests/test_yamlrw.ml
···+check_value "plain" (`String "hello") (of_string "hello world" |> function `String s -> `String (String.sub s 0 5) | v -> v);+Alcotest.failf "expected 1 pair but got %d pairs (trailing comma should not create empty entry)"+Alcotest.(check bool) "contains name" true (starts_with "name" trimmed || starts_with "\"name\"" trimmed)+| _ -> Alcotest.fail ("expected Alias_expansion_depth_limit error, got: " ^ Error.kind_to_string e.Error.kind))
+33
yamlrw-eio.opam
+33
yamlrw-eio.opam
···+"Eio-based streaming I/O for Yamlrw. Provides efficient async YAML parsing and emission using the Eio effects-based concurrency library. Requires OCaml 5.0 or later."
+32
yamlrw-unix.opam
+32
yamlrw-unix.opam
···+"Unix file and channel operations for Yamlrw. Provides convenient functions for reading and writing YAML files using Unix I/O."
+33
yamlrw.opam
+33
yamlrw.opam
···+"Yamlrw is a pure OCaml implementation of YAML 1.2 parsing and emission. It provides both a high-level JSON-compatible interface for simple data interchange and a lower-level streaming API for fine-grained control over parsing and emission. The library works on all OCaml platforms without C dependencies."