Boost logo

Boost Users :

Subject: [Boost-users] [spirit] Parsing the following question
From: Michael Powell (mwpowellhtx_at_[hidden])
Date: 2013-08-19 16:18:01


Hello,

I would like to parse the following:

"{0,0}" with the following constraints:

rule<iterator> r %= '{' >> ( int_(0) | int_(1) | int_(2) )[phx::ref(m_mux) = _1]
>> ',' >> ( int_(0x29) | int_(0x39) | int_(0x49)
)[phx::ref(m_addr) = _1] >> '}';

So that m_mux is capturing either 0, 1, or 2, and m_addr is capturing
either 29H, 39H, or 49H (in decimal).

Having some difficulty though with the following errors:

Description Resource Path Location Type
static assertion failed: error_invalid_expression detector
line 176, external location:
/home/mpowell/srcb/Dchem/SEEKERe/dchem-seekere/tools/installed/boost/include/boost/spirit/home/qi/nonterminal/rule.hpp
   C/C++ Problem

Maybe I don't need the int_ at all?

Thank you...

Regards,

Michael Powell


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net