From: Peter Johnson Date: Sat, 1 Dec 2001 09:20:49 +0000 (-0000) Subject: Fix so "0h" works. X-Git-Tag: v0.1.0~161 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9a74064b4eee409863bb6f37cf840a4374ca4b0;p=yasm Fix so "0h" works. svn path=/trunk/yasm/; revision=369 --- diff --git a/modules/parsers/nasm/token.l.in b/modules/parsers/nasm/token.l.in index a3b086e1..2193cec6 100644 --- a/modules/parsers/nasm/token.l.in +++ b/modules/parsers/nasm/token.l.in @@ -100,7 +100,7 @@ WS [ \t\r] } /* 0AAh form of hexidecimal number */ -{DIGIT}{HEXDIGIT}+h { +{DIGIT}{HEXDIGIT}*h { yytext[strlen(yytext)-1] = '\0'; /* strip off 'h' */ yylval.intn = intnum_new_hex(yytext); return INTNUM; diff --git a/src/parsers/nasm/token.l.in b/src/parsers/nasm/token.l.in index a3b086e1..2193cec6 100644 --- a/src/parsers/nasm/token.l.in +++ b/src/parsers/nasm/token.l.in @@ -100,7 +100,7 @@ WS [ \t\r] } /* 0AAh form of hexidecimal number */ -{DIGIT}{HEXDIGIT}+h { +{DIGIT}{HEXDIGIT}*h { yytext[strlen(yytext)-1] = '\0'; /* strip off 'h' */ yylval.intn = intnum_new_hex(yytext); return INTNUM;