Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

refactor: eliminate decreasing_by in Parser.lean in favour of structural recursion

Open
#34 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Domain
compilers

Research direction

Open Lck/Regex/Parser.lean and inspect the parsing code at lines 646 and 912, then read the termination guidance in CLAUDE.md. Determine whether the affected recursive calls can use structurally smaller token lists; done means both uses of decreasing_by are removed, or an explanatory comment documents why restructuring is infeasible.

Written by the indexing model from the issue text.

Description

Problem

Lck/Regex/Parser.lean at lines 646 and 912 uses decreasing_by to convince the termination checker. Per CLAUDE.md, decreasing_by is a code smell for parsers — a well-structured LL(1) parser over a token list should terminate structurally.

Expected fix

Restructure the affected parsing functions so that recursive calls are made on a syntactically smaller token list, allowing the Lean termination checker to accept them without decreasing_by. If this turns out to be infeasible, document why with a comment.

References

  • Observed by AI code review on PR #9
  • See CLAUDE.md termination discipline
Dominant language
Lean
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lambdaclass/lambda_compiler_kit

All issues in lambdaclass/lambda_compiler_kit

Similar issues

More Compilers issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.