lua-users home
lua-l archive

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


Thanks for the update! Great to see you're working on this again. I'll have to plug the new version into my language and see how it works.

No kidding about the code being complex. I made some aftermarket modifications and it was quite a challenge :)

On Mar 27, 2013 12:23 PM, "Roberto Ierusalimschy" <roberto@inf.puc-rio.br> wrote:
What is LPeg? LPeg is a new (well, not that new now) pattern-matching
library for Lua, based on Parsing _expression_ Grammars (PEGs).

What is new in version 0.11?

  + complete reimplementation of the code generator
  + new syntax for table captures
  + new functions in module 're'
  + other small improvements

Where to get it?

  http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-0.11.tar.gz

(The implementation of LPeg became too complex. I spent a long time
trying to document it so that I could understand it again, but in the
end I had to give up and accept that I could not maintain it as it
was.  So, I reimplemented the code generator [the real complicated part]
almost from scratch.  The new implementation is somewhat larger than the
old one, because now it first creates an AST for each _expression_ and
later compiles the AST into opcodes for the virtual machine. But now I
can understand the optimizations.)

-- Roberto