Migrate GIB parser to petitparser#101
Open
vijaytogra wants to merge 102 commits intoale64bit:mainfrom
Open
Conversation
vijaytogra
commented
Oct 13, 2025
- Refactored GIB parser to use petitparser library (matching SGF parser)
- Replaced hand-written imperative parser with declarative grammar
- Removed obsolete parse_ext.dart file that was only used by GIB parser
- Maintains same public API and data structures for backward compatibility
- All 15 tests pass without modification
This reverts commit d48bb5b.
- Refactored GIB parser to use petitparser library (matching SGF parser) - Replaced hand-written imperative parser with declarative grammar - Removed obsolete parse_ext.dart file that was only used by GIB parser - Maintains same public API and data structures for backward compatibility - All 15 tests pass without modification
Author
SummaryMigrated the GIB parser from a hand-written imperative parser to use the Changes
Benefits
TestingAll existing tests pass: flutter test test/gib_test.dart # ✅ Pass
flutter test # ✅ All 15 tests pass |
Contributor
|
Hi Vijay, I'm not as familiar with the GIB side, but I want to note that the GIB test suite is not very robust. There is only one test in gib_test.dart, and the assertions are pretty loose. If you want to be confident that this doesn't cause a regression, I recommend adding a test that exercises GameRecord.fromGib and asserts the moves that are read out. |
cae9122 to
3009a61
Compare
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.