Skip to content

Parse interactive single input with its own start rule - #10

Draft
youknowdot wants to merge 1 commit into
RustPython:rustpython-0.17.5from
youknowdot:rustpython-interactive-single-input
Draft

youknowdot wants to merge 1 commit into
RustPython:rustpython-0.17.5from
youknowdot:rustpython-interactive-single-input

Conversation

@youknowdot

Copy link
Copy Markdown

Summary

Add an interactive single start rule and an interactive EOF token sequence, rather than making the compiler infer a compound-statement terminator after module parsing. Honor the caller's implied-dedent option in the token feed. Leave module and expression parsing on their existing paths.

This is the parser half of the RustPython #10044 follow-up. The implementation follows the CPython 3.15.2 interactive grammar and EOF handling.

Validation

  • Focused parser checks cover inline and indented suites, nested dedents, following statements and unchanged module parsing.
  • With the RustPython integration on Linux, 264 of 4,280 observations newly match CPython 3.15.2 exactly and no previously exact observation regressed. Diagnostic differences remain.
  • RustPython's existing compile snippet and selected canonical syntax, codeop, symtable, compile, and REPL tests passed with their skips; full CI and performance are unverified.

Assisted by Codex.

@coderabbitai

coderabbitai Bot commented Nov 29, 2026

Copy link
Copy Markdown

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

This branch has not been deployed

No deployments
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