Lexer and parser generators using CTFE
Nick Sabalausky
a at a.a
Wed Feb 29 09:15:35 PST 2012
"Andrei Alexandrescu" <SeeWebsiteForEmail at erdani.org> wrote in message
news:jiljsg$193s$1 at digitalmars.com...
> On 2/28/12 1:52 PM, Dmitry Olshansky wrote:
>> - have reasonable compile times and memory consumption (though it will
>> only improve over time)
>
> Yes. I guess PEGs have problems there.
>
Probably LR, too, unless you build the state tables in a separate prior
build step.
>> There is prototype of interactive regex matcher that
>> works directly on stream (buried in std.regex), it even passed dry-run
>> unittests back then. Though I had to postpone till I/O is sorted out. I
>> really loved Steven's design with it's easy access to buffer and well
>> thought out primitives, hope it will come about sometime soon.
>
> An interactive regex would be a dream come true to me...
>
One thing I've been wanting to see in a lexer's regex would be a way to
match things like D's nested comments or:
qEOS fancy string blah blah EOS
Support for either one would probably render it "not *technically* a regex"
but it should be entirely possible by just adding some extra data/processing
to the states.
More information about the Digitalmars-d
mailing list