Remove parser Context backtrace APIs and docs#62
Conversation
There was a problem hiding this comment.
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)
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()
Summary
Backtracefromrusty_lr_coreContext::backtrace()Context::backtraces()--no-backtrace