Boost logo

Boost Users :

Subject: Re: [Boost-users] Spirit: Chset base uint32_t
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-06-11 19:08:30


AMDG

Etienne Philip Pretorius wrote:
> Hello List,
>
> I am trying to define the Char definition in the XML specification and
> I receive this compiler error: hex escape sequence out of range
>
> Here is the relvent code:
>
> const static boost::spirit::chset<uint32_t> Char(
> "\x9\xA\xD\x20-\xD7FF\xE000-\xFFFD\x10000-\x10FFFF"
> );
>
> Can someone please point me in the right direction to get this working.

Does
    uint32_t values[] = { 0x9, 0xA, 0xD, 0x20, '-', 0xD7FF, 0xE000, '-',
0xFFFD, 0x10000, '-', 0x10FFFF, 0 };
    const static boost::spirit::chset<uint32_t> Char(&values[0]);
work?

In Christ,
Steven Watanabe


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