texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: Use nesting stacks for sectioning and def command


From: Gavin D. Smith
Subject: branch master updated: Use nesting stacks for sectioning and def commands
Date: Thu, 09 Feb 2023 10:21:17 -0500

This is an automated email from the git hooks/post-receive script.

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new a33d6b4a41 Use nesting stacks for sectioning and def commands
a33d6b4a41 is described below

commit a33d6b4a414bf355a9d3fc2d3103b2888f992163
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Thu Feb 9 15:20:57 2023 +0000

    Use nesting stacks for sectioning and def commands
    
    * tp/Texinfo/command_data.txt: Add contain_basic_inline flag
    for all def and sectioning_heading commands.
    
    * tp/Texinfo/ParserNonXS.pm
    (%in_basic_inline_with_refs_commands): Remove.
    (%default_valid_nestings):
    Do not set using %in_basic_inline_with_refs_commands.
    (%ok_in_basic_inline_with_refs_commands): New hash, with exceptions.
    (_check_valid_nesting): Eliminate special handling of ct_def context.
    (_check_valid_nesting_context):
    Use %ok_in_basic_inline_with_refs_commands as list of inclusions
    for sectioning and def commands.
    
    * tp/Texinfo/ParserNonXS.pm
    (_end_line_misc_line, _end_line_starting_block):
    Pop nesting contexts before calling _end_line_def_line.
    
    * tp/Texinfo/XS/parsetexi/parser.c (check_valid_nesting):
    Do not handle "basic inline with refs" commands.
    * tp/Texinfo/XS/parsetexi/parser.c (check_valid_nesting_context):
    Include CF_ref commands as allowed for sectioning and def commands.
    
    * tp/Texinfo/XS/parsetexi/end_line.c
    (end_line_misc_line, end_line_starting_block):
    Pop nesting contexts before calling end_line_def_line.
---
 ChangeLog                                          |  30 +++++
 tp/Texinfo/ParserNonXS.pm                          |  77 ++++++------
 tp/Texinfo/XS/parsetexi/end_line.c                 |  28 +++--
 tp/Texinfo/XS/parsetexi/parser.c                   |  30 ++---
 tp/Texinfo/command_data.txt                        | 130 ++++++++++-----------
 tp/t/results/def/double_command.pl                 |   8 +-
 .../formats_encodings/at_commands_in_refs.pl       |   4 +-
 .../at_commands_in_refs_latin1.pl                  |   4 +-
 .../formats_encodings/at_commands_in_refs_utf8.pl  |   4 +-
 tp/t/results/invalid_nestings/on_def_line.pl       |  32 ++---
 tp/t/results/invalid_nestings/on_section_line.pl   |  20 ++--
 .../results/invalid_nestings/on_subheading_line.pl |  20 ++--
 .../invalid_nestings/section_on_def_line.pl        |   4 +-
 .../invalid_nestings/section_on_defx_line.pl       |   4 +-
 .../unclosed_verb_on_section_line.pl               |   4 +-
 .../setfilename_on_top_and_after_node.pl           |   4 +-
 16 files changed, 209 insertions(+), 194 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index fd8fb8f09d..1c1aaccb57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,33 @@
+2023-02-09  Gavin Smith <gavinsmith0123@gmail.com>
+
+       Use nesting stacks for sectioning and def commands
+
+       * tp/Texinfo/command_data.txt: Add contain_basic_inline flag
+       for all def and sectioning_heading commands.
+
+       * tp/Texinfo/ParserNonXS.pm
+       (%in_basic_inline_with_refs_commands): Remove.
+       (%default_valid_nestings):
+       Do not set using %in_basic_inline_with_refs_commands.
+       (%ok_in_basic_inline_with_refs_commands): New hash, with exceptions.
+       (_check_valid_nesting): Eliminate special handling of ct_def context.
+       (_check_valid_nesting_context):
+       Use %ok_in_basic_inline_with_refs_commands as list of inclusions
+       for sectioning and def commands.
+
+       * tp/Texinfo/ParserNonXS.pm
+       (_end_line_misc_line, _end_line_starting_block):
+       Pop nesting contexts before calling _end_line_def_line.
+
+       * tp/Texinfo/XS/parsetexi/parser.c (check_valid_nesting):
+       Do not handle "basic inline with refs" commands.
+       * tp/Texinfo/XS/parsetexi/parser.c (check_valid_nesting_context):
+       Include CF_ref commands as allowed for sectioning and def commands.
+
+       * tp/Texinfo/XS/parsetexi/end_line.c
+       (end_line_misc_line, end_line_starting_block):
+       Pop nesting contexts before calling end_line_def_line.
+
 2023-02-09  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/parsetexi/source_marks.c (relocate_source_marks):
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 2b7e1944b8..45a8c55ea9 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -454,23 +454,19 @@ delete $in_full_text_commands{'shortcaption'};
 # Note that checks for basic inline content are now done using the stacks of
 # commands in 'nesting_context'.
 
