From 6e5f5201729b7a60a7514425d25ef4de7b914321 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 20 Feb 2003 03:28:55 +0000 Subject: [PATCH] * rclex.l: Handle strings spanning more than one line. --- binutils/ChangeLog | 4 ++++ binutils/rclex.l | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 55db2d6a92a..806c359302c 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2003-02-19 Mark Blackburn + + * rclex.l: Handle strings spanning more than one line. + 2003-02-12 Bob Wilson * nm.c (usage): Add `java' and `gnat' demangle styles and make diff --git a/binutils/rclex.l b/binutils/rclex.l index 600e38ec9f1..a168b9fd8fe 100644 --- a/binutils/rclex.l +++ b/binutils/rclex.l @@ -196,7 +196,7 @@ static char *get_string PARAMS ((int)); MAYBE_RETURN (NUMBER); } -("\""[^\"\n]*"\""[ \t]*)+ { +("\""[^\"\n]*"\""[ \t\n]*)+ { char *s; unsigned long length; @@ -425,7 +425,10 @@ handle_quotes (input, len) ++t; assert (ISSPACE (*t)); while (ISSPACE (*t)) + { + if ((*t) == '\n') ++rc_lineno; ++t; + } if (*t == '\0') break; assert (*t == '"'); -- 2.30.2