On Tue, Feb 09, 2021 at 07:17:47PM +0100, Patrice Dumas wrote: > On Tue, Feb 09, 2021 at 02:54:02PM +0000, Gavin Smith wrote: > > On Tue, Feb 09, 2021 at 02:41:46PM +0100, Patrice Dumas wrote: > > > Hello, > > > > > I think the problem is due to the fact that the file I was using ended > > lines with \x0d\x0a (MS-DOS style). > > Indeed, the problem happen even outside of @def*. Also I checked that > it happens with the pure perl parser too. My intuition is that on MS > windows the problem does not appear with pure perl code, but I have no > idea about the XS code. Also, it is not clear to me whether we want any > end of line work on any platform. > > In perl, since 5.10, there seems to be a special escape \R that could be > used for that in the pure perl parser, though it would not help in the > XS codes. > > Should we try to modify the parsers to handle dos eol on Unix like > platforms? In that case I could have a go at the perl parser maybe this > weekend.
My inclination is towards not handling them, as it can't be much of a real problem, not having come up until now. If people have files with MS-DOS style line endings it would be better if they could convert them, rather than trying to deal with this in the program. They could work out and fix the reason why they had these line endings in the first place, avoiding problems with other programs too. I think it's a complication that we can avoid dealing with.