py-lua-parser icon indicating copy to clipboard operation
py-lua-parser copied to clipboard

Failure to reject incorrect inputs: name token

Open bendrissou opened this issue 1 year ago • 0 comments

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.

bendrissou avatar Sep 22 '23 15:09 bendrissou