Boost logo

Boost :

From: Olaf Peter (ope-devel_at_[hidden])
Date: 2024-02-22 10:50:32

> This is really interesting! I did not know that Spirit X3 had made
> this change, but the real/float parser I use is just the one from
> Spirit X3. And sure enough, it's policies class starts with this:
> template <typename T>
> struct ureal_policies
> {
> // trailing dot policy suggested by Gustavo Guerra
> static bool const allow_leading_dot = true;
> static bool const allow_trailing_dot = true;
> static bool const expect_dot = false;
> So, not only does it allow a leading dot, but it's a constant; you'd
> have to inherit from this policies type and hide the value with a new
> one in the derived class.

This reminds me of my parser attempts with Spirit.x3 in the past. C++,
VHDL and other languages support literal digit separators. On there are some workarounds (especially for VHDL's
digit separator '_' ), which work but are unattractive to
unwieldy/unflexible. Is there a native/direct support for it?


Boost list run by bdawes at, gregod at, cpdaniel at, john at