diff options
author | sqmedeiros <sqmedeiros@gmail.com> | 2022-12-23 15:48:12 -0300 |
---|---|---|
committer | sqmedeiros <sqmedeiros@gmail.com> | 2022-12-23 15:48:12 -0300 |
commit | ff2dbe372a8759acb1c52bb6296ae7b0866180d5 (patch) | |
tree | 8be667d7d426368a24cca993f01b00d9d498d801 /relabel.lua | |
parent | b5d7638608b4e0b65344c361fd4b8d65a742038f (diff) | |
download | lpeglabel-ff2dbe372a8759acb1c52bb6296ae7b0866180d5.tar.gz lpeglabel-ff2dbe372a8759acb1c52bb6296ae7b0866180d5.tar.bz2 lpeglabel-ff2dbe372a8759acb1c52bb6296ae7b0866180d5.zip |
Removing label ExpItem. Label MisClose8 signals a missing closing ']' or an empty char class
Diffstat (limited to 'relabel.lua')
-rw-r--r-- | relabel.lua | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/relabel.lua b/relabel.lua index f4f4546..5190a98 100644 --- a/relabel.lua +++ b/relabel.lua | |||
@@ -56,8 +56,6 @@ local errinfo = { | |||
56 | 56 | ||
57 | ExpNameOrLab = "expected a name or label after '%' (no space)", | 57 | ExpNameOrLab = "expected a name or label after '%' (no space)", |
58 | 58 | ||
59 | ExpItem = "expected at least one item after '[' or '^'", | ||
60 | |||
61 | MisClose1 = "missing closing ')'", | 59 | MisClose1 = "missing closing ')'", |
62 | MisClose2 = "missing closing ':}'", | 60 | MisClose2 = "missing closing ':}'", |
63 | MisClose3 = "missing closing '~}'", | 61 | MisClose3 = "missing closing '~}'", |
@@ -67,7 +65,7 @@ local errinfo = { | |||
67 | MisClose6 = "missing closing '>'", | 65 | MisClose6 = "missing closing '>'", |
68 | MisClose7 = "missing closing '}'", -- for the labels | 66 | MisClose7 = "missing closing '}'", -- for the labels |
69 | 67 | ||
70 | MisClose8 = "missing closing ']'", | 68 | MisClose8 = "missing closing ']' or empty char class", |
71 | 69 | ||
72 | MisTerm1 = "missing terminating single quote", | 70 | MisTerm1 = "missing terminating single quote", |
73 | MisTerm2 = "missing terminating double quote", | 71 | MisTerm2 = "missing terminating double quote", |
@@ -187,7 +185,7 @@ local item = (defined + Range + m.C(any)) / m.P | |||
187 | local Class = | 185 | local Class = |
188 | "[" | 186 | "[" |
189 | * (m.C(m.P"^"^-1)) -- optional complement symbol | 187 | * (m.C(m.P"^"^-1)) -- optional complement symbol |
190 | * m.Cf(expect(item, "ExpItem") * (item - "]")^0, mt.__add) | 188 | * m.Cf(item * (item - "]")^0, mt.__add) |
191 | / function (c, p) return c == "^" and any - p or p end | 189 | / function (c, p) return c == "^" and any - p or p end |
192 | * expect("]", "MisClose8") | 190 | * expect("]", "MisClose8") |
193 | 191 | ||