From b5a2925a241329ef66babb8012cf8324573f8c07 Mon Sep 17 00:00:00 2001 From: drudge Date: Sun, 26 Nov 2023 20:51:20 -0800 Subject: [PATCH] fiddling with grammars but haven't actually tested whether any portion of them are right --- scratchpad.raku | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 scratchpad.raku diff --git a/scratchpad.raku b/scratchpad.raku new file mode 100644 index 0000000..366bb9a --- /dev/null +++ b/scratchpad.raku @@ -0,0 +1,12 @@ +# Below is an example policy to test Policy structure against +my $rule = 'all aws_ebs_volume resources have required tag "foo" with required value "bar"'; + +grammar Policy { + regex TOP { } + regex quantifier { + || any + || all + || \d + } + regex resource { \s \w \s resource[s?] \s} +} \ No newline at end of file