See #268. Replace UniversalParser/ParserResult with parse(path)/parse(string) returning std::expected<Mechanism, Errors>. Dispatches to the correct version parser (v0, v1, v2), each producing the canonical Mechanism. Structural and semantic errors both reported. development::types::Mechanism becomes mechanism_configuration::Mechanism. ConfigParseStatus renamed to ErrorCode.
Acceptance criteria
parse(<filepath>) returns std::expected<Mechanism, Errors> with all errors included
.map() and .map_error() compose correctly
- No caller touches
UniversalParser
- No
v0::types or v1::types remain; all parsers target the canonical mechanism types.
development::types becomes the canonical type without a version, so it's just a mechanism_configuration::Mehchanism, mechanism_configuration::Arrhenius, etc.
Ideas
- Semantic checks (species referenced in reactions exist in the species list, etc.) run after parsing
- These means that two possible paths are
parse file -> validate -> mechanism, or in code mechanism -> validate -> mechanism
See #268. Replace
UniversalParser/ParserResultwithparse(path)/parse(string)returningstd::expected<Mechanism, Errors>. Dispatches to the correct version parser (v0, v1, v2), each producing the canonicalMechanism. Structural and semantic errors both reported.development::types::Mechanismbecomesmechanism_configuration::Mechanism.ConfigParseStatusrenamed toErrorCode.Acceptance criteria
parse(<filepath>)returnsstd::expected<Mechanism, Errors>with all errors included.map()and.map_error()compose correctlyUniversalParserv0::typesorv1::typesremain; all parsers target the canonical mechanism types.development::typesbecomes the canonical type without a version, so it's just amechanism_configuration::Mehchanism,mechanism_configuration::Arrhenius, etc.Ideas
parse file->validate->mechanism, orin code mechanism->validate->mechanism