aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiao Zeng <zengxiao@eswincomputing.com>2025-01-07 09:54:55 +0800
committerAlan Modra <amodra@gmail.com>2025-01-09 15:23:21 +1030
commit87199294875e0e9cb484038f89a16417d0cd2081 (patch)
tree0ca0fc13acc3b88bafb9d324ad11d553a48c1f6d
parentb5e40fa57215854e567f5eb8895e893e47a06c8e (diff)
downloadbinutils-87199294875e0e9cb484038f89a16417d0cd2081.zip
binutils-87199294875e0e9cb484038f89a16417d0cd2081.tar.gz
binutils-87199294875e0e9cb484038f89a16417d0cd2081.tar.bz2
ld: Utilize specific digit ranges for different numeral systems
* ldlex.l: Utilize specific digit ranges for different numeral systems. Signed-off-by: Xiao Zeng <zengxiao@eswincomputing.com>
-rw-r--r--ld/ldlex.l2
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/ldlex.l b/ld/ldlex.l
index a3b6871..ef0c5bd 100644
--- a/ld/ldlex.l
+++ b/ld/ldlex.l
@@ -139,7 +139,7 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
return INT;
}
-<MRI,EXPRESSION>([0-9A-Fa-f])+(H|h|X|x|B|b|O|o|D|d) {
+<MRI,EXPRESSION>((([0-9A-Fa-f])+(H|h|X|x))|(([0-1])+(B|b))|(([0-7])+(O|o))|(([0-9])+(D|d))) {
int ibase ;
switch (yytext[yyleng - 1]) {
case 'X':