From: Robert Ramey (ramey_at_[hidden])
Date: 2019-09-23 16:19:22
On 9/23/19 9:11 AM, Vinnie Falco via Boost wrote:
> On Mon, Sep 23, 2019 at 8:58 AM Bjorn Reese via Boost
> <boost_at_[hidden]> wrote:
>> ...online parser...
>> A push parser (SAX)...
>> A tree parser (DOM)
> I have no experience with these terms other than occasionally coming
> across them in my Google searching adventures. The parsers that I have
> written take as input one or more buffers of contiguous characters,
> and produce as "output" a series of calls to abstract member functions
> which are implemented in the derived class. These calls represent
> tokens or events, such as "key string", "object begin", "array end".
> So what would we call this in the taxonomy above?
Hmmmm - sounds like a job for Boost Spirit ! This is what I used 15+
years ago to create a special purpose for the limited subset of XML that
boost serialization library. In all that time, through innumerable
variations of compilers, linkers, C++ versions, ... everything -
modification has been required on only a couple of cases. And by
separating syntax from actions, it has permitted other collaborators to
discover and suggest fixes to weird corner cases. The code seems pretty
efficient too - at least no one has complained about that aspect - or
another other either.
The only complain would be slow compile time. But since the
serialization library is compiled and the code is only compiled when the
grammar changes - it's not really an issue.
This software and its approach has been under appreciated - need a good
CppCon talk on this subject. Food for thought.
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk