SANKit
Read and write PGN format and test moves for legality.
...This code is now reformatted to modern standards, adds support for NAG codes and comments, and has a "non-CLI" mode for inclusion in chess playing programs.
The code has gone through extensive analysis using the llvm/clang compiler and reports no issues at this time. To use the code as a "framework" you would undefined "CLI".
In addition, a small C++ program is included that takes as input a file of one or more PGN records, and outputs pure pristine PGN records as output. In addition to flagging errors at the move level, the program provides three boards around the move.
NOTE: plan on budgeting a fair amount of time to read, re-read, and experiment with the documentation and cryptic uncommented code. ...