texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/ParserNonXS.pm (%plain_text_commands


From: Gavin D. Smith
Subject: branch master updated: * tp/Texinfo/ParserNonXS.pm (%plain_text_commands, %contain_plain_text_commands) (%basic_inline_commands, %contain_basic_inline_commands) (%full_line_commands, %contain_full_line_commands) (%full_text_commands, %contain_full_text_commands): Rename to make it clear that these are lists of containing commands, not of contained commands.
Date: Tue, 31 Jan 2023 12:58:19 -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 636cb91e8b * tp/Texinfo/ParserNonXS.pm (%plain_text_commands, 
%contain_plain_text_commands) (%basic_inline_commands, 
%contain_basic_inline_commands) (%full_line_commands, 
%contain_full_line_commands) (%full_text_commands, 
%contain_full_text_commands): Rename to make it clear that these are lists of 
containing commands, not of contained commands.
636cb91e8b is described below

commit 636cb91e8bc45ee2ed92bd72a03423a0525dc9ec
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Tue Jan 31 17:58:05 2023 +0000

    * tp/Texinfo/ParserNonXS.pm
    (%plain_text_commands, %contain_plain_text_commands)
    (%basic_inline_commands, %contain_basic_inline_commands)
    (%full_line_commands, %contain_full_line_commands)
    (%full_text_commands, %contain_full_text_commands):
    Rename to make it clear that these are lists of containing
    commands, not of contained commands.
---
 ChangeLog                 | 10 ++++++++++
 tp/Texinfo/ParserNonXS.pm | 38 ++++++++++++++++----------------------
 2 files changed, 26 insertions(+), 22 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a57d9cc944..b6ca32928f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2023-01-31  Gavin Smith <gavinsmith0123@gmail.com>
+
+       * tp/Texinfo/ParserNonXS.pm
+       (%plain_text_commands, %contain_plain_text_commands)
+       (%basic_inline_commands, %contain_basic_inline_commands)
+       (%full_line_commands, %contain_full_line_commands)
+       (%full_text_commands, %contain_full_text_commands):
+       Rename to make it clear that these are lists of containing
+       commands, not of contained commands.
+
 2023-01-31  Gavin Smith <gavinsmith0123@gmail.com>
 
        Nesting context basic inline stack
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 6557b17fb7..dccc4ccc2f 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -236,7 +236,7 @@ my %parser_default_configuration = (
 # no_paragraph_commands   the same as %default_no_paragraph_commands
 #                         below, with index
 #                         entry commands dynamically added
-# basic_inline_commands   the same as %basic_inline_commands below, but
+# basic_inline_commands   the same as %contain_basic_inline_commands below, but
 #                         with index entry commands dynamically added
 # current_node            last seen node.
 # current_section         last seen section.
@@ -466,35 +466,28 @@ foreach my $not_in_basic_inline_command('xref', 'ref', 
'pxref', 'inforef') {
 }
 
 
-# commands that only accept plain text, ie only accent, symbol and glyph
-# commands
-my %plain_text_commands = %contain_plain_text_commands;
-
-# commands that only accept basic inline content as an argument
-my %basic_inline_commands = %contain_basic_inline_commands;
-
-my %basic_inline_with_refs_commands = (%sectioning_heading_commands,
+my %contain_basic_inline_with_refs_commands = (%sectioning_heading_commands,
                                       %def_commands);
 
 # commands that accept full text, but no block or top-level commands
-my %full_text_commands;
+my %contain_full_text_commands;
 foreach my $brace_command (keys (%brace_commands)) {
-  next if (exists($basic_inline_commands{$brace_command})
-           or exists($plain_text_commands{$brace_command}));
+  next if (exists($contain_basic_inline_commands{$brace_command})
+           or exists($contain_plain_text_commands{$brace_command}));
   if ($brace_commands{$brace_command} eq 'style_code'
       or $brace_commands{$brace_command} eq 'style_other'
       or $brace_commands{$brace_command} eq 'style_no_code') {
-    $full_text_commands{$brace_command} = 1;
+    $contain_full_text_commands{$brace_command} = 1;
   }
 }
 
 # commands that accept almost the same as in full text, except
 # what does not make sense on a line.
-my %full_line_commands;
-$full_line_commands{'center'} = 1;
-$full_line_commands{'exdent'} = 1;
-$full_line_commands{'item'} = 1;
-$full_line_commands{'itemx'} = 1;
+my %contain_full_line_commands;
+$contain_full_line_commands{'center'} = 1;
+$contain_full_line_commands{'exdent'} = 1;
+$contain_full_line_commands{'item'} = 1;
+$contain_full_line_commands{'itemx'} = 1;
 
 # Fill the valid nestings hash.  The keys are the containing commands and
 # the values arrays of commands that are allowed to occur inside those
@@ -505,16 +498,17 @@ $full_line_commands{'itemx'} = 1;
 # Index entry commands are dynamically set as %in_basic_inline_commands
 my %default_valid_nestings;
 
-foreach my $command (keys(%plain_text_commands)) {
+foreach my $command (keys(%contain_plain_text_commands)) {
   $default_valid_nestings{$command} = \%in_plain_text_commands;
 }
-foreach my $command (keys(%basic_inline_commands)) {
+foreach my $command (keys(%contain_basic_inline_commands)) {
   $default_valid_nestings{$command} = \%in_basic_inline_commands;
 }
-foreach my $command (keys(%full_text_commands), keys(%full_line_commands)) {
+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(%basic_inline_with_refs_commands)) {
+foreach my $command (keys(%contain_basic_inline_with_refs_commands)) {
   $default_valid_nestings{$command} = \%in_basic_inline_with_refs_commands;
 }
 



reply via email to

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