[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: LPEG parsing 'external' strings or streams
- From: "Thomas Harning Jr." <harningt@...>
- Date: Fri, 13 Apr 2007 10:17:44 -0400
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.