On Tue, Mar 23, 2010 at 1:00 PM, Roan
Kattouw<roan.kattouw(a)gmail.com> wrote:
DFAs parse regular languages, which means those
languages can also be
expressed as regexes. In fact, the regexes accepted by the preg_*()
functions allow certain extensions to the language theory definition
of regular expressions, allowing them to describe certain non-regular
languages as well. In short: preg_split() can do everything a DFA can
do, and more. The only reason to use a DFA parser would be
performance, but since the preg_*() functions are so heavily optimized
I don't think that'll be an issue.
This much I know, but is LaTeX actually a regular language?
It's not even context free, luckily the subset we are interested in
is
(as clearly shown by the texvc parser :p).