Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test-case 9KAX #11

Open
hvr opened this issue May 18, 2019 · 1 comment
Open

test-case 9KAX #11

hvr opened this issue May 18, 2019 · 1 comment

Comments

@hvr
Copy link
Collaborator

hvr commented May 18, 2019

https://matrix.yaml.io/details/9KAX.html doesn't pass as of HsYAML-0.1.2.0 specifically because of

---
!!map
&a8 !!str key8: value7

which yaml2token decodes as

<stdin>:1:0: BeginDocument  | 
<stdin>:1:0: DirectivesEnd  |  ---
<stdin>:1:3: BeginNode      | 
<stdin>:1:3: BeginScalar    | 
<stdin>:1:3: EndScalar      | 
<stdin>:1:3: EndNode        | 
<stdin>:1:3: Break          |     \n

<stdin>:2:0: Unparsed       |  !!map
<stdin>:2:5: Unparsed       |       \n

<stdin>:3:0: Unparsed       | "&a8 !!str key8: value7"
<stdin>:3:22: Unparsed       |                        \n

<stdin>:4:0: EndDocument    | 

in other words, parsing chokes on the !!map token

TODO: review YAML 1.2 spec

@vijayphoenix
Copy link
Collaborator

vijayphoenix commented Jun 17, 2019

I think the main source of the problem is production rule 200 in token.hs
It is a slightly improved version of the grammar production rule 200 in YAML 1.2 spec but still, some tweaks in this rule are required to fix this error.
For this example, it fails because we are not able to parse !!map as we are not able to detect s-l-comments in the look-ahead.
TODO: Review the definition of s_l_comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants