Re: [Spirit Qi %] (x%y) not semantically equivalent to (x >> *(y >> x))
Frank Hein <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <OFC5190A72.990183F8-ONC1257FC1.000262A7-C1257FC1.0003D01A@maxence.de> |
With the current implementation expected parser output gets discarded when
used with %. Allthough
it is documented as you pointed out this is somewhat strange at least.
You are right, a fix would break int_ % char_(",;").
But if you don't want the char_(",;") attribute I would recommend to use
lit instead of char_.
Often enough if happened, that bugs became features for good reasons. I do
not know if this
is justified here. The use of % gets significantly limited for the sake of
what?
Frank
From: Lee Clagett <[email protected]>
To: [email protected],
Date: 27.05.2016 20:07
Subject: Re: [Spirit-general] [Spirit Qi %] (x%y) not semantically
equivalent to (x >> *(y >> x))
On Fri, 27 May 2016 19:03:46 +0200
Frank Hein <[email protected]> wrote:
> Rather than documenting the bug I'd provide a fix.
There is no bug. If the intent was to expose `b` in `a % b` then
the documentation in the list operator would be stated differently. The
heading "expression semantics" might need some clarification in that it
only covers the inputs accepted by the generated parser, but the parser
does not extract identical attributes from those inputs. More
importantly, fixing this "bug" could break existing code:
int_ % char_(",;")
would currently expose a `Container<int>`; a change would have to
expose an `int` and `char` in a container.
Lee
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and
traffic
patterns at an interface-level. Reveals which users, apps, and protocols
are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Spirit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spirit-general
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Spirit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spirit-general
smime.p7s
(application/pkcs7-signature, 5.1 KB) - not displayed