• feat: NCS-30 FEN Parser using ParserCombinators (#21)

    NowChess released this 2026-04-07 12:28:43 +02:00 | 137 commits to main since this release

    Summary

    • Added scala-parser-combinators_3:2.4.0 dependency to modules/io
    • Implemented FenParserCombinators as an alternative FEN parser using RegexParsers, with the same public API as the
      existing FenParser
    • Parsers are built bottom-up: piece characters → rank tokens → rank → board, composed with explicit field separators
      into a full FEN parser
    • Added FenParserCombinatorsTest mirroring the existing FenParserTest to prove behavioural equivalence

    Test plan

    • All existing tests pass — FenParser and all other modules untouched
    • FenParserCombinatorsTest covers all cases: valid FEN, invalid color, invalid castling, invalid board shapes, en
      passant, round-trip via FenExporter
    • 100% line/branch/method coverage on FenParserCombinators

    Co-authored-by: LQ63 lkhermann@web.de
    Reviewed-on: #21
    Reviewed-by: Janis janis-e@gmx.de
    Co-authored-by: Leon Hermann lq@blackhole.local
    Co-committed-by: Leon Hermann lq@blackhole.local

    Downloads