From: Peter Johnson Date: Mon, 24 Apr 2006 05:53:26 +0000 (-0000) Subject: * nasm-token.re: Actually handle $-prefixed names correctly, stripping the $ prefix... X-Git-Tag: v0.5.0~14^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c6b95ad4759852cae821221754f5e88509b1dd01;p=yasm * nasm-token.re: Actually handle $-prefixed names correctly, stripping the $ prefix and allowing any combination of characters following. * win64-dataref.asm: Update to match (has a $-prefixed symbol). Reported by: Nils Weller svn path=/trunk/yasm/; revision=1508 --- diff --git a/modules/objfmts/win64/tests/win64-dataref.asm b/modules/objfmts/win64/tests/win64-dataref.asm index a0a6d8e8..d863dc5a 100644 --- a/modules/objfmts/win64/tests/win64-dataref.asm +++ b/modules/objfmts/win64/tests/win64-dataref.asm @@ -131,10 +131,10 @@ trap: sub rsp, 256 [SECTION .pdata] dd trap dd trap.end wrt trap -dd $xdatasym +dd $$xdatasym [SECTION .xdata] -$xdatasym: +$$xdatasym: db 1, 7, 2, 0, 7, 1, 0x20, 0 [SECTION _FOO] diff --git a/modules/parsers/nasm/nasm-token.re b/modules/parsers/nasm/nasm-token.re index 4ece0095..34e24c26 100644 --- a/modules/parsers/nasm/nasm-token.re +++ b/modules/parsers/nasm/nasm-token.re @@ -374,8 +374,8 @@ scan: } /* forced identifier */ - "$" [a-zA-Z_?][a-zA-Z0-9_$#@~.?]* { - lvalp->str_val = yasm__xstrndup(TOK, TOKLEN); + "$" [a-zA-Z0-9_$#@~.?]+ { + lvalp->str_val = yasm__xstrndup(TOK+1, TOKLEN-1); RETURN(ID); }