Open
Description
parsley.ometa.runtime.ParseError has a very nice way of formatting / printing error messages
It would be nice if there was some way to access this from the grammar rules. For example, if there was a type of exception that would be picked up and have the line and character added.
Also, it would be nice if there was a way to emit a warning with a given message formatted in the same way as the ParseError.
(This can kinda-sorta be achieved via print str(grammar.input.head()[1].withMessage("whatever warning")
, but there doesn't seem to be a way to get access to the grammar object itself from inside a rule.)
Metadata
Metadata
Assignees
Labels
No labels
Activity