bug-texinfo
[Top][All Lists]
Advanced

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

Re: Texinfo command nesting and syntax checking: nested @ref


From: Gavin Smith
Subject: Re: Texinfo command nesting and syntax checking: nested @ref
Date: Wed, 18 Jan 2023 17:12:28 +0000

On Wed, Jan 18, 2023 at 11:52:33AM +0100, Patrice Dumas wrote:
> > Perhaps a similar approach could be used in the
> > tp/Texinfo/command_data.txt file, avoiding ad hoc and repetitous code
> > in the two parser modules to check for valid nesting?
> 
> The current approach of classes of containing and contained commands
> looks right to me.  I am not sure that there is a need for a more
> generic syntax.
> 
> > I am just throwing this out there as a possibility, although it may not
> > be much use without specifics (i.e. how could valid nesting be specified
> > in command_data.txt).  I always found the code about nesting
> > commands hard to understand.
> 
> Even the recent one?  I started having more categories in command_data.txt
> both for the inner commands classes (in_heading_spec) and outer commands 
> classes
> (contain_simple_text, contain_plain_text), maybe simply adding more
> classes/flags would be enough to have a clear code.  The issue is that
> the number of flags is constrained for the XS parser.

Flags are probably enough but I will have to take some time to understand
the existing rules.

What confused me is that the in_index flag (for e.g. @sortas) wasn't
used in the XS parser at all.  That made me suspect that the nesting
rules were different for the two parsers.  However, some of the nesting
checks were not done in the _check_valid_nesting function but elsewhere
in the code.




reply via email to

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