protect_in_body_one_arg.pl 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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{'protect_in_body_one_arg'} = {
  7. 'contents' => [
  8. {
  9. 'args' => [
  10. {
  11. 'parent' => {},
  12. 'text' => 'macroone',
  13. 'type' => 'macro_name'
  14. },
  15. {
  16. 'parent' => {},
  17. 'text' => 'arg1',
  18. 'type' => 'macro_arg'
  19. },
  20. {
  21. 'parent' => {},
  22. 'text' => 'arg2',
  23. 'type' => 'macro_arg'
  24. }
  25. ],
  26. 'cmdname' => 'macro',
  27. 'contents' => [
  28. {
  29. 'parent' => {},
  30. 'text' => 'result: @emph{\\arg1\\} protected \\\\ -> \\\\arg1\\\\ @emph{\\arg2\\}',
  31. 'type' => 'raw'
  32. },
  33. {
  34. 'parent' => {},
  35. 'text' => '
  36. ',
  37. 'type' => 'last_raw_newline'
  38. }
  39. ],
  40. 'extra' => {
  41. 'arg_line' => ' macroone { arg1 , arg2 }
  42. '
  43. },
  44. 'line_nr' => {
  45. 'file_name' => '',
  46. 'line_nr' => 1,
  47. 'macro' => ''
  48. },
  49. 'parent' => {}
  50. },
  51. {
  52. 'extra' => {
  53. 'command' => {}
  54. },
  55. 'parent' => {},
  56. 'text' => '
  57. ',
  58. 'type' => 'empty_line_after_command'
  59. },
  60. {
  61. 'parent' => {},
  62. 'text' => '
  63. ',
  64. 'type' => 'empty_line'
  65. },
  66. {
  67. 'contents' => [
  68. {
  69. 'parent' => {},
  70. 'text' => 'result: '
  71. },
  72. {
  73. 'args' => [
  74. {
  75. 'contents' => [
  76. {
  77. 'args' => [
  78. {
  79. 'contents' => [
  80. {
  81. 'parent' => {},
  82. 'text' => 'f\\irst arg'
  83. }
  84. ],
  85. 'parent' => {},
  86. 'type' => 'brace_command_arg'
  87. }
  88. ],
  89. 'cmdname' => 'samp',
  90. 'contents' => [],
  91. 'line_nr' => {
  92. 'file_name' => '',
  93. 'line_nr' => 5,
  94. 'macro' => 'macroone'
  95. },
  96. 'parent' => {}
  97. }
  98. ],
  99. 'parent' => {},
  100. 'type' => 'brace_command_arg'
  101. }
  102. ],
  103. 'cmdname' => 'emph',
  104. 'contents' => [],
  105. 'line_nr' => {},
  106. 'parent' => {}
  107. },
  108. {
  109. 'parent' => {},
  110. 'text' => ' protected \\ -> \\arg1\\ '
  111. },
  112. {
  113. 'args' => [
  114. {
  115. 'contents' => [],
  116. 'parent' => {},
  117. 'type' => 'brace_command_arg'
  118. }
  119. ],
  120. 'cmdname' => 'emph',
  121. 'contents' => [],
  122. 'line_nr' => {},
  123. 'parent' => {}
  124. },
  125. {
  126. 'parent' => {},
  127. 'text' => '
  128. '
  129. }
  130. ],
  131. 'parent' => {},
  132. 'type' => 'paragraph'
  133. }
  134. ],
  135. 'type' => 'text_root'
  136. };
  137. $result_trees{'protect_in_body_one_arg'}{'contents'}[0]{'args'}[0]{'parent'} = $result_trees{'protect_in_body_one_arg'}{'contents'}[0];
  138. $result_trees{'protect_in_body_one_arg'}{'contents'}[0]{'args'}[1]{'parent'} = $result_trees{'protect_in_body_one_arg'}{'contents'}[0];
  139. $result_trees{'protect_in_body_one_arg'}{'contents'}[0]{'args'}[2]{'parent'} = $result_trees{'protect_in_body_one_arg'}{'contents'}[0];
  140. $result_trees{'protect_in_body_one_arg'}{'contents'}[0]{'contents'}[0]{'parent'} = $result_trees{'protect_in_body_one_arg'}{'contents'}[0];
  141. $result_trees{'protect_in_body_one_arg'}{'contents'}[0]{'contents'}[1]{'parent'} = $result_trees{'protect_in_body_one_arg'}{'contents'}[0];
  142. $result_trees{'protect_in_body_one_arg'}{'contents'}[0]{'parent'} = $result_trees{'protect_in_body_one_arg'};
  143. $result_trees{'protect_in_body_one_arg'}{'contents'}[1]{'extra'}{'command'} = $result_trees{'protect_in_body_one_arg'}{'contents'}[0];
  144. $result_trees{'protect_in_body_one_arg'}{'contents'}[1]{'parent'} = $result_trees{'protect_in_body_one_arg'};
  145. $result_trees{'protect_in_body_one_arg'}{'contents'}[2]{'parent'} = $result_trees{'protect_in_body_one_arg'};
  146. $result_trees{'protect_in_body_one_arg'}{'contents'}[3]{'contents'}[0]{'parent'} = $result_trees{'protect_in_body_one_arg'}{'contents'}[3];
  147. $result_trees{'protect_in_body_one_arg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'} = $result_trees{'protect_in_body_one_arg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[0]{'args'}[0];
  148. $result_trees{'protect_in_body_one_arg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[0]{'args'}[0]{'parent'} = $result_trees{'protect_in_body_one_arg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[0];
  149. $result_trees{'protect_in_body_one_arg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'} = $result_trees{'protect_in_body_one_arg'}{'contents'}[3]{'contents'}[1]{'args'}[0];
  150. $result_trees{'protect_in_body_one_arg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'parent'} = $result_trees{'protect_in_body_one_arg'}{'contents'}[3]{'contents'}[1];
  151. $result_trees{'protect_in_body_one_arg'}{'contents'}[3]{'contents'}[1]{'line_nr'} = $result_trees{'protect_in_body_one_arg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[0]{'line_nr'};
  152. $result_trees{'protect_in_body_one_arg'}{'contents'}[3]{'contents'}[1]{'parent'} = $result_trees{'protect_in_body_one_arg'}{'contents'}[3];
  153. $result_trees{'protect_in_body_one_arg'}{'contents'}[3]{'contents'}[2]{'parent'} = $result_trees{'protect_in_body_one_arg'}{'contents'}[3];
  154. $result_trees{'protect_in_body_one_arg'}{'contents'}[3]{'contents'}[3]{'args'}[0]{'parent'} = $result_trees{'protect_in_body_one_arg'}{'contents'}[3]{'contents'}[3];
  155. $result_trees{'protect_in_body_one_arg'}{'contents'}[3]{'contents'}[3]{'line_nr'} = $result_trees{'protect_in_body_one_arg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[0]{'line_nr'};
  156. $result_trees{'protect_in_body_one_arg'}{'contents'}[3]{'contents'}[3]{'parent'} = $result_trees{'protect_in_body_one_arg'}{'contents'}[3];
  157. $result_trees{'protect_in_body_one_arg'}{'contents'}[3]{'contents'}[4]{'parent'} = $result_trees{'protect_in_body_one_arg'}{'contents'}[3];
  158. $result_trees{'protect_in_body_one_arg'}{'contents'}[3]{'parent'} = $result_trees{'protect_in_body_one_arg'};
  159. $result_texis{'protect_in_body_one_arg'} = '@macro macroone { arg1 , arg2 }
  160. result: @emph{\\arg1\\} protected \\\\ -> \\\\arg1\\\\ @emph{\\arg2\\}
  161. @end macro
  162. result: @emph{@samp{f\\irst arg}} protected \\ -> \\arg1\\ @emph{}
  163. ';
  164. $result_texts{'protect_in_body_one_arg'} = '
  165. result: f\\irst arg protected \\ -> \\arg1\\
  166. ';
  167. $result_errors{'protect_in_body_one_arg'} = [];
  168. 1;