Boost C++ Libraries: Ticket #6106: New map[] directive to augment qi::symbols when doing binary parsing https://svn.boost.org/trac10/ticket/6106 <p> qi::symbols is an exceptionally useful parser, but it is strongly tied to character strings as its input type. When doing binary parsing, one of the common tasks is de-serializing objects from the binary stream, an activity which can strongly benefit from Nabialek trick (<a class="ext-link" href="http://boost-spirit.com/home/articles/qi-example/nabialek-trick/"><span class="icon">​</span>http://boost-spirit.com/home/articles/qi-example/nabialek-trick/</a>). Another common use case are extensible enum types, a feat which is somewhat cumbersome to handle with attribute transformations. </p> <p> This is my first attempt at implementing a qi directive, so it's probably far from perfect. One of the immediate shortcomings I want to resolve is direct dependency on std::map which is also passed by value between instances. </p> <p> The implementation and a short example demonstrating Nabialek trick is attached. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6106 Trac 1.4.3 oakad@… Tue, 08 Nov 2011 19:17:26 GMT attachment set https://svn.boost.org/trac10/ticket/6106 https://svn.boost.org/trac10/ticket/6106 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">map.hpp</span> </li> </ul> <p> Implementation of the map[] directive in the repository::qi namespace </p> Ticket oakad@… Tue, 08 Nov 2011 19:18:14 GMT attachment set https://svn.boost.org/trac10/ticket/6106 https://svn.boost.org/trac10/ticket/6106 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test_map1.cpp</span> </li> </ul> <p> Example showing use of map[] to implement Nabialek trick </p> Ticket Joel de Guzman Tue, 08 Nov 2011 23:18:31 GMT <link>https://svn.boost.org/trac10/ticket/6106#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6106#comment:1</guid> <description> <p> That's very interesting! </p> <p> We deal with feature submissions like this through the Spirit mailing list. I suggest you post a message there. </p> </description> <category>Ticket</category> </item> <item> <author>oakad@…</author> <pubDate>Wed, 09 Nov 2011 06:08:07 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6106#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6106#comment:2</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/6106#comment:1" title="Comment 1">djowel</a>: </p> <blockquote class="citation"> <p> We deal with feature submissions like this through the Spirit mailing list. I suggest you post a message there. </p> </blockquote> <p> Of course I posted a message there, with a link here. But I suppose, ticket is a good place to keep everything related together. Or isn't it? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Joel de Guzman</dc:creator> <pubDate>Wed, 09 Nov 2011 06:51:45 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6106#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6106#comment:3</guid> <description> <p> Yes, this is good. </p> </description> <category>Ticket</category> </item> </channel> </rss>