$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] Spirit Newbie (balanced parentheses)
From: Lars Rohwedder (L.Rohwedder_at_[hidden])
Date: 2010-04-19 10:22:14
EricB schrieb:
> is there any way to manage this with 1.6.4
If only need to checked whether the string contains the same number of
'(' and ')' what about
int counter=0;
rule<> r = ch_p('(')[increment_a(counter)] >> ~ch_p(')') >>
ch_p(')')[decrement_a(counter)]
if(counter!=0)
{
// unbalanced!
}
L.R.