devel/lua-lpeg 1.1.0 MidnightBSD
PEG-based pattern-matching library for Lua
- System
- MidnightBSD
- Repository
- mports
- Maintainer
- [email protected]
- License
- mit
- Categories
- devel
Description
LPeg is a new pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs).
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 break complex definitions in smaller parts, etc.) and are extensible, as we can define new functions to create and compose patterns.
In the other systems
| System | Port | Version |
|---|---|---|
| MidnightBSD | devel/lua-lpeg | 1.1.0 |
| FreeBSD | devel/lua-lpeg | 1.1.0 |
| NetBSD | devel/lua-lpeg | 1.1.0nb2 |
| DragonFly | devel/lua-lpeg | 1.1.0 |
| HardenedBSD | devel/lua-lpeg | 1.1.0 |
| GhostBSD | devel/lua-lpeg | 1.1.0 |
Install
Binary package:
mport install ${LUA_PKGNAMEPREFIX}lpeg
From mports:
cd /usr/mports/devel/lua-lpeg && make install clean
To depend on this port in another port's Makefile:
RUN_DEPENDS= ${LUA_PKGNAMEPREFIX}lpeg>0:devel/lua-lpeg
Dependencies
Required by 2
Configuration
No options to configure.
- USES
- lua:module
- Service scripts
- none
Files
distinfo 1
| File | Size | SHA256 |
|---|---|---|
| lpeg-1.1.0.tar.gz | 78042 | 4b155d67d2246c1ffa7ad7bc466c1ea899bbc40fef0257cc9c03cecbaed4352a |
Master sites 2
- https://www.inf.puc-rio.br/~roberto/lpeg/
- FREEBSD_LOCAL/sunpoet