4 ms·
I'm curious about the state machine you can type up in a few characters and be a first class citizen. Can you give or link to an example?
by weinzierl 12y ago
I'm curious about the state machine you can type up in a few characters and be a first class citizen. Can you give or link to an example?
- zzzcpan 12y agoI believe he was talking about regular expressions being first class citizens in Perl: ($v1, $v2) =~ /a(b|c)d(e)/; (regular expressions are state machines)
- weinzierl 12y agoOk, I get that. I wrote simple state machines for simple parsing tasks and was just hoping there was an easier way.
- kbenson 12y agoOh, in Perl 6 there are, grammars[1]. [1]: http://en.wikibooks.org/wiki/Perl_6_Programming/Grammars http://en.wikibooks.org/wiki/Perl_6_Programming/Grammars