Skip to content

NoMatch reports line,col, but debug messages report position. #71

Description

@StyXman

From this page https://textx.github.io/Arpeggio/stable/handling_errors/ :

Traceback (most recent call last):
  ...
arpeggio.NoMatch: Expected '+' or '-' or 'number' or 
  '(' at position (1, 6) => '23+4/*r-89'.

But the debug messages show only the position in file (from another project I'm working on):

[...]
                                                                 ?? Try match rule StrMatch(:) in set_attribute at position 15638 => -dasharray*: @primary
                                                                  ++ Match ':' at 15638 => '-dasharray*:* @primary'
                                                                  >> Matching rule expression=OrderedChoice in set_attribute at position 15639 => dasharray:* @primary-
[...]

It would be nice that the debug messages also reported line+col, as many editors only support displaying that instead of position in file.

If you could point me to where the code should be changed, I could even try to do the patch myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions