Skip to content

Remove parser Context backtrace APIs and docs#62

Merged
ehwan merged 2 commits into
breaking_changefrom
context_cleanup
Jun 19, 2026
Merged

Remove parser Context backtrace APIs and docs#62
ehwan merged 2 commits into
breaking_changefrom
context_cleanup

Conversation

@ehwan

@ehwan ehwan commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Removed Backtrace from rusty_lr_core
  • Removed deterministic Context::backtrace()
  • Removed nondeterministic Context::backtraces()
  • Removed README references to Context backtrace usage and --no-backtrace

@ehwan ehwan self-assigned this Jun 19, 2026
@ehwan ehwan changed the base branch from main to breaking_change June 19, 2026 12:11

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a major refactoring to optimize compiled binary size and simplify the parser API. The parser rules and DFA states are now serialized into flat static integer arrays and decoded lazily at runtime, replacing verbose static enum instantiations. Additionally, the %filter and %trace directives, along with backtracing functionality, have been removed. The Context structs now take the Parser as a generic parameter, eliminating the need to pass a parser reference to methods like feed, feed_location, and accept. Feedback on the changes suggests removing commented-out code placeholders in the Clone implementation of the nondeterministic Context.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

I am having trouble creating individual review comments. Click here to see my feedback.

rusty_lr_core/src/parser/nondeterministic/context.rs (1817-1822)

medium

Commented-out code should be removed to keep the codebase clean and maintainable. Since these fields are not meant to be cloned (as they are temporary fields populated during parsing), they can be safely omitted from the Clone implementation without leaving commented-out placeholders.

            _phantom: std::marker::PhantomData,
            ..Default::default()

@ehwan ehwan merged commit c2b293e into breaking_change Jun 19, 2026
@ehwan ehwan deleted the context_cleanup branch June 19, 2026 12:16
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