by bshimmin · 12y ago · 0 comments
While the code is concise, this is more a case of "it implements A and B of an X" than "it implements an X, apart from A and B".
Still, all three parts of the series are a good read, and definitely helpful for learning about parsing and about Scala.
The advantage of mathematical regular expressions is that they terminate in O(n) time based on the length of the input string. The disadvantage is that they lack features like capture groups and look ahead/behind. The important point is that engines like those of Perl or Java are not based on regular expressions in a mathematical sense. This is true of any Regex engine that stores state or backtracks.