You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This isn't an issue with any Lua interpreters that I know of, but libraries implementing Lua parsers (especially PEG) really struggle parsing expressions of the following form: return (((((((((((((((("a" .. a) .. ",") .. b) .. ",") .. c) .. ",") .. d) .. ",") .. e) .. ",") .. f) .. ",") .. g) .. ",") .. h) .. ",") .. i
This is the output of something like a{a},{b},{c},{d},..
While this is trivial to fix in controlled code by not using string interpolation for very long expression, it is not trivial to fix in certain parser architectures, and impossible to guard against "in the wild".
This isn't an issue with any Lua interpreters that I know of, but libraries implementing Lua parsers (especially PEG) really struggle parsing expressions of the following form:
return (((((((((((((((("a" .. a) .. ",") .. b) .. ",") .. c) .. ",") .. d) .. ",") .. e) .. ",") .. f) .. ",") .. g) .. ",") .. h) .. ",") .. i
This is the output of something like
a{a},{b},{c},{d},..
While this is trivial to fix in controlled code by not using string interpolation for very long expression, it is not trivial to fix in certain parser architectures, and impossible to guard against "in the wild".
Here is an example of a Lua parser that gets tripped up by this: Kampfkarren/full-moon#279
This -should- be straightforward to fix by flattening out the nested expression, and simply emitting
"a" .. a .. "," .. b .. "," ..
The text was updated successfully, but these errors were encountered: