lua-users home
lua-l archive

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


I'm trying to see if there is a simple natural way to use Lpeg
for parsing in the following two cases:
  - matching (length, value) encoded strings:
     for example some binary stream, like network packet, that
     at some point stores length, followed by that many bytes.
  - matching output of another lpeg capture.
     for example, some keyword that is case-insensitive.
     can it be matched using P "string" over something?
Any hints or pointers to examples appreciated.