CSS.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419
  1. <?php
  2. /**
  3. * Auto-generated class. CSS 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: : css.xml,v 1.2 2008/01/01 23:45:07 ssttoo Exp
  19. * @author Andrey Demenev <demenev@gmail.com>
  20. *
  21. */
  22. /**
  23. * Auto-generated class. CSS 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_CSS extends Text_Highlighter
  34. {
  35. var $_language = 'css';
  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 => '/((?i)\\/\\*)|((?i)(@[a-z\\d]+))|((?i)(((\\.|#)?[a-z]+[a-z\\d\\-]*(?![a-z\\d\\-]))|(\\*))(?!\\s*:\\s*[\\s\\{]))|((?i):[a-z][a-z\\d\\-]*)|((?i)\\[)|((?i)\\{)/',
  47. 0 => '//',
  48. 1 => '/((?i)\\d*\\.?\\d+(\\%|em|ex|pc|pt|px|in|mm|cm))|((?i)\\d*\\.?\\d+)|((?i)[a-z][a-z\\d\\-]*)|((?i)#([\\da-f]{6}|[\\da-f]{3})\\b)/',
  49. 2 => '/((?i)\')|((?i)")|((?i)[\\w\\-\\:]+)/',
  50. 3 => '/((?i)\\/\\*)|((?i)[a-z][a-z\\d\\-]*\\s*:)|((?i)(((\\.|#)?[a-z]+[a-z\\d\\-]*(?![a-z\\d\\-]))|(\\*))(?!\\s*:\\s*[\\s\\{]))|((?i)\\{)/',
  51. 4 => '/((?i)\\\\[\\\\(\\\\)\\\\])/',
  52. 5 => '/((?i)\\\\\\\\|\\\\"|\\\\\'|\\\\`)/',
  53. 6 => '/((?i)\\\\\\\\|\\\\"|\\\\\'|\\\\`|\\\\t|\\\\n|\\\\r)/',
  54. );
  55. $this->_counts = array (
  56. -1 =>
  57. array (
  58. 0 => 0,
  59. 1 => 1,
  60. 2 => 4,
  61. 3 => 0,
  62. 4 => 0,
  63. 5 => 0,
  64. ),
  65. 0 =>
  66. array (
  67. ),
  68. 1 =>
  69. array (
  70. 0 => 1,
  71. 1 => 0,
  72. 2 => 0,
  73. 3 => 1,
  74. ),
  75. 2 =>
  76. array (
  77. 0 => 0,
  78. 1 => 0,
  79. 2 => 0,
  80. ),
  81. 3 =>
  82. array (
  83. 0 => 0,
  84. 1 => 0,
  85. 2 => 4,
  86. 3 => 0,
  87. ),
  88. 4 =>
  89. array (
  90. 0 => 0,
  91. ),
  92. 5 =>
  93. array (
  94. 0 => 0,
  95. ),
  96. 6 =>
  97. array (
  98. 0 => 0,
  99. ),
  100. );
  101. $this->_delim = array (
  102. -1 =>
  103. array (
  104. 0 => 'comment',
  105. 1 => '',
  106. 2 => '',
  107. 3 => '',
  108. 4 => 'brackets',
  109. 5 => 'brackets',
  110. ),
  111. 0 =>
  112. array (
  113. ),
  114. 1 =>
  115. array (
  116. 0 => '',
  117. 1 => '',
  118. 2 => '',
  119. 3 => '',
  120. ),
  121. 2 =>
  122. array (
  123. 0 => 'quotes',
  124. 1 => 'quotes',
  125. 2 => '',
  126. ),
  127. 3 =>
  128. array (
  129. 0 => 'comment',
  130. 1 => 'reserved',
  131. 2 => '',
  132. 3 => 'brackets',
  133. ),
  134. 4 =>
  135. array (
  136. 0 => '',
  137. ),
  138. 5 =>
  139. array (
  140. 0 => '',
  141. ),
  142. 6 =>
  143. array (
  144. 0 => '',
  145. ),
  146. );
  147. $this->_inner = array (
  148. -1 =>
  149. array (
  150. 0 => 'comment',
  151. 1 => 'var',
  152. 2 => 'identifier',
  153. 3 => 'special',
  154. 4 => 'code',
  155. 5 => 'code',
  156. ),
  157. 0 =>
  158. array (
  159. ),
  160. 1 =>
  161. array (
  162. 0 => 'number',
  163. 1 => 'number',
  164. 2 => 'code',
  165. 3 => 'var',
  166. ),
  167. 2 =>
  168. array (
  169. 0 => 'string',
  170. 1 => 'string',
  171. 2 => 'var',
  172. ),
  173. 3 =>
  174. array (
  175. 0 => 'comment',
  176. 1 => 'code',
  177. 2 => 'identifier',
  178. 3 => 'code',
  179. ),
  180. 4 =>
  181. array (
  182. 0 => 'string',
  183. ),
  184. 5 =>
  185. array (
  186. 0 => 'special',
  187. ),
  188. 6 =>
  189. array (
  190. 0 => 'special',
  191. ),
  192. );
  193. $this->_end = array (
  194. 0 => '/(?i)\\*\\//',
  195. 1 => '/(?i)(?=;|\\})/',
  196. 2 => '/(?i)\\]/',
  197. 3 => '/(?i)\\}/',
  198. 4 => '/(?i)\\)/',
  199. 5 => '/(?i)\'/',
  200. 6 => '/(?i)"/',
  201. );
  202. $this->_states = array (
  203. -1 =>
  204. array (
  205. 0 => 0,
  206. 1 => -1,
  207. 2 => -1,
  208. 3 => -1,
  209. 4 => 2,
  210. 5 => 3,
  211. ),
  212. 0 =>
  213. array (
  214. ),
  215. 1 =>
  216. array (
  217. 0 => -1,
  218. 1 => -1,
  219. 2 => -1,
  220. 3 => -1,
  221. ),
  222. 2 =>
  223. array (
  224. 0 => 5,
  225. 1 => 6,
  226. 2 => -1,
  227. ),
  228. 3 =>
  229. array (
  230. 0 => 0,
  231. 1 => 1,
  232. 2 => -1,
  233. 3 => 3,
  234. ),
  235. 4 =>
  236. array (
  237. 0 => -1,
  238. ),
  239. 5 =>
  240. array (
  241. 0 => -1,
  242. ),
  243. 6 =>
  244. array (
  245. 0 => -1,
  246. ),
  247. );
  248. $this->_keywords = array (
  249. -1 =>
  250. array (
  251. 0 => -1,
  252. 1 =>
  253. array (
  254. ),
  255. 2 =>
  256. array (
  257. ),
  258. 3 =>
  259. array (
  260. ),
  261. 4 => -1,
  262. 5 => -1,
  263. ),
  264. 0 =>
  265. array (
  266. ),
  267. 1 =>
  268. array (
  269. 0 =>
  270. array (
  271. ),
  272. 1 =>
  273. array (
  274. ),
  275. 2 =>
  276. array (
  277. 'propertyValue' => '/^((?i)far-left|left|center-left|center-right|center|far-right|right-side|right|behind|leftwards|rightwards|inherit|scroll|fixed|transparent|none|repeat-x|repeat-y|repeat|no-repeat|collapse|separate|auto|top|bottom|both|open-quote|close-quote|no-open-quote|no-close-quote|crosshair|default|pointer|move|e-resize|ne-resize|nw-resize|n-resize|se-resize|sw-resize|s-resize|text|wait|help|ltr|rtl|inline|block|list-item|run-in|compact|marker|table|inline-table|table-row-group|table-header-group|table-footer-group|table-row|table-column-group|table-column|table-cell|table-caption|below|level|above|higher|lower|show|hide|caption|icon|menu|message-box|small-caption|status-bar|normal|wider|narrower|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|italic|oblique|small-caps|bold|bolder|lighter|inside|outside|disc|circle|square|decimal|decimal-leading-zero|lower-roman|upper-roman|lower-greek|lower-alpha|lower-latin|upper-alpha|upper-latin|hebrew|armenian|georgian|cjk-ideographic|hiragana|katakana|hiragana-iroha|katakana-iroha|crop|cross|invert|visible|hidden|always|avoid|x-low|low|medium|high|x-high|mix?|repeat?|static|relative|absolute|portrait|landscape|spell-out|once|digits|continuous|code|x-slow|slow|fast|x-fast|faster|slower|justify|underline|overline|line-through|blink|capitalize|uppercase|lowercase|embed|bidi-override|baseline|sub|super|text-top|middle|text-bottom|silent|x-soft|soft|loud|x-loud|pre|nowrap|serif|sans-serif|cursive|fantasy|monospace|empty|string|strict|loose|char|true|false|dotted|dashed|solid|double|groove|ridge|inset|outset|larger|smaller|xx-small|x-small|small|large|x-large|xx-large|all|newspaper|distribute|distribute-all-lines|distribute-center-last|inter-word|inter-ideograph|inter-cluster|kashida|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|keep-all|break-all|break-word|lr-tb|tb-rl|thin|thick|inline-block|w-resize|hand|distribute-letter|distribute-space|whitespace|male|female|child)$/',
  278. 'namedcolor' => '/^((?i)aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|purple|red|silver|teal|white|yellow|activeborder|activecaption|appworkspace|background|buttonface|buttonhighlight|buttonshadow|buttontext|captiontext|graytext|highlight|highlighttext|inactiveborder|inactivecaption|inactivecaptiontext|infobackground|infotext|menu|menutext|scrollbar|threeddarkshadow|threedface|threedhighlight|threedlightshadow|threedshadow|window|windowframe|windowtext)$/',
  279. ),
  280. 3 =>
  281. array (
  282. ),
  283. ),
  284. 2 =>
  285. array (
  286. 0 => -1,
  287. 1 => -1,
  288. 2 =>
  289. array (
  290. ),
  291. ),
  292. 3 =>
  293. array (
  294. 0 => -1,
  295. 1 => -1,
  296. 2 =>
  297. array (
  298. ),
  299. 3 => -1,
  300. ),
  301. 4 =>
  302. array (
  303. 0 =>
  304. array (
  305. ),
  306. ),
  307. 5 =>
  308. array (
  309. 0 =>
  310. array (
  311. ),
  312. ),
  313. 6 =>
  314. array (
  315. 0 =>
  316. array (
  317. ),
  318. ),
  319. );
  320. $this->_parts = array (
  321. 0 =>
  322. array (
  323. ),
  324. 1 =>
  325. array (
  326. 0 =>
  327. array (
  328. 1 => 'string',
  329. ),
  330. 1 => NULL,
  331. 2 => NULL,
  332. 3 => NULL,
  333. ),
  334. 2 =>
  335. array (
  336. 0 => NULL,
  337. 1 => NULL,
  338. 2 => NULL,
  339. ),
  340. 3 =>
  341. array (
  342. 0 => NULL,
  343. 1 => NULL,
  344. 2 => NULL,
  345. 3 => NULL,
  346. ),
  347. 4 =>
  348. array (
  349. 0 => NULL,
  350. ),
  351. 5 =>
  352. array (
  353. 0 => NULL,
  354. ),
  355. 6 =>
  356. array (
  357. 0 => NULL,
  358. ),
  359. );
  360. $this->_subst = array (
  361. -1 =>
  362. array (
  363. 0 => false,
  364. 1 => false,
  365. 2 => false,
  366. 3 => false,
  367. 4 => false,
  368. 5 => false,
  369. ),
  370. 0 =>
  371. array (
  372. ),
  373. 1 =>
  374. array (
  375. 0 => false,
  376. 1 => false,
  377. 2 => false,
  378. 3 => false,
  379. ),
  380. 2 =>
  381. array (
  382. 0 => false,
  383. 1 => false,
  384. 2 => false,
  385. ),
  386. 3 =>
  387. array (
  388. 0 => false,
  389. 1 => false,
  390. 2 => false,
  391. 3 => false,
  392. ),
  393. 4 =>
  394. array (
  395. 0 => false,
  396. ),
  397. 5 =>
  398. array (
  399. 0 => false,
  400. ),
  401. 6 =>
  402. array (
  403. 0 => false,
  404. ),
  405. );
  406. $this->_conditions = array (
  407. );
  408. $this->_kwmap = array (
  409. 'propertyValue' => 'string',
  410. 'namedcolor' => 'var',
  411. );
  412. $this->_defClass = 'code';
  413. $this->_checkDefines();
  414. }
  415. }