texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Common.pm (%array_parser_options) (%


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Common.pm (%array_parser_options) (%default_parser_customization_values) ($common_parser_regular_options_defaults): add %array_parser_options for array reference parser options and use Texinfo::Options parser options to gt the other customization options. Remove %common_parser_customization and %parser_customization.
Date: Mon, 23 Dec 2024 18:02:35 -0500

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

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 863fda666f * tp/Texinfo/Common.pm (%array_parser_options) 
(%default_parser_customization_values) 
($common_parser_regular_options_defaults): add %array_parser_options for array 
reference parser options and use Texinfo::Options parser options to gt the 
other customization options. Remove %common_parser_customization and 
%parser_customization.
863fda666f is described below

commit 863fda666fc53e0ab5810c715cd910d3c1e03a28
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Dec 8 15:33:48 2024 +0100

    * tp/Texinfo/Common.pm (%array_parser_options)
    (%default_parser_customization_values)
    ($common_parser_regular_options_defaults): add %array_parser_options
    for array reference parser options and use Texinfo::Options
    parser options to gt the other customization options. Remove
    %common_parser_customization and %parser_customization.
    
    * util/txicustomvars: use Texinfo::Options::parser_options only to get
    parser specific options.
---
 ChangeLog            | 12 ++++++++++++
 tp/Texinfo/Common.pm | 52 +++++++++++++++-------------------------------------
 util/txicustomvars   |  4 ++--
 3 files changed, 29 insertions(+), 39 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d169297186..d5099c61d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2024-12-08  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Common.pm (%array_parser_options)
+       (%default_parser_customization_values)
+       ($common_parser_regular_options_defaults): add %array_parser_options
+       for array reference parser options and use Texinfo::Options
+       parser options to gt the other customization options. Remove
+       %common_parser_customization and %parser_customization.
+
+       * util/txicustomvars: use Texinfo::Options::parser_options only to get
+       parser specific options.
+
 2024-12-08  Patrice Dumas  <pertusus@free.fr>
 
        * tp/maintain/regenerate_perl_options_info.pl,
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index 74a8123246..664390310b 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -125,43 +125,12 @@ foreach my $variable_name ('MACRO_EXPAND', 
'INTERNAL_LINKS') {
   $non_decoded_customization_variables{$variable_name} = 1;
 }
 
-# variables not specific of Parser, used in other contexts.  Spread over
-# the different categories set below.  The default values are in general
-# the same as elsewhere, but occasionally may be specific of the Parser.
-my %common_parser_customization = (
+# array variables not specific of Parser, used in other contexts.
+my %array_parser_options = (
   'INCLUDE_DIRECTORIES' => [ '.' ],
-  'documentlanguage' => undef,  # not 'en' as it is better to specify that 
there is no
-                                # need for translation since the strings are 
in english
-                                # rather than ask for translations to en
   'EXPANDED_FORMATS' => [],
-  'DEBUG' => 0,     # if >= 10, tree is printed in texi2any.pl after parsing.
-                    # If >= 100 tree is printed every line.
-  'FORMAT_MENU' => 'menu',           # if not 'menu' no menu error related.
-  'DOC_ENCODING_FOR_INPUT_FILE_NAME' => 1, # use document encoding for input 
file
-                                           # names encoding if set
-  'COMMAND_LINE_ENCODING' => undef, # encoding of command line strings
-                                    # used to decode file names for error 
message
-  'INPUT_FILE_NAME_ENCODING' => undef, # used for input file name encoding
-  'LOCALE_ENCODING' => undef, # used for file name encoding
 );
 
-# Customization variables obeyed only by the parser, and the default values.
-my %parser_customization = (
-  'IGNORE_SPACE_AFTER_BRACED_COMMAND_NAME' => 1,
-  'CPP_LINE_DIRECTIVES' => 1, # handle cpp like synchronization lines
-  'MAX_MACRO_CALL_NESTING' => 100000, # max number of nested macro calls
-  'NO_INDEX' => 0, # if set, do not record index entries and ignore
-                   # index related @-commands
-  'NO_USER_COMMANDS' => 0, # if set, ignore @*macro, @def*index, @alias and
-                           # @definfoenclose
-);
-
-# this serves both to set defaults and list customization variable
-# valid for the parser.
-# also used in util/txicustomvars
-our %default_parser_customization_values = (%common_parser_customization,
-                                            %parser_customization);
-
 # can be modified through command-line, but not customization options
 our %parser_document_state_configuration = (
   # parsed document parsing information still relevant after parsing
@@ -181,10 +150,19 @@ my %parser_inner_options = (
                                # currently set if called by gdt.
 );
 
+# this serves both to set defaults and list customization variable
+# valid for the parser.
+my $common_parser_regular_options_defaults
+  = Texinfo::Options::get_regular_options('common_parser');
+our %default_parser_customization_values = (%array_parser_options,
+                  %Texinfo::Options::parser_options,
+                  %$common_parser_regular_options_defaults);
+
+
 our %parser_document_parsing_options = (
-                       %default_parser_customization_values,
-                       %parser_document_state_configuration,
-                       %parser_inner_options);
+                  %default_parser_customization_values,
+                  %parser_document_state_configuration,
+                  %parser_inner_options);
 
 # check that settable commands are contained in global commands
 # from command_data.txt
@@ -229,7 +207,7 @@ foreach my $var (keys(%document_settable_at_commands),
          keys(%Texinfo::Options::program_cmdline_options),
          keys(%Texinfo::Options::converter_cmdline_options),
          keys(%Texinfo::Options::program_customization_options),
-         keys(%parser_customization),
+         keys(%Texinfo::Options::parser_options),
          keys(%Texinfo::Options::converter_customization_options),
          keys(%Texinfo::Options::converter_other_options),
          keys(%Texinfo::Options::array_cmdline_options)) {
diff --git a/util/txicustomvars b/util/txicustomvars
index 503cfe62ca..28cc5570e2 100755
--- a/util/txicustomvars
+++ b/util/txicustomvars
@@ -45,10 +45,10 @@ if ($do_customization_variable_commands) {
   exit 0;
 }
 
-my %parser_customization
-  = %Texinfo::Common::default_parser_customization_values;
+my %parser_customization = %Texinfo::Options::parser_options;
 
 # avoid commands by selecting only upper cased customization variables
+# also remove array and hash references
 my @parser_string_non_command_customization
     = grep {ref($parser_customization{$_}) eq '' and $_ =~ /^[A-Z0-9_]+$/ }
               keys(%parser_customization);



reply via email to

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