I'm considering writing what is essentially my first parser since forever (= since the compiler class at Uni which I've forgotten mostly).
Since I use C++, I was thinking of using Boost Spirit. Then I noticed there's the "regular" 2.5.2 and there's something magical subset of the code named Spirit X3.
I' also ve noticed that Boost Spirit X3 was announced/discussed/pre-released already 2 years ago, yet Boost Spirit's official version is 2.5.2. Finally, I read:
Where is boost-spirit 3? Is it abandoned?
So I "know" that it's not an abandoned project - but not a very actively maintained project. How "safe" is it for me to write a parser with Spirit X3? Is it possible it might fail / be dropped / be abandoned, or is it certain to become the main line of Boost Spirit release?
It's already released, so there's little chance of it just vanishing.
I liberally use X3 even in production code: After all, we do have tests for a reason.
That said, I know a number of hairy issues surround the linking of rules spread across separate translation units¹.
Here's a list of things that make me consider not using X3 in the following cases:
Slightly less pressing differences are when:
with<>
: Boost Spirit X3 cannot compile repeat directive with variable factor but I'm not convinced it's re-entrantNote however, there are definite areas where X3 shines:
¹ see the mailing list, and e.g. x3 linker error with separate TU and linking errors while separate parser using boost spirit x3
² In fact, it might be "easy" to create one by creating a custom parser, building on with<>
and any_parser<>