aboutsummaryrefslogtreecommitdiff
path: root/examples/listId3.lua
diff options
context:
space:
mode:
Diffstat (limited to 'examples/listId3.lua')
-rw-r--r--examples/listId3.lua16
1 files changed, 8 insertions, 8 deletions
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