isla
isla copied to clipboard
[BUG] ISLaSolver.check() error message reports wrong start symbol
In an error message, ISLaSolver.check()
reports "
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