Oliver Hamlet 180b728728 Improve parsing error messages
Nom's custom error type handling isn't great, requiring a lot of
fix_error! macro calls, and even then the complete! macro hardcodes the
error type it expects as u32, so it can't be used and instead the
CompleteStr type needs to be used everywhere.
2018-10-07 10:45:24 +01:00
2018-10-07 10:45:24 +01:00
2018-10-05 20:30:50 +01:00
2018-10-05 20:30:50 +01:00
2018-10-05 20:21:14 +01:00
2018-10-06 16:04:57 +01:00

loot-condition-interpreter

An experimental library for parsing and evaluating LOOT's metadata condition strings. This library improves upon LOOT's existing implementation in the following ways:

  • Condition expressions are parsed into an intermediate representation instead of being stringly typed, which allows parsing and evaluation to be separated.
  • State is uncoupled by necessity, and Rusts's concurrency guarantees mean it can be accessed more efficiently.
  • Results are cached with more granularity, per function instead of per expression, improving performance when expressions are not entirely different.
  • Result caching is guided by benchmarks, so results aren't cached unnecessarily.
  • Reading executable versions doesn't involve calling out to the shell and piping several commands together when on Linux.

The code is also not as much of a mess, it's got benchmarks, and probably better test coverage.

The library is still experimental because it currently lacks:

  • an FFI for LOOT to call it through.
  • good error handling, details about parsing errors are not exposed.

The tests need the testing-plugins and the LOOT API v0.13.8 Windows archives to be extracted and present in the repo root.

S
Description
No description provided
Readme MIT
833 KiB
Languages
Rust 97.2%
C++ 2.5%
CMake 0.3%