lua-users home
lua-l archive

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




On 09/12/16 11:46 PM, Duncan Cross wrote:
On Sat, Dec 10, 2016 at 12:10 AM, Soni L. <fakedme@gmail.com> wrote:
I was told PNG is a regular language, in the sense that you can validate any
PNG chunk with a VERY VERY VERY LONG regex.
Including the 32-bit CRC at the end of the chunk? That's got to be a
hell of a regex.

-Duncan


Only 256^2^2^32 alternations or something. While not practical, it is, mathematically speaking, possible. However, that's just for the raw chunks - regex wouldn't work for chunk contents or compression, which's why this is an LPeg challenge, not a regex challenge.

--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.