empty_def_command.pl 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  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_def_command'} = {
  7. 'contents' => [
  8. {
  9. 'cmdname' => 'deffn',
  10. 'contents' => [
  11. {
  12. 'args' => [
  13. {
  14. 'contents' => [
  15. {
  16. 'extra' => {
  17. 'command' => {}
  18. },
  19. 'parent' => {},
  20. 'text' => ' ',
  21. 'type' => 'empty_spaces_after_command'
  22. },
  23. {
  24. 'parent' => {},
  25. 'text' => 'empty deffn
  26. '
  27. }
  28. ],
  29. 'parent' => {},
  30. 'type' => 'block_line_arg'
  31. }
  32. ],
  33. 'extra' => {
  34. 'def_args' => [
  35. [
  36. 'category',
  37. {
  38. 'text' => 'empty'
  39. }
  40. ],
  41. [
  42. 'spaces',
  43. {
  44. 'text' => ' ',
  45. 'type' => 'spaces'
  46. }
  47. ],
  48. [
  49. 'name',
  50. {
  51. 'text' => 'deffn'
  52. }
  53. ]
  54. ],
  55. 'def_command' => 'deffn',
  56. 'def_parsed_hash' => {
  57. 'category' => {},
  58. 'name' => {}
  59. },
  60. 'index_entry' => {
  61. 'command' => {},
  62. 'content' => [
  63. {}
  64. ],
  65. 'content_normalized' => [
  66. {}
  67. ],
  68. 'in_code' => 1,
  69. 'index_at_command' => 'deffn',
  70. 'index_name' => 'fn',
  71. 'index_type_command' => 'deffn',
  72. 'key' => 'deffn',
  73. 'number' => 1
  74. },
  75. 'original_def_cmdname' => 'deffn'
  76. },
  77. 'line_nr' => {
  78. 'file_name' => '',
  79. 'line_nr' => 1,
  80. 'macro' => ''
  81. },
  82. 'parent' => {},
  83. 'type' => 'def_line'
  84. },
  85. {
  86. 'args' => [
  87. {
  88. 'contents' => [
  89. {
  90. 'extra' => {
  91. 'command' => {}
  92. },
  93. 'parent' => {},
  94. 'text' => ' ',
  95. 'type' => 'empty_spaces_after_command'
  96. },
  97. {
  98. 'parent' => {},
  99. 'text' => 'deffn'
  100. },
  101. {
  102. 'parent' => {},
  103. 'text' => '
  104. ',
  105. 'type' => 'spaces_at_end'
  106. }
  107. ],
  108. 'parent' => {},
  109. 'type' => 'misc_line_arg'
  110. }
  111. ],
  112. 'cmdname' => 'end',
  113. 'extra' => {
  114. 'command' => {},
  115. 'command_argument' => 'deffn',
  116. 'spaces_after_command' => {},
  117. 'text_arg' => 'deffn'
  118. },
  119. 'line_nr' => {
  120. 'file_name' => '',
  121. 'line_nr' => 2,
  122. 'macro' => ''
  123. },
  124. 'parent' => {}
  125. }
  126. ],
  127. 'extra' => {
  128. 'end_command' => {},
  129. 'spaces_after_command' => {}
  130. },
  131. 'line_nr' => {},
  132. 'parent' => {}
  133. },
  134. {
  135. 'parent' => {},
  136. 'text' => '
  137. ',
  138. 'type' => 'empty_line'
  139. },
  140. {
  141. 'cmdname' => 'deffn',
  142. 'contents' => [
  143. {
  144. 'args' => [
  145. {
  146. 'contents' => [
  147. {
  148. 'extra' => {
  149. 'command' => {}
  150. },
  151. 'parent' => {},
  152. 'text' => ' ',
  153. 'type' => 'empty_spaces_after_command'
  154. },
  155. {
  156. 'parent' => {},
  157. 'text' => 'empty deffn with deffnx
  158. '
  159. }
  160. ],
  161. 'parent' => {},
  162. 'type' => 'block_line_arg'
  163. }
  164. ],
  165. 'extra' => {
  166. 'def_args' => [
  167. [
  168. 'category',
  169. {
  170. 'text' => 'empty'
  171. }
  172. ],
  173. [
  174. 'spaces',
  175. {
  176. 'text' => ' ',
  177. 'type' => 'spaces'
  178. }
  179. ],
  180. [
  181. 'name',
  182. {
  183. 'text' => 'deffn'
  184. }
  185. ],
  186. [
  187. 'spaces',
  188. {
  189. 'text' => ' ',
  190. 'type' => 'spaces'
  191. }
  192. ],
  193. [
  194. 'arg',
  195. {
  196. 'text' => 'with'
  197. }
  198. ],
  199. [
  200. 'spaces',
  201. {
  202. 'text' => ' ',
  203. 'type' => 'spaces'
  204. }
  205. ],
  206. [
  207. 'arg',
  208. {
  209. 'text' => 'deffnx'
  210. }
  211. ]
  212. ],
  213. 'def_command' => 'deffn',
  214. 'def_parsed_hash' => {
  215. 'category' => {},
  216. 'name' => {}
  217. },
  218. 'index_entry' => {
  219. 'command' => {},
  220. 'content' => [
  221. {}
  222. ],
  223. 'content_normalized' => [
  224. {}
  225. ],
  226. 'in_code' => 1,
  227. 'index_at_command' => 'deffn',
  228. 'index_name' => 'fn',
  229. 'index_type_command' => 'deffn',
  230. 'key' => 'deffn',
  231. 'number' => 2
  232. },
  233. 'original_def_cmdname' => 'deffn'
  234. },
  235. 'line_nr' => {
  236. 'file_name' => '',
  237. 'line_nr' => 4,
  238. 'macro' => ''
  239. },
  240. 'parent' => {},
  241. 'type' => 'def_line'
  242. },
  243. {
  244. 'args' => [
  245. {
  246. 'contents' => [
  247. {
  248. 'extra' => {
  249. 'command' => {}
  250. },
  251. 'parent' => {},
  252. 'text' => ' ',
  253. 'type' => 'empty_spaces_after_command'
  254. },
  255. {
  256. 'parent' => {},
  257. 'text' => 'empty deffnx
  258. '
  259. }
  260. ],
  261. 'parent' => {},
  262. 'type' => 'misc_line_arg'
  263. }
  264. ],
  265. 'cmdname' => 'deffnx',
  266. 'extra' => {
  267. 'def_args' => [
  268. [
  269. 'category',
  270. {
  271. 'text' => 'empty'
  272. }
  273. ],
  274. [
  275. 'spaces',
  276. {
  277. 'text' => ' ',
  278. 'type' => 'spaces'
  279. }
  280. ],
  281. [
  282. 'name',
  283. {
  284. 'text' => 'deffnx'
  285. }
  286. ]
  287. ],
  288. 'def_command' => 'deffn',
  289. 'def_parsed_hash' => {
  290. 'category' => {},
  291. 'name' => {}
  292. },
  293. 'index_entry' => {
  294. 'command' => {},
  295. 'content' => [
  296. {}
  297. ],
  298. 'content_normalized' => [
  299. {}
  300. ],
  301. 'in_code' => 1,
  302. 'index_at_command' => 'deffnx',
  303. 'index_name' => 'fn',
  304. 'index_type_command' => 'deffn',
  305. 'key' => 'deffnx',
  306. 'number' => 3
  307. },
  308. 'original_def_cmdname' => 'deffnx',
  309. 'spaces_after_command' => {}
  310. },
  311. 'line_nr' => {
  312. 'file_name' => '',
  313. 'line_nr' => 5,
  314. 'macro' => ''
  315. },
  316. 'parent' => {},
  317. 'type' => 'def_line'
  318. },
  319. {
  320. 'args' => [
  321. {
  322. 'contents' => [
  323. {
  324. 'extra' => {
  325. 'command' => {}
  326. },
  327. 'parent' => {},
  328. 'text' => ' ',
  329. 'type' => 'empty_spaces_after_command'
  330. },
  331. {
  332. 'parent' => {},
  333. 'text' => 'deffn'
  334. },
  335. {
  336. 'parent' => {},
  337. 'text' => '
  338. ',
  339. 'type' => 'spaces_at_end'
  340. }
  341. ],
  342. 'parent' => {},
  343. 'type' => 'misc_line_arg'
  344. }
  345. ],
  346. 'cmdname' => 'end',
  347. 'extra' => {
  348. 'command' => {},
  349. 'command_argument' => 'deffn',
  350. 'spaces_after_command' => {},
  351. 'text_arg' => 'deffn'
  352. },
  353. 'line_nr' => {
  354. 'file_name' => '',
  355. 'line_nr' => 6,
  356. 'macro' => ''
  357. },
  358. 'parent' => {}
  359. }
  360. ],
  361. 'extra' => {
  362. 'end_command' => {},
  363. 'spaces_after_command' => {}
  364. },
  365. 'line_nr' => {},
  366. 'parent' => {}
  367. }
  368. ],
  369. 'type' => 'text_root'
  370. };
  371. $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'}[0]{'extra'}{'command'} = $result_trees{'empty_def_command'}{'contents'}[0];
  372. $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'} = $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[0]{'args'}[0];
  373. $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'}[1]{'parent'} = $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[0]{'args'}[0];
  374. $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[0]{'args'}[0]{'parent'} = $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[0];
  375. $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[0]{'extra'}{'def_parsed_hash'}{'category'} = $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[0]{'extra'}{'def_args'}[0][1];
  376. $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[0]{'extra'}{'def_parsed_hash'}{'name'} = $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[0]{'extra'}{'def_args'}[2][1];
  377. $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'command'} = $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[0];
  378. $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'content'}[0] = $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[0]{'extra'}{'def_args'}[2][1];
  379. $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'content_normalized'}[0] = $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[0]{'extra'}{'def_args'}[2][1];
  380. $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[0]{'parent'} = $result_trees{'empty_def_command'}{'contents'}[0];
  381. $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'extra'}{'command'} = $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[1];
  382. $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'} = $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[1]{'args'}[0];
  383. $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'} = $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[1]{'args'}[0];
  384. $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'} = $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[1]{'args'}[0];
  385. $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'parent'} = $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[1];
  386. $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[1]{'extra'}{'command'} = $result_trees{'empty_def_command'}{'contents'}[0];
  387. $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[1]{'extra'}{'spaces_after_command'} = $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0];
  388. $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[1]{'parent'} = $result_trees{'empty_def_command'}{'contents'}[0];
  389. $result_trees{'empty_def_command'}{'contents'}[0]{'extra'}{'end_command'} = $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[1];
  390. $result_trees{'empty_def_command'}{'contents'}[0]{'extra'}{'spaces_after_command'} = $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'}[0];
  391. $result_trees{'empty_def_command'}{'contents'}[0]{'line_nr'} = $result_trees{'empty_def_command'}{'contents'}[0]{'contents'}[0]{'line_nr'};
  392. $result_trees{'empty_def_command'}{'contents'}[0]{'parent'} = $result_trees{'empty_def_command'};
  393. $result_trees{'empty_def_command'}{'contents'}[1]{'parent'} = $result_trees{'empty_def_command'};
  394. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[0]{'args'}[0]{'contents'}[0]{'extra'}{'command'} = $result_trees{'empty_def_command'}{'contents'}[2];
  395. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'} = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[0]{'args'}[0];
  396. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[0]{'args'}[0]{'contents'}[1]{'parent'} = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[0]{'args'}[0];
  397. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[0]{'args'}[0]{'parent'} = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[0];
  398. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[0]{'extra'}{'def_parsed_hash'}{'category'} = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[0]{'extra'}{'def_args'}[0][1];
  399. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[0]{'extra'}{'def_parsed_hash'}{'name'} = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[0]{'extra'}{'def_args'}[2][1];
  400. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[0]{'extra'}{'index_entry'}{'command'} = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[0];
  401. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[0]{'extra'}{'index_entry'}{'content'}[0] = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[0]{'extra'}{'def_args'}[2][1];
  402. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[0]{'extra'}{'index_entry'}{'content_normalized'}[0] = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[0]{'extra'}{'def_args'}[2][1];
  403. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[0]{'parent'} = $result_trees{'empty_def_command'}{'contents'}[2];
  404. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[1]{'args'}[0]{'contents'}[0]{'extra'}{'command'} = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[1];
  405. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'} = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[1]{'args'}[0];
  406. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'} = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[1]{'args'}[0];
  407. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[1]{'args'}[0]{'parent'} = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[1];
  408. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[1]{'extra'}{'def_parsed_hash'}{'category'} = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[1]{'extra'}{'def_args'}[0][1];
  409. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[1]{'extra'}{'def_parsed_hash'}{'name'} = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[1]{'extra'}{'def_args'}[2][1];
  410. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[1]{'extra'}{'index_entry'}{'command'} = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[1];
  411. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[1]{'extra'}{'index_entry'}{'content'}[0] = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[1]{'extra'}{'def_args'}[2][1];
  412. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[1]{'extra'}{'index_entry'}{'content_normalized'}[0] = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[1]{'extra'}{'def_args'}[2][1];
  413. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[1]{'extra'}{'spaces_after_command'} = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[1]{'args'}[0]{'contents'}[0];
  414. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[1]{'parent'} = $result_trees{'empty_def_command'}{'contents'}[2];
  415. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[2]{'args'}[0]{'contents'}[0]{'extra'}{'command'} = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[2];
  416. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[2]{'args'}[0]{'contents'}[0]{'parent'} = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[2]{'args'}[0];
  417. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[2]{'args'}[0]{'contents'}[1]{'parent'} = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[2]{'args'}[0];
  418. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[2]{'args'}[0]{'contents'}[2]{'parent'} = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[2]{'args'}[0];
  419. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[2]{'args'}[0]{'parent'} = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[2];
  420. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[2]{'extra'}{'command'} = $result_trees{'empty_def_command'}{'contents'}[2];
  421. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[2]{'extra'}{'spaces_after_command'} = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[2]{'args'}[0]{'contents'}[0];
  422. $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[2]{'parent'} = $result_trees{'empty_def_command'}{'contents'}[2];
  423. $result_trees{'empty_def_command'}{'contents'}[2]{'extra'}{'end_command'} = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[2];
  424. $result_trees{'empty_def_command'}{'contents'}[2]{'extra'}{'spaces_after_command'} = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[0]{'args'}[0]{'contents'}[0];
  425. $result_trees{'empty_def_command'}{'contents'}[2]{'line_nr'} = $result_trees{'empty_def_command'}{'contents'}[2]{'contents'}[0]{'line_nr'};
  426. $result_trees{'empty_def_command'}{'contents'}[2]{'parent'} = $result_trees{'empty_def_command'};
  427. $result_texis{'empty_def_command'} = '@deffn empty deffn
  428. @end deffn
  429. @deffn empty deffn with deffnx
  430. @deffnx empty deffnx
  431. @end deffn
  432. ';
  433. $result_texts{'empty_def_command'} = 'empty: deffn
  434. empty: deffn with deffnx
  435. empty: deffnx
  436. ';
  437. $result_errors{'empty_def_command'} = [
  438. {
  439. 'error_line' => ':1: warning: entry for index `fn\' outside of any node
  440. ',
  441. 'file_name' => '',
  442. 'line_nr' => 1,
  443. 'macro' => '',
  444. 'text' => 'entry for index `fn\' outside of any node',
  445. 'type' => 'warning'
  446. },
  447. {
  448. 'error_line' => ':4: warning: entry for index `fn\' outside of any node
  449. ',
  450. 'file_name' => '',
  451. 'line_nr' => 4,
  452. 'macro' => '',
  453. 'text' => 'entry for index `fn\' outside of any node',
  454. 'type' => 'warning'
  455. },
  456. {
  457. 'error_line' => ':5: warning: entry for index `fn\' outside of any node
  458. ',
  459. 'file_name' => '',
  460. 'line_nr' => 5,
  461. 'macro' => '',
  462. 'text' => 'entry for index `fn\' outside of any node',
  463. 'type' => 'warning'
  464. }
  465. ];
  466. $result_converted{'plaintext'}->{'empty_def_command'} = ' -- empty: deffn
  467. -- empty: deffn with deffnx
  468. -- empty: deffnx
  469. ';
  470. 1;