From efb32d31fceae2090a65d0f56fe43902b6c00f93 Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Wed, 19 Apr 2023 16:11:10 +0200 Subject: [PATCH] bifcl: builtin-func.l: Allow more than just one additional component I'm not sure why this was restricted to only two components, the following appears functional in Zeek scripts. module A::B::C; export { type MyRecord: record { a: string; }; } Closes #25. --- tools/bifcl/builtin-func.l | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/bifcl/builtin-func.l b/tools/bifcl/builtin-func.l index 6d31f9613a..063a394cfb 100644 --- a/tools/bifcl/builtin-func.l +++ b/tools/bifcl/builtin-func.l @@ -37,11 +37,8 @@ int check_c_mode(int t) WS [ \t]+ OWS [ \t]* - /* Note, bifcl only accepts a single "::" in IDs while the policy - layer acceptes multiple. (But the policy layer doesn't have - a hierachy. */ IDCOMPONENT [A-Za-z_][A-Za-z_0-9]* -ID {IDCOMPONENT}(::{IDCOMPONENT})? +ID {IDCOMPONENT}(::{IDCOMPONENT})* ESCSEQ (\\([^\n]|[0-7]+|x[[:xdigit:]]+)) DEC [[:digit:]]+ HEX [0-9a-fA-F]+