texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: Reset parsing state to the configuration values b


From: Patrice Dumas
Subject: branch master updated: Reset parsing state to the configuration values before parsing
Date: Tue, 21 May 2024 13:16:32 -0400

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 ee0fa81419 Reset parsing state to the configuration values before 
parsing
ee0fa81419 is described below

commit ee0fa814194f65fb8a6b00da68bda8e9eb73da93
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue May 21 19:16:20 2024 +0200

    Reset parsing state to the configuration values before parsing
    
    * tp/Texinfo/Common.pm (%common_parser_customization)
    (%parser_customization, %parser_inner_options): rename
    %common_parser_options as %common_parser_customization and add
    LOCALE_ENCODING.  Rename %parser_options as %parser_customization and
    %parser_inner_configuration as %parser_inner_options.
    
    * tp/Texinfo/Common.pm (%parser_configuration)
    (%parser_document_state_configuration)
    (%parser_document_parsing_options): split %parser_state_configuration
    in two with %parser_configuration with registrar and
    %parser_document_state_configuration with values.  Add
    %parser_document_parsing_options for all the customizations and
    similar that should be set for a document parsing.
    
    * tp/Texinfo/ParserNonXS.pm (%parser_document_state_initialization)
    (%parsing_state_initialization): move 'sections_level_modifier' and
    'input_file_encoding' from %parsing_state_initialization to
    %parser_document_state_initialization.
    
    * tp/Texinfo/ParserNonXS.pm (parser, _initialize_parsing): base
    configuration on %Texinfo::Common::parser_document_parsing_options.
    Add a $parser_conf hash reference and fill it instead of modifying the
    parser itself for variables in Texinfo::Common
    parser_document_parsing_options and add only the others (only
    registrar, in practice) to the parser.  Store $parser_conf in
    $parser->{'conf'}.  Use $parser->{'conf'} to reset the parser in
    _initialize_parsing.
    
    * tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser, parse_texi_file)
    (_get_parser_info): update based on change in ParserNonXS.pm.  Inline
    _get_parser_error_registrar.
    
    * tp/Texinfo/XS/parsetexi/api.c (initialize_parsing): move code around
    to correspond better to type of variables in Perl.
    
    * tp/Texinfo/XS/parsetexi/conf.c (reset_parser_conf): set debug to 0
    in the default case.
---
 ChangeLog                            | 42 ++++++++++++++++++
 tp/Texinfo/Common.pm                 | 32 +++++++++-----
 tp/Texinfo/ParserNonXS.pm            | 86 +++++++++++++++++++++++-------------
 tp/Texinfo/Report.pm                 |  7 +++
 tp/Texinfo/XS/parsetexi/Parsetexi.pm | 81 ++++++++++++++++++---------------
 tp/Texinfo/XS/parsetexi/api.c        |  7 +--
 tp/Texinfo/XS/parsetexi/conf.c       |  2 +-
 7 files changed, 176 insertions(+), 81 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f3404a9bc2..59e14d3be5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,45 @@
