Subject: Re: [boost] [Re] [Re] JSON Parsing Library for GSoC 14
From: Rob Stewart (robertstewart_at_[hidden])
Date: 2014-03-01 07:05:40
On March 1, 2014 1:35:52 AM EST, Ganesh Prasad <sir.gnsp_at_[hidden]> wrote:
>So basically, the idea of generalization is like this :
>-- A compile time library to work just like parser building tools (ex:
>-- The library is to generate small sized fast and embed-able parsers
>for tag based/markup languages like XML, TeX
>-- The parsing mechanism of the library is to be simpler than that of
>mainstream DCFG parsing tools, yet powerful enough to generate parsers
>for all kinds of tag based languages.
>-- An event handling mechanism. When an tag/end-of-tag is encountered
>an event is generated and this event is to be handled. The library is
>to provide features for this.
>-- Mechanism to bind functions/function objects to events.
You've just described Boost.Spirit.Qi. Well, you'd need to create grammars and provide hooks for the event callbacks, but the tools are present. If you created your own library, you could invent a DSEL that would simplify the creation of parsers for such languages versus creating parsers with Boost.Spirit.Qi ready for use, but for a predetermined set of tag-based languages.
(Sent from my portable computation engine)