%{/* deflex.l - Lexer for .def files */
-/* Copyright (C) 1995-2017 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2023 Free Software Foundation, Inc.
This file is part of GNU Binutils.
}
"\""[^\"]*"\"" {
- yylval.id = xstrdup (yytext+1);
- yylval.id[yyleng-2] = 0;
+ yylval.id = xmemdup (yytext + 1, yyleng - 2, yyleng - 1);
return ID;
}
"\'"[^\']*"\'" {
- yylval.id = xstrdup (yytext+1);
- yylval.id[yyleng-2] = 0;
+ yylval.id = xmemdup (yytext + 1, yyleng - 2, yyleng - 1);
return ID;
}
"*".* { }