lua-users home
lua-l archive

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


Just wondering, how feasible would it be for LPEG to be able to parse
external strings (ex: mem-mapped file) or generic streams.

The idea of streams could be the following:
* seekable -- might be necessary in LPEG, not positive... could be
alleviated by caching data  as its read (either in LPEG or layer on
top of a forward-only stream)
* c-implemented -- outputs external byte array and length information
* lua-implemented -- basically the same as c-implemented, but all
strings end up interned in Lua

LPEG works pretty fast, and allows for plenty of quick optimization...
the only potential issue is that large data sets must be loaded into
Lua as it stands now.

--
Thomas Harning Jr.