diff options
author | Sergio Queiroz <sqmedeiros@gmail.com> | 2016-11-14 17:15:27 -0300 |
---|---|---|
committer | Sergio Queiroz <sqmedeiros@gmail.com> | 2016-11-14 17:15:27 -0300 |
commit | 448762908fd822fbc101a4fe66fac9cd8aa913b5 (patch) | |
tree | c7bc865aa66f557be6d3d9d422bcaec42a8be0be /examples/listId1.lua | |
parent | fd28f9d9e54f33bf7ae3a5e12dc71478f9c91aea (diff) | |
download | lpeglabel-448762908fd822fbc101a4fe66fac9cd8aa913b5.tar.gz lpeglabel-448762908fd822fbc101a4fe66fac9cd8aa913b5.tar.bz2 lpeglabel-448762908fd822fbc101a4fe66fac9cd8aa913b5.zip |
Changing documentation and examples with recovery
Diffstat (limited to 'examples/listId1.lua')
-rw-r--r-- | examples/listId1.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/examples/listId1.lua b/examples/listId1.lua index 8976f5f..dee46e9 100644 --- a/examples/listId1.lua +++ b/examples/listId1.lua | |||
@@ -1,12 +1,14 @@ | |||
1 | local m = require'lpeglabel' | 1 | local m = require'lpeglabelrec' |
2 | local re = require'relabel' | 2 | local re = require'relabelrec' |
3 | |||
4 | local id = m.R'az'^1 | ||
3 | 5 | ||
4 | local g = m.P{ | 6 | local g = m.P{ |
5 | "S", | 7 | "S", |
6 | S = m.V"Id" * m.V"List", | 8 | S = m.V"Id" * m.V"List", |
7 | List = -m.P(1) + (m.V"Comma" + m.T(2)) * (m.V"Id" + m.T(1)) * m.V"List", | 9 | List = -m.P(1) + m.V"Comma" * m.V"Id" * m.V"List", |
8 | Id = m.V"Sp" * m.R'az'^1, | 10 | Id = m.V"Sp" * id + m.T(1), |
9 | Comma = m.V"Sp" * ",", | 11 | Comma = m.V"Sp" * "," + m.T(2), |
10 | Sp = m.S" \n\t"^0, | 12 | Sp = m.S" \n\t"^0, |
11 | } | 13 | } |
12 | 14 | ||