bug-texinfo
[Top][All Lists]
Advanced

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

Re: different encodings for input and output file names and command line


From: Patrice Dumas
Subject: Re: different encodings for input and output file names and command line
Date: Thu, 3 Mar 2022 00:17:01 +0100

On Wed, Mar 02, 2022 at 07:18:48PM +0000, Gavin Smith wrote:
> On Wed, Mar 02, 2022 at 10:42:34AM +0100, Patrice Dumas wrote:
> > I just tested that it does not happen with the perl Parser.  I let you
> > look in more details, maybe the issue is that top->source_info is not
> > current_source_info at the point of the line directive.
> 
> It's actually nothing to do with being in a node or not, it's due to
> the #line directive occurring so soon after '\input texinfo' that it
> is read while collecting the 'preamble_before_beginning' element, and
> added back to the input stream as text (like an expanded macro), so
> the source line information is attached to this added text, not to
> the input file.

I had a look at the perl Parser, and it seems to me that it does not
matter whether the pending text comes from pending text in
$self->{'input'}->[0]->{'pending'} or from a file, it is treated the
same.  Therefore, I don't see a need to change anything in the perl
parser.  My feeling is that the difference with the XS parster comes
from the differences in structures for the input.  In the XS parser
there is one stack shared by both files and pending text, in the perl
Parser the pending text is put into the 'pending' array reference
together with its own source information, and the file information is
also present in the same input stack level as the 'pending' texts array.
The line directive has an effect on the file information, not on the
pending text array.

Maybe the XS parser should use the same structure as in the perl Parser?

-- 
Pat



reply via email to

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