lark-parser / lark-parser/lark
Earley recogniser - Leo transitives
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6k
- Forks
- 523
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 2
Description
Hi, I noticed that there's an implementation of Joop Leo's optimisation for right recursion, but it is commented out.
I'm fairly new to the concept of this algorithm so I'm trying to learn. Is there a reason to omit this, or maybe there's some other way of achieving linear time for LR(k) grammars?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in lark/parsers/earley.py at the commented Leo optimisation around line 81. Read the surrounding Earley recogniser implementation and its tests, then investigate why the optimisation was disabled and whether it can be safely restored for the relevant grammars. Done means the limitation or implementation path is documented and any supported behaviour is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100