Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion perf_parser/parsers/boostsconfig.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sys
import re
import xml.etree.ElementTree as ET
from typing import List, Optional, Tuple

Expand All @@ -11,7 +12,9 @@ def parse_resources(resources_str: str) -> List[Tuple[int, int]]:
"0x40C00000, 0x1, 0x40804000, 0xFFF, ..."
into a list of (int, int) tuples.
"""
nums = [int(tok.strip(), 0) for tok in resources_str.split(',') if tok.strip()]
# Accept comma/space/newline separated values; extract all ints/hex tokens robustly.
toks = re.findall(r'0x[0-9a-fA-F]+|\d+', resources_str or "")
nums = [int(tok, 0) for tok in toks]
return [(nums[i], nums[i + 1]) for i in range(0, len(nums), 2)]


Expand Down