Boost logo

Boost :

Subject: Re: [boost] [spirit] Symbols parser with overlapping symbols
From: Joel de Guzman (djowel_at_[hidden])
Date: 2012-09-30 20:44:49


On 10/1/2012 12:17 AM, Andrey Semashev wrote:
> Hi,
>
> I wonder how qi::symbols parser behaves when it contains partially overlapping
> symbols. For example:
>
> qi::symbols< char, int > syms;
> syms.add("a", 1);
> syms.add("aaa", 2);
>
> What will this parser return when "aaa" is passed as input? I couldn't find it
> in the docs.

"aaa" will return 2 while "a" will return 1. I'll make it
clear in the docs.

Regards,

-- 
Joel de Guzman
http://www.boostpro.com
http://boost-spirit.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk