-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
[YAMLParser] Improve plain scalar spec compliance #68946
[YAMLParser] Improve plain scalar spec compliance #68946
Conversation
The `YAMLParser.h` header file claims support for YAML 1.2 with a few deviations, but our plain scalar parsing failed to parse some valid YAML according to the spec. This change puts us more in compliance with the YAML spec, now letting us parse plain scalars containing additional special characters in cases where they are not ambiguous.
4b8c1aa
to
d99c12b
Compare
This LGTM, but I'll let others more familiar with the code to accept it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the patch!
I am sorry for the delay in review, I was out most of last week.
The change looks good overall, but there are a couple test changes/additions I'd like, and I am a bit confused around some of the more subtle conditions and hoped you could just help me understand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @slinder1 for your detailed feedback. I have made some changes in response to your feedback, and also provided responses to your questions below. Please take another look when you can. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you for the more detailed explanation where I was confused, and for the additional tests!
@akirchhoff-modular as discussed offline, I'll merge this on your behalf. Thanks for the thorough review, @slinder1! |
The
YAMLParser.h
header file claims support for YAML 1.2 with a few deviations, but our plain scalar parsing failed to parse some valid YAML according to the spec. This change puts us more in compliance with the YAML spec, now letting us parse plain scalars containing additional special characters in cases where they are not ambiguous.