Our parser needs to keep this in mind. There are a few approaches I will experiment with:
RegEx-based parser.
Heuristics-based parser.
A combination of the two.
The RegEx parser is expected to have many ambiguities to resolve. The heuristics are expected to remain incomplete forever. And the combination might just end up being the best overall. (E.g. heuristics for known patterns, and RegEx for everything else.)
This will officially support switching between Metric and US Standard measurement systems.
Here's a rough list of considerations:
uom
mag
quantity
cpc
dimensioned
These are the units I've personally observed so far:
The HTML setup exports can use either measurement system. Some even include a mix of systems. For instance, Dallara P217 with US Standard mixes inches and millimeters: https://github.com/parasyte/cartunes/blob/2a3b98997e6e319d040f46bbddbbe7b5739e8d83/fixtures/iracing_lemans_default.htm#L29-L30
Our parser needs to keep this in mind. There are a few approaches I will experiment with:
The RegEx parser is expected to have many ambiguities to resolve. The heuristics are expected to remain incomplete forever. And the combination might just end up being the best overall. (E.g. heuristics for known patterns, and RegEx for everything else.)