diff options
Diffstat (limited to 'relabel.lua')
-rw-r--r-- | relabel.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/relabel.lua b/relabel.lua index ed3a6ed..7055eaa 100644 --- a/relabel.lua +++ b/relabel.lua | |||
@@ -179,7 +179,7 @@ local function labchoice (...) | |||
179 | local p = t[1] | 179 | local p = t[1] |
180 | local i = 2 | 180 | local i = 2 |
181 | while i + 1 <= n do | 181 | while i + 1 <= n do |
182 | p = mm.Lc(p, t[i+1], unpack(t[i])) | 182 | p = t[i] and mm.Lc(p, t[i+1], unpack(t[i])) or mt.__add(p, t[i+1]) |
183 | i = i + 2 | 183 | i = i + 2 |
184 | end | 184 | end |
185 | 185 | ||
@@ -188,7 +188,7 @@ end | |||
188 | 188 | ||
189 | local exp = m.P{ "Exp", | 189 | local exp = m.P{ "Exp", |
190 | Exp = S * ( m.V"Grammar" | 190 | Exp = S * ( m.V"Grammar" |
191 | + (m.V"Seq" * ("/" * (m.V"Labels" + m.Cc({0})) * S | 191 | + (m.V"Seq" * ("/" * (m.V"Labels" + m.Cc(nil)) * S |
192 | * m.Lc(m.V"Seq" + throw(4), (-m.P"/" * any)^0, 4, 5, 6, 7, 8, 9, 10))^0) / labchoice ); | 192 | * m.Lc(m.V"Seq" + throw(4), (-m.P"/" * any)^0, 4, 5, 6, 7, 8, 9, 10))^0) / labchoice ); |
193 | Labels = m.Ct(m.P"{" * S * (m.V"Label" + throw(27)) * (S * "," * S * (m.V"Label" + throw(28)))^0 * S * ("}" + throw(29))); | 193 | Labels = m.Ct(m.P"{" * S * (m.V"Label" + throw(27)) * (S * "," * S * (m.V"Label" + throw(28)))^0 * S * ("}" + throw(29))); |
194 | Seq = m.Cf(m.Cc(m.P"") * m.V"Prefix"^1 , mt.__mul); | 194 | Seq = m.Cf(m.Cc(m.P"") * m.V"Prefix"^1 , mt.__mul); |