diff-for-test-parsetexi.diff 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. Index: Texinfo/Convert/Converter.pm
  2. ===================================================================
  3. --- Texinfo/Convert/Converter.pm (revision 7488)
  4. +++ Texinfo/Convert/Converter.pm (working copy)
  5. @@ -1136,6 +1136,8 @@ sub _collect_leading_trailing_spaces_arg($$)
  6. return @result;
  7. }
  8. +use Parsetexi;
  9. +
  10. sub _table_item_content_tree($$$)
  11. {
  12. my $self = shift;
  13. @@ -1160,7 +1162,8 @@ sub _table_item_content_tree($$$)
  14. 'contents' => $contents,
  15. 'parent' => $command,};
  16. $command->{'args'} = [$arg];
  17. - $self->Texinfo::Parser::_register_command_arg($arg, 'brace_command_contents');
  18. + #$self->Parsetexi::_register_command_arg($arg, 'brace_command_contents');
  19. + #$self->Texinfo::Parser::_register_command_arg($arg, 'brace_command_contents');
  20. $contents = [$command];
  21. }
  22. $converted_tree->{'contents'} = $contents;
  23. Index: Texinfo/ModulePath.pm.in
  24. ===================================================================
  25. --- Texinfo/ModulePath.pm.in (revision 7490)
  26. +++ Texinfo/ModulePath.pm.in (working copy)
  27. @@ -51,6 +51,7 @@ sub init (;$$) {
  28. if ('@USE_EXTERNAL_UNIDECODE@' ne 'yes') {
  29. unshift @INC, (File::Spec->catdir($lib_dir, 'lib', 'Text-Unidecode', 'lib'));
  30. }
  31. + unshift @INC, (File::Spec->catdir($lib_dir, '..', 'parsetexi'));
  32. }
  33. if (!$libexec_dir) {
  34. Index: Texinfo/Parser.pm
  35. ===================================================================
  36. --- Texinfo/Parser.pm (revision 7506)
  37. +++ Texinfo/Parser.pm (working copy)
  38. @@ -33,6 +33,9 @@ package Texinfo::Parser;
  39. use 5.006;
  40. use strict;
  41. +# make sure we don't load this module for testing XS
  42. +die;
  43. +
  44. # debug
  45. use Carp qw(cluck);
  46. Index: Texinfo/Report.pm
  47. ===================================================================
  48. --- Texinfo/Report.pm (revision 7496)
  49. +++ Texinfo/Report.pm (working copy)
  50. @@ -48,7 +48,8 @@ use File::Basename;
  51. use Locale::Messages;
  52. # to be able to load a parser if none was given to gdt.
  53. -use Texinfo::Parser;
  54. +#use Texinfo::Parser;
  55. +use Parsetexi;
  56. # return the errors and warnings
  57. sub errors($)
  58. @@ -392,7 +393,8 @@ sub gdt($$;$$)
  59. }
  60. }
  61. #my $parser = Texinfo::Parser::parser($parser_conf);
  62. - my $parser = Texinfo::Parser::simple_parser($parser_conf);
  63. + #my $parser = Texinfo::Parser::simple_parser($parser_conf);
  64. + my $parser = Parsetexi::parser($parser_conf);
  65. if ($parser->{'DEBUG'}) {
  66. print STDERR "GDT $translation_result\n";
  67. }
  68. Index: Texinfo/Structuring.pm
  69. ===================================================================
  70. --- Texinfo/Structuring.pm (revision 7506)
  71. +++ Texinfo/Structuring.pm (working copy)
  72. @@ -396,7 +396,8 @@ sub nodes_tree($)
  73. foreach my $node (@{$self->{'nodes'}}) {
  74. if ($node->{'extra'}->{'normalized'} eq 'Top') {
  75. $top_node = $node;
  76. - my $parser = Texinfo::Parser::simple_parser ($self->{'conf'});
  77. + #my $parser = Texinfo::Parser::simple_parser ($self->{'conf'});
  78. + my $parser = Parsetexi::parser ($self->{'conf'});
  79. my $top_node_up_content_tree
  80. = $parser->parse_texi_line($self->{'TOP_NODE_UP'});
  81. $top_node_up
  82. Index: t/test_utils.pl
  83. ===================================================================
  84. --- t/test_utils.pl (revision 7480)
  85. +++ t/test_utils.pl (working copy)
  86. @@ -43,7 +43,8 @@ Texinfo::ModulePath::init();
  87. use Test::More;
  88. -use Texinfo::Parser;
  89. +#use Texinfo::Parser;
  90. +use Parsetexi;
  91. use Texinfo::Convert::Text;
  92. use Texinfo::Convert::Texinfo;
  93. use Texinfo::Structuring;
  94. @@ -730,7 +731,8 @@ sub test($$)
  95. # push @tested_formats, @{$self->{'test_formats'}};
  96. }
  97. - my $parser = Texinfo::Parser->parser({'TEST' => 1,
  98. + #my $parser = Texinfo::Parser->parser({'TEST' => 1,
  99. + my $parser = Parsetexi::parser({'TEST' => 1,
  100. 'include_directories' => [
  101. 't/include_dir/',
  102. 't/include/',
  103. Index: texi2any.pl
  104. ===================================================================
  105. --- texi2any.pl (revision 7480)
  106. +++ texi2any.pl (working copy)
  107. @@ -273,8 +273,8 @@ if ($configured_version eq '@' . 'PACKAGE_VERSION@
  108. } else {
  109. # used in the standalone perl module, as $hardcoded_version is undef
  110. # and it should never be configured in that setup
  111. - require Texinfo::Parser;
  112. - $configured_version = $Texinfo::Parser::VERSION;
  113. + ## require Texinfo::Parser;
  114. + ## $configured_version = $Texinfo::Parser::VERSION;
  115. }
  116. }
  117. my $configured_package = '@PACKAGE@';
  118. @@ -1068,7 +1068,14 @@ if ($call_texi2dvi) {
  119. document_warn(__('--Xopt option without printed output'));
  120. }
  121. -require Texinfo::Parser;
  122. +#require Texinfo::Parser;
  123. +BEGIN {
  124. +require Parsetexi;
  125. +*Texinfo::Parser:: = \%Parsetexi::;
  126. +}
  127. +
  128. +print *Parsetexi::{PACKAGE};
  129. +
  130. require Texinfo::Structuring;
  131. require Texinfo::Transformations;
  132. # Avoid loading these modules until down here to speed up the case