Looking for champion - std.lang.d.lex
Nick Sabalausky
a at a.a
Sat Oct 23 18:41:50 PDT 2010
"Nick Sabalausky" <a at a.a> wrote in message
news:ia01sk$1i7s$1 at digitalmars.com...
> "Nick Sabalausky" <a at a.a> wrote in message
> news:ia01q3$1i1a$1 at digitalmars.com...
>> "Walter Bright" <newshound2 at digitalmars.com> wrote in message
>> news:i9vn3l$bd1$2 at digitalmars.com...
>>> Nick Sabalausky wrote:
>>>> What's wrong with regexes?
>>>
>>> They don't handle recursion.
>>
>> Neither do plain-old strings. But regexes will get you farther than plain
>> strings before needing to resort to customized lexing.
>>
>> But I'm a big data-driven fan anyway. If you're not than I can see why it
>> wouldn't seem as appealing as it does to me.
>>
>> In any case, if I have a chance I might see about adapting my Goldie (
>> www.dsource.org/projects/goldie ) library to more Phobos-friendly
>> requirements. It's already a fully-usable lexer/parser (and the
>> lexer/parser parts can be used independantly), with a complete grammar
>> description language and I already have misc related tools written. And
>> it's mostly working on D2 already (just need the next DMD because it has
>> a fix for a bug that's a breaker for one of the tools). So if I can get
>> it into a state more suitable for Phobos then that might end up putting
>> things ahead of where they would be if someone just started from scratch.
>> The initial versions might not be completely Phobos-ified, but it could
>> definitely get there (especially if I had some guidance from people with
>> more Phobos2 experience than me). Would Walter & co be interested in
>> this? If not, I won't bother, but if so, then I may give it a shot.
>>
>
> And FWIW, I was already thnking about making some improvements to Goldie's
> API enyway.
>
But that's all if you want generalized lexing or parsing though. If you just
want "lexing D code"/"parsing D code", then IMO anything other than adapting
parts of DDMD would be the wrong way to go.
More information about the Digitalmars-d
mailing list