nested_args.pl 13 KB

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