On March 1, 2014 1:35:52 AM EST, Ganesh Prasad
So basically, the idea of generalization is like this :
-- A compile time library to work just like parser building tools (ex: yacc). -- The library is to generate small sized fast and embed-able parsers for tag based/markup languages like XML, TeX etc. -- 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. ___ Rob (Sent from my portable computation engine)