50 ms·
Oh, neat. Perl 6 appears to have assimilated that idea: http://doc.perl6.org/language/regexes#Subrules http://doc.perl6.org/language/regexes#Subrules
by raldi 11y ago
Oh, neat.
Perl 6 appears to have assimilated that idea:
http://doc.perl6.org/language/regexes#Subrules http://doc.perl6.org/language/regexes#Subrules
- kbenson 11y agoI don't think that's quite the same, as Perl 6 isolates the grammar DSL to grammar blocks, but it would be trivial to make something in Perl 6 that is equivalent, if there isn't already, by defining operators between tokens and grammars in Perl 6 to accomplish the same thing. IIUC grammars are also first class in Perl 6, but it isolates their DSL to grammar blocks. I'm not sure of the specifics of each to note whether one is capable of easily doing something the other can't or has a hard time with, but it looks to boil down to SPITBAL's implementation being slightly easier to access as there's no grammar block required, and Perl 6's being slightly more clear and self documenting, due to that same requirement. Note: I've yet to use either, so someone with more experience, possibly you, might be able to correct my misunderstandings.