empty_images.pl 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  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{'empty_images'} = {
  7. 'contents' => [
  8. {
  9. 'args' => [
  10. {
  11. 'contents' => [],
  12. 'parent' => {},
  13. 'type' => 'brace_command_arg'
  14. }
  15. ],
  16. 'cmdname' => 'image',
  17. 'contents' => [],
  18. 'extra' => {
  19. 'brace_command_contents' => [
  20. undef
  21. ]
  22. },
  23. 'line_nr' => {
  24. 'file_name' => '',
  25. 'line_nr' => 1,
  26. 'macro' => ''
  27. },
  28. 'parent' => {}
  29. },
  30. {
  31. 'parent' => {},
  32. 'text' => '
  33. '
  34. },
  35. {
  36. 'parent' => {},
  37. 'text' => '
  38. ',
  39. 'type' => 'empty_line'
  40. },
  41. {
  42. 'args' => [
  43. {
  44. 'contents' => [
  45. {
  46. 'parent' => {},
  47. 'text' => ' ',
  48. 'type' => 'empty_spaces_before_argument'
  49. }
  50. ],
  51. 'parent' => {},
  52. 'type' => 'brace_command_arg'
  53. },
  54. {
  55. 'contents' => [
  56. {
  57. 'parent' => {},
  58. 'text' => 'aa'
  59. }
  60. ],
  61. 'parent' => {},
  62. 'type' => 'brace_command_arg'
  63. },
  64. {
  65. 'contents' => [
  66. {
  67. 'parent' => {},
  68. 'text' => 'bb'
  69. }
  70. ],
  71. 'parent' => {},
  72. 'type' => 'brace_command_arg'
  73. },
  74. {
  75. 'contents' => [
  76. {
  77. 'parent' => {},
  78. 'text' => 'cc'
  79. },
  80. {
  81. 'parent' => {},
  82. 'text' => ' ',
  83. 'type' => 'spaces_at_end'
  84. }
  85. ],
  86. 'parent' => {},
  87. 'type' => 'brace_command_arg'
  88. },
  89. {
  90. 'contents' => [
  91. {
  92. 'parent' => {},
  93. 'text' => 'dd'
  94. }
  95. ],
  96. 'parent' => {},
  97. 'type' => 'brace_command_arg'
  98. }
  99. ],
  100. 'cmdname' => 'image',
  101. 'contents' => [],
  102. 'extra' => {
  103. 'brace_command_contents' => [
  104. undef,
  105. [
  106. {}
  107. ],
  108. [
  109. {}
  110. ],
  111. [
  112. {}
  113. ],
  114. [
  115. {}
  116. ]
  117. ],
  118. 'spaces_before_argument' => {}
  119. },
  120. 'line_nr' => {
  121. 'file_name' => '',
  122. 'line_nr' => 3,
  123. 'macro' => ''
  124. },
  125. 'parent' => {}
  126. },
  127. {
  128. 'parent' => {},
  129. 'text' => '
  130. '
  131. },
  132. {
  133. 'parent' => {},
  134. 'text' => '
  135. ',
  136. 'type' => 'empty_line'
  137. },
  138. {
  139. 'args' => [
  140. {
  141. 'contents' => [],
  142. 'parent' => {},
  143. 'type' => 'brace_command_arg'
  144. },
  145. {
  146. 'contents' => [],
  147. 'parent' => {},
  148. 'type' => 'brace_command_arg'
  149. },
  150. {
  151. 'contents' => [],
  152. 'parent' => {},
  153. 'type' => 'brace_command_arg'
  154. },
  155. {
  156. 'contents' => [
  157. {
  158. 'cmdname' => ' ',
  159. 'parent' => {}
  160. }
  161. ],
  162. 'parent' => {},
  163. 'type' => 'brace_command_arg'
  164. }
  165. ],
  166. 'cmdname' => 'image',
  167. 'contents' => [],
  168. 'extra' => {
  169. 'brace_command_contents' => [
  170. undef,
  171. undef,
  172. undef,
  173. [
  174. {}
  175. ]
  176. ]
  177. },
  178. 'line_nr' => {
  179. 'file_name' => '',
  180. 'line_nr' => 5,
  181. 'macro' => ''
  182. },
  183. 'parent' => {}
  184. },
  185. {
  186. 'parent' => {},
  187. 'text' => '
  188. '
  189. },
  190. {
  191. 'args' => [
  192. {
  193. 'contents' => [],
  194. 'parent' => {},
  195. 'type' => 'brace_command_arg'
  196. },
  197. {
  198. 'contents' => [],
  199. 'parent' => {},
  200. 'type' => 'brace_command_arg'
  201. },
  202. {
  203. 'contents' => [],
  204. 'parent' => {},
  205. 'type' => 'brace_command_arg'
  206. },
  207. {
  208. 'contents' => [
  209. {
  210. 'cmdname' => ':',
  211. 'parent' => {}
  212. }
  213. ],
  214. 'parent' => {},
  215. 'type' => 'brace_command_arg'
  216. }
  217. ],
  218. 'cmdname' => 'image',
  219. 'contents' => [],
  220. 'extra' => {
  221. 'brace_command_contents' => [
  222. undef,
  223. undef,
  224. undef,
  225. [
  226. {}
  227. ]
  228. ]
  229. },
  230. 'line_nr' => {
  231. 'file_name' => '',
  232. 'line_nr' => 6,
  233. 'macro' => ''
  234. },
  235. 'parent' => {}
  236. },
  237. {
  238. 'parent' => {},
  239. 'text' => '
  240. '
  241. }
  242. ],
  243. 'type' => 'text_root'
  244. };
  245. $result_trees{'empty_images'}{'contents'}[0]{'args'}[0]{'parent'} = $result_trees{'empty_images'}{'contents'}[0];
  246. $result_trees{'empty_images'}{'contents'}[0]{'parent'} = $result_trees{'empty_images'};
  247. $result_trees{'empty_images'}{'contents'}[1]{'parent'} = $result_trees{'empty_images'};
  248. $result_trees{'empty_images'}{'contents'}[2]{'parent'} = $result_trees{'empty_images'};
  249. $result_trees{'empty_images'}{'contents'}[3]{'args'}[0]{'contents'}[0]{'parent'} = $result_trees{'empty_images'}{'contents'}[3]{'args'}[0];
  250. $result_trees{'empty_images'}{'contents'}[3]{'args'}[0]{'parent'} = $result_trees{'empty_images'}{'contents'}[3];
  251. $result_trees{'empty_images'}{'contents'}[3]{'args'}[1]{'contents'}[0]{'parent'} = $result_trees{'empty_images'}{'contents'}[3]{'args'}[1];
  252. $result_trees{'empty_images'}{'contents'}[3]{'args'}[1]{'parent'} = $result_trees{'empty_images'}{'contents'}[3];
  253. $result_trees{'empty_images'}{'contents'}[3]{'args'}[2]{'contents'}[0]{'parent'} = $result_trees{'empty_images'}{'contents'}[3]{'args'}[2];
  254. $result_trees{'empty_images'}{'contents'}[3]{'args'}[2]{'parent'} = $result_trees{'empty_images'}{'contents'}[3];
  255. $result_trees{'empty_images'}{'contents'}[3]{'args'}[3]{'contents'}[0]{'parent'} = $result_trees{'empty_images'}{'contents'}[3]{'args'}[3];
  256. $result_trees{'empty_images'}{'contents'}[3]{'args'}[3]{'contents'}[1]{'parent'} = $result_trees{'empty_images'}{'contents'}[3]{'args'}[3];
  257. $result_trees{'empty_images'}{'contents'}[3]{'args'}[3]{'parent'} = $result_trees{'empty_images'}{'contents'}[3];
  258. $result_trees{'empty_images'}{'contents'}[3]{'args'}[4]{'contents'}[0]{'parent'} = $result_trees{'empty_images'}{'contents'}[3]{'args'}[4];
  259. $result_trees{'empty_images'}{'contents'}[3]{'args'}[4]{'parent'} = $result_trees{'empty_images'}{'contents'}[3];
  260. $result_trees{'empty_images'}{'contents'}[3]{'extra'}{'brace_command_contents'}[1][0] = $result_trees{'empty_images'}{'contents'}[3]{'args'}[1]{'contents'}[0];
  261. $result_trees{'empty_images'}{'contents'}[3]{'extra'}{'brace_command_contents'}[2][0] = $result_trees{'empty_images'}{'contents'}[3]{'args'}[2]{'contents'}[0];
  262. $result_trees{'empty_images'}{'contents'}[3]{'extra'}{'brace_command_contents'}[3][0] = $result_trees{'empty_images'}{'contents'}[3]{'args'}[3]{'contents'}[0];
  263. $result_trees{'empty_images'}{'contents'}[3]{'extra'}{'brace_command_contents'}[4][0] = $result_trees{'empty_images'}{'contents'}[3]{'args'}[4]{'contents'}[0];
  264. $result_trees{'empty_images'}{'contents'}[3]{'extra'}{'spaces_before_argument'} = $result_trees{'empty_images'}{'contents'}[3]{'args'}[0]{'contents'}[0];
  265. $result_trees{'empty_images'}{'contents'}[3]{'parent'} = $result_trees{'empty_images'};
  266. $result_trees{'empty_images'}{'contents'}[4]{'parent'} = $result_trees{'empty_images'};
  267. $result_trees{'empty_images'}{'contents'}[5]{'parent'} = $result_trees{'empty_images'};
  268. $result_trees{'empty_images'}{'contents'}[6]{'args'}[0]{'parent'} = $result_trees{'empty_images'}{'contents'}[6];
  269. $result_trees{'empty_images'}{'contents'}[6]{'args'}[1]{'parent'} = $result_trees{'empty_images'}{'contents'}[6];
  270. $result_trees{'empty_images'}{'contents'}[6]{'args'}[2]{'parent'} = $result_trees{'empty_images'}{'contents'}[6];
  271. $result_trees{'empty_images'}{'contents'}[6]{'args'}[3]{'contents'}[0]{'parent'} = $result_trees{'empty_images'}{'contents'}[6]{'args'}[3];
  272. $result_trees{'empty_images'}{'contents'}[6]{'args'}[3]{'parent'} = $result_trees{'empty_images'}{'contents'}[6];
  273. $result_trees{'empty_images'}{'contents'}[6]{'extra'}{'brace_command_contents'}[3][0] = $result_trees{'empty_images'}{'contents'}[6]{'args'}[3]{'contents'}[0];
  274. $result_trees{'empty_images'}{'contents'}[6]{'parent'} = $result_trees{'empty_images'};
  275. $result_trees{'empty_images'}{'contents'}[7]{'parent'} = $result_trees{'empty_images'};
  276. $result_trees{'empty_images'}{'contents'}[8]{'args'}[0]{'parent'} = $result_trees{'empty_images'}{'contents'}[8];
  277. $result_trees{'empty_images'}{'contents'}[8]{'args'}[1]{'parent'} = $result_trees{'empty_images'}{'contents'}[8];
  278. $result_trees{'empty_images'}{'contents'}[8]{'args'}[2]{'parent'} = $result_trees{'empty_images'}{'contents'}[8];
  279. $result_trees{'empty_images'}{'contents'}[8]{'args'}[3]{'contents'}[0]{'parent'} = $result_trees{'empty_images'}{'contents'}[8]{'args'}[3];
  280. $result_trees{'empty_images'}{'contents'}[8]{'args'}[3]{'parent'} = $result_trees{'empty_images'}{'contents'}[8];
  281. $result_trees{'empty_images'}{'contents'}[8]{'extra'}{'brace_command_contents'}[3][0] = $result_trees{'empty_images'}{'contents'}[8]{'args'}[3]{'contents'}[0];
  282. $result_trees{'empty_images'}{'contents'}[8]{'parent'} = $result_trees{'empty_images'};
  283. $result_trees{'empty_images'}{'contents'}[9]{'parent'} = $result_trees{'empty_images'};
  284. $result_texis{'empty_images'} = '@image{}
  285. @image{ ,aa,bb,cc ,dd}
  286. @image{,,,@ }
  287. @image{,,,@:}
  288. ';
  289. $result_texts{'empty_images'} = '
  290. ';
  291. $result_errors{'empty_images'} = [
  292. {
  293. 'error_line' => ':1: @image missing filename argument
  294. ',
  295. 'file_name' => '',
  296. 'line_nr' => 1,
  297. 'macro' => '',
  298. 'text' => '@image missing filename argument',
  299. 'type' => 'error'
  300. },
  301. {
  302. 'error_line' => ':3: @image missing filename argument
  303. ',
  304. 'file_name' => '',
  305. 'line_nr' => 3,
  306. 'macro' => '',
  307. 'text' => '@image missing filename argument',
  308. 'type' => 'error'
  309. },
  310. {
  311. 'error_line' => ':5: @image missing filename argument
  312. ',
  313. 'file_name' => '',
  314. 'line_nr' => 5,
  315. 'macro' => '',
  316. 'text' => '@image missing filename argument',
  317. 'type' => 'error'
  318. },
  319. {
  320. 'error_line' => ':6: @image missing filename argument
  321. ',
  322. 'file_name' => '',
  323. 'line_nr' => 6,
  324. 'macro' => '',
  325. 'text' => '@image missing filename argument',
  326. 'type' => 'error'
  327. }
  328. ];
  329. 1;