lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Tim Mensch <tim-lua-l@bitgems.com> writes:
> While IMO it's better (i.e., easier for humans to read and write) to use
> something like LPEG for more complex matching, it is unarguably true
> that Lua's patterns are not "regular expressions". And I'm not talking a
> minor technicality here, but the fundamental fact that regular
> expressions involve recursively defining expressions; there's none of
> that in Lua pattern matching.

Wait, what?

The conventional/traditional meaning of the term "regular expression"
most certainly does not require recursion.  Indeed, it's precisely the
_lack_ of recursion that is often used to differentiate between REs and
more powerful types of grammars.

-Miles

-- 
Conservative, n. A statesman enamored of existing evils, as opposed to a
Liberal, who wants to replace them with new ones.