Skip to content

Grammar ambiguities introduced with support for nested properties. #20

@nalundgaard

Description

@nalundgaard

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions