Skip to content

Use the interactive parser start rule for single input - #10074

Merged
youknowone merged 3 commits into
RustPython:mainfrom
youknowdot:parser-interactive-start-rule-3152
Nov 30, 2026
Merged

youknowone merged 3 commits into
RustPython:mainfrom
youknowdot:parser-interactive-start-rule-3152

Conversation

@youknowdot

Copy link
Copy Markdown
Contributor

Summary

Follow up on #10044 by routing single-input compilation, AST parsing, and symtable through the interactive start rule in RustPython/ruff#10. This moves compound terminators and implied dedents into the parser and removes the RustPython post-parse terminator reconstruction. Keep EOF location handling shared and preserve the existing non-interactive paths. The Ruff PR should land before this draft.

Validation

  • Linux with the same parser source: 264 observations newly match CPython 3.15.2 exactly out of 4,280; zero previously exact observations changed. The continued physical newline now matches in both code and AST modes. The hard class-header grammar error stays a SyntaxError. Other diagnostic differences remain.
  • Existing compile snippet passed. Canonical syntax/codeop/symtable: 162 counted, 14 skipped. Compile: 187 counted, 50 skipped, big-dict stress filtered. REPL: 18 counted, 3 skipped, one preexisting expected failure. Compiler unit tests: 42 passed.
  • Those tests ran on the local source candidate. The rebased draft's locked Git dependency was resolved without a local source override. Exact-head hosted CI, full C API suite and performance remain unverified.

Assisted by Codex.

@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Assisted-by: Codex:unspecified
@youknowone
youknowone marked this pull request as ready for review November 30, 2026 11:47
@youknowone
youknowone merged commit 45fa746 into RustPython:main Nov 30, 2026
7 of 8 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-30T11:53:28.010145Z 53bdfef Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants