aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlex.l
diff options
context:
space:
mode:
Diffstat (limited to 'ld/ldlex.l')
-rw-r--r--ld/ldlex.l33
1 files changed, 13 insertions, 20 deletions
diff --git a/ld/ldlex.l b/ld/ldlex.l
index a7bf04c..6e73a7f 100644
--- a/ld/ldlex.l
+++ b/ld/ldlex.l
@@ -91,17 +91,14 @@ static void lex_warn_invalid (char *where, char *what);
%a 4000
%o 5000
-CMDFILENAMECHAR [_a-zA-Z0-9\/\.\\_\+\$\:\[\]\\\,\=\&\!\<\>\-\~]
-CMDFILENAMECHAR1 [_a-zA-Z0-9\/\.\\_\+\$\:\[\]\\\,\=\&\!\<\>\~]
-FILENAMECHAR1 [_a-zA-Z\/\.\\\$\_\~]
-SYMBOLNAMECHAR1 [_a-zA-Z\/\.\\\$\_]
-SYMBOLCHARN [_a-zA-Z\/\.\\\$\_\~0-9]
-FILENAMECHAR [_a-zA-Z0-9\/\.\-\_\+\=\$\:\[\]\\\,\~]
-WILDCHAR [_a-zA-Z0-9\/\.\-\_\+\=\$\:\[\]\\\,\~\?\*\^\!]
+WILDCHAR [_a-zA-Z0-9\/\.\\\$\~\-\+\:\[\]\,\=\?\*\^\!]
+FILENAMECHAR [_a-zA-Z0-9\/\.\\\$\~\-\+\:\[\]\,\=]
+NOCFILENAMECHAR [_a-zA-Z0-9\/\.\\\$\~\-\+\:\[\]]
+SYMBOLNAMECHAR [_a-zA-Z0-9\/\.\\\$\~]
+FILENAMECHAR1 [_a-zA-Z\/\.\\\$\~]
+SYMBOLNAMECHAR1 [_a-zA-Z\/\.\\\$]
WHITE [ \t\n\r]+
-NOCFILENAMECHAR [_a-zA-Z0-9\/\.\-\_\+\$\:\[\]\\\~]
-
V_TAG [.$_a-zA-Z][._a-zA-Z0-9]*
V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
@@ -137,7 +134,8 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
<DEFSYMEXP>"-" { RTOKEN('-');}
<DEFSYMEXP>"+" { RTOKEN('+');}
-<DEFSYMEXP>{SYMBOLNAMECHAR1}{SYMBOLCHARN}* { yylval.name = xstrdup (yytext); return NAME; }
+<DEFSYMEXP>{SYMBOLNAMECHAR1}{SYMBOLNAMECHAR}* { yylval.name = xstrdup (yytext);
+ return NAME; }
<DEFSYMEXP>"=" { RTOKEN('='); }
<MRI,EXPRESSION>"$"([0-9A-Fa-f])+ {
@@ -368,31 +366,26 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
<MRI>{FILENAMECHAR1}{NOCFILENAMECHAR}* {
/* Filename without commas, needed to parse mri stuff */
- yylval.name = xstrdup (yytext);
+ yylval.name = xstrdup (yytext);
return NAME;
}
<BOTH,INPUTLIST>{FILENAMECHAR1}{FILENAMECHAR}* {
- yylval.name = xstrdup (yytext);
+ yylval.name = xstrdup (yytext);
return NAME;
}
<INPUTLIST>"="{FILENAMECHAR1}{FILENAMECHAR}* {
/* Filename to be prefixed by --sysroot or when non-sysrooted, nothing. */
- yylval.name = xstrdup (yytext);
- return NAME;
- }
-<INPUTLIST>"$SYSROOT"{FILENAMECHAR1}{FILENAMECHAR}* {
-/* Filename to be prefixed by --sysroot or when non-sysrooted, nothing. */
- yylval.name = xstrdup (yytext);
+ yylval.name = xstrdup (yytext);
return NAME;
}
<BOTH,INPUTLIST>"-l"{FILENAMECHAR}+ {
yylval.name = xstrdup (yytext + 2);
return LNAME;
}
-<EXPRESSION>{SYMBOLNAMECHAR1}{NOCFILENAMECHAR}* {
- yylval.name = xstrdup (yytext);
+<EXPRESSION>{SYMBOLNAMECHAR1}{NOCFILENAMECHAR}* {
+ yylval.name = xstrdup (yytext);
return NAME;
}
<EXPRESSION>"-l"{NOCFILENAMECHAR}+ {