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

Grammar ambiguities introduced with support for nested properties. #20

Open
nalundgaard opened this issue May 4, 2021 · 0 comments
Open
Labels

Comments

@nalundgaard
Copy link
Contributor

The introduction of support for nested properties (see #16 and the AWS documentation) via #18 (with a small fix in #19) introduced some ambiguity to the grammar around blank and comment:

Parse action conflict scanning symbol break in state 47:
   Reduce to single_value from blank (rule 44 at line 121)
      vs.
   shift to state 52, adding right sisters to blank.
Conflict resolved in favor of shift.

Parse action conflict scanning symbol blank in state 58:
   Reduce to properties_nested from property_nested (rule 30 at line 101)
      vs.
   shift to state 61, adding right sisters to property_nested.
Conflict resolved in favor of shift.

Parse action conflict scanning symbol comment in state 58:
   Reduce to properties_nested from property_nested (rule 30 at line 101)
      vs.
   shift to state 12, adding right sisters to property_nested.
Conflict resolved in favor of shift.

This appears to cause an issue parsing INI files with a comment line at the end of a block of nested properties when another (not-nested) key follows. The trigger case here is documented here.

This may need to be fixed with a modification to tokenization in order to keep the grammar sufficiently simple to prevent ambiguity.

This appears to be a fairly low-priority concern, but it's noted here for future correction.

@nalundgaard nalundgaard added the bug label May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant