Nmap Development mailing list archives

Fwd: Lpeg Integration


From: devin bjelland <devinbjelland () gmail com>
Date: Mon, 9 Jun 2014 03:28:19 +0100

Hi list,
This last week, I have been working on integrating the Lpeg library for use
in the
NSE. Lpeg stands for Lua parsing expression grammars. Expressions grammars
are more expressive than regular expressions and will also to simplify many
parsing
related tasks (like writing a XML and HTML parsing library). See these
examples
of what Lpeg can do [1].
  There has been a fair bit of discussion about incorporating lpeg into nmap
the past.[2] There was some concern about the number of source files, but
amalgamating them into a single file remedies that. I successfully
amalgamated
the lpeg source into a single file and compiled it into Nmap. You can get
my code with:

$svn co https://svn.nmap.org/nmap-exp/devin/lpeg-integration

I incorporated two patches that Patrick had written a while back which use
Lpeg to simplify the code for Json parsing and script selection.

Cheers,
Devin Bjelland

[1]http://www.inf.puc-rio.br/~roberto/lpeg/#ex
[2]https://www.google.com/search?q=lpeg+site:seclists.org
_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: