diff options
Diffstat (limited to 'examples/listId2.lua')
-rw-r--r-- | examples/listId2.lua | 16 |
1 files changed, 8 insertions, 8 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' | |||
2 | local re = require'relabel' | 2 | local re = require'relabel' |
3 | 3 | ||
4 | local terror = { | 4 | local 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 | ||
10 | local id = m.R'az'^1 | 10 | local id = m.R'az'^1 |
11 | 11 | ||
12 | local g = m.P{ | 12 | local 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 | ||