On Wed, 12 Sep 2012 21:36:52 +0200
"Eldar Insafutdinov" e.insafutdinov@gmail.com wrote:

I don't quite understand about how exactly to use state machines
here, but I just thought - if there were support for Regexps how
would that fit in?

AIUI:

It would essentially be a lexer.

Vibe.d would collect all the regexes. Then, instead of the usual regex
approach of building one NFA/DFA for each regex (with one "Accept"
state each), it would essentially combine them like this:

(regex1)|(regex2)|(regex3)|(etc.)

And each of those parts would have their own separate "accept" state.

Ie, a lexer.