           SPELL=lpeg
         VERSION=0.10
          SOURCE=$SPELL-$VERSION.tar.gz
   SOURCE_URL[0]=http://www.inf.puc-rio.br/~roberto/$SPELL/$SOURCE
     SOURCE_HASH=sha512:04a0ada3faabe6171ffb425f76a9e0fc96819bdbbe1dbd5102b65c5747352e79a9238de7a1d4ac43b3fb97a81ceec2d4d6cf0050a5e85e175de0bebe17d89239
SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
        WEB_SITE=http://www.inf.puc-rio.br/~roberto/lpeg.html
      LICENSE[0]=MIT
         ENTERED=20080823
           SHORT="Parsing Expression Grammars for Lua"
cat << EOF
LPeg is a new pattern-matching library for Lua, based on Parsing Expression
Grammars (PEGs). In this text, I assume you are familiar with PEGs. If you
are not, you can get a quick start reading the Wikipedia Entry for PEGs or
Section 2 of Parsing Expression Grammars: A Recognition-Based Syntactic
Foundation (the section has only one page). The nice thing about PEGs is
that it has a formal basis (instead of being an ad-hoc set of features),
allows an efficient and simple implementation, and does most things we expect
from a pattern-matching library (and more, as we can define entire grammars).

Following the Snobol tradition, LPeg defines patterns as first-class objects.
That is, patterns are regular Lua values (represented by userdata). The
library offers several functions to create and compose patterns. With the use
of metamethods, several of these functions are provided as infix or prefix
operators. On the one hand, the result is usually much more verbose than the
typical encoding of patterns using the so called regular expressions (which
typically are not regular expressions in the formal sense). On the other hand,
first-class patterns allow much better documentation (as it is easy to comment
the code, to use auxiliary variables to break complex definitions, etc.) and
are extensible, as we can define new functions to create and compose patterns.
EOF
