Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2005-05-02 15:43:53


Resending my reply, sent to Andreas directly ... ;-)

Andreas Pokorny wrote:
> Resending that message, accidently sent it to eric directly, so again:
>
> On Mon, May 02, 2005 at 09:50:37AM -0700, Eric Niebler <eric_at_[hidden]> wrote:
>
>>About a year ago, Hartmut Kaiser wrote an xpressive_p() parser for
>>Spirit which wrapped an xpressive regex. It worked a bit like the
>>current regex_p parser. Would that meet your needs? I don't know what
>>became of it. Perhaps Hartmut knows.
>
>
> Thats also an interesting usage of xpressive.
>
> I dont have an acute need for scanners, my parsing needs are currently
> focused on biological formats which are just database dumps most of the
> time. So I have to work on character level most of the time.
>
> But provided that I work on parsing a scripting language, or rather a
> language which is intended for parsing by software, I would try to
> implement a lexer first. And use that lexer as scanner object in spirit.
>
> I think it is a bit strangely that there are several generic C++
> replacements for yacc/bison, but nothing similar to lex/flex, that can
> be intergrated into spirit (integrated as scanner that is).
>
>

Ah, now I see that I didn't answer your question. I didn't know that in
Spirit parlance, scanner == lexer. Yes, I agree it would be interesting
and useful to adapt xpressive to be a lexer for Spirit. I think it would
fit this role nicely. There was initially some excitement on the part of
the Spirit developers to use xpressive in just this way, but nothing
came of it.

I'm not terribly familiar with the scanner interface for Spirit, so I
don't know what would be involved. Perhaps I'll look into it. Unless
someone (you?) beat me to it, of course.

-- 
Eric Niebler
Boost Consulting
www.boost-consulting.com

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