Re: boost::regex: regex meta data or AST for regex?

Frank Bergemann <[email protected]> Tue, 19 Jan 2021 19:07:35 +0100
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <[email protected]>
On 17.01.21 23:28, Seth Heeren wrote:
> On zo, 17. jan 09:48, Frank Bergemann wrote:
>> On 17.01.21 09:33, Frank Bergemann wrote:
>>> more general:
>>> Can an AST be created for a the given regex string (c'tor argument)?
>>> E.g with boost::spirit?
> 
> I'm not completely sure why you would want this, but here's something
> that I made before that might give you inspiration:
> https://stackoverflow.com/questions/7657130/how-to-get-the-ast-of-a-regular-expression-string/21419351#21419351
> 
> Also, are you aware of Boost Xpressive? It's only tangentially
> related, but in its core it has "static regexes" which are really
> Spirit-style template expressions. The linking element here could be
> that you can make the group matches trigger semantic actions just like
> in spirit, which already tells you what part of the regular expression is involved.
> 
> Cheer,
> Seth
> 

Hi Seth,

isn't Xpressive about static regexes at compile time, plus a wrapping 
for both: dynamic _and_ static regexes?
How can that help to create an AST for a dynamic regular expression 
(string)?