From 47a24790846effa60185449c337e035adb857893 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 6 Dec 2019 23:51:52 +0000 Subject: [PATCH] pubkeys: Provide ability to add extra action to KEYWORD Nothing uses this yet. Signed-off-by: Ian Jackson --- pubkeys.fl.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pubkeys.fl.pl b/pubkeys.fl.pl index 19af65e..b89d191 100755 --- a/pubkeys.fl.pl +++ b/pubkeys.fl.pl @@ -73,12 +73,14 @@ sub inst ($) { while () { s#\{!2(\w+)\}# '{'.(2 * ($subst{$1}//die "$1 ?")).'}' #ge; - if (m/^!KEYWORD ([-0-9a-z]+)$/) { + if (m/^!KEYWORD ([-0-9a-z]+)(\s*\{.*\})?$/) { + my $kwt=$2; die if $kw; $kw = $1; + my $xact = $3 // ''; $kwid = $kw; $kwid =~ y/-/_/; $in_s = "HK_${kwid}"; - $co .= "{L}$kw { BEGIN($in_s); }\n"; + $co .= "{L}$kwt { BEGIN($in_s); $xact }\n"; next; } if (m/^!ARG (\w+) (\S.*\S) \{\s*$/) { -- 2.30.2