lark-parser / lark

Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.
MIT License
4.75k stars 401 forks source link

Possible bug in PropagatePositions class #1304

Closed stellabelin closed 1 year ago

stellabelin commented 1 year ago

Hi, thanks for your work with this library! When updating to lark 1.1.6 we started getting issues with our parser, and after digging I noticed that it's possible this line inputs the wrong variable: https://github.com/lark-parser/lark/blob/e4df0249c489d20c64222fd293b5cca4c3be4f27/lark/parse_tree_builder.py#L65 It should use last_meta instead of first_meta, right? When I tried changing it our parser worked as expected.

erezsh commented 1 year ago

Hi Stella! I believe you're right. Very embarrassing. Thanks for letting me know!

On Thu, 20 Jul 2023 at 10:49, Stella Belin @.***> wrote:

Hi, thanks for your work with this library! When updating to lark 1.1.6 we started getting issues with our parser, and after digging I noticed that it's possible this line inputs the wrong variable: https://github.com/lark-parser/lark/blob/e4df0249c489d20c64222fd293b5cca4c3be4f27/lark/parse_tree_builder.py#L65 It should use last_meta instead of first_meta, right? When I tried changing it our parser worked as expected.

— Reply to this email directly, view it on GitHub https://github.com/lark-parser/lark/issues/1304, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFSSSBUHLHIFJVVL25IJBTXRDWHVANCNFSM6AAAAAA2RCTMXY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

erezsh commented 1 year ago

Fixed and released 1.1.7

Thanks again!

stellabelin commented 1 year ago

Great, thank you the fix and the quick response!