1. 04 Jun, 2020 1 commit
  2. 02 Jun, 2020 2 commits
  3. 01 Jun, 2020 8 commits
  4. 29 May, 2020 1 commit
  5. 21 May, 2020 3 commits
  6. 19 Apr, 2020 4 commits
    • Tina Müller's avatar
      Changes for v0.2.4 release · 36fdfc6308c6
      Tina Müller authored
    • Tina Müller's avatar
      Fix logic for document end before directive · 64758cef676f
      Tina Müller authored
      open_ended can have three states now:
      0: The previous document was ended explicitly with '...'
      1: The previous document wasn't ended with '...'
      2: The last scalar event was a block scalar with trailing empty lines |+, and
         last document wasn't ended with '...'.
         Important at stream end.
      This was broken in the past, and fixed in fa1293a.
      With my last PR #162 I added the faulty behaviour again.
      The problematic behaviour showed only when all of the following conditions were
      * writing YAML directives
      * writing unquoted top level scalars
      * writing more than one document
      ================== BROKEN ==============================
      The first example shows that the document end marker is not emitted before
      the next document. This would be valid in YAML 1.1 if the scalar was quoted,
      but not if it is plain.
      This commit fixes this.
      echo '--- foo
      --- bar
      ' | ./tests/run-parser-test-suite  | ./tests/run-emitter-test-suite  --directive 1.1
      %YAML 1.1
      --- foo
      %YAML 1.1
      --- bar
      ================== FIXED ==============================
      echo '--- foo
      --- bar
      ' | ./tests/run-parser-test-suite  | ./tests/run-emitter-test-suite  --directive 1.1
      %YAML 1.1
      --- foo
      %YAML 1.1
      --- bar
      Other examples which should look like this (and were correct already before
      this fix):
      Open ended scalars like |+ need '...' at the end of the stream:
      echo '--- |+
      --- |+
      ' | ./tests/run-parser-test-suite  | ./tests/run-emitter-test-suite
      --- |+
      --- |+
      If a document is ended with an explicit '...', the code should not
      print '...' twice:
      echo '--- foo
      --- bar
      ' | ./tests/run-parser-test-suite  | ./tests/run-emitter-test-suite --directive 1.1
      %YAML 1.1
      --- foo
      %YAML 1.1
      --- bar
    • Tina Müller's avatar
      Allow emitting 1.2 directive · 6c0f5c49ef59
      Tina Müller authored
      Before `1.1` was hardcoded in the emitter.
      * Also add --directive option to run-emitter-test-suite
        Allows to easily test how output looks like if %YAML directives
        are output.
    • Tina Müller (tinita)'s avatar
  7. 11 Apr, 2020 2 commits
  8. 10 Apr, 2020 3 commits
    • Tina Müller (tinita)'s avatar
      Support %YAML 1.2 directives (#172) · 1486036fead9
      Tina Müller (tinita) authored
      This will simply allow `%YAML 1.2` directives additionally to `%YAML 1.1`.
      There is no change in behaviour.
      See also #20
      No changes are needed regarding tag directives.
      In YAML 1.2 tag directives are for the following document only.
      This is already implemented like that in libyaml.
      We would rather have to fix the code if we want to have the correct behaviour
      (global directives) in YAML 1.1. This would be a bit more complicated, as we
      would have to save the default version and the current version in the parser
      New passing parser tests:
      * 27NA: Spec Example 5.9. Directive Indicator
      * 6ZKB: Spec Example 9.6. Stream
      * 9DXL: Spec Example 9.6. Stream [1.3]
      * RTP8: Spec Example 9.2. Document Markers
      New failing error parser tests (before they were errors for the wrong reason):
      * EB22: Missing document-end marker before directive
      * RHX7: YAML directive without document end marker
    • Michael Drake's avatar
      Avoid recursion in the document loader. (#127) · 191d64170c09
      Michael Drake authored
      The document loading API (yaml_parser_load) was susseptable to a
      stack overflow issue when given input data which opened many
      mappings and/or sequences without closing them.
      This was due to the use of recurion in the implementation.
      With this change, we avoid recursion, and maintain our own loader
      context stack on the heap.
      The loader context contains a stack of document node indexes.
      Each time a sequence or mapping start event is encountered,
      the node index corrasponding to the event is pushed to the
      stack.  Each time a sequence or mapping end event is encountered,
      the corrasponding node's index is popped from the stack.
      The yaml_parser_load_nodes() function sits on the event stream,
      issuing events to the appropriate handlers by type.
      When an event handler function constructs a node, it needs to
      connect the new node to its parent (unless it's the root node).
      This is where the loader context stack is used to find the
      parent node.  The way that the new node is added to the tree
      depends on whether the parent node is a mapping (with a
      yaml_node_pair_t to fill), or a sequence (with a yaml_node_item_t).
      Fixes: https://github.com/yaml/libyaml/issues/107
    • Ashutosh Chauhan's avatar
      Fix missing token in example (#169) · 248af9405bb3
      Ashutosh Chauhan authored
  9. 28 Mar, 2020 3 commits
  10. 26 Mar, 2020 3 commits
  11. 21 Dec, 2019 1 commit
  12. 25 Jul, 2019 1 commit
  13. 06 Jun, 2019 6 commits
  14. 13 Mar, 2019 1 commit
  15. 12 Mar, 2019 1 commit