diff options
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 | ||