Recent Commits to lark:master

  • 02/06/2026 9:01

    Fix empty SPPF node from xearley ignore carry-over (fixes #1598)

    Fix empty SPPF node from xearley ignore carry-over (fixes #1598)
    
    When an item in to_scan was carried over past an ignored sequence with
    item.node=None (e.g. a prediction at ptr=0 that hasn't matched anything
    yet), the carry-over still allocated an empty SymbolNode and stored it
    in node_cache. That empty node later became the left child of a
    PackedNode when the terminal was finally scanned, and crashed
    ForestSumVisitor with "max() iterable argument is empty".
    
    Skip SymbolNode creation when item.node is None — there's nothing to
    merge, and new_item.node staying None makes the subsequent PackedNode
    have left=None, which is well-handled everywhere else.

Log in