-# commands that may appear inside sectioning commands
-my %in_basic_inline_with_refs_commands = %in_full_text_commands;
-foreach my $not_in_basic_inline_with_refs_commands ('titlefont',
-                                   'anchor', 'footnote', 'verb') {
-  delete $in_basic_inline_with_refs_commands{
-                                 $not_in_basic_inline_with_refs_commands};
+my %in_basic_inline_commands = %in_full_text_commands;
+foreach my $not_in_basic_inline_commands
+                               ('xref', 'ref', 'pxref', 'inforef',
+                                'titlefont', 'anchor', 'footnote', 'verb') {
+  delete $in_basic_inline_commands{$not_in_basic_inline_commands};
 }
 
-# commands that are basic inline content
-my %in_basic_inline_commands = %in_basic_inline_with_refs_commands;
-foreach my $not_in_basic_inline_command('xref', 'ref', 'pxref', 'inforef') {
-  delete $in_basic_inline_commands{$not_in_basic_inline_command};
-}
-
-
 my %contain_basic_inline_with_refs_commands = (%sectioning_heading_commands,
                                       %def_commands);
+my %ok_in_basic_inline_with_refs_commands;
+foreach my $permitted_command ('xref', 'ref', 'pxref', 'inforef') {
+  $ok_in_basic_inline_with_refs_commands{$permitted_command} = 1;
+}
 
 # commands that accept full text, but no block or top-level commands
 my %contain_full_text_commands;
@@ -497,7 +493,6 @@ $contain_full_line_commands{'itemx'} = 1;
 # There are additional context tests, to make sure, for instance that we are
 # testing @-commands on the block, line or node @-command line and not
 # in the content.
-# Index entry commands are dynamically set as %in_basic_inline_commands
 my %default_valid_nestings;
 
 foreach my $command (keys(%contain_plain_text_commands)) {
@@ -508,9 +503,6 @@ foreach my $command (keys(%contain_full_text_commands),
                      keys(%contain_full_line_commands)) {
   $default_valid_nestings{$command} = \%in_full_text_commands;
 }
-foreach my $command (keys(%contain_basic_inline_with_refs_commands)) {
-  $default_valid_nestings{$command} = \%in_basic_inline_with_refs_commands;
-}
 
 # @this* commands should not appear in any line command except for
 # page heading specification commands and can also appear in brace @-commands,
@@ -3333,6 +3325,12 @@ sub _end_line_misc_line($$$)
   my $current = shift;
   my $source_info = shift;
 
+  my $command = $current->{'parent'}->{'cmdname'};
+
+  if ($self->{'basic_inline_commands'}->{$command}) {
+    pop @{$self->{'nesting_context'}->{'basic_inline_stack_on_line'}};
+  }
+
   if ($current->{'parent'}->{'type'}
         and $current->{'parent'}->{'type'} eq 'def_line') {
     $current = _end_line_def_line($self, $current, $source_info);
@@ -3342,20 +3340,14 @@ sub _end_line_misc_line($$$)
   $self->_pop_context(['ct_line'], $source_info, $current, 'in line_arg');
   _isolate_last_space($self, $current);
 
-  # first parent is the @command, second is the parent
   $current = $current->{'parent'};
   my $misc_cmd = $current;
-  my $command = $current->{'cmdname'};
   my $end_command;
   my $included_file;
   my $include_source_mark;
   print STDERR "MISC END \@$command: $self->{'line_commands'}->{$command}\n"
      if ($self->{'DEBUG'});
 
-  if ($self->{'basic_inline_commands'}->{$command}) {
-    pop @{$self->{'nesting_context'}->{'basic_inline_stack_on_line'}};
-  }
-
   if ($self->{'line_commands'}->{$command} eq 'specific') {
     my $args = _parse_line_command_args($self, $current, $source_info);
     if (defined($args)) {
@@ -3758,6 +3750,19 @@ sub _end_line_starting_block($$$)
   my $current = shift;
   my $source_info = shift;
 
+  my $command;
+  if ($current->{'parent'}->{'type'}
+        and $current->{'parent'}->{'type'} eq 'def_line') {
+    $command = $current->{'parent'}->{'parent'}->{'cmdname'}
+  } else {
+    $command = $current->{'parent'}->{'cmdname'};
+  }
+  $command = '' if !defined($command);
+
+  if ($self->{'basic_inline_commands'}->{$command}) {
+    pop @{$self->{'nesting_context'}->{'basic_inline_stack_block'}};
+  }
+
   if ($current->{'parent'}->{'type'}
         and $current->{'parent'}->{'type'} eq 'def_line') {
     $current = _end_line_def_line($self, $current, $source_info);
@@ -3768,13 +3773,6 @@ sub _end_line_starting_block($$$)
   $self->_pop_context(['ct_line'], $source_info, $current,
                       'in block_line_arg');
 
-  my $command = $current->{'parent'}->{'cmdname'};
-  $command = '' if !defined($command);
-
-  if ($self->{'basic_inline_commands'}->{$command}) {
-    pop @{$self->{'nesting_context'}->{'basic_inline_stack_block'}};
-  }
-
   print STDERR "END BLOCK LINE: "
      .Texinfo::Common::debug_print_element_short($current, 1)."\n"
        if ($self->{'DEBUG'});
@@ -4480,18 +4478,6 @@ sub _check_valid_nesting {
                         and $current->{'type'} eq 'line_arg'))) {
         $invalid_parent = $current->{'parent'}->{'cmdname'};
       }
-    } elsif ($self->_top_context() eq 'ct_def'
-      # FIXME instead of hardcoding in_basic_inline_with_refs_commands
-      # it would be better to use the parent command valid_nesting.
-             and !$in_basic_inline_with_refs_commands{$command}) {
-      my $def_block = $current;
-      while ($def_block->{'parent'}
-             and (!$def_block->{'parent'}->{'type'}
-                  or $def_block->{'parent'}->{'type'} ne 'def_line')) {
-        $def_block = $def_block->{'parent'};
-      }
-
-      $invalid_parent = $def_block->{'parent'}->{'parent'}->{'cmdname'};
     }
   }
 
@@ -4532,6 +4518,13 @@ sub _check_valid_nesting_context
       = $self->{'nesting_context'}->{'basic_inline_stack_block'}->[-1];
   }
 
+  if ($invalid_context
+        and $contain_basic_inline_with_refs_commands{$invalid_context}) {
+    if ($ok_in_basic_inline_with_refs_commands{$command}) {
+      undef $invalid_context;
+    }
+  }
+
   $self->_line_warn(sprintf(
         __("\@%s should not appear anywhere inside \@%s"),
             $command, $invalid_context), $source_info)
diff --git a/tp/Texinfo/XS/parsetexi/end_line.c 
b/tp/Texinfo/XS/parsetexi/end_line.c
index e43de4c47c..528201f7ab 100644
--- a/tp/Texinfo/XS/parsetexi/end_line.c
+++ b/tp/Texinfo/XS/parsetexi/end_line.c
@@ -1011,15 +1011,22 @@ end_line_starting_block (ELEMENT *current)
 {
   KEY_PAIR *k;
 
+  enum command_id command;
+
+  if (current->parent->type == ET_def_line)
+    command = current->parent->parent->cmd;
+  else
+    command = current->parent->cmd;
+
+  if (command_data(command).flags & CF_contain_basic_inline)
+      (void) pop_command (&nesting_context.basic_inline_stack_block);
+
   if (current->parent->type == ET_def_line)
     return end_line_def_line (current);
 
   if (pop_context () != ct_line)
     fatal ("line context expected");
 
-  if (command_flags(current->parent) & CF_contain_basic_inline)
-      (void) pop_command (&nesting_context.basic_inline_stack_block);
-
   if (current->parent->cmd == CM_multitable
       && (k = lookup_extra (current->parent, "columnfractions")))
     {
@@ -1377,6 +1384,14 @@ end_line_misc_line (ELEMENT *current)
   int included_file = 0;
   SOURCE_MARK *include_source_mark;
 
+  cmd = current->parent->cmd;
+  if (!cmd)
+    fatal ("command name unknown for @end");
+
+  if ((command_data(cmd).flags & CF_contain_basic_inline)
+      || cmd == CM_item) /* CM_item_LINE on stack */
+    (void) pop_command (&nesting_context.basic_inline_stack_on_line);
+
   if (current->parent->type == ET_def_line)
     return end_line_def_line (current);
 
@@ -1384,18 +1399,11 @@ end_line_misc_line (ELEMENT *current)
 
   current = current->parent;
   misc_cmd = current;
-  cmd = current->cmd;
-  if (!cmd)
-    fatal ("command name unknown for @end");
 
   arg_type = command_data(cmd).data;
    
   debug ("MISC END %s", command_name(cmd));
 
-  if ((command_data(cmd).flags & CF_contain_basic_inline)
-      || cmd == CM_item) /* CM_item_LINE on stack */
-    (void) pop_command (&nesting_context.basic_inline_stack_on_line);
-
   if (pop_context () != ct_line)
     fatal ("line context expected");
 
diff --git a/tp/Texinfo/XS/parsetexi/parser.c b/tp/Texinfo/XS/parsetexi/parser.c
index 4af79a1b38..7c4c5c9146 100644
--- a/tp/Texinfo/XS/parsetexi/parser.c
+++ b/tp/Texinfo/XS/parsetexi/parser.c
@@ -1103,13 +1103,7 @@ check_valid_nesting (ELEMENT *current, enum command_id 
cmd)
            || outer == CM_center
            || outer == CM_exdent
            || outer == CM_item
-           || outer == CM_itemx
-
-           || (!current->parent->cmd && current_context () == ct_def)
-
-           /* "full line no refs commands" */
-           || (outer_flags & (CF_sectioning_heading | CF_def))
-           || (!current->parent->cmd && current_context () == ct_def))
+           || outer == CM_itemx)
     {
       /* Start by checking if the command is allowed inside a "full text 
          command" - this is the most permissive. */
@@ -1151,19 +1145,6 @@ check_valid_nesting (ELEMENT *current, enum command_id 
cmd)
                       || command_data(outer).data == BRACE_style_no_code)))
               ok = 1;
         }
