[LLVMdev] Regular Expression lib support

Samuel Crow samuraileumas at yahoo.com
Sun Aug 23 22:04:12 PDT 2009


Hello LLVM Devs,

I thought I'd weigh in on some of these non-backtracking linear time RegEx algorithms.  If they're anything like the PackRat parsing algorithms they take at least 4x the amount of memory in terms of storage as the string length itself by not backtracking.  That should be fine for small RegExes but it wouldn't do so well for more elaborate and long expressions.

If what you need is something for a short regex, a packrat algorithm will do fine.  A 256-character string may bloat up to a couple of KB and still be reasonably cheap.  If you're looking for a full parser, Spirit2.x might be better.

--Sam



      



More information about the llvm-dev mailing list