Skip to content

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

@andreas-zeller

Description

@andreas-zeller

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions