Skip to content

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

Draft
youknowdot wants to merge 2 commits into
RustPython:mainfrom
youknowdot:parser-interactive-start-rule-3152
Draft

youknowdot wants to merge 2 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

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • 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

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.

1 participant