arg_body_expansion_order.pl 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  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{'arg_body_expansion_order'} = {
  7. 'contents' => [
  8. {
  9. 'parent' => {},
  10. 'text' => '
  11. ',
  12. 'type' => 'empty_line'
  13. },
  14. {
  15. 'args' => [
  16. {
  17. 'parent' => {},
  18. 'text' => 'othermacro',
  19. 'type' => 'macro_name'
  20. }
  21. ],
  22. 'cmdname' => 'macro',
  23. 'contents' => [
  24. {
  25. 'parent' => {},
  26. 'text' => 'initial',
  27. 'type' => 'raw'
  28. },
  29. {
  30. 'parent' => {},
  31. 'text' => '
  32. ',
  33. 'type' => 'last_raw_newline'
  34. }
  35. ],
  36. 'extra' => {
  37. 'arg_line' => ' othermacro
  38. '
  39. },
  40. 'line_nr' => {
  41. 'file_name' => '',
  42. 'line_nr' => 2,
  43. 'macro' => ''
  44. },
  45. 'parent' => {}
  46. },
  47. {
  48. 'extra' => {
  49. 'command' => {}
  50. },
  51. 'parent' => {},
  52. 'text' => '
  53. ',
  54. 'type' => 'empty_line_after_command'
  55. },
  56. {
  57. 'parent' => {},
  58. 'text' => '
  59. ',
  60. 'type' => 'empty_line'
  61. },
  62. {
  63. 'args' => [
  64. {
  65. 'parent' => {},
  66. 'text' => 'redefineothermacro',
  67. 'type' => 'macro_name'
  68. },
  69. {
  70. 'parent' => {},
  71. 'text' => 'arg',
  72. 'type' => 'macro_arg'
  73. }
  74. ],
  75. 'cmdname' => 'macro',
  76. 'contents' => [
  77. {
  78. 'parent' => {},
  79. 'text' => '@unmacro othermacro
  80. ',
  81. 'type' => 'raw'
  82. },
  83. {
  84. 'cmdname' => 'macro',
  85. 'contents' => [
  86. {
  87. 'parent' => {},
  88. 'text' => 'different',
  89. 'type' => 'raw'
  90. },
  91. {
  92. 'parent' => {},
  93. 'text' => '
  94. ',
  95. 'type' => 'last_raw_newline'
  96. }
  97. ],
  98. 'extra' => {
  99. 'arg_line' => ' othermacro
  100. '
  101. },
  102. 'parent' => {}
  103. },
  104. {
  105. 'extra' => {
  106. 'command' => {}
  107. },
  108. 'parent' => {},
  109. 'text' => '
  110. ',
  111. 'type' => 'empty_line_after_command'
  112. },
  113. {
  114. 'parent' => {},
  115. 'text' => '\\arg\\',
  116. 'type' => 'raw'
  117. },
  118. {
  119. 'parent' => {},
  120. 'text' => '
  121. ',
  122. 'type' => 'last_raw_newline'
  123. }
  124. ],
  125. 'extra' => {
  126. 'arg_line' => ' redefineothermacro {arg}
  127. '
  128. },
  129. 'line_nr' => {
  130. 'file_name' => '',
  131. 'line_nr' => 6,
  132. 'macro' => ''
  133. },
  134. 'parent' => {}
  135. },
  136. {
  137. 'extra' => {
  138. 'command' => {}
  139. },
  140. 'parent' => {},
  141. 'text' => '
  142. ',
  143. 'type' => 'empty_line_after_command'
  144. },
  145. {
  146. 'parent' => {},
  147. 'text' => '
  148. ',
  149. 'type' => 'empty_line'
  150. },
  151. {
  152. 'args' => [
  153. {
  154. 'parent' => {},
  155. 'text' => 'othermacro',
  156. 'type' => 'misc_arg'
  157. }
  158. ],
  159. 'cmdname' => 'unmacro',
  160. 'extra' => {
  161. 'arg_line' => ' othermacro
  162. ',
  163. 'misc_args' => [
  164. 'othermacro'
  165. ]
  166. },
  167. 'parent' => {}
  168. },
  169. {
  170. 'args' => [
  171. {
  172. 'parent' => {},
  173. 'text' => 'othermacro',
  174. 'type' => 'macro_name'
  175. }
  176. ],
  177. 'cmdname' => 'macro',
  178. 'contents' => [
  179. {
  180. 'parent' => {},
  181. 'text' => 'different',
  182. 'type' => 'raw'
  183. },
  184. {
  185. 'parent' => {},
  186. 'text' => '
  187. ',
  188. 'type' => 'last_raw_newline'
  189. }
  190. ],
  191. 'extra' => {
  192. 'arg_line' => ' othermacro
  193. '
  194. },
  195. 'line_nr' => {
  196. 'file_name' => '',
  197. 'line_nr' => 14,
  198. 'macro' => 'redefineothermacro'
  199. },
  200. 'parent' => {}
  201. },
  202. {
  203. 'extra' => {
  204. 'command' => {}
  205. },
  206. 'parent' => {},
  207. 'text' => '
  208. ',
  209. 'type' => 'empty_line_after_command'
  210. },
  211. {
  212. 'contents' => [
  213. {
  214. 'parent' => {},
  215. 'text' => 'different
  216. '
  217. }
  218. ],
  219. 'parent' => {},
  220. 'type' => 'paragraph'
  221. }
  222. ],
  223. 'type' => 'text_root'
  224. };
  225. $result_trees{'arg_body_expansion_order'}{'contents'}[0]{'parent'} = $result_trees{'arg_body_expansion_order'};
  226. $result_trees{'arg_body_expansion_order'}{'contents'}[1]{'args'}[0]{'parent'} = $result_trees{'arg_body_expansion_order'}{'contents'}[1];
  227. $result_trees{'arg_body_expansion_order'}{'contents'}[1]{'contents'}[0]{'parent'} = $result_trees{'arg_body_expansion_order'}{'contents'}[1];
  228. $result_trees{'arg_body_expansion_order'}{'contents'}[1]{'contents'}[1]{'parent'} = $result_trees{'arg_body_expansion_order'}{'contents'}[1];
  229. $result_trees{'arg_body_expansion_order'}{'contents'}[1]{'parent'} = $result_trees{'arg_body_expansion_order'};
  230. $result_trees{'arg_body_expansion_order'}{'contents'}[2]{'extra'}{'command'} = $result_trees{'arg_body_expansion_order'}{'contents'}[1];
  231. $result_trees{'arg_body_expansion_order'}{'contents'}[2]{'parent'} = $result_trees{'arg_body_expansion_order'};
  232. $result_trees{'arg_body_expansion_order'}{'contents'}[3]{'parent'} = $result_trees{'arg_body_expansion_order'};
  233. $result_trees{'arg_body_expansion_order'}{'contents'}[4]{'args'}[0]{'parent'} = $result_trees{'arg_body_expansion_order'}{'contents'}[4];
  234. $result_trees{'arg_body_expansion_order'}{'contents'}[4]{'args'}[1]{'parent'} = $result_trees{'arg_body_expansion_order'}{'contents'}[4];
  235. $result_trees{'arg_body_expansion_order'}{'contents'}[4]{'contents'}[0]{'parent'} = $result_trees{'arg_body_expansion_order'}{'contents'}[4];
  236. $result_trees{'arg_body_expansion_order'}{'contents'}[4]{'contents'}[1]{'contents'}[0]{'parent'} = $result_trees{'arg_body_expansion_order'}{'contents'}[4]{'contents'}[1];
  237. $result_trees{'arg_body_expansion_order'}{'contents'}[4]{'contents'}[1]{'contents'}[1]{'parent'} = $result_trees{'arg_body_expansion_order'}{'contents'}[4]{'contents'}[1];
  238. $result_trees{'arg_body_expansion_order'}{'contents'}[4]{'contents'}[1]{'parent'} = $result_trees{'arg_body_expansion_order'}{'contents'}[4];
  239. $result_trees{'arg_body_expansion_order'}{'contents'}[4]{'contents'}[2]{'extra'}{'command'} = $result_trees{'arg_body_expansion_order'}{'contents'}[4]{'contents'}[1];
  240. $result_trees{'arg_body_expansion_order'}{'contents'}[4]{'contents'}[2]{'parent'} = $result_trees{'arg_body_expansion_order'}{'contents'}[4];
  241. $result_trees{'arg_body_expansion_order'}{'contents'}[4]{'contents'}[3]{'parent'} = $result_trees{'arg_body_expansion_order'}{'contents'}[4];
  242. $result_trees{'arg_body_expansion_order'}{'contents'}[4]{'contents'}[4]{'parent'} = $result_trees{'arg_body_expansion_order'}{'contents'}[4];
  243. $result_trees{'arg_body_expansion_order'}{'contents'}[4]{'parent'} = $result_trees{'arg_body_expansion_order'};
  244. $result_trees{'arg_body_expansion_order'}{'contents'}[5]{'extra'}{'command'} = $result_trees{'arg_body_expansion_order'}{'contents'}[4];
  245. $result_trees{'arg_body_expansion_order'}{'contents'}[5]{'parent'} = $result_trees{'arg_body_expansion_order'};
  246. $result_trees{'arg_body_expansion_order'}{'contents'}[6]{'parent'} = $result_trees{'arg_body_expansion_order'};
  247. $result_trees{'arg_body_expansion_order'}{'contents'}[7]{'args'}[0]{'parent'} = $result_trees{'arg_body_expansion_order'}{'contents'}[7];
  248. $result_trees{'arg_body_expansion_order'}{'contents'}[7]{'parent'} = $result_trees{'arg_body_expansion_order'};
  249. $result_trees{'arg_body_expansion_order'}{'contents'}[8]{'args'}[0]{'parent'} = $result_trees{'arg_body_expansion_order'}{'contents'}[8];
  250. $result_trees{'arg_body_expansion_order'}{'contents'}[8]{'contents'}[0]{'parent'} = $result_trees{'arg_body_expansion_order'}{'contents'}[8];
  251. $result_trees{'arg_body_expansion_order'}{'contents'}[8]{'contents'}[1]{'parent'} = $result_trees{'arg_body_expansion_order'}{'contents'}[8];
  252. $result_trees{'arg_body_expansion_order'}{'contents'}[8]{'parent'} = $result_trees{'arg_body_expansion_order'};
  253. $result_trees{'arg_body_expansion_order'}{'contents'}[9]{'extra'}{'command'} = $result_trees{'arg_body_expansion_order'}{'contents'}[8];
  254. $result_trees{'arg_body_expansion_order'}{'contents'}[9]{'parent'} = $result_trees{'arg_body_expansion_order'};
  255. $result_trees{'arg_body_expansion_order'}{'contents'}[10]{'contents'}[0]{'parent'} = $result_trees{'arg_body_expansion_order'}{'contents'}[10];
  256. $result_trees{'arg_body_expansion_order'}{'contents'}[10]{'parent'} = $result_trees{'arg_body_expansion_order'};
  257. $result_texis{'arg_body_expansion_order'} = '
  258. @macro othermacro
  259. initial
  260. @end macro
  261. @macro redefineothermacro {arg}
  262. @unmacro othermacro
  263. @macro othermacro
  264. different
  265. @end macro
  266. \\arg\\
  267. @end macro
  268. @unmacro othermacro
  269. @macro othermacro
  270. different
  271. @end macro
  272. different
  273. ';
  274. $result_texts{'arg_body_expansion_order'} = '
  275. different
  276. ';
  277. $result_errors{'arg_body_expansion_order'} = [];
  278. 1;