lark-parser / lark

Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.
MIT License
4.87k stars 413 forks source link

Better docs for match_examples #834

Closed ThatXliner closed 3 years ago

ThatXliner commented 3 years ago

I have no clue what does match_examples does. Maybe adding examples in the docs would help.

I was reading: https://github.com/lark-parser/lark-language-server/pull/2#issuecomment-778309135

I'm making the issue here since commenting there would be off topic

MegaIng commented 3 years ago

Originally posted by @erezsh in lark-parser/lark-language-server#2 (comment)

No. This is not true. Why would you add that kind of remark if it isn't true?

Maybe adding examples in the docs would help.

Well, examples are there: https://lark-parser.readthedocs.io/en/latest/examples/advanced/error_reporting_lalr.html#sphx-glr-examples-advanced-error-reporting-lalr-py

But adding a sentence or two in the docs would help

ThatXliner commented 3 years ago

No. This is not true. Why would you add that kind of remark if it isn't true?

My bad!

I forgot to edit it after

MegaIng commented 3 years ago

I just checked, and there are docs: https://lark-parser.readthedocs.io/en/latest/classes.html#lark.exceptions.UnexpectedInput.match_examples , at least since we migrated to sphinx.

ThatXliner commented 3 years ago

This is an old issue. I've also managed to successfully use .match_examples. Thanks for the response, though!