bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Perl prototypes confuses parser


From: Crispin Flowerday
Subject: Perl prototypes confuses parser
Date: Thu, 18 Sep 2003 10:55:18 +0100

Hi,

While testing the new perl mode in the current CVS version (checkout
17th September 2003), I think I found some bugs in the parsing of the
perl code.

The 2 attached files show 2 problems, which are probably related. From
my testing, it seems that the perl prototypes confuse the parser, which
then tries to treat POD comments as code rather than comments.

I was running the xgettext using the following arguments of the attached
files

xgettext --language=perl --output=- foo.pm

Neither file has any file inside a gettext() function call, however
running over the first file gives a msgid of "d foo bar" which came from
a POD comment.

The second file won't parse, my guess is the parser is attempting to
located the second ' character (the first being in the POD comment).

In both cases if the prototype is removed in the function, then parsing
succeeds as expected.

Cheers

-- 
Crispin Flowerday      <address@hidden>      T:+44(0)1223 525000
Zeus Technology Ltd    <http://www.zeus.com>      F:+44(0)1223 525100
Zeus House,  Cowley Road,  Cambridge,  CB4 0ZT,  ENGLAND

Attachment: foo.pm
Description: Text document

Attachment: foo1.pm
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]