4 ms·
It goes deeper than that. He has used back references. So formally it aren't real regular expressions anymore. (Back references rewrites the grammar on the fly)
by poelie 15y ago
It goes deeper than that. He has used back references. So formally it aren't real regular expressions anymore. (Back references rewrites the grammar on the fly).
Perl regular expressions are pretty powerful. I wrote a small perl program (just for fun after reading the post), which can parse S-Expressions. It wrote it quick, but it shows it is possible:
http://pastebin.com/ndrHTZJB http://pastebin.com/ndrHTZJB
I know it has bugs.
- d0m 15y agoIt's interesting, I'll take a look at it more seriously. Thanks for sharing.