-
-      /* Now add more restrictions for
-         "basic inline with refs" commands. */
-      if (outer_flags & (CF_sectioning_heading | CF_def)
-          || (!current->parent->cmd && current_context () == ct_def))
-        {
-          if (cmd == CM_titlefont
-              || cmd == CM_anchor
-              || cmd == CM_footnote
-              || cmd == CM_verb
-              || cmd == CM_indent || cmd == CM_noindent)
-            ok = 0;
-        }
     }
   else
     {
@@ -1247,10 +1228,13 @@ check_valid_nesting_context (enum command_id cmd)
             invalid_context = top_command
                                 (&nesting_context.basic_inline_stack_block);
         }
+    }
 
-      /* FIXME: This may not match exactly the definition of
-         "basic inline with refs" in check_valid_nesting.  We should
-         only need to define what these commands are in one place. */
+  /* Inclusions for "basic inline with refs" commands. */
+  if (command_data(invalid_context).flags & (CF_sectioning_heading | CF_def))
+    {
+      if (command_data(cmd).flags & CF_ref)
+        invalid_context = 0;
     }
 
   if (invalid_context)
diff --git a/tp/Texinfo/command_data.txt b/tp/Texinfo/command_data.txt
index 8fc37ed692..d90f8622e2 100644
--- a/tp/Texinfo/command_data.txt
+++ b/tp/Texinfo/command_data.txt
@@ -1,4 +1,4 @@
-# Copyright 2010-2022 Free Software Foundation, Inc.
+# Copyright 2010-2023 Free Software Foundation, Inc.
 #
 # This file is part of GNU Texinfo.
 #
@@ -111,30 +111,30 @@ refill                  nobrace,preamble,deprecated     
NOBRACE_other
 # and for @node.  The number of arguments of LINE_specific commands
 # is not used anywhere in the code, it is here as documentation only.
 
