April 4th, 2010, 10:19 am
QuoteOriginally posted by: outrunQuoteOriginally posted by: CuchulainnYou could use Spirit (Spirit2?) but would it be the most suitable? There are other, more low-entry options in boost:. StringAlgo (is useful but stops at strings, bit of regex). Regex can define regular expressions (e.g. your (a|b|c)* ) and then match/search/replace . Xpressive (REs and the ensuing semantic actions and user-defined assertions). Easy learning curve.It depends on what the problem is. edit: bojan has some remarks on Xpressive and its applicability to order book flow.good edit!the messages look like this:10=3.14;11=hi;45=what?;80=1234;i.r.key=value;key=value;...the key is always an integer the value type dependent on the key (int, string, float)I'm now thinking on writing a simple state transition loop that extract key,value pairs and calls some function with thoseI knocked up a quick piece of code to do the k/v part of this stuff (the niceties of RTTI is student exercise, maybe boost any or Variant..)
Last edited by
Cuchulainn on April 3rd, 2010, 10:00 pm, edited 1 time in total.