verb_in_xref.pl 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  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{'verb_in_xref'} = {
  7. 'contents' => [
  8. {
  9. 'contents' => [],
  10. 'parent' => {},
  11. 'type' => 'text_root'
  12. },
  13. {
  14. 'args' => [
  15. {
  16. 'contents' => [
  17. {
  18. 'extra' => {
  19. 'command' => {}
  20. },
  21. 'parent' => {},
  22. 'text' => ' ',
  23. 'type' => 'empty_spaces_after_command'
  24. },
  25. {
  26. 'parent' => {},
  27. 'text' => 'Top'
  28. },
  29. {
  30. 'parent' => {},
  31. 'text' => '
  32. ',
  33. 'type' => 'spaces_at_end'
  34. }
  35. ],
  36. 'parent' => {},
  37. 'type' => 'misc_line_arg'
  38. }
  39. ],
  40. 'cmdname' => 'node',
  41. 'contents' => [
  42. {
  43. 'parent' => {},
  44. 'text' => '
  45. ',
  46. 'type' => 'empty_line'
  47. },
  48. {
  49. 'contents' => [
  50. {
  51. 'args' => [
  52. {
  53. 'contents' => [
  54. {
  55. 'parent' => {},
  56. 'text' => 'Top'
  57. }
  58. ],
  59. 'parent' => {},
  60. 'type' => 'brace_command_arg'
  61. },
  62. {
  63. 'contents' => [
  64. {
  65. 'parent' => {},
  66. 'text' => ' ',
  67. 'type' => 'empty_spaces_before_argument'
  68. },
  69. {
  70. 'args' => [
  71. {
  72. 'contents' => [
  73. {
  74. 'parent' => {},
  75. 'text' => 'with
  76. ',
  77. 'type' => 'raw'
  78. },
  79. {
  80. 'parent' => {},
  81. 'text' => 'verb
  82. ',
  83. 'type' => 'raw'
  84. },
  85. {
  86. 'parent' => {},
  87. 'text' => '
  88. ',
  89. 'type' => 'raw'
  90. },
  91. {
  92. 'parent' => {},
  93. 'text' => 'ggg ',
  94. 'type' => 'raw'
  95. }
  96. ],
  97. 'parent' => {},
  98. 'type' => 'brace_command_arg'
  99. }
  100. ],
  101. 'cmdname' => 'verb',
  102. 'contents' => [],
  103. 'extra' => {
  104. 'invalid_nesting' => 1
  105. },
  106. 'line_nr' => {
  107. 'file_name' => '',
  108. 'line_nr' => 3,
  109. 'macro' => ''
  110. },
  111. 'parent' => {},
  112. 'type' => '*'
  113. }
  114. ],
  115. 'parent' => {},
  116. 'type' => 'brace_command_arg'
  117. }
  118. ],
  119. 'cmdname' => 'xref',
  120. 'contents' => [],
  121. 'extra' => {
  122. 'brace_command_contents' => [
  123. [
  124. {}
  125. ],
  126. [
  127. {}
  128. ]
  129. ],
  130. 'label' => {},
  131. 'node_argument' => {
  132. 'node_content' => [
  133. {}
  134. ],
  135. 'normalized' => 'Top'
  136. }
  137. },
  138. 'line_nr' => {},
  139. 'parent' => {}
  140. },
  141. {
  142. 'parent' => {},
  143. 'text' => '.
  144. '
  145. }
  146. ],
  147. 'parent' => {},
  148. 'type' => 'paragraph'
  149. }
  150. ],
  151. 'extra' => {
  152. 'node_content' => [
  153. {}
  154. ],
  155. 'nodes_manuals' => [
  156. {
  157. 'node_content' => [],
  158. 'normalized' => 'Top'
  159. }
  160. ],
  161. 'normalized' => 'Top',
  162. 'spaces_after_command' => {}
  163. },
  164. 'line_nr' => {
  165. 'file_name' => '',
  166. 'line_nr' => 1,
  167. 'macro' => ''
  168. },
  169. 'parent' => {}
  170. }
  171. ],
  172. 'type' => 'document_root'
  173. };
  174. $result_trees{'verb_in_xref'}{'contents'}[0]{'parent'} = $result_trees{'verb_in_xref'};
  175. $result_trees{'verb_in_xref'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'extra'}{'command'} = $result_trees{'verb_in_xref'}{'contents'}[1];
  176. $result_trees{'verb_in_xref'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'} = $result_trees{'verb_in_xref'}{'contents'}[1]{'args'}[0];
  177. $result_trees{'verb_in_xref'}{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'} = $result_trees{'verb_in_xref'}{'contents'}[1]{'args'}[0];
  178. $result_trees{'verb_in_xref'}{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'} = $result_trees{'verb_in_xref'}{'contents'}[1]{'args'}[0];
  179. $result_trees{'verb_in_xref'}{'contents'}[1]{'args'}[0]{'parent'} = $result_trees{'verb_in_xref'}{'contents'}[1];
  180. $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[0]{'parent'} = $result_trees{'verb_in_xref'}{'contents'}[1];
  181. $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'} = $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[0];
  182. $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[0]{'parent'} = $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0];
  183. $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[1]{'contents'}[0]{'parent'} = $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[1];
  184. $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[1]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'} = $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[1]{'contents'}[1]{'args'}[0];
  185. $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[1]{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'} = $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[1]{'contents'}[1]{'args'}[0];
  186. $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[1]{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'} = $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[1]{'contents'}[1]{'args'}[0];
  187. $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[1]{'contents'}[1]{'args'}[0]{'contents'}[3]{'parent'} = $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[1]{'contents'}[1]{'args'}[0];
  188. $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[1]{'contents'}[1]{'args'}[0]{'parent'} = $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[1]{'contents'}[1];
  189. $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[1]{'contents'}[1]{'parent'} = $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[1];
  190. $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[1]{'parent'} = $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0];
  191. $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'extra'}{'brace_command_contents'}[0][0] = $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[0]{'contents'}[0];
  192. $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'extra'}{'brace_command_contents'}[1][0] = $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[1]{'contents'}[1];
  193. $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'extra'}{'label'} = $result_trees{'verb_in_xref'}{'contents'}[1];
  194. $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'extra'}{'node_argument'}{'node_content'}[0] = $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[0]{'contents'}[0];
  195. $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'line_nr'} = $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[1]{'contents'}[1]{'line_nr'};
  196. $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'parent'} = $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1];
  197. $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'contents'}[1]{'parent'} = $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1];
  198. $result_trees{'verb_in_xref'}{'contents'}[1]{'contents'}[1]{'parent'} = $result_trees{'verb_in_xref'}{'contents'}[1];
  199. $result_trees{'verb_in_xref'}{'contents'}[1]{'extra'}{'node_content'}[0] = $result_trees{'verb_in_xref'}{'contents'}[1]{'args'}[0]{'contents'}[1];
  200. $result_trees{'verb_in_xref'}{'contents'}[1]{'extra'}{'nodes_manuals'}[0]{'node_content'} = $result_trees{'verb_in_xref'}{'contents'}[1]{'extra'}{'node_content'};
  201. $result_trees{'verb_in_xref'}{'contents'}[1]{'extra'}{'spaces_after_command'} = $result_trees{'verb_in_xref'}{'contents'}[1]{'args'}[0]{'contents'}[0];
  202. $result_trees{'verb_in_xref'}{'contents'}[1]{'parent'} = $result_trees{'verb_in_xref'};
  203. $result_texis{'verb_in_xref'} = '@node Top
  204. @xref{Top, @verb{*with
  205. verb
  206. ggg *}}.
  207. ';
  208. $result_texts{'verb_in_xref'} = '
  209. Top.
  210. ';
  211. $result_sectioning{'verb_in_xref'} = {};
  212. $result_nodes{'verb_in_xref'} = {
  213. 'cmdname' => 'node',
  214. 'extra' => {
  215. 'normalized' => 'Top'
  216. },
  217. 'node_up' => {
  218. 'extra' => {
  219. 'manual_content' => [
  220. {
  221. 'text' => 'dir'
  222. }
  223. ],
  224. 'top_node_up' => {}
  225. },
  226. 'type' => 'top_node_up'
  227. }
  228. };
  229. $result_nodes{'verb_in_xref'}{'node_up'}{'extra'}{'top_node_up'} = $result_nodes{'verb_in_xref'};
  230. $result_menus{'verb_in_xref'} = {
  231. 'cmdname' => 'node',
  232. 'extra' => {
  233. 'normalized' => 'Top'
  234. }
  235. };
  236. $result_errors{'verb_in_xref'} = [
  237. {
  238. 'error_line' => ':3: warning: @verb should not appear in @xref
  239. ',
  240. 'file_name' => '',
  241. 'line_nr' => 3,
  242. 'macro' => '',
  243. 'text' => '@verb should not appear in @xref',
  244. 'type' => 'warning'
  245. }
  246. ];
  247. $result_converted{'plaintext'}->{'verb_in_xref'} = '*Note with
  248. verb
  249. ggg : Top.
  250. ';
  251. $result_converted{'html_text'}->{'verb_in_xref'} = '<a name="Top"></a>
  252. <h1 class="node-heading">Top</h1>
  253. <p>See <a href="#Top"><tt>with
  254. verb
  255. ggg </tt></a>.
  256. </p><hr>
  257. ';
  258. 1;