aboutsummaryrefslogtreecommitdiff
path: root/shared_utils.py
diff options
context:
space:
mode:
authorMr. Jake <norbertzpilicy@gmail.com>2025-06-23 03:37:56 +0200
committerGitHub <noreply@github.com>2025-06-22 18:37:56 -0700
commitb30cec9d8d37a1f81623edfb8f70d466ef352d18 (patch)
tree6171d4a307ec9708e2bd83d06ff4678200a53750 /shared_utils.py
parent9a09c4844f8eb926e4d4f96c6adc097b78d8b945 (diff)
downloadriscv-opcodes-master.zip
riscv-opcodes-master.tar.gz
riscv-opcodes-master.tar.bz2
Added tab as a possible delimeter (#356)HEADmaster
Diffstat (limited to 'shared_utils.py')
-rw-r--r--shared_utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/shared_utils.py b/shared_utils.py
index f6cd4b7..9dd82e9 100644
--- a/shared_utils.py
+++ b/shared_utils.py
@@ -55,7 +55,7 @@ def validate_bit_range(msb: int, lsb: int, entry_value: int, line: str):
# Split the instruction line into name and remaining part
def parse_instruction_line(line: str) -> "tuple[str, str]":
"""Parse the instruction name and the remaining encoding details."""
- name, remaining = line.split(" ", 1)
+ name, remaining = line.replace("\t", " ").split(" ", 1)
name = name.replace(".", "_") # Replace dots for compatibility
remaining = remaining.lstrip() # Remove leading whitespace
return name, remaining