+2024-05-21  Patrice Dumas  <pertusus@free.fr>
+
+       Reset parsing state to the configuration values before parsing
+
+       * tp/Texinfo/Common.pm (%common_parser_customization)
+       (%parser_customization, %parser_inner_options): rename
+       %common_parser_options as %common_parser_customization and add
+       LOCALE_ENCODING.  Rename %parser_options as %parser_customization and
+       %parser_inner_configuration as %parser_inner_options.
+
+       * tp/Texinfo/Common.pm (%parser_configuration)
+       (%parser_document_state_configuration)
+       (%parser_document_parsing_options): split %parser_state_configuration
+       in two with %parser_configuration with registrar and
+       %parser_document_state_configuration with values.  Add
+       %parser_document_parsing_options for all the customizations and
+       similar that should be set for a document parsing.
+
+       * tp/Texinfo/ParserNonXS.pm (%parser_document_state_initialization)
+       (%parsing_state_initialization): move 'sections_level_modifier' and
+       'input_file_encoding' from %parsing_state_initialization to
+       %parser_document_state_initialization.
+
+       * tp/Texinfo/ParserNonXS.pm (parser, _initialize_parsing): base
+       configuration on %Texinfo::Common::parser_document_parsing_options.
+       Add a $parser_conf hash reference and fill it instead of modifying the
+       parser itself for variables in Texinfo::Common
+       parser_document_parsing_options and add only the others (only
+       registrar, in practice) to the parser.  Store $parser_conf in
+       $parser->{'conf'}.  Use $parser->{'conf'} to reset the parser in
+       _initialize_parsing.
+
+       * tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser, parse_texi_file)
+       (_get_parser_info): update based on change in ParserNonXS.pm.  Inline
+       _get_parser_error_registrar.
+
+       * tp/Texinfo/XS/parsetexi/api.c (initialize_parsing): move code around
+       to correspond better to type of variables in Perl.
+
+       * tp/Texinfo/XS/parsetexi/conf.c (reset_parser_conf): set debug to 0
+       in the default case.
+
 2024-05-21  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/ParserNonXS.pm (%parsing_state_initialization)
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index d4f0953c5f..0638f1964e 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -128,7 +128,7 @@ foreach my $variable_name ('MACRO_EXPAND', 
'INTERNAL_LINKS') {
 # 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_options = (
+my %common_parser_customization = (
   '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
@@ -143,10 +143,11 @@ my %common_parser_options = (
   '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 encoding
+  'LOCALE_ENCODING' => undef, # used for file name encoding
 );
 
 # Customization variables obeyed only by the parser, and the default values.
-my %parser_options = (
+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
@@ -159,13 +160,18 @@ my %parser_options = (
 # 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_options, 
%parser_options);
+our %default_parser_customization_values = (%common_parser_customization,
+                                            %parser_customization);
 
-# customizable parser state, can be passed to the parser function.
-my %parser_state_configuration = (
+# can be passed to the parser function, but not document parsing nor
+# customization, and can only be passed through code.
+my %parser_configuration = (
   'registrar' => undef,        # Texinfo::Report object used for error
                                # reporting.
+);
 
+# can be modified through command-line, but not customization options
+our %parser_document_state_configuration = (
   # parsed document parsing information still relevant after parsing
   'values' => {'txicommandconditionals' => 1},
                               # the key is the name, the value the @set name
@@ -177,17 +183,21 @@ my %parser_state_configuration = (
 
 # parser keys related to customization
 # Set when initializing a parser, but never from command-line/init files
-my %parser_inner_configuration = (
+my %parser_inner_options = (
   'accept_internalvalue' => 0, # whether @txiinternalvalue should be added
                                # to the tree or considered invalid.
                                # currently set if called by gdt.
 );
 
-# configurable parser state
+our %parser_document_parsing_options = (
+                       %default_parser_customization_values,
+                       %parser_document_state_configuration,
+                       %parser_inner_options);
+
+# configurable parser keys
 our %parser_settable_configuration = (
-  %parser_inner_configuration,
-  %parser_state_configuration,
-  %default_parser_customization_values,
+  %parser_document_parsing_options,
+  %parser_configuration,
 );
 
 
@@ -234,7 +244,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_options),
+         keys(%parser_customization),
          keys(%Texinfo::Options::converter_customization_options),
          keys(%Texinfo::Options::converter_other_options),
          keys(%Texinfo::Options::array_cmdline_options)) {
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 490f8773df..3b88eb1ff5 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -141,7 +141,7 @@ our $VERSION = '7.1dev';
 
 # these are the default values for the parsing state of a document.
 # Some could become configurable if moved to Texinfo::Common
-# %parser_state_configuration,
+# %parser_document_state_configuration,
 # but they are not configurable/implemented in the XS parser, so they are
 # best left internal.  Could be relevant to reuse for diverse sources
 # of input associated to the same document.
@@ -155,12 +155,16 @@ my %parser_document_state_initialization = (
                               # reference with 2 values, beginning and ending.
 
   # parsing information still relevant at the end of the parsing
-  'clickstyle' => 'arrow',       #
-  'kbdinputstyle' => 'distinct', #
-  'source_mark_counters' => {},  #
-  'current_node'    => undef,    # last seen node.
-  'current_section' => undef,    # last seen section.
-  'current_part'    => undef,    # last seen part.
+  'clickstyle' => 'arrow',        #
+  'kbdinputstyle' => 'distinct',  #
+  'source_mark_counters' => {},   #
+  'current_node'    => undef,     # last seen node.
+  'current_section' => undef,     # last seen section.
+  'current_part'    => undef,     # last seen part.
+  'sections_level_modifier' => 0, # modified by raise/lowersections
+
+  'input_file_encoding' => 'utf-8', # perl encoding name used for the input
+                                    # file
 );
 
 my %parsing_state_initialization = (
@@ -173,7 +177,6 @@ my %parsing_state_initialization = (
   'raw_block_stack' => [],    # a stack of raw block commands that are nested.
   'macro_expansion_nr' => 0,  # number of macros being expanded
   'value_expansion_nr' => 0,  # number of values being expanded
-  'sections_level_modifier' => 0, # modified by raise/lowersections
   'nesting_context'    => {
                          # key is the context name, value is the
                          # depth of the context.
@@ -206,8 +209,6 @@ my %parsing_state_initialization = (
                          # be added each time a context is pushed on
                          # 'context_stack'.  Could be undef if there
                          # is no @-command associated with the context.
-  'input_file_encoding' => 'utf-8', # perl encoding name used for the input
-                                    # file
 );
 
 my %parser_state_initialization = (%parser_document_state_initialization,
@@ -562,47 +563,47 @@ sub parser(;$)
   # In Texinfo::Common because all the
   # customization options information is gathered here, and also
   # because it is used in other codes, in particular the XS parser.
-  my $parser = dclone(\%Texinfo::Common::parser_settable_configuration);
+  # Note that it also contains inner options like accept_internalvalue
+  # and customizable document parser state values in addition to
+  # regular customization options.
+  my $parser_conf = dclone(\%Texinfo::Common::parser_document_parsing_options);
+  my $parser = {};
   bless $parser;
 
-  # for get_conf, set for all the configuration keys that are also in
-  # %Texinfo::Common::default_parser_customization_values to the
-  # values set at parser initialization
+  # Reset conf from argument, restricting to parser_document_parsing_options,
+  # and set directly parser keys if in parser_settable_configuration and not in
+  # parser_document_parsing_options.
   $parser->{'set'} = {};
   if (defined($conf)) {
     foreach my $key (keys(%$conf)) {
-      if (exists($Texinfo::Common::parser_settable_configuration{$key})) {
+      if (exists($Texinfo::Common::parser_document_parsing_options{$key})) {
         # we keep registrar instead of copying on purpose, to reuse the object
-        if ($key ne 'values' and $key ne 'registrar' and ref($conf->{$key})) {
-          $parser->{$key} = dclone($conf->{$key});
+        if (ref($conf->{$key})) {
+          $parser_conf->{$key} = dclone($conf->{$key});
         } else {
-          $parser->{$key} = $conf->{$key};
+          $parser_conf->{$key} = $conf->{$key};
         }
         if ($initialization_overrides{$key}) {
-          $parser->{'set'}->{$key} = $parser->{$key};
+          $parser->{'set'}->{$key} = $parser_conf->{$key};
         }
+      } elsif (exists($Texinfo::Common::parser_settable_configuration{$key})) {
+        # we keep instead of copying on purpose, to reuse the objects
+        # Should only be registrar
+        $parser->{$key} = $conf->{$key};
       } else {
         warn "ignoring parser configuration value \"$key\"\n";
       }
     }
   }
 
-  $parser->{'conf'} = {};
-  # restrict variables found by get_conf, and set the values to the
-  # parser initialization values only.  What is found in the document
-  # has no effect.
-  foreach my $key 
(keys(%Texinfo::Common::default_parser_customization_values)) {
-    $parser->{'conf'}->{$key} = $parser->{$key};
-  }
-
   # This is not very useful in perl, but mimics the XS parser
   print STDERR "!!!!!!!!!!!!!!!! RESETTING THE PARSER !!!!!!!!!!!!!!!!!!!!!\n"
-    if ($parser->{'DEBUG'});
+    if ($parser_conf->{'DEBUG'});
 
   # turn the array to a hash for speed.  Not sure it really matters for such
   # a small array.
   $parser->{'expanded_formats_hash'} = {};
-  foreach my $expanded_format(@{$parser->{'EXPANDED_FORMATS'}}) {
+  foreach my $expanded_format(@{$parser_conf->{'EXPANDED_FORMATS'}}) {
     $parser->{'expanded_formats_hash'}->{$expanded_format} = 1;
   }
 
@@ -610,6 +611,11 @@ sub parser(;$)
     $parser->{'registrar'} = Texinfo::Report::new();
   }
 
+  # variables found by get_conf, set to the parser initialization values
+  # only.  What is found in the document has no effect.  Also used to
+  # initialize parsing state.
+  $parser->{'conf'} = $parser_conf;
+
   return $parser;
 }
 
@@ -629,6 +635,19 @@ sub _initialize_parsing()
 
   my $parser_state = dclone(\%parser_state_initialization);
 
+  # initialize with conf.  Note that most options do not ever change,
+  # but some do, in practice documentlanguage (if not in 'set') and
+  # values, such that it is important to reset and replace values obtained
+  # at the end of the previous parsing.
+  foreach my $key (keys(%{$parser->{'conf'}})) {
+    if (ref($parser->{'conf'}->{$key})) {
+      $parser_state->{$key} = dclone($parser->{'conf'}->{$key});
+    } else {
+      # includes undef values
+      $parser_state->{$key} = $parser->{'conf'}->{$key};
+    }
+  }
+
   $parser_state->{'document'} = $document;
 
   # In gdt(), both NO_INDEX and NO_USER_COMMANDS are set and this has a sizable
@@ -767,6 +786,9 @@ sub parse_texi_piece($$;$)
   $line_nr = 1 if (not defined($line_nr));
 
   my $parser_state = $self->_initialize_parsing();
+  # We rely on parser state overriding the previous state infomation
+  # in self, as documented in perldata:
+  #   If a key appears more than once in the initializer list of a hash, the 
last occurrence wins
   %$self = (%$self, %$parser_state);
 
   _input_push_text($self, $text, $line_nr);
@@ -2453,6 +2475,10 @@ sub _next_text($;$)
           # which are byte strings and end up unmodified in output error
           # messages.
           my $file_name_encoding;
+          # FIXME 'file_name_encoding' should always be defined, as
+          # it comes from 'input_file_encoding' which is always
+          # defined, possibly to the default value, so the following
+          # condition should always be true.
           if (defined($input->{'file_name_encoding'})) {
             $file_name_encoding = $input->{'file_name_encoding'};
           } else {
@@ -3688,7 +3714,7 @@ sub _end_line_misc_line($$$)
           $self->_command_warn($current, $message);
         }
         if (!$self->{'set'}->{'documentlanguage'}) {
-           $self->{'documentlanguage'} = $text;
+          $self->{'documentlanguage'} = $text;
         }
       }
     }
diff --git a/tp/Texinfo/Report.pm b/tp/Texinfo/Report.pm
index 23b9bd9e75..2902d42c4f 100644
--- a/tp/Texinfo/Report.pm
+++ b/tp/Texinfo/Report.pm
@@ -62,6 +62,13 @@ sub errors($)
   return ($self->{'errors_warnings'}, $self->{'error_nrs'});
 }
 
+sub clear($)
+{
+  my $self = shift;
+  $self->{'errors_warnings'} = [];
+  $self->{'errors_nrs'} = 0;
+}
+
 # add an already formatted/setup message
 sub add_formatted_message($$)
 {
diff --git a/tp/Texinfo/XS/parsetexi/Parsetexi.pm 
b/tp/Texinfo/XS/parsetexi/Parsetexi.pm
index 54c8260913..0cc71add23 100644
--- a/tp/Texinfo/XS/parsetexi/Parsetexi.pm
+++ b/tp/Texinfo/XS/parsetexi/Parsetexi.pm
@@ -57,40 +57,59 @@ sub get_conf($$)
   return $self->{'conf'}->{$var};
 }
 
+
 # Initialize the parser
+# The last argument, optional, is a hash provided by the user to change
+# the default values for what is present in %parser_settable_configuration.
 sub parser (;$)
 {
   my $conf = shift;
 
-  my $parser = dclone(\%Texinfo::Common::parser_settable_configuration);
+  # In Texinfo::Common because all the
+  # customization options information is gathered here, and also
+  # because it is used in other codes, in particular the XS parser.
+  # Note that it also contains inner options like accept_internalvalue
+  # and customizable document parser state values in addition to
+  # regular customization options.
+  my $parser_conf = dclone(\%Texinfo::Common::parser_document_parsing_options);
+  my $parser = {};
+  bless $parser;
 
+  # Reset conf from argument, restricting to parser_document_parsing_options,
+  # and set directly parser keys if in parser_settable_configuration and not in
+  # parser_document_parsing_options.
   if (defined($conf)) {
-    foreach my $key (keys (%$conf)) {
-      if (exists($Texinfo::Common::parser_settable_configuration{$key})) {
-        # Copy conf to parser object.
+    foreach my $key (keys(%$conf)) {
+      if (exists($Texinfo::Common::parser_document_parsing_options{$key})) {
         # we keep registrar instead of copying on purpose, to reuse the object
-        if ($key ne 'values' and $key ne 'registrar' and ref($conf->{$key})) {
-          $parser->{$key} = dclone($conf->{$key});
+        if (ref($conf->{$key})) {
+          $parser_conf->{$key} = dclone($conf->{$key});
         } else {
-          $parser->{$key} = $conf->{$key};
+          $parser_conf->{$key} = $conf->{$key};
         }
-      } # no warning here as in pure Perl as it is warned below
+      } elsif (exists($Texinfo::Common::parser_settable_configuration{$key})) {
+        # we keep instead of copying on purpose, to reuse the objects
+        # Should only be registrar
+        $parser->{$key} = $conf->{$key};
+      } else {
+        # no warning here as in pure Perl as it is warned below
+        #warn "ignoring parser configuration value \"$key\"\n";
+      }
     }
   }
-  # restrict variables found by get_conf, and set the values to the
-  # parser initialization values only.  What is found in the document
-  # has no effect.
-  $parser->{'conf'} = {};
-  foreach my $key 
(keys(%Texinfo::Common::default_parser_customization_values)) {
-    $parser->{'conf'}->{$key} = $parser->{$key};
-  }
 
   # pass directly DEBUG value to reset_parser to override previous
   # parser configuration, as the configuration isn't already reset and the new
   # configuration is set afterwards.
   my $debug = 0;
-  $debug = $parser->{'DEBUG'} if ($parser->{'DEBUG'});
+  $debug = $parser_conf->{'DEBUG'} if ($parser_conf->{'DEBUG'});
+
+  # The reset_parser call resets the conf to the same values as found in
+  # Texinfo::Common parser_document_parsing_options.
   reset_parser($debug);
+
+  # Following code does the same as Perl code just above to
+  # setup parser_conf in C.
   # (re)set debug in any case, assuming that undef DEBUG is no debug
   parser_conf_set_DEBUG($debug);
 
@@ -145,20 +164,15 @@ sub parser (;$)
     }
   }
 
-  bless $parser;
+  if (not $parser->{'registrar'}) {
+    $parser->{'registrar'} = Texinfo::Report::new();
+  }
 
-  return $parser;
-}
+  # variables found by get_conf, set to the parser initialization values
+  # only.  What is found in the document has no effect.
+  $parser->{'conf'} = $parser_conf;
 
-sub _get_parser_error_registrar($)
-{
-  my $self = shift;
-  if (not $self->{'registrar'}) {
-    $self->{'registrar'} = Texinfo::Report::new();
-  }
-  my $registrar = $self->{'registrar'};
-  my $configuration_information = $self;
-  return $registrar, $configuration_information;
+  return $parser;
 }
 
 sub _get_parser_info($$;$) {
@@ -166,10 +180,6 @@ sub _get_parser_info($$;$) {
   my $document_descriptor = shift;
   my $no_store = shift;
 
-  # make sure that the parser Texinfo::Report registrar is setup
-  my ($parser_registrar, $configuration_information)
-     = _get_parser_error_registrar($self);
-
   # get hold of errors before calling build_document, as if $no_store is set
   # they will be destroyed.
   pass_document_parser_errors_to_registrar($document_descriptor, $self);
@@ -184,7 +194,7 @@ sub _get_parser_info($$;$) {
   # additional info relevant in perl only.
   my $perl_encoding
     = Texinfo::Common::get_perl_encoding($document->{'commands_info'},
-                        $parser_registrar, $configuration_information);
+                        $self->{'registrar'}, $self);
   $perl_encoding = 'utf-8' if (!defined($perl_encoding));
   Texinfo::Document::set_document_global_info($document,
                      'input_perl_encoding', $perl_encoding);
@@ -213,14 +223,13 @@ sub parse_texi_file ($$)
   my $document_descriptor = parse_file($input_file_path,
                                        $basename, $directories);
   if (!$document_descriptor) {
-    my ($parser_registrar, $configuration_information)
-       = _get_parser_error_registrar($self);
+    my $parser_registrar = $self->{'registrar'};
     my $input_file_name = $input_file_path;
     my $encoding = $self->get_conf('COMMAND_LINE_ENCODING');
     if (defined($encoding)) {
       $input_file_name = decode($encoding, $input_file_path);
     }
-    $parser_registrar->document_error($configuration_information,
+    $parser_registrar->document_error($self,
        sprintf(__("could not open %s: %s"), $input_file_name, $!));
     return undef;
   }
diff --git a/tp/Texinfo/XS/parsetexi/api.c b/tp/Texinfo/XS/parsetexi/api.c
index 9fa9e60a4f..93ee062b71 100644
--- a/tp/Texinfo/XS/parsetexi/api.c
+++ b/tp/Texinfo/XS/parsetexi/api.c
@@ -52,6 +52,9 @@ initialize_parsing (void)
 {
   parsed_document = new_document ();
 
+  if (!parser_conf.no_index)
+    init_index_commands ();
+
   wipe_user_commands ();
   wipe_macros ();
 
@@ -68,6 +71,7 @@ initialize_parsing (void)
   global_kbdinputstyle = kbd_distinct;
 
   current_node = current_section = current_part = 0;
+  source_marks_reset_counters ();
 
   reset_context_stack ();
   reset_command_stack (&nesting_context.basic_inline_stack);
@@ -80,12 +84,9 @@ initialize_parsing (void)
      list to avoid memory leaks rather than reuse the iconv
      opened handlers */
   parser_reset_encoding_list ();
-  source_marks_reset_counters ();
 
   reset_obstacks ();
 
-  if (!parser_conf.no_index)
-    init_index_commands ();
 
   set_input_encoding ("utf-8");
 }
diff --git a/tp/Texinfo/XS/parsetexi/conf.c b/tp/Texinfo/XS/parsetexi/conf.c
index 7c4d946713..fe6bc92e90 100644
--- a/tp/Texinfo/XS/parsetexi/conf.c
+++ b/tp/Texinfo/XS/parsetexi/conf.c
@@ -140,7 +140,7 @@ reset_parser_conf (void)
 
   parser_conf.accept_internalvalue = 0;
   parser_conf.cpp_line_directives = 1;
-  parser_conf.debug = 1;
+  parser_conf.debug = 0;
   parser_conf.doc_encoding_for_input_file_name = 1;
   parser_conf.documentlanguage = 0;
   parser_conf.ignore_space_after_braced_command_name = 1;



reply via email to

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