Repository navigation
refactor: Make the parser selectable via --parser - #109
Merged
Merged
Conversation
The server picks the parser per connection, so further parsers can be offered via the new `--parser` option. For now there's only `original`, which stays the default. There's no dynamic dispatch: Server::start spawns a separate task type per parser, and handle_connection is generic over it. So every connection loop is compiled on its own, exactly as if the parser was hardcoded. ParserKind lives in breakwater-parser, which owns the parsers. Its clap::ValueEnum is derived behind a new optional `clap` feature, which breakwater enables. The C bindings stay clap-free. The server tests take the parser as a parameter, so they can run against every parser. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The `--advertised-endpoint` value name, the `--network-buffer-size` text and the two web frame compression options had drifted from the actual help. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ParserKind is renamed to ParserImplementation, with docs on what each parser is good at. `--parser refactored` selects RefactoredParser. It doesn't implement PXMULTI, so ParserImplementation::check_supported() rejects it at startup when binary-sync-pixels is enabled. refactored.rs states that itself. The server tests run against both parsers and all pass, including PB and alpha. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
sbernauer
marked this pull request as ready for review
October 4, 2026 16:06
sbernauer
added a commit
that referenced
this pull request
Oct 4, 2026
The parser selection from main (#109) replaces the spike's own version: ParserKind becomes ParserImplementation with an added `Fear` variant. Its check_supported() asks fear::UNSUPPORTED_ENABLED_FEATURE, and the server and the general server tests got their Fear arms. The PB tests stay without Fear, as it doesn't support the binary commands. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.