RustPython / RustPython/Parser

Too many elif chain crashes parser

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

Nobody has claimed this yet.

Dominant language
Rust
Stars
117
Forks
38
Avg merge
4d 7h
Merged PRs (30d)
1

Description

Code generator maybe able to generate it.
CPython cannot run this code anyway.

test_too_many_elif.py.zip

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.

Research direction

Start by extracting and running the attached test_too_many_elif.py.zip case to reproduce the parser crash. Trace the parser path for a very long elif chain and compare it with the claim that CPython cannot run the code. Done means the parser handles the case without crashing, with a regression test covering it.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.