unknown_encoding.pl 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. use vars qw(%result_texis %result_texts %result_trees %result_errors
  2. %result_indices %result_sectioning %result_nodes %result_menus
  3. %result_floats %result_converted %result_converted_errors
  4. %result_elements %result_directions_text);
  5. use utf8;
  6. $result_trees{'unknown_encoding'} = {
  7. 'contents' => [
  8. {
  9. 'contents' => [
  10. {
  11. 'parent' => {},
  12. 'text' => '
  13. ',
  14. 'type' => 'empty_line'
  15. },
  16. {
  17. 'args' => [
  18. {
  19. 'contents' => [
  20. {
  21. 'extra' => {
  22. 'command' => {}
  23. },
  24. 'parent' => {},
  25. 'text' => ' ',
  26. 'type' => 'empty_spaces_after_command'
  27. },
  28. {
  29. 'parent' => {},
  30. 'text' => 'ggg'
  31. },
  32. {
  33. 'parent' => {},
  34. 'text' => '
  35. ',
  36. 'type' => 'spaces_at_end'
  37. }
  38. ],
  39. 'parent' => {},
  40. 'type' => 'misc_line_arg'
  41. }
  42. ],
  43. 'cmdname' => 'documentencoding',
  44. 'extra' => {
  45. 'spaces_after_command' => {},
  46. 'text_arg' => 'ggg'
  47. },
  48. 'line_nr' => {
  49. 'file_name' => '',
  50. 'line_nr' => 2,
  51. 'macro' => ''
  52. },
  53. 'parent' => {}
  54. },
  55. {
  56. 'parent' => {},
  57. 'text' => '
  58. ',
  59. 'type' => 'empty_line'
  60. }
  61. ],
  62. 'parent' => {},
  63. 'type' => 'text_root'
  64. },
  65. {
  66. 'args' => [
  67. {
  68. 'contents' => [
  69. {
  70. 'extra' => {
  71. 'command' => {}
  72. },
  73. 'parent' => {},
  74. 'text' => ' ',
  75. 'type' => 'empty_spaces_after_command'
  76. },
  77. {
  78. 'parent' => {},
  79. 'text' => 'Top'
  80. },
  81. {
  82. 'parent' => {},
  83. 'text' => '
  84. ',
  85. 'type' => 'spaces_at_end'
  86. }
  87. ],
  88. 'parent' => {},
  89. 'type' => 'misc_line_arg'
  90. }
  91. ],
  92. 'cmdname' => 'node',
  93. 'contents' => [
  94. {
  95. 'parent' => {},
  96. 'text' => '
  97. ',
  98. 'type' => 'empty_line'
  99. }
  100. ],
  101. 'extra' => {
  102. 'node_content' => [
  103. {}
  104. ],
  105. 'nodes_manuals' => [
  106. {
  107. 'node_content' => [],
  108. 'normalized' => 'Top'
  109. }
  110. ],
  111. 'normalized' => 'Top',
  112. 'spaces_after_command' => {}
  113. },
  114. 'line_nr' => {
  115. 'file_name' => '',
  116. 'line_nr' => 4,
  117. 'macro' => ''
  118. },
  119. 'parent' => {}
  120. }
  121. ],
  122. 'type' => 'document_root'
  123. };
  124. $result_trees{'unknown_encoding'}{'contents'}[0]{'contents'}[0]{'parent'} = $result_trees{'unknown_encoding'}{'contents'}[0];
  125. $result_trees{'unknown_encoding'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'extra'}{'command'} = $result_trees{'unknown_encoding'}{'contents'}[0]{'contents'}[1];
  126. $result_trees{'unknown_encoding'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'} = $result_trees{'unknown_encoding'}{'contents'}[0]{'contents'}[1]{'args'}[0];
  127. $result_trees{'unknown_encoding'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'} = $result_trees{'unknown_encoding'}{'contents'}[0]{'contents'}[1]{'args'}[0];
  128. $result_trees{'unknown_encoding'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'} = $result_trees{'unknown_encoding'}{'contents'}[0]{'contents'}[1]{'args'}[0];
  129. $result_trees{'unknown_encoding'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'parent'} = $result_trees{'unknown_encoding'}{'contents'}[0]{'contents'}[1];
  130. $result_trees{'unknown_encoding'}{'contents'}[0]{'contents'}[1]{'extra'}{'spaces_after_command'} = $result_trees{'unknown_encoding'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0];
  131. $result_trees{'unknown_encoding'}{'contents'}[0]{'contents'}[1]{'parent'} = $result_trees{'unknown_encoding'}{'contents'}[0];
  132. $result_trees{'unknown_encoding'}{'contents'}[0]{'contents'}[2]{'parent'} = $result_trees{'unknown_encoding'}{'contents'}[0];
  133. $result_trees{'unknown_encoding'}{'contents'}[0]{'parent'} = $result_trees{'unknown_encoding'};
  134. $result_trees{'unknown_encoding'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'extra'}{'command'} = $result_trees{'unknown_encoding'}{'contents'}[1];
  135. $result_trees{'unknown_encoding'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'} = $result_trees{'unknown_encoding'}{'contents'}[1]{'args'}[0];
  136. $result_trees{'unknown_encoding'}{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'} = $result_trees{'unknown_encoding'}{'contents'}[1]{'args'}[0];
  137. $result_trees{'unknown_encoding'}{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'} = $result_trees{'unknown_encoding'}{'contents'}[1]{'args'}[0];
  138. $result_trees{'unknown_encoding'}{'contents'}[1]{'args'}[0]{'parent'} = $result_trees{'unknown_encoding'}{'contents'}[1];
  139. $result_trees{'unknown_encoding'}{'contents'}[1]{'contents'}[0]{'parent'} = $result_trees{'unknown_encoding'}{'contents'}[1];
  140. $result_trees{'unknown_encoding'}{'contents'}[1]{'extra'}{'node_content'}[0] = $result_trees{'unknown_encoding'}{'contents'}[1]{'args'}[0]{'contents'}[1];
  141. $result_trees{'unknown_encoding'}{'contents'}[1]{'extra'}{'nodes_manuals'}[0]{'node_content'} = $result_trees{'unknown_encoding'}{'contents'}[1]{'extra'}{'node_content'};
  142. $result_trees{'unknown_encoding'}{'contents'}[1]{'extra'}{'spaces_after_command'} = $result_trees{'unknown_encoding'}{'contents'}[1]{'args'}[0]{'contents'}[0];
  143. $result_trees{'unknown_encoding'}{'contents'}[1]{'parent'} = $result_trees{'unknown_encoding'};
  144. $result_texis{'unknown_encoding'} = '
  145. @documentencoding ggg
  146. @node Top
  147. ';
  148. $result_texts{'unknown_encoding'} = '
  149. ';
  150. $result_sectioning{'unknown_encoding'} = {};
  151. $result_nodes{'unknown_encoding'} = {
  152. 'cmdname' => 'node',
  153. 'extra' => {
  154. 'normalized' => 'Top'
  155. },
  156. 'node_up' => {
  157. 'extra' => {
  158. 'manual_content' => [
  159. {
  160. 'text' => 'dir'
  161. }
  162. ],
  163. 'top_node_up' => {}
  164. },
  165. 'type' => 'top_node_up'
  166. }
  167. };
  168. $result_nodes{'unknown_encoding'}{'node_up'}{'extra'}{'top_node_up'} = $result_nodes{'unknown_encoding'};
  169. $result_menus{'unknown_encoding'} = {
  170. 'cmdname' => 'node',
  171. 'extra' => {
  172. 'normalized' => 'Top'
  173. }
  174. };
  175. $result_errors{'unknown_encoding'} = [
  176. {
  177. 'error_line' => ':2: warning: encoding `ggg\' is not a canonical texinfo encoding
  178. ',
  179. 'file_name' => '',
  180. 'line_nr' => 2,
  181. 'macro' => '',
  182. 'text' => 'encoding `ggg\' is not a canonical texinfo encoding',
  183. 'type' => 'warning'
  184. },
  185. {
  186. 'error_line' => ':2: warning: unrecognized encoding name `ggg\'
  187. ',
  188. 'file_name' => '',
  189. 'line_nr' => 2,
  190. 'macro' => '',
  191. 'text' => 'unrecognized encoding name `ggg\'',
  192. 'type' => 'warning'
  193. }
  194. ];
  195. $result_converted{'info'}->{'unknown_encoding'} = 'This is , produced from .
  196. 
  197. File: , Node: Top, Up: (dir)
  198. 
  199. Tag Table:
  200. Node: Top27
  201. 
  202. End Tag Table
  203. ';
  204. 1;