Files
PowerToys/doc/devdocs/modules/powerdisplay
Yu Leng 9413b7cc37 Replace regex parser with recursive descent parser
Introduce a new `MccsCapabilitiesParser` to replace the
regex-based `VcpCapabilitiesParser` for parsing MCCS capabilities
strings. The new parser uses a grammar-based recursive descent
approach, improving performance, extensibility, and error handling.

Key changes:
- Implement `MccsCapabilitiesParser` with `ref struct` for zero
  heap allocation and efficient parsing using `ReadOnlySpan<char>`.
- Add sub-parsers for `vcp()` and `vcpname()` segments.
- Accumulate errors in `ParseError` list and return partial results.
- Replace all references to `VcpCapabilitiesParser` with the new
  parser in `DdcCiNative.cs` and `MonitorManager.cs`.
- Enhance `VcpCapabilities` model with `MccsVersion` property.
- Add comprehensive unit tests in `MccsCapabilitiesParserTests.cs`
  to validate real-world examples and edge cases.
- Remove legacy `VcpCapabilitiesParser` and associated code.

Additional improvements:
- Optimize parsing for both space-separated and concatenated hex
  formats.
- Improve logging for parsing progress and error diagnostics.
- Adjust application initialization to prevent race conditions.
2025-12-03 01:32:06 +08:00
..