-# Root commands
-node                    line,formatted_line,root,contain_basic_inline          
    LINE_line     4
-top                     
line,formatted_line,root,sectioning_heading,global_unique   LINE_line
-chapter                 line,formatted_line,root,sectioning_heading            
   LINE_line
-unnumbered              line,formatted_line,root,sectioning_heading            
   LINE_line
-chapheading             line,formatted_line,sectioning_heading,close_paragraph 
   LINE_line
-appendix                line,formatted_line,root,sectioning_heading            
   LINE_line
-section                 line,formatted_line,root,sectioning_heading            
   LINE_line
-unnumberedsec           line,formatted_line,root,sectioning_heading            
   LINE_line
-heading                 line,formatted_line,sectioning_heading,close_paragraph 
   LINE_line
-appendixsec             line,formatted_line,root,sectioning_heading            
   LINE_line
-subsection              line,formatted_line,root,sectioning_heading            
   LINE_line
-unnumberedsubsec        line,formatted_line,root,sectioning_heading            
   LINE_line
-subheading              line,formatted_line,sectioning_heading,close_paragraph 
   LINE_line
-appendixsubsec          line,formatted_line,root,sectioning_heading            
   LINE_line
-subsubsection           line,formatted_line,root,sectioning_heading            
   LINE_line
-unnumberedsubsubsec     line,formatted_line,root,sectioning_heading            
   LINE_line
-subsubheading           line,formatted_line,sectioning_heading,close_paragraph 
   LINE_line
-appendixsubsubsec       line,formatted_line,root,sectioning_heading            
   LINE_line
-
-part                    line,formatted_line,root,sectioning_heading,global     
   LINE_line
-appendixsection         line,formatted_line,root,sectioning_heading            
   LINE_line
-majorheading            line,formatted_line,sectioning_heading,close_paragraph 
   LINE_line
-centerchap              line,formatted_line,root,sectioning_heading,deprecated 
   LINE_line
+# Root and heading commands
+node                    line,formatted_line,root,contain_basic_inline          
                      LINE_line     4
+top                     
line,formatted_line,root,contain_basic_inline,sectioning_heading,global_unique 
LINE_line
+chapter                 
line,formatted_line,root,contain_basic_inline,sectioning_heading               
LINE_line
+unnumbered              
line,formatted_line,root,contain_basic_inline,sectioning_heading               
LINE_line
+chapheading             
line,formatted_line,contain_basic_inline,sectioning_heading,close_paragraph    
LINE_line
+appendix                
line,formatted_line,root,contain_basic_inline,sectioning_heading               
LINE_line
+section                 
line,formatted_line,root,contain_basic_inline,sectioning_heading               
LINE_line
+unnumberedsec           
line,formatted_line,root,contain_basic_inline,sectioning_heading               
LINE_line
+heading                 
line,formatted_line,contain_basic_inline,sectioning_heading,close_paragraph    
LINE_line
+appendixsec             
line,formatted_line,root,contain_basic_inline,sectioning_heading               
LINE_line
+subsection              
line,formatted_line,root,contain_basic_inline,sectioning_heading               
LINE_line
+unnumberedsubsec        
line,formatted_line,root,contain_basic_inline,sectioning_heading               
LINE_line
+subheading              
line,formatted_line,contain_basic_inline,sectioning_heading,close_paragraph    
LINE_line
+appendixsubsec          
line,formatted_line,root,contain_basic_inline,sectioning_heading               
LINE_line
+subsubsection           
line,formatted_line,root,contain_basic_inline,sectioning_heading               
LINE_line
+unnumberedsubsubsec     
line,formatted_line,root,contain_basic_inline,sectioning_heading               
LINE_line
+subsubheading           
line,formatted_line,contain_basic_inline,sectioning_heading,close_paragraph    
LINE_line
+appendixsubsubsec       
line,formatted_line,root,contain_basic_inline,sectioning_heading               
LINE_line
+
+part                    
line,formatted_line,root,contain_basic_inline,sectioning_heading,global        
LINE_line
+appendixsection         
line,formatted_line,root,contain_basic_inline,sectioning_heading               
LINE_line
+majorheading            
line,formatted_line,contain_basic_inline,sectioning_heading,close_paragraph    
LINE_line
+centerchap              
line,formatted_line,root,contain_basic_inline,sectioning_heading,deprecated    
LINE_line
 
 # end of document, end of block
 bye                     line,preamble                       LINE_skipline
@@ -468,50 +468,50 @@ titlefont               
brace,close_paragraph,global,contain_basic_inline    BRA
 ##########################################################
 
 # def* commands
-deffn                   block,def,close_paragraph       BLOCK_def
-defvr                   block,def,close_paragraph       BLOCK_def
-deftypefn               block,def,close_paragraph       BLOCK_def
-deftypeop               block,def,close_paragraph       BLOCK_def
-deftypevr               block,def,close_paragraph       BLOCK_def
-defcv                   block,def,close_paragraph       BLOCK_def
-deftypecv               block,def,close_paragraph       BLOCK_def
-defop                   block,def,close_paragraph       BLOCK_def
-deftp                   block,def,close_paragraph       BLOCK_def
+deffn                   block,def,contain_basic_inline,close_paragraph       
BLOCK_def
+defvr                   block,def,contain_basic_inline,close_paragraph       
BLOCK_def
+deftypefn               block,def,contain_basic_inline,close_paragraph       
BLOCK_def
+deftypeop               block,def,contain_basic_inline,close_paragraph       
BLOCK_def
+deftypevr               block,def,contain_basic_inline,close_paragraph       
BLOCK_def
+defcv                   block,def,contain_basic_inline,close_paragraph       
BLOCK_def
+deftypecv               block,def,contain_basic_inline,close_paragraph       
BLOCK_def
+defop                   block,def,contain_basic_inline,close_paragraph       
BLOCK_def
+deftp                   block,def,contain_basic_inline,close_paragraph       
BLOCK_def
 #   shortcuts
