aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorSérgio Queiroz <sqmedeiros@gmail.com>2017-12-29 14:14:29 -0300
committerSérgio Queiroz <sqmedeiros@gmail.com>2017-12-29 14:14:29 -0300
commit08e96cea389b70e7da26b30449f877caf7d33205 (patch)
tree23950eb4b808edc8cffe54e2fe780cc235616ecc /examples
parent19119a91005506ec2133948f3a127e68b6e93f30 (diff)
downloadlpeglabel-08e96cea389b70e7da26b30449f877caf7d33205.tar.gz
lpeglabel-08e96cea389b70e7da26b30449f877caf7d33205.tar.bz2
lpeglabel-08e96cea389b70e7da26b30449f877caf7d33205.zip
Updating documentation for version 1.5
Diffstat (limited to 'examples')
-rw-r--r--examples/listId2.lua16
-rw-r--r--examples/listId3.lua16
2 files changed, 16 insertions, 16 deletions
diff --git a/examples/listId2.lua b/examples/listId2.lua
index dc30ce5..11a181a 100644
--- a/examples/listId2.lua
+++ b/examples/listId2.lua
@@ -2,20 +2,20 @@ local m = require'lpeglabel'
2local re = require'relabel' 2local re = require'relabel'
3 3
4local terror = { 4local terror = {
5 ErrId = "expecting an identifier", 5 ErrId = "expecting an identifier",
6 ErrEnd = "expecting EOF", 6 ErrEnd = "expecting EOF",
7 fail = "undefined" 7 fail = "undefined"
8} 8}
9 9
10local id = m.R'az'^1 10local id = m.R'az'^1
11 11
12local g = m.P{ 12local g = m.P{
13 'S', 13 'S',
14 S = m.V'List' * (-m.P(1) + m.T'ErrEnd'), 14 S = m.V'List' * (-m.P(1) + m.T'ErrEnd'),
15 List = m.V'Id' * (m.V'Comma' * (m.V'Id' + m.T'ErrId'))^0, 15 List = m.V'Id' * (m.V'Comma' * (m.V'Id' + m.T'ErrId'))^0,
16 Id = m.V'Sp' * id, 16 Id = m.V'Sp' * id,
17 Comma = m.V'Sp' * ',', 17 Comma = m.V'Sp' * ',',
18 Sp = m.S' \n\t'^0, 18 Sp = m.S' \n\t'^0,
19} 19}
20 20
21 21
diff --git a/examples/listId3.lua b/examples/listId3.lua
index 03da97d..84793ce 100644
--- a/examples/listId3.lua
+++ b/examples/listId3.lua
@@ -2,20 +2,20 @@ local m = require'lpeglabel'
2local re = require'relabel' 2local re = require'relabel'
3 3
4local terror = { 4local terror = {
5 ErrId = "expecting an identifier", 5 ErrId = "expecting an identifier",
6 ErrComma = "expecting ','", 6 ErrComma = "expecting ','",
7 fail = "undefined" 7 fail = "undefined"
8} 8}
9 9
10local id = m.R'az'^1 10local id = m.R'az'^1
11 11
12local g = m.P{ 12local g = m.P{
13 'S', 13 'S',
14 S = m.V'List', 14 S = m.V'List',
15 List = m.V'Id' * (#m.P(1) * m.V'Comma' * (m.V'Id' + m.T'ErrId'))^0, 15 List = m.V'Id' * (#m.P(1) * m.V'Comma' * (m.V'Id' + m.T'ErrId'))^0,
16 Id = m.V'Sp' * id, 16 Id = m.V'Sp' * id,
17 Comma = m.V'Sp' * ',' + m.T'ErrComma', 17 Comma = m.V'Sp' * ',' + m.T'ErrComma',
18 Sp = m.S' \n\t'^0, 18 Sp = m.S' \n\t'^0,
19} 19}
20 20
21 21