3 ms·
And Perl5. Here are two examples of grammar engines built out of perl regex... * Regexp::Grammars - https://metacpan.org/pod/Regexp::Grammars https://metacpan
by draegtun 10y ago
And Perl5. Here are two examples of grammar engines built out of perl regex...
* Regexp::Grammars - https://metacpan.org/pod/Regexp::Grammars https://metacpan.org/pod/Regexp::Grammars
* Parse::RecDescent - https://metacpan.org/pod/Parse::RecDescent https://metacpan.org/pod/Parse::RecDescent
- throwaway7645 10y agoYea, not native which is what the poster ended up meaning, but I hear that one you linked from Damian Conway is great.
- draegtun 10y agoNo external library is used in these modules just Perl5 native regex engine. NB. I think thats also same for Parsec (built out of Haskell's parser combinators) BTW - Damian created both of them, Regexp::Grammars was his replacement for his Parse::RecDescent.
- throwaway7645 10y agoInteresting. I didn't know they had no dependencies. Is it still considered native though since you have to import another module? Rebol & Perl6 don't require that although I'm probably grasping at straws lol. Thanks for pointing out Damian replaced Parse::RecDescent with the other one as I was reading doc on it today at work.
- draegtun 10y agoYou can write grammars in pure Perl5 regex but it can get a bit fugly :) Here's a (very) simple example I did in Perl5 - https://news.ycombinator.com/item?id=6895126 https://news.ycombinator.com/item?id=6895126 And here's a (nicer!) port to Rebol I also did - https://www.reddit.com/r/programming/comments/1smpa1/why_rebol_red_and_the_parse_dialect_are_cool/ce035cv/ https://www.reddit.com/r/programming/comments/1smpa1/why_reb...
- throwaway7645 10y agoThank you!