libucl icon indicating copy to clipboard operation
libucl copied to clipboard

Parse failure with obscure error on name collision with named key hierarchy

Open imax9000 opened this issue 11 years ago • 2 comments

% cat test2.ucl
section foo bar {
  key = value
}
section foo baz {
  key = value
}
section foo {
  bar = lol /* removing this line makes parsing successful */
}
% ./objdump test2.ucl
Error occured: error on line 10 at column 3: 'invalid character in a key', character: '0xff'


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

imax9000 avatar Jan 13 '14 23:01 imax9000

For your example ucl should now produce the following json:

{
    "section": [
        {
            "foo": {
                "bar": {
                    "key": "value"
                }
            }
        },
        {
            "foo": {
                "baz": {
                    "key": "value"
                }
            }
        },
        {
            "foo": {
                "bar": "lol"
            }
        }
    ]
}

vstakhov avatar Jan 16 '14 18:01 vstakhov

LGTM

imax9000 avatar Jan 16 '14 19:01 imax9000