py-lua-parser
py-lua-parser copied to clipboard
Failure to reject incorrect inputs: name token
Hi,
The parser doesn't reject some of the incorrect and incomplete Lua inputs.
As a short example, consider the following Lua string:
var_name
The parser parses and labels the input as Name, without raising any error!
In comparison to the official Lua grammar, and official Lua implementation, the input is invalid. This is because Name is not a statement. So, it can only be part of a statement, and is only allowed in certain contexts.
So my question is : is this behaviour intended? Or is it a parsing error?
Thank you.