3 ms·
I had always suspected that regular expressions were not, in fact, regular, and now it is obvious. This is in fact why regexs are slow. The old Thompson NFA is
by likpok 18y ago
I had always suspected that regular expressions were not, in fact, regular, and now it is obvious.
This is in fact why regexs are slow. The old Thompson NFA is orders of magnitude faster than current libraries. However, it can only recognize regular languages.
I wonder, are there any libraries for CFG's, that allow specifying the productions?
- nuclear_eclipse 18y agoFlex and Bison come to mind, but they are tailored more for the point of generating new language parsers and compilers. You could, however, attempt to use them in another fashion, considering they are open source (BSDish and GPL respectively). Although I have looked, I've been unable to find much more than a bunch of whitepapers and various incomplete projects.