YAML filter can't handle empty array elements

Issue #632 new
Chase Tingley created an issue

Testcase attached. The YAML parser grammar can't handle arrays that have empty elements, like the first element here:

  -
  - a
  - b
  - c

Other parsers will interpret this as an array with three elements ([a, b, c]), ignoring the fourth. However, parsing the attached file with tikal fails:

$ tikal.sh -fc okf_yaml -x empty_array.yml

Error: Error parsing YAML file: Encountered unexpected token: "- " <DASH>
    at line 4, column 3.

Was expecting one of:

    "BLOCK_MAPPING_START"
    "BLOCK_SEQUENCE_START"
    "["
    "\"\""
    "\'\'"
    "{"
    <ALIAS>
    <ANCHOR>
    <DOUBLE_QUOTED_FIRST>
    <FOLDED_SCALAR_START>
    <LITERAL_SCALAR_START>
    <PLAIN_SCALAR>
    <SINGLE_QUOTED_FIRST>
    <TAG>
    <TAG_DIRECTIVE>

Comments (1)

  1. Log in to comment