DIFF.php 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. <?php
  2. /**
  3. * Auto-generated class. DIFF syntax highlighting
  4. *
  5. * PHP version 4 and 5
  6. *
  7. * LICENSE: This source file is subject to version 3.0 of the PHP license
  8. * that is available through the world-wide-web at the following URI:
  9. * http://www.php.net/license/3_0.txt. If you did not receive a copy of
  10. * the PHP License and are unable to obtain it through the web, please
  11. * send a note to license@php.net so we can mail you a copy immediately.
  12. *
  13. * @copyright 2004-2006 Andrey Demenev
  14. * @license http://www.php.net/license/3_0.txt PHP License
  15. * @link http://pear.php.net/package/Text_Highlighter
  16. * @category Text
  17. * @package Text_Highlighter
  18. * @version generated from: : diff.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp
  19. * @author Andrey Demenev <demenev@gmail.com>
  20. *
  21. */
  22. /**
  23. * Auto-generated class. DIFF syntax highlighting
  24. *
  25. * @author Andrey Demenev <demenev@gmail.com>
  26. * @category Text
  27. * @package Text_Highlighter
  28. * @copyright 2004-2006 Andrey Demenev
  29. * @license http://www.php.net/license/3_0.txt PHP License
  30. * @version Release: 0.7.1
  31. * @link http://pear.php.net/package/Text_Highlighter
  32. */
  33. class Text_Highlighter_DIFF extends Text_Highlighter
  34. {
  35. var $_language = 'diff';
  36. /**
  37. * Constructor
  38. *
  39. * @param array $options
  40. * @access public
  41. */
  42. function __construct($options=array())
  43. {
  44. $this->_options = $options;
  45. $this->_regs = array (
  46. -1 => '/((?m)^\\\\\\sNo\\snewline.+$)|((?m)^\\-\\-\\-$)|((?m)^(diff\\s+\\-|Only\\s+|Index).*$)|((?m)^(\\-\\-\\-|\\+\\+\\+)\\s.+$)|((?m)^\\*.*$)|((?m)^\\+.*$)|((?m)^!.*$)|((?m)^\\<\\s.*$)|((?m)^\\>\\s.*$)|((?m)^\\d+(\\,\\d+)?[acd]\\d+(,\\d+)?$)|((?m)^\\-.*$)|((?m)^\\+.*$)|((?m)^@@.+@@$)|((?m)^d\\d+\\s\\d+$)|((?m)^a\\d+\\s\\d+$)|((?m)^(\\d+)(,\\d+)?(a)$)|((?m)^(\\d+)(,\\d+)?(c)$)|((?m)^(\\d+)(,\\d+)?(d)$)|((?m)^a(\\d+)(\\s\\d+)?$)|((?m)^c(\\d+)(\\s\\d+)?$)|((?m)^d(\\d+)(\\s\\d+)?$)/',
  47. 0 => '//',
  48. 1 => '//',
  49. 2 => '//',
  50. 3 => '//',
  51. 4 => '//',
  52. );
  53. $this->_counts = array (
  54. -1 =>
  55. array (
  56. 0 => 0,
  57. 1 => 0,
  58. 2 => 1,
  59. 3 => 1,
  60. 4 => 0,
  61. 5 => 0,
  62. 6 => 0,
  63. 7 => 0,
  64. 8 => 0,
  65. 9 => 2,
  66. 10 => 0,
  67. 11 => 0,
  68. 12 => 0,
  69. 13 => 0,
  70. 14 => 0,
  71. 15 => 3,
  72. 16 => 3,
  73. 17 => 3,
  74. 18 => 2,
  75. 19 => 2,
  76. 20 => 2,
  77. ),
  78. 0 =>
  79. array (
  80. ),
  81. 1 =>
  82. array (
  83. ),
  84. 2 =>
  85. array (
  86. ),
  87. 3 =>
  88. array (
  89. ),
  90. 4 =>
  91. array (
  92. ),
  93. );
  94. $this->_delim = array (
  95. -1 =>
  96. array (
  97. 0 => '',
  98. 1 => '',
  99. 2 => '',
  100. 3 => '',
  101. 4 => '',
  102. 5 => '',
  103. 6 => '',
  104. 7 => '',
  105. 8 => '',
  106. 9 => '',
  107. 10 => '',
  108. 11 => '',
  109. 12 => '',
  110. 13 => '',
  111. 14 => 'code',
  112. 15 => 'code',
  113. 16 => 'code',
  114. 17 => '',
  115. 18 => 'code',
  116. 19 => 'code',
  117. 20 => '',
  118. ),
  119. 0 =>
  120. array (
  121. ),
  122. 1 =>
  123. array (
  124. ),
  125. 2 =>
  126. array (
  127. ),
  128. 3 =>
  129. array (
  130. ),
  131. 4 =>
  132. array (
  133. ),
  134. );
  135. $this->_inner = array (
  136. -1 =>
  137. array (
  138. 0 => 'special',
  139. 1 => 'code',
  140. 2 => 'var',
  141. 3 => 'reserved',
  142. 4 => 'quotes',
  143. 5 => 'string',
  144. 6 => 'inlinedoc',
  145. 7 => 'quotes',
  146. 8 => 'string',
  147. 9 => 'code',
  148. 10 => 'quotes',
  149. 11 => 'string',
  150. 12 => 'code',
  151. 13 => 'code',
  152. 14 => 'var',
  153. 15 => 'string',
  154. 16 => 'inlinedoc',
  155. 17 => 'code',
  156. 18 => 'string',
  157. 19 => 'inlinedoc',
  158. 20 => 'code',
  159. ),
  160. 0 =>
  161. array (
  162. ),
  163. 1 =>
  164. array (
  165. ),
  166. 2 =>
  167. array (
  168. ),
  169. 3 =>
  170. array (
  171. ),
  172. 4 =>
  173. array (
  174. ),
  175. );
  176. $this->_end = array (
  177. 0 => '/(?m)(?=^[ad]\\d+\\s\\d+)/',
  178. 1 => '/(?m)^(\\.)$/',
  179. 2 => '/(?m)^(\\.)$/',
  180. 3 => '/(?m)^(\\.)$/',
  181. 4 => '/(?m)^(\\.)$/',
  182. );
  183. $this->_states = array (
  184. -1 =>
  185. array (
  186. 0 => -1,
  187. 1 => -1,
  188. 2 => -1,
  189. 3 => -1,
  190. 4 => -1,
  191. 5 => -1,
  192. 6 => -1,
  193. 7 => -1,
  194. 8 => -1,
  195. 9 => -1,
  196. 10 => -1,
  197. 11 => -1,
  198. 12 => -1,
  199. 13 => -1,
  200. 14 => 0,
  201. 15 => 1,
  202. 16 => 2,
  203. 17 => -1,
  204. 18 => 3,
  205. 19 => 4,
  206. 20 => -1,
  207. ),
  208. 0 =>
  209. array (
  210. ),
  211. 1 =>
  212. array (
  213. ),
  214. 2 =>
  215. array (
  216. ),
  217. 3 =>
  218. array (
  219. ),
  220. 4 =>
  221. array (
  222. ),
  223. );
  224. $this->_keywords = array (
  225. -1 =>
  226. array (
  227. 0 =>
  228. array (
  229. ),
  230. 1 =>
  231. array (
  232. ),
  233. 2 =>
  234. array (
  235. ),
  236. 3 =>
  237. array (
  238. ),
  239. 4 =>
  240. array (
  241. ),
  242. 5 =>
  243. array (
  244. ),
  245. 6 =>
  246. array (
  247. ),
  248. 7 =>
  249. array (
  250. ),
  251. 8 =>
  252. array (
  253. ),
  254. 9 =>
  255. array (
  256. ),
  257. 10 =>
  258. array (
  259. ),
  260. 11 =>
  261. array (
  262. ),
  263. 12 =>
  264. array (
  265. ),
  266. 13 =>
  267. array (
  268. ),
  269. 14 => -1,
  270. 15 => -1,
  271. 16 => -1,
  272. 17 =>
  273. array (
  274. ),
  275. 18 => -1,
  276. 19 => -1,
  277. 20 =>
  278. array (
  279. ),
  280. ),
  281. 0 =>
  282. array (
  283. ),
  284. 1 =>
  285. array (
  286. ),
  287. 2 =>
  288. array (
  289. ),
  290. 3 =>
  291. array (
  292. ),
  293. 4 =>
  294. array (
  295. ),
  296. );
  297. $this->_parts = array (
  298. 0 =>
  299. array (
  300. ),
  301. 1 =>
  302. array (
  303. ),
  304. 2 =>
  305. array (
  306. ),
  307. 3 =>
  308. array (
  309. ),
  310. 4 =>
  311. array (
  312. ),
  313. );
  314. $this->_subst = array (
  315. -1 =>
  316. array (
  317. 0 => false,
  318. 1 => false,
  319. 2 => false,
  320. 3 => false,
  321. 4 => false,
  322. 5 => false,
  323. 6 => false,
  324. 7 => false,
  325. 8 => false,
  326. 9 => false,
  327. 10 => false,
  328. 11 => false,
  329. 12 => false,
  330. 13 => false,
  331. 14 => false,
  332. 15 => false,
  333. 16 => false,
  334. 17 => false,
  335. 18 => false,
  336. 19 => false,
  337. 20 => false,
  338. ),
  339. 0 =>
  340. array (
  341. ),
  342. 1 =>
  343. array (
  344. ),
  345. 2 =>
  346. array (
  347. ),
  348. 3 =>
  349. array (
  350. ),
  351. 4 =>
  352. array (
  353. ),
  354. );
  355. $this->_conditions = array (
  356. );
  357. $this->_kwmap = array (
  358. );
  359. $this->_defClass = 'default';
  360. $this->_checkDefines();
  361. }
  362. }