diff options
author | Sérgio Medeiros <sqmedeiros@gmail.com> | 2016-04-28 09:24:32 -0300 |
---|---|---|
committer | Sérgio Medeiros <sqmedeiros@gmail.com> | 2016-04-28 09:24:32 -0300 |
commit | 49fa2fc52c6913abfce7d0cd5fac24b2c88bce05 (patch) | |
tree | 860b5488aa370b4411366c201db28e2c5cdf3351 | |
parent | 859005d9f0ba728e7f1e9db99fd7b234fc7f3300 (diff) | |
parent | 023ee65f23afa9f46a1cf0045577a0f6e9021e5b (diff) | |
download | lpeglabel-49fa2fc52c6913abfce7d0cd5fac24b2c88bce05.tar.gz lpeglabel-49fa2fc52c6913abfce7d0cd5fac24b2c88bce05.tar.bz2 lpeglabel-49fa2fc52c6913abfce7d0cd5fac24b2c88bce05.zip |
Merge pull request #5 from undecidabot/master
Updating to support Lua 5.1
-rw-r--r-- | makefile | 5 | ||||
-rw-r--r-- | relabel.lua | 2 | ||||
-rw-r--r-- | rockspecs/lpeglabel-0.12.2-1.rockspec | 32 | ||||
-rw-r--r-- | rockspecs/lpeglabel-0.12.2-2.rockspec | 32 |
4 files changed, 68 insertions, 3 deletions
@@ -40,8 +40,9 @@ lpeglabel.so: $(FILES) | |||
40 | 40 | ||
41 | $(FILES): makefile | 41 | $(FILES): makefile |
42 | 42 | ||
43 | test: test.lua re.lua lpeglabel.so | 43 | test: test.lua relabel.lua lpeglabel.so |
44 | ./test.lua | 44 | lua test.lua |
45 | lua testlabel.lua | ||
45 | 46 | ||
46 | clean: | 47 | clean: |
47 | rm -f $(FILES) lpeglabel.so | 48 | rm -f $(FILES) lpeglabel.so |
diff --git a/relabel.lua b/relabel.lua index ef1edae..b66fc2e 100644 --- a/relabel.lua +++ b/relabel.lua | |||
@@ -3,7 +3,7 @@ | |||
3 | -- imported functions and modules | 3 | -- imported functions and modules |
4 | local tonumber, type, print, error = tonumber, type, print, error | 4 | local tonumber, type, print, error = tonumber, type, print, error |
5 | local setmetatable = setmetatable | 5 | local setmetatable = setmetatable |
6 | local unpack = table.unpack | 6 | local unpack = table.unpack or unpack |
7 | local m = require"lpeglabel" | 7 | local m = require"lpeglabel" |
8 | 8 | ||
9 | -- 'm' will be used to parse expressions, and 'mm' will be used to | 9 | -- 'm' will be used to parse expressions, and 'mm' will be used to |
diff --git a/rockspecs/lpeglabel-0.12.2-1.rockspec b/rockspecs/lpeglabel-0.12.2-1.rockspec new file mode 100644 index 0000000..63500ff --- /dev/null +++ b/rockspecs/lpeglabel-0.12.2-1.rockspec | |||
@@ -0,0 +1,32 @@ | |||
1 | package = "LPegLabel" | ||
2 | version = "0.12.2-1" | ||
3 | source = { | ||
4 | url = "https://github.com/sqmedeiros/lpeglabel/archive/v0.12.2.tar.gz", | ||
5 | tag = "v0.12.2", | ||
6 | dir = "lpeglabel-0.12.2", | ||
7 | } | ||
8 | description = { | ||
9 | summary = "Parsing Expression Grammars For Lua with Labeled Failures", | ||
10 | detailed = [[ | ||
11 | LPegLabel is a conservative extension of the LPeg library that provides | ||
12 | an implementation of Parsing Expression Grammars (PEGs) with labeled failures. | ||
13 | Labels can be used to signal different kinds of erros and to specify which | ||
14 | alternative in a labeled ordered choice should handle a given label. | ||
15 | Labels can also be combined with the standard patterns of LPeg. | ||
16 | ]], | ||
17 | homepage = "https://github.com/sqmedeiros/lpeglabel/", | ||
18 | maintainer = "Sergio Medeiros <sqmedeiros@gmail.com>", | ||
19 | license = "MIT/X11" | ||
20 | } | ||
21 | dependencies = { | ||
22 | "lua >= 5.2", | ||
23 | } | ||
24 | build = { | ||
25 | type = "builtin", | ||
26 | modules = { | ||
27 | lpeglabel = { | ||
28 | "lpcap.c", "lpcode.c", "lpprint.c", "lptree.c", "lpvm.c" | ||
29 | }, | ||
30 | relabel = "relabel.lua" | ||
31 | } | ||
32 | } | ||
diff --git a/rockspecs/lpeglabel-0.12.2-2.rockspec b/rockspecs/lpeglabel-0.12.2-2.rockspec new file mode 100644 index 0000000..e370f7d --- /dev/null +++ b/rockspecs/lpeglabel-0.12.2-2.rockspec | |||
@@ -0,0 +1,32 @@ | |||
1 | package = "LPegLabel" | ||
2 | version = "0.12.2-2" | ||
3 | source = { | ||
4 | url = "https://github.com/sqmedeiros/lpeglabel/archive/v0.12.2-2.tar.gz", | ||
5 | tag = "v0.12.2-2", | ||
6 | dir = "lpeglabel-0.12.2-2", | ||
7 | } | ||
8 | description = { | ||
9 | summary = "Parsing Expression Grammars For Lua with Labeled Failures", | ||
10 | detailed = [[ | ||
11 | LPegLabel is a conservative extension of the LPeg library that provides | ||
12 | an implementation of Parsing Expression Grammars (PEGs) with labeled failures. | ||
13 | Labels can be used to signal different kinds of erros and to specify which | ||
14 | alternative in a labeled ordered choice should handle a given label. | ||
15 | Labels can also be combined with the standard patterns of LPeg. | ||
16 | ]], | ||
17 | homepage = "https://github.com/sqmedeiros/lpeglabel/", | ||
18 | maintainer = "Sergio Medeiros <sqmedeiros@gmail.com>", | ||
19 | license = "MIT/X11" | ||
20 | } | ||
21 | dependencies = { | ||
22 | "lua >= 5.1", | ||
23 | } | ||
24 | build = { | ||
25 | type = "builtin", | ||
26 | modules = { | ||
27 | lpeglabel = { | ||
28 | "lpcap.c", "lpcode.c", "lpprint.c", "lptree.c", "lpvm.c" | ||
29 | }, | ||
30 | relabel = "relabel.lua" | ||
31 | } | ||
32 | } | ||