From ee0c4cf7d1dbda957222ab27b037ef0be2b74ce2 Mon Sep 17 00:00:00 2001 From: Steve Chamberlain Date: Wed, 22 Apr 1992 19:55:15 +0000 Subject: [PATCH] * ldlex.l: added CMDFILENAMECHAR state so that you can lex different sorts of filenames on the command line than in a script. --- ld/ChangeLog | 5 +++++ ld/ldlex.l | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 1d878b7aba3..c13046ed6a6 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +Wed Apr 22 12:48:42 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * ldlex.l: added CMDFILENAMECHAR state so that you can lex + different sorts of filenames on the command line than in a script. + Fri Apr 17 08:57:17 1992 Steve Chamberlain (sac@thepub.cygnus.com) * relax.c: added handling for new "padding" seclet type, used to diff --git a/ld/ldlex.l b/ld/ldlex.l index b52ba2e4e74..d2f4db3914d 100644 --- a/ld/ldlex.l +++ b/ld/ldlex.l @@ -65,6 +65,9 @@ unsigned int include_stack_ptr = 0; %a 4000 %o 5000 + +CMDFILENAMECHAR [_a-zA-Z0-9\/\.\\_\+\$\:\[\]\\\,\=\&\!\<\>\-] +CMDFILENAMECHAR1 [_a-zA-Z0-9\/\.\\_\+\$\:\[\]\\\,\=\&\!\<\>] FILENAMECHAR1 [_a-zA-Z\/\.\\] SYMBOLCHARN [_a-zA-Z\/\.\\0-9] FILENAMECHAR [_a-zA-Z0-9\/\.\-\_\+\=\$\:\[\]\\] @@ -189,7 +192,7 @@ WHITE [ \t\n]+ yylval.integer = strtol(yytext+1, 0, base); return INT; } -"$"?"0x"?([0-9A-Fa-f])+(M|K|m|k)? { +"$"?"0x"?([0-9A-Fa-f])+(M|K|m|k)? { yylval.integer = strtol(yytext,0,hex_mode); if (yytext[yyleng-1]=='M' || yytext[yyleng-1] == 'm') { @@ -306,6 +309,12 @@ WHITE [ \t\n]+ "sect" { RTOKEN(SECT); } "absolute" { RTOKEN(ABSOLUTE); } +{CMDFILENAMECHAR1}{CMDFILENAMECHAR}* { + yylval.name = buystring(yytext); + return NAME; + } + + {FILENAMECHAR1}{FILENAMECHAR}* { yylval.name = buystring(yytext); return NAME; -- 2.30.2