-defun                   block,def,def_alias,close_paragraph    BLOCK_def
-defmac                  block,def,def_alias,close_paragraph    BLOCK_def
-defspec                 block,def,def_alias,close_paragraph    BLOCK_def
-defvar                  block,def,def_alias,close_paragraph    BLOCK_def
-defopt                  block,def,def_alias,close_paragraph    BLOCK_def
-deftypefun              block,def,def_alias,close_paragraph    BLOCK_def
-deftypevar              block,def,def_alias,close_paragraph    BLOCK_def
-defivar                 block,def,def_alias,close_paragraph    BLOCK_def
-deftypeivar             block,def,def_alias,close_paragraph    BLOCK_def
-defmethod               block,def,def_alias,close_paragraph    BLOCK_def
-deftypemethod           block,def,def_alias,close_paragraph    BLOCK_def
+defun                   
block,def,contain_basic_inline,def_alias,close_paragraph    BLOCK_def
+defmac                  
block,def,contain_basic_inline,def_alias,close_paragraph    BLOCK_def
+defspec                 
block,def,contain_basic_inline,def_alias,close_paragraph    BLOCK_def
+defvar                  
block,def,contain_basic_inline,def_alias,close_paragraph    BLOCK_def
+defopt                  
block,def,contain_basic_inline,def_alias,close_paragraph    BLOCK_def
+deftypefun              
block,def,contain_basic_inline,def_alias,close_paragraph    BLOCK_def
+deftypevar              
block,def,contain_basic_inline,def_alias,close_paragraph    BLOCK_def
+defivar                 
block,def,contain_basic_inline,def_alias,close_paragraph    BLOCK_def
+deftypeivar             
block,def,contain_basic_inline,def_alias,close_paragraph    BLOCK_def
+defmethod               
block,def,contain_basic_inline,def_alias,close_paragraph    BLOCK_def
+deftypemethod           
block,def,contain_basic_inline,def_alias,close_paragraph    BLOCK_def
 
 # def*x
-deffnx                  line,def,close_paragraph        LINE_line
-defvrx                  line,def,close_paragraph        LINE_line
-deftypefnx              line,def,close_paragraph        LINE_line
-deftypeopx              line,def,close_paragraph        LINE_line
-deftypevrx              line,def,close_paragraph        LINE_line
-defcvx                  line,def,close_paragraph        LINE_line
-deftypecvx              line,def,close_paragraph        LINE_line
-defopx                  line,def,close_paragraph        LINE_line
-deftpx                  line,def,close_paragraph        LINE_line
+deffnx                  line,def,contain_basic_inline,close_paragraph        
LINE_line
+defvrx                  line,def,contain_basic_inline,close_paragraph        
LINE_line
+deftypefnx              line,def,contain_basic_inline,close_paragraph        
LINE_line
+deftypeopx              line,def,contain_basic_inline,close_paragraph        
LINE_line
+deftypevrx              line,def,contain_basic_inline,close_paragraph        
LINE_line
+defcvx                  line,def,contain_basic_inline,close_paragraph        
LINE_line
+deftypecvx              line,def,contain_basic_inline,close_paragraph        
LINE_line
+defopx                  line,def,contain_basic_inline,close_paragraph        
LINE_line
+deftpx                  line,def,contain_basic_inline,close_paragraph        
LINE_line
 #   shortcuts
-defunx                  line,def,def_alias,close_paragraph     LINE_line
-defmacx                 line,def,def_alias,close_paragraph     LINE_line
-defspecx                line,def,def_alias,close_paragraph     LINE_line
-defvarx                 line,def,def_alias,close_paragraph     LINE_line
-defoptx                 line,def,def_alias,close_paragraph     LINE_line
-deftypefunx             line,def,def_alias,close_paragraph     LINE_line
-deftypevarx             line,def,def_alias,close_paragraph     LINE_line
-defivarx                line,def,def_alias,close_paragraph     LINE_line
-deftypeivarx            line,def,def_alias,close_paragraph     LINE_line
-defmethodx              line,def,def_alias,close_paragraph     LINE_line
-deftypemethodx          line,def,def_alias,close_paragraph     LINE_line
+defunx                  
line,def,contain_basic_inline,def_alias,close_paragraph     LINE_line
+defmacx                 
line,def,contain_basic_inline,def_alias,close_paragraph     LINE_line
+defspecx                
line,def,contain_basic_inline,def_alias,close_paragraph     LINE_line
+defvarx                 
line,def,contain_basic_inline,def_alias,close_paragraph     LINE_line
+defoptx                 
line,def,contain_basic_inline,def_alias,close_paragraph     LINE_line
+deftypefunx             
line,def,contain_basic_inline,def_alias,close_paragraph     LINE_line
+deftypevarx             
line,def,contain_basic_inline,def_alias,close_paragraph     LINE_line
+defivarx                
line,def,contain_basic_inline,def_alias,close_paragraph     LINE_line
+deftypeivarx            
line,def,contain_basic_inline,def_alias,close_paragraph     LINE_line
+defmethodx              
line,def,contain_basic_inline,def_alias,close_paragraph     LINE_line
+deftypemethodx          
line,def,contain_basic_inline,def_alias,close_paragraph     LINE_line
 
 multitable              block,close_paragraph,blockitem,contain_basic_inline   
BLOCK_multitable
 
