From aab5e63ce93c890e42d477211c31425dbe32769e Mon Sep 17 00:00:00 2001 From: Linda Njau Date: Wed, 7 Aug 2024 11:48:07 +0300 Subject: [PATCH] Add comment for operand search; rename 'operand' to 'elements' --- src/sail_json_backend/json.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sail_json_backend/json.ml b/src/sail_json_backend/json.ml index 26b817669..29bee37c9 100644 --- a/src/sail_json_backend/json.ml +++ b/src/sail_json_backend/json.ml @@ -239,12 +239,12 @@ let rec filter_non_operands components = | _ -> filter_non_operands (List.tl components) let rec extract_operands k filtered_components = + (*This looks for operands embedded within functions like "funct(op1 @ op2 @ 0b00)" *) match filtered_components with | [] -> [] | hd :: tl -> if Str.string_match (Str.regexp ".+(\\(.*\\))") hd 0 then ( - let operand = Str.matched_group 1 hd in - let elements = Str.split (Str.regexp ",") operand in + let elements = Str.split (Str.regexp ",") (Str.matched_group 1 hd) in let filtered_elements = match Hashtbl.find_opt inputs k with | None -> []