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

[BUG] ISLaSolver.check() error message reports wrong start symbol #75

Open
andreas-zeller opened this issue May 20, 2023 · 0 comments
Open

Comments

@andreas-zeller
Copy link

In an error message, ISLaSolver.check() reports "" as start symbol, although a different start symbol was given as constructor.

To Reproduce

In the context

digit_solver = ISLaSolver(EXPR_GRAMMAR, start_symbol='<digit>')
str(digit_solver.solve())  # returns '9'
digit_solver.check('9')  # returns True

the invocation

digit_solver.check('2 + 2')

prints

Error parsing "2 + 2" starting with "<start>"

Expected behavior
This should print

Error parsing "2 + 2" starting with "<digit>"

since <digit> was specified as the start symbol.

This may be an instance of a more general issue - maybe giving start_symbol defines <start> as <digit>? Also indicate the exact position and/or element of the parsing error (if possible).

System/Installation Specs:

  • ISLa Version: 1.11.1
  • Python Version: 3.10
  • OS: macOS 13.4
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

No branches or pull requests

1 participant