texinfo-commits
[Top][All Lists]
Advanced

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

[7170] parsetexi remove some commented out code


From: gavinsmith0123
Subject: [7170] parsetexi remove some commented out code
Date: Sat, 14 May 2016 20:20:21 +0000 (UTC)

Revision: 7170
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7170
Author:   gavin
Date:     2016-05-14 20:20:21 +0000 (Sat, 14 May 2016)
Log Message:
-----------
parsetexi remove some commented out code

Modified Paths:
--------------
    trunk/tp/parsetexi/ChangeLog
    trunk/tp/parsetexi/Parsetexi.pm

Modified: trunk/tp/parsetexi/ChangeLog
===================================================================
--- trunk/tp/parsetexi/ChangeLog        2016-05-14 20:14:31 UTC (rev 7169)
+++ trunk/tp/parsetexi/ChangeLog        2016-05-14 20:20:21 UTC (rev 7170)
@@ -1,3 +1,8 @@
+2016-05-14  Gavin Smith  <address@hidden>
+
+       * Parsetexi.pm: Remove commented-out code to use other methods 
+       of getting data from C code.
+
 2016-03-31  Gavin Smith  <address@hidden>
 
        * texi2any-2-C.pl: Remove file.

Modified: trunk/tp/parsetexi/Parsetexi.pm
===================================================================
--- trunk/tp/parsetexi/Parsetexi.pm     2016-05-14 20:14:31 UTC (rev 7169)
+++ trunk/tp/parsetexi/Parsetexi.pm     2016-05-14 20:20:21 UTC (rev 7170)
@@ -133,9 +133,6 @@
   $parser->{'gettext'} = $parser_default_configuration{'gettext'};
   $parser->{'pgettext'} = $parser_default_configuration{'pgettext'};
 
-  ## wipe_values ();
-  ## init_index_commands ();
-  ## init_floats ();
   reset_parser ();
   # fixme: these are overwritten immediately after
   if (defined($conf)) {
@@ -293,69 +290,21 @@
 
   my ($TREE, $LABELS, $FLOATS,
       $INDEX_NAMES, $ERRORS, $GLOBAL_INFO, $GLOBAL_INFO2);
-  if (1) {
-    # This is our third way of passing the data: construct it using
-    # Perl api directly.
-    #print "Parsing file...\n";
-    parse_file ($file_name);
-    #print "Fetching data..\n";
-    $TREE = build_texinfo_tree ();
-    #print "Got tree...\n";
-    #print Texinfo::Parser::_print_tree ($TREE);
+  parse_file ($file_name);
+  $TREE = build_texinfo_tree ();
 
-    $LABELS = build_label_list ();
-    $FLOATS = build_float_list ();
+  $LABELS = build_label_list ();
+  $FLOATS = build_float_list ();
 
-    $INDEX_NAMES = build_index_data ();
+  $INDEX_NAMES = build_index_data ();
 
-    # Commenting out this line changes the run time of makeinfo elisp.texi
-    # from about 17.0 sec to 13.0 sec.  documentencoding is utf-8.
-    $GLOBAL_INFO = build_global_info ();
+  $GLOBAL_INFO = build_global_info ();
 
-    $GLOBAL_INFO2 = build_global_info2 ();
+  $GLOBAL_INFO2 = build_global_info2 ();
 
-  } elsif (0) {
-    # $| = 1; # Flush after each print
-    print "Parsing file...\n";
-    parse_file ($file_name);
-    print "Fetching data\n";
-    $tree_stream = dump_tree_to_string_1 ();
-    #print "tree stream is $tree_stream\n";
-    eval $tree_stream;
-    $tree_stream = dump_root_element_1 ();
-    eval $tree_stream;
-    while (1) {
-      $tree_stream = dump_root_element_2 ();
-      last if (!defined $tree_stream);
-      eval $tree_stream;
-    }
-    $tree_stream = dump_tree_to_string_2 ();
-    #print "tree stream is $tree_stream\n";
-    eval $tree_stream;
-    $tree_stream = dump_tree_to_string_25 ();
-    #print "tree stream is $tree_stream\n";
-    eval $tree_stream;
-    $tree_stream = dump_tree_to_string_3 ();
-    #print "tree stream is $tree_stream\n";
-    eval $tree_stream;
-    print "Got data.\n";
-  } elsif (0) {
-
-    # This calls a separate executable instead of using the code
-    # compliled into Parsetexi.pm as a library.
-    $tree_stream = qx(./parsetexi $file_name 2>/dev/null);
-
-    print "Reading tree...\n";
-    eval $tree_stream;
-    print "Read tree.\n";
-  }
-
-  #print "Adjusting tree...\n";
   _add_parents ($TREE);
   _complete_node_list ($self, $TREE);
-  #print "Adjusted tree.\n";
 
-
   # line 899
   my $text_root;
   if ($TREE->{'type'} eq 'text_root') {
@@ -392,12 +341,9 @@
     }
   }
 
-
-
   ############################################################
 
   $self->{'info'} = $GLOBAL_INFO;
-  #print "!!! ENCODING IS ", $self->{'info'}->{'input_encoding_name'} , "\n";
   $self->{'extra'} = $GLOBAL_INFO2;
 
   if (defined($self->{'info'}->{'input_encoding_name'})) {
@@ -405,30 +351,14 @@
       = Texinfo::Encoding::encoding_alias(
             $self->{'info'}->{'input_encoding_name'});
     $self->{'info'}->{'input_encoding_name'} = $input_encoding;
-    #print "!!! ENCODING IS ", $self->{'info'}->{'input_encoding_name'} , "\n";
-
   }
   $self->{'info'}->{'input_file_name'} = $file_name;
 
   $self->{'labels'} = $LABELS;
   $self->{'floats'} = $FLOATS;
 
-  #$self->{'index_names'} = $INDEX_NAMES;
-  #for my $index (keys %$INDEX_NAMES) {
-  #  if ($INDEX_NAMES->{$index}->{'merged_in'}) {
-  #    $self->{'merged_indices'}-> {$index}
-  #      = $INDEX_NAMES->{$index}->{'merged_in'};
-  #  }
-  #}
-
   _get_errors ($self);
 
-
-  #$Data::Dumper::Purity = 1;
-  #$Data::Dumper::Indent = 1;
-  #my $bar = Data::Dumper->Dump([$TREE], ['$TREE']);
-  #print $bar;
-
   return $TREE;
 }
 




reply via email to

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