Open jjerphan opened 1 month ago
I think introducing a formal grammar for MatchSpec
, and using parser generators with a generated C++ parser for mamba is the proper solution for this problem.
https://github.com/conda/ceps/pull/82 aims at proposing a grammar.
3456 grossly adapted
MatchSpec::parse
to introduce a robust handling of extra white space inMatchSpec
. This current solution is improper (it reallocates memory several time for the edge cases mentioned in #3453), and must be introduced insplit_version_and_build
as mentioned in https://github.com/mamba-org/mamba/pull/3456#discussion_r1764843646.Part of the complexity of the parser adaptation comes from
MatchSpec
's flexibility (for instancenumpy 2.0 hxyzw
is a validMatchSpec
).