[zeek/spicy] 9accdb: Fix parsing of regexps with capture groups in look...

0 views
Skip to first unread message

Benjamin Bannier

unread,
Jul 24, 2026, 5:29:01 AM (3 days ago) Jul 24
to spicy-...@zeek.org
Branch: refs/heads/topic/bbannier/issue/2438
Home: https://github.com/zeek/spicy
Commit: 9accdbce98b59d95a319cc34a2f6947f02e365f1
https://github.com/zeek/spicy/commit/9accdbce98b59d95a319cc34a2f6947f02e365f1
Author: Benjamin Bannier <benjamin...@corelight.com>
Date: 2026-07-24 (Fri, 24 Jul 2026)

Changed paths:
M spicy/toolchain/src/compiler/codegen/parsers/literals.cc
A tests/Baseline/spicy.types.unit.switch-lahead-regexp-captures/output
A tests/spicy/types/unit/switch-lahead-regexp-captures.spicy

Log Message:
-----------
Fix parsing of regexps with capture groups in lookahead

The lookahead fast path consumed the look-ahead token and skipped the
regex loop, so capture groups were never populated. For regexp fields
that have captures, we now skip the fast path and let the regex loop run
instead so captures are filled normally.

Fixes #2438.



To unsubscribe from these emails, change your notification settings at https://github.com/zeek/spicy/settings/notifications
Reply all
Reply to author
Forward
0 new messages