Skip to content

Make problem parsing tolerant of delimiter whitespace - #189

Open
sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:mainfrom
sylvesterkaczmarek:fix-problem-parser-whitespace
Open

sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:mainfrom
sylvesterkaczmarek:fix-problem-parser-whitespace

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Fixes #166.

Makes the problem-text parser tolerant of ordinary whitespace variations around ;, =, ,, and ?. It also avoids treating a trailing semicolon before the goal as an empty clause, while preserving the empty dependency-clause form used by defs.txt.

The regression test compares irregularly spaced input with the existing canonical form.

Checks:

  • problem_test.py: 3 tests passed
  • direct checks for trailing-semicolon goal parsing and the empty dependency clause
  • python3 -m compileall problem.py problem_test.py
  • git diff --check

@sylvesterkaczmarek

Copy link
Copy Markdown
Author

Could a maintainer approve the workflow and review the problem-parser whitespace fix? It accepts delimiter spacing variations while retaining the existing parsing structure.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

problem.py: Parser KeyError (e.g., ';' or '<point_name>;') on syntactically correct input, possibly due to subtle string variations

1 participant