diff --git a/tp/t/results/def/double_command.pl 
b/tp/t/results/def/double_command.pl
index 5caaaa89eb..fb36e2cc58 100644
--- a/tp/t/results/def/double_command.pl
+++ b/tp/t/results/def/double_command.pl
@@ -680,12 +680,12 @@ $result_errors{'double_command'} = [
     'type' => 'warning'
   },
   {
-    'error_line' => 'warning: @deffnx should not appear in @deffn
+    'error_line' => 'warning: @deffnx should not appear anywhere inside @deffn
 ',
     'file_name' => '',
     'line_nr' => 1,
     'macro' => '',
-    'text' => '@deffnx should not appear in @deffn',
+    'text' => '@deffnx should not appear anywhere inside @deffn',
     'type' => 'warning'
   },
   {
@@ -725,12 +725,12 @@ $result_errors{'double_command'} = [
     'type' => 'warning'
   },
   {
-    'error_line' => 'warning: @defvr should not appear in @deffn
+    'error_line' => 'warning: @defvr should not appear anywhere inside @deffn
 ',
     'file_name' => '',
     'line_nr' => 5,
     'macro' => '',
-    'text' => '@defvr should not appear in @deffn',
+    'text' => '@defvr should not appear anywhere inside @deffn',
     'type' => 'warning'
   },
   {
diff --git a/tp/t/results/formats_encodings/at_commands_in_refs.pl 
b/tp/t/results/formats_encodings/at_commands_in_refs.pl
index 8dded45a24..b55c5dca07 100644
--- a/tp/t/results/formats_encodings/at_commands_in_refs.pl
+++ b/tp/t/results/formats_encodings/at_commands_in_refs.pl
@@ -17749,12 +17749,12 @@ $result_errors{'at_commands_in_refs'} = [
     'type' => 'warning'
   },
   {
-    'error_line' => 'warning: @verb should not appear in @chapter
+    'error_line' => 'warning: @verb should not appear anywhere inside @chapter
 ',
     'file_name' => '',
     'line_nr' => 97,
     'macro' => '',
-    'text' => '@verb should not appear in @chapter',
+    'text' => '@verb should not appear anywhere inside @chapter',
     'type' => 'warning'
   },
   {
diff --git a/tp/t/results/formats_encodings/at_commands_in_refs_latin1.pl 
b/tp/t/results/formats_encodings/at_commands_in_refs_latin1.pl
index fa0e68f16b..8f3ea07c44 100644
--- a/tp/t/results/formats_encodings/at_commands_in_refs_latin1.pl
+++ b/tp/t/results/formats_encodings/at_commands_in_refs_latin1.pl
@@ -17825,12 +17825,12 @@ $result_errors{'at_commands_in_refs_latin1'} = [
     'type' => 'warning'
   },
   {
-    'error_line' => 'warning: @verb should not appear in @chapter
+    'error_line' => 'warning: @verb should not appear anywhere inside @chapter
 ',
     'file_name' => '',
     'line_nr' => 100,
     'macro' => '',
-    'text' => '@verb should not appear in @chapter',
+    'text' => '@verb should not appear anywhere inside @chapter',
     'type' => 'warning'
   },
   {
diff --git a/tp/t/results/formats_encodings/at_commands_in_refs_utf8.pl 
b/tp/t/results/formats_encodings/at_commands_in_refs_utf8.pl
index 8cfd58e949..823860a381 100644
--- a/tp/t/results/formats_encodings/at_commands_in_refs_utf8.pl
+++ b/tp/t/results/formats_encodings/at_commands_in_refs_utf8.pl
@@ -17825,12 +17825,12 @@ $result_errors{'at_commands_in_refs_utf8'} = [
     'type' => 'warning'
   },
   {
-    'error_line' => 'warning: @verb should not appear in @chapter
+    'error_line' => 'warning: @verb should not appear anywhere inside @chapter
 ',
     'file_name' => '',
     'line_nr' => 100,
     'macro' => '',
-    'text' => '@verb should not appear in @chapter',
+    'text' => '@verb should not appear anywhere inside @chapter',
     'type' => 'warning'
   },
   {
diff --git a/tp/t/results/invalid_nestings/on_def_line.pl 
b/tp/t/results/invalid_nestings/on_def_line.pl
index 370f2142d8..7a2939ef98 100644
--- a/tp/t/results/invalid_nestings/on_def_line.pl
+++ b/tp/t/results/invalid_nestings/on_def_line.pl
@@ -445,30 +445,30 @@ $result_texts{'on_def_line'} = ': in titlefont  exdent
 
 $result_errors{'on_def_line'} = [
   {
-    'error_line' => 'warning: @anchor should not appear in @deffn
+    'error_line' => 'warning: @anchor should not appear anywhere inside @deffn
 ',
     'file_name' => '',
     'line_nr' => 1,
     'macro' => '',
-    'text' => '@anchor should not appear in @deffn',
+    'text' => '@anchor should not appear anywhere inside @deffn',
     'type' => 'warning'
   },
   {
-    'error_line' => 'warning: @titlefont should not appear in @deffn
+    'error_line' => 'warning: @titlefont should not appear anywhere inside 
@deffn
 ',
     'file_name' => '',
     'line_nr' => 1,
     'macro' => '',
-    'text' => '@titlefont should not appear in @deffn',
+    'text' => '@titlefont should not appear anywhere inside @deffn',
     'type' => 'warning'
   },
   {
-    'error_line' => 'warning: @footnote should not appear in @deffn
+    'error_line' => 'warning: @footnote should not appear anywhere inside 
@deffn
 ',
     'file_name' => '',
     'line_nr' => 1,
     'macro' => '',
-    'text' => '@footnote should not appear in @deffn',
+    'text' => '@footnote should not appear anywhere inside @deffn',
     'type' => 'warning'
   },
   {
@@ -481,12 +481,12 @@ $result_errors{'on_def_line'} = [
     'type' => 'warning'
   },
   {
-    'error_line' => 'warning: @exdent should not appear in @deffn
+    'error_line' => 'warning: @exdent should not appear anywhere inside @deffn
 ',
     'file_name' => '',
     'line_nr' => 1,
     'macro' => '',
-    'text' => '@exdent should not appear in @deffn',
+    'text' => '@exdent should not appear anywhere inside @deffn',
     'type' => 'warning'
   },
   {
@@ -499,30 +499,30 @@ $result_errors{'on_def_line'} = [
     'type' => 'warning'
   },
   {
-    'error_line' => 'warning: @anchor should not appear in @deffn
+    'error_line' => 'warning: @anchor should not appear anywhere inside @deffnx
 ',
     'file_name' => '',
     'line_nr' => 2,
     'macro' => '',
-    'text' => '@anchor should not appear in @deffn',
+    'text' => '@anchor should not appear anywhere inside @deffnx',
     'type' => 'warning'
   },
   {
-    'error_line' => 'warning: @titlefont should not appear in @deffnx
+    'error_line' => 'warning: @titlefont should not appear anywhere inside 
@deffnx
 ',
     'file_name' => '',
     'line_nr' => 2,
     'macro' => '',
-    'text' => '@titlefont should not appear in @deffnx',
+    'text' => '@titlefont should not appear anywhere inside @deffnx',
     'type' => 'warning'
   },
   {
-    'error_line' => 'warning: @footnote should not appear in @deffnx
+    'error_line' => 'warning: @footnote should not appear anywhere inside 
@deffnx
 ',
     'file_name' => '',
     'line_nr' => 2,
     'macro' => '',
-    'text' => '@footnote should not appear in @deffnx',
+    'text' => '@footnote should not appear anywhere inside @deffnx',
     'type' => 'warning'
   },
   {
@@ -535,12 +535,12 @@ $result_errors{'on_def_line'} = [
     'type' => 'warning'
   },
   {
-    'error_line' => 'warning: @exdent should not appear in @deffnx
+    'error_line' => 'warning: @exdent should not appear anywhere inside @deffnx
 ',
     'file_name' => '',
     'line_nr' => 2,
     'macro' => '',
-    'text' => '@exdent should not appear in @deffnx',
+    'text' => '@exdent should not appear anywhere inside @deffnx',
     'type' => 'warning'
   },
   {
diff --git a/tp/t/results/invalid_nestings/on_section_line.pl 
b/tp/t/results/invalid_nestings/on_section_line.pl
index 2dbd9d3387..e7261b94ac 100644
--- a/tp/t/results/invalid_nestings/on_section_line.pl
+++ b/tp/t/results/invalid_nestings/on_section_line.pl
@@ -178,39 +178,39 @@ 
$result_sectioning{'on_section_line'}{'structure'}{'section_childs'}[0]{'structu
 
 $result_errors{'on_section_line'} = [
   {
-    'error_line' => 'warning: @noindent should not appear in @section
+    'error_line' => 'warning: @noindent should not appear anywhere inside 
@section
 ',
     'file_name' => '',
     'line_nr' => 1,
     'macro' => '',
-    'text' => '@noindent should not appear in @section',
+    'text' => '@noindent should not appear anywhere inside @section',
     'type' => 'warning'
   },
   {
-    'error_line' => 'warning: @titlefont should not appear in @section
+    'error_line' => 'warning: @titlefont should not appear anywhere inside 
@section
 ',
     'file_name' => '',
     'line_nr' => 1,
     'macro' => '',
-    'text' => '@titlefont should not appear in @section',
+    'text' => '@titlefont should not appear anywhere inside @section',
     'type' => 'warning'
   },
   {
-    'error_line' => 'warning: @anchor should not appear in @section
+    'error_line' => 'warning: @anchor should not appear anywhere inside 
@section
 ',
     'file_name' => '',
     'line_nr' => 1,
     'macro' => '',
-    'text' => '@anchor should not appear in @section',
+    'text' => '@anchor should not appear anywhere inside @section',
     'type' => 'warning'
   },
   {
-    'error_line' => 'warning: @footnote should not appear in @section
+    'error_line' => 'warning: @footnote should not appear anywhere inside 
@section
 ',
     'file_name' => '',
     'line_nr' => 1,
     'macro' => '',
-    'text' => '@footnote should not appear in @section',
+    'text' => '@footnote should not appear anywhere inside @section',
     'type' => 'warning'
   },
   {
@@ -223,12 +223,12 @@ $result_errors{'on_section_line'} = [
     'type' => 'warning'
   },
   {
-    'error_line' => 'warning: @exdent should not appear in @section
+    'error_line' => 'warning: @exdent should not appear anywhere inside 
@section
 ',
     'file_name' => '',
     'line_nr' => 1,
     'macro' => '',
-    'text' => '@exdent should not appear in @section',
+    'text' => '@exdent should not appear anywhere inside @section',
     'type' => 'warning'
   }
 ];
diff --git a/tp/t/results/invalid_nestings/on_subheading_line.pl 
b/tp/t/results/invalid_nestings/on_subheading_line.pl
index 729ae55921..e76f50989d 100644
--- a/tp/t/results/invalid_nestings/on_subheading_line.pl
+++ b/tp/t/results/invalid_nestings/on_subheading_line.pl
@@ -162,39 +162,39 @@ $result_texts{'on_subheading_line'} = 'Text in titlefont  
exdent
 
 $result_errors{'on_subheading_line'} = [
   {
-    'error_line' => 'warning: @noindent should not appear in @subheading
+    'error_line' => 'warning: @noindent should not appear anywhere inside 
@subheading
 ',
     'file_name' => '',
     'line_nr' => 1,
     'macro' => '',
-    'text' => '@noindent should not appear in @subheading',
+    'text' => '@noindent should not appear anywhere inside @subheading',
     'type' => 'warning'
   },
   {
-    'error_line' => 'warning: @titlefont should not appear in @subheading
+    'error_line' => 'warning: @titlefont should not appear anywhere inside 
@subheading
 ',
     'file_name' => '',
     'line_nr' => 1,
     'macro' => '',
-    'text' => '@titlefont should not appear in @subheading',
+    'text' => '@titlefont should not appear anywhere inside @subheading',
     'type' => 'warning'
   },
   {
-    'error_line' => 'warning: @anchor should not appear in @subheading
+    'error_line' => 'warning: @anchor should not appear anywhere inside 
@subheading
 ',
     'file_name' => '',
     'line_nr' => 1,
     'macro' => '',
-    'text' => '@anchor should not appear in @subheading',
+    'text' => '@anchor should not appear anywhere inside @subheading',
     'type' => 'warning'
   },
   {
-    'error_line' => 'warning: @footnote should not appear in @subheading
+    'error_line' => 'warning: @footnote should not appear anywhere inside 
@subheading
 ',
     'file_name' => '',
     'line_nr' => 1,
     'macro' => '',
-    'text' => '@footnote should not appear in @subheading',
+    'text' => '@footnote should not appear anywhere inside @subheading',
     'type' => 'warning'
   },
   {
@@ -207,12 +207,12 @@ $result_errors{'on_subheading_line'} = [
     'type' => 'warning'
   },
   {
-    'error_line' => 'warning: @exdent should not appear in @subheading
+    'error_line' => 'warning: @exdent should not appear anywhere inside 
@subheading
 ',
     'file_name' => '',
     'line_nr' => 1,
     'macro' => '',
-    'text' => '@exdent should not appear in @subheading',
+    'text' => '@exdent should not appear anywhere inside @subheading',
     'type' => 'warning'
   }
 ];
diff --git a/tp/t/results/invalid_nestings/section_on_def_line.pl 
b/tp/t/results/invalid_nestings/section_on_def_line.pl
index 83babe8991..1bc9937728 100644
--- a/tp/t/results/invalid_nestings/section_on_def_line.pl
+++ b/tp/t/results/invalid_nestings/section_on_def_line.pl
@@ -192,12 +192,12 @@ $result_errors{'section_on_def_line'} = [
     'type' => 'warning'
   },
   {
-    'error_line' => 'warning: @section should not appear in @deffn
+    'error_line' => 'warning: @section should not appear anywhere inside @deffn
 ',
     'file_name' => '',
     'line_nr' => 1,
     'macro' => '',
-    'text' => '@section should not appear in @deffn',
+    'text' => '@section should not appear anywhere inside @deffn',
     'type' => 'warning'
   },
   {
diff --git a/tp/t/results/invalid_nestings/section_on_defx_line.pl 
b/tp/t/results/invalid_nestings/section_on_defx_line.pl
index 68b32e4d15..647052736f 100644
--- a/tp/t/results/invalid_nestings/section_on_defx_line.pl
+++ b/tp/t/results/invalid_nestings/section_on_defx_line.pl
@@ -303,12 +303,12 @@ $result_errors{'section_on_defx_line'} = [
     'type' => 'warning'
   },
   {
-    'error_line' => 'warning: @section should not appear in @deffnx
+    'error_line' => 'warning: @section should not appear anywhere inside 
@deffnx
 ',
     'file_name' => '',
     'line_nr' => 2,
     'macro' => '',
-    'text' => '@section should not appear in @deffnx',
+    'text' => '@section should not appear anywhere inside @deffnx',
     'type' => 'warning'
   },
   {
diff --git a/tp/t/results/invalid_nestings/unclosed_verb_on_section_line.pl 
b/tp/t/results/invalid_nestings/unclosed_verb_on_section_line.pl
index f4aeca3f5b..5e3184ae3a 100644
--- a/tp/t/results/invalid_nestings/unclosed_verb_on_section_line.pl
+++ b/tp/t/results/invalid_nestings/unclosed_verb_on_section_line.pl
@@ -102,12 +102,12 @@ 
$result_sectioning{'unclosed_verb_on_section_line'}{'structure'}{'section_childs
 
 $result_errors{'unclosed_verb_on_section_line'} = [
   {
-    'error_line' => 'warning: @verb should not appear in @section
+    'error_line' => 'warning: @verb should not appear anywhere inside @section
 ',
     'file_name' => '',
     'line_nr' => 1,
     'macro' => '',
-    'text' => '@verb should not appear in @section',
+    'text' => '@verb should not appear anywhere inside @section',
     'type' => 'warning'
   },
   {
diff --git a/tp/t/results/sectioning/setfilename_on_top_and_after_node.pl 
b/tp/t/results/sectioning/setfilename_on_top_and_after_node.pl
index 7122cd14c7..fcda1d3f9d 100644
--- a/tp/t/results/sectioning/setfilename_on_top_and_after_node.pl
+++ b/tp/t/results/sectioning/setfilename_on_top_and_after_node.pl
@@ -231,12 +231,12 @@ $result_errors{'setfilename_on_top_and_after_node'} = [
     'type' => 'warning'
   },
   {
-    'error_line' => 'warning: @setfilename should not appear in @top
+    'error_line' => 'warning: @setfilename should not appear anywhere inside 
@top
 ',
     'file_name' => '',
     'line_nr' => 2,
     'macro' => '',
-    'text' => '@setfilename should not appear in @top',
+    'text' => '@setfilename should not appear anywhere inside @top',
     'type' => 'warning'
   },
   {



reply via email to

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