|
Boost Users : |
From: Jacques-Olivier Goussard (jogoussard_at_[hidden])
Date: 2007-10-31 10:36:58
Eric Niebler wrote:
>'ll second the suggestion to look into xpressive. With xpressive, you
>can refer to one regex from another. And with the latest version (in the
>Boost Sandbox) you can put your list of cities into a symbol table and
>get very fast look-up -- much better than just a bunch of alternates.
Ok, I've taken a look and that doesn't seem to be what I need afteral.
The regexp used must use the Perl semantic and are only known at
runtime, so I would go for what you call dynamic expressions, however I'm
not sure I see
how I can use your symbol table neat trick with those, unless they are
disconnected. I.e. I can easily translate
"in (CITY) on westbrook"
into
sregex leftre = 'in';
sregex rightre = 'on westbrook';
sregex re = leftre >> (city_map) >> rightre;
but what to do with
"in (CITY|heaven) on westbrook" ?
/jog
/jog
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