[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [release] parser-gen
- From: Peter Melnichenko <mpeterval@...>
- Date: Wed, 30 Aug 2017 21:31:20 +0300
On Wed, Aug 30, 2017 at 9:00 PM, Peter Melnichenko <mpeterval@gmail.com> wrote:
> I've tried the Lua parser on some real code.
> Testing on files in src/luacheck/ in
> https://github.com/mpeterv/luacheck at commit ca21257:
>
> analyze.lua, linearize.lua, parser.lua: errors with `too many
> captures` in lpeglabel.match call.
> format.lua: it seems to be confused by `{[[...]]}` construction.
>
> Syntax error #1: expected an expression after '[' for the table
> key at line 332(col 18)
> Syntax error #2: expected '=' after the table key at line 332(col 58)
> Syntax error #3: expected an expression after '=' at line 333(col 4)
> Syntax error #4: expected '}' to close the table constructor at
> line 333(col 4)
>
> Testing on files from Luarocks show some other types of errors. But
> these can be fixed.
> The `too many captures` error is more troubling as it appears for most
> larger files.
> Additionally, the memory consumption of the parser seemed very high on
> these larger files
> (hint: turn off swap before testing this if you have it enabled normally).
> Not sure if this is due to limitations of parser-gen or lpeglabel or
> perhaps some bad case in grammar.
For reference, https://github.com/andremm/lua-parser does not have any issues
with any of these files.
-- Best regards,
-- Peter Melnichenko