PageRenderTime 24ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/yii/framework/vendors/TextHighlighter/Text/Highlighter/SQL.php

https://github.com/joshuaswarren/weatherhub
PHP | 401 lines | 358 code | 4 blank | 39 comment | 0 complexity | a88962714f90f3ee28d20cc252e2de15 MD5 | raw file
  1. <?php
  2. /**
  3. * Auto-generated class. SQL syntax highlighting
  4. *
  5. * Based on SQL-99
  6. *
  7. * PHP version 4 and 5
  8. *
  9. * LICENSE: This source file is subject to version 3.0 of the PHP license
  10. * that is available through the world-wide-web at the following URI:
  11. * http://www.php.net/license/3_0.txt. If you did not receive a copy of
  12. * the PHP License and are unable to obtain it through the web, please
  13. * send a note to license@php.net so we can mail you a copy immediately.
  14. *
  15. * @copyright 2004-2006 Andrey Demenev
  16. * @license http://www.php.net/license/3_0.txt PHP License
  17. * @link http://pear.php.net/package/Text_Highlighter
  18. * @category Text
  19. * @package Text_Highlighter
  20. * @version generated from: : sql.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp
  21. * @author Andrey Demenev <demenev@gmail.com>
  22. *
  23. */
  24. /**
  25. * Auto-generated class. SQL syntax highlighting
  26. *
  27. * @author Andrey Demenev <demenev@gmail.com>
  28. * @category Text
  29. * @package Text_Highlighter
  30. * @copyright 2004-2006 Andrey Demenev
  31. * @license http://www.php.net/license/3_0.txt PHP License
  32. * @version Release: 0.7.1
  33. * @link http://pear.php.net/package/Text_Highlighter
  34. */
  35. class Text_Highlighter_SQL extends Text_Highlighter
  36. {
  37. var $_language = 'sql';
  38. /**
  39. * Constructor
  40. *
  41. * @param array $options
  42. * @access public
  43. */
  44. function __construct($options=array())
  45. {
  46. $this->_options = $options;
  47. $this->_regs = array (
  48. -1 => '/((?i)`)|((?i)\\/\\*)|((?i)(#|--\\s).*)|((?i)[a-z_]\\w*)|((?i)")|((?i)\\()|((?i)\')|((?i)((\\d+|((\\d*\\.\\d+)|(\\d+\\.\\d*)))[eE][+-]?\\d+))|((?i)(\\d*\\.\\d+)|(\\d+\\.\\d*))|((?i)\\d+l?|\\b0l?\\b)|((?i)0[xX][\\da-f]+l?)/',
  49. 0 => '//',
  50. 1 => '//',
  51. 2 => '/((?i)\\\\.)/',
  52. 3 => '/((?i)`)|((?i)\\/\\*)|((?i)(#|--\\s).*)|((?i)[a-z_]\\w*)|((?i)")|((?i)\\()|((?i)\')|((?i)((\\d+|((\\d*\\.\\d+)|(\\d+\\.\\d*)))[eE][+-]?\\d+))|((?i)(\\d*\\.\\d+)|(\\d+\\.\\d*))|((?i)\\d+l?|\\b0l?\\b)|((?i)0[xX][\\da-f]+l?)/',
  53. 4 => '/((?i)\\\\.)/',
  54. );
  55. $this->_counts = array (
  56. -1 =>
  57. array (
  58. 0 => 0,
  59. 1 => 0,
  60. 2 => 1,
  61. 3 => 0,
  62. 4 => 0,
  63. 5 => 0,
  64. 6 => 0,
  65. 7 => 5,
  66. 8 => 2,
  67. 9 => 0,
  68. 10 => 0,
  69. ),
  70. 0 =>
  71. array (
  72. ),
  73. 1 =>
  74. array (
  75. ),
  76. 2 =>
  77. array (
  78. 0 => 0,
  79. ),
  80. 3 =>
  81. array (
  82. 0 => 0,
  83. 1 => 0,
  84. 2 => 1,
  85. 3 => 0,
  86. 4 => 0,
  87. 5 => 0,
  88. 6 => 0,
  89. 7 => 5,
  90. 8 => 2,
  91. 9 => 0,
  92. 10 => 0,
  93. ),
  94. 4 =>
  95. array (
  96. 0 => 0,
  97. ),
  98. );
  99. $this->_delim = array (
  100. -1 =>
  101. array (
  102. 0 => 'quotes',
  103. 1 => 'comment',
  104. 2 => '',
  105. 3 => '',
  106. 4 => 'quotes',
  107. 5 => 'brackets',
  108. 6 => 'quotes',
  109. 7 => '',
  110. 8 => '',
  111. 9 => '',
  112. 10 => '',
  113. ),
  114. 0 =>
  115. array (
  116. ),
  117. 1 =>
  118. array (
  119. ),
  120. 2 =>
  121. array (
  122. 0 => '',
  123. ),
  124. 3 =>
  125. array (
  126. 0 => 'quotes',
  127. 1 => 'comment',
  128. 2 => '',
  129. 3 => '',
  130. 4 => 'quotes',
  131. 5 => 'brackets',
  132. 6 => 'quotes',
  133. 7 => '',
  134. 8 => '',
  135. 9 => '',
  136. 10 => '',
  137. ),
  138. 4 =>
  139. array (
  140. 0 => '',
  141. ),
  142. );
  143. $this->_inner = array (
  144. -1 =>
  145. array (
  146. 0 => 'identifier',
  147. 1 => 'comment',
  148. 2 => 'comment',
  149. 3 => 'identifier',
  150. 4 => 'string',
  151. 5 => 'code',
  152. 6 => 'string',
  153. 7 => 'number',
  154. 8 => 'number',
  155. 9 => 'number',
  156. 10 => 'number',
  157. ),
  158. 0 =>
  159. array (
  160. ),
  161. 1 =>
  162. array (
  163. ),
  164. 2 =>
  165. array (
  166. 0 => 'special',
  167. ),
  168. 3 =>
  169. array (
  170. 0 => 'identifier',
  171. 1 => 'comment',
  172. 2 => 'comment',
  173. 3 => 'identifier',
  174. 4 => 'string',
  175. 5 => 'code',
  176. 6 => 'string',
  177. 7 => 'number',
  178. 8 => 'number',
  179. 9 => 'number',
  180. 10 => 'number',
  181. ),
  182. 4 =>
  183. array (
  184. 0 => 'special',
  185. ),
  186. );
  187. $this->_end = array (
  188. 0 => '/(?i)`/',
  189. 1 => '/(?i)\\*\\//',
  190. 2 => '/(?i)"/',
  191. 3 => '/(?i)\\)/',
  192. 4 => '/(?i)\'/',
  193. );
  194. $this->_states = array (
  195. -1 =>
  196. array (
  197. 0 => 0,
  198. 1 => 1,
  199. 2 => -1,
  200. 3 => -1,
  201. 4 => 2,
  202. 5 => 3,
  203. 6 => 4,
  204. 7 => -1,
  205. 8 => -1,
  206. 9 => -1,
  207. 10 => -1,
  208. ),
  209. 0 =>
  210. array (
  211. ),
  212. 1 =>
  213. array (
  214. ),
  215. 2 =>
  216. array (
  217. 0 => -1,
  218. ),
  219. 3 =>
  220. array (
  221. 0 => 0,
  222. 1 => 1,
  223. 2 => -1,
  224. 3 => -1,
  225. 4 => 2,
  226. 5 => 3,
  227. 6 => 4,
  228. 7 => -1,
  229. 8 => -1,
  230. 9 => -1,
  231. 10 => -1,
  232. ),
  233. 4 =>
  234. array (
  235. 0 => -1,
  236. ),
  237. );
  238. $this->_keywords = array (
  239. -1 =>
  240. array (
  241. 0 => -1,
  242. 1 => -1,
  243. 2 =>
  244. array (
  245. ),
  246. 3 =>
  247. array (
  248. 'reserved' => '/^((?i)absolute|action|add|admin|after|aggregate|alias|all|allocate|alter|and|any|are|array|as|asc|assertion|at|authorization|before|begin|binary|bit|blob|boolean|both|breadth|by|call|cascade|cascaded|case|cast|catalog|char|character|check|class|clob|close|collate|collation|column|commit|completion|connect|connection|constraint|constraints|constructor|continue|corresponding|create|cross|cube|current|current_date|current_path|current_role|current_time|current_timestamp|current_user|cursor|cycle|data|date|day|deallocate|dec|decimal|declare|default|deferrable|deferred|delete|depth|deref|desc|describe|descriptor|destroy|destructor|deterministic|diagnostics|dictionary|disconnect|distinct|domain|double|drop|dynamic|each|else|end|end-exec|equals|escape|every|except|exception|exec|execute|external|false|fetch|first|float|for|foreign|found|free|from|full|function|general|get|global|go|goto|grant|group|grouping|having|host|hour|identity|ignore|immediate|in|indicator|initialize|initially|inner|inout|input|insert|int|integer|intersect|interval|into|is|isolation|iterate|join|key|language|large|last|lateral|leading|left|less|level|like|limit|local|localtime|localtimestamp|locator|map|match|minute|modifies|modify|module|month|names|national|natural|nchar|nclob|new|next|no|none|not|null|numeric|object|of|off|old|on|only|open|operation|option|or|order|ordinality|out|outer|output|pad|parameter|parameters|partial|path|postfix|precision|prefix|preorder|prepare|preserve|primary|prior|privileges|procedure|public|read|reads|real|recursive|ref|references|referencing|relative|restrict|result|return|returns|revoke|right|role|rollback|rollup|routine|row|rows|savepoint|schema|scope|scroll|search|second|section|select|sequence|session|session_user|set|sets|size|smallint|some|space|specific|specifictype|sql|sqlexception|sqlstate|sqlwarning|start|state|statement|static|structure|system_user|table|temporary|terminate|than|then|time|timestamp|timezone_hour|timezone_minute|to|trailing|transaction|translation|treat|trigger|true|under|union|unique|unknown|unnest|update|usage|user|using|value|values|varchar|variable|varying|view|when|whenever|where|with|without|work|write|year|zone)$/',
  249. 'keyword' => '/^((?i)abs|ada|asensitive|assignment|asymmetric|atomic|avg|between|bitvar|bit_length|c|called|cardinality|catalog_name|chain|character_length|character_set_catalog|character_set_name|character_set_schema|char_length|checked|class_origin|coalesce|cobol|collation_catalog|collation_name|collation_schema|column_name|command_function|command_function_code|committed|condition_number|connection_name|constraint_catalog|constraint_name|constraint_schema|contains|convert|count|cursor_name|datetime_interval_code|datetime_interval_precision|defined|definer|dispatch|dynamic_function|dynamic_function_code|existing|exists|extract|final|fortran|g|generated|granted|hierarchy|hold|implementation|infix|insensitive|instance|instantiable|invoker|k|key_member|key_type|length|lower|m|max|message_length|message_octet_length|message_text|method|min|mod|more|mumps|name|nullable|nullif|number|octet_length|options|overlaps|overlay|overriding|parameter_mode|parameter_name|parameter_ordinal_position|parameter_specific_catalog|parameter_specific_name|parameter_specific_schema|pascal|pli|position|repeatable|returned_length|returned_octet_length|returned_sqlstate|routine_catalog|routine_name|routine_schema|row_count|scale|schema_name|security|self|sensitive|serializable|server_name|similar|simple|source|specific_name|style|subclass_origin|sublist|substring|sum|symmetric|system|table_name|transactions_committed|transactions_rolled_back|transaction_active|transform|transforms|translate|trigger_catalog|trigger_name|trigger_schema|trim|type|uncommitted|unnamed|upper|user_defined_type_catalog|user_defined_type_name|user_defined_type_schema)$/',
  250. ),
  251. 4 => -1,
  252. 5 => -1,
  253. 6 => -1,
  254. 7 =>
  255. array (
  256. ),
  257. 8 =>
  258. array (
  259. ),
  260. 9 =>
  261. array (
  262. ),
  263. 10 =>
  264. array (
  265. ),
  266. ),
  267. 0 =>
  268. array (
  269. ),
  270. 1 =>
  271. array (
  272. ),
  273. 2 =>
  274. array (
  275. 0 =>
  276. array (
  277. ),
  278. ),
  279. 3 =>
  280. array (
  281. 0 => -1,
  282. 1 => -1,
  283. 2 =>
  284. array (
  285. ),
  286. 3 =>
  287. array (
  288. 'reserved' => '/^((?i)absolute|action|add|admin|after|aggregate|alias|all|allocate|alter|and|any|are|array|as|asc|assertion|at|authorization|before|begin|binary|bit|blob|boolean|both|breadth|by|call|cascade|cascaded|case|cast|catalog|char|character|check|class|clob|close|collate|collation|column|commit|completion|connect|connection|constraint|constraints|constructor|continue|corresponding|create|cross|cube|current|current_date|current_path|current_role|current_time|current_timestamp|current_user|cursor|cycle|data|date|day|deallocate|dec|decimal|declare|default|deferrable|deferred|delete|depth|deref|desc|describe|descriptor|destroy|destructor|deterministic|diagnostics|dictionary|disconnect|distinct|domain|double|drop|dynamic|each|else|end|end-exec|equals|escape|every|except|exception|exec|execute|external|false|fetch|first|float|for|foreign|found|free|from|full|function|general|get|global|go|goto|grant|group|grouping|having|host|hour|identity|ignore|immediate|in|indicator|initialize|initially|inner|inout|input|insert|int|integer|intersect|interval|into|is|isolation|iterate|join|key|language|large|last|lateral|leading|left|less|level|like|limit|local|localtime|localtimestamp|locator|map|match|minute|modifies|modify|module|month|names|national|natural|nchar|nclob|new|next|no|none|not|null|numeric|object|of|off|old|on|only|open|operation|option|or|order|ordinality|out|outer|output|pad|parameter|parameters|partial|path|postfix|precision|prefix|preorder|prepare|preserve|primary|prior|privileges|procedure|public|read|reads|real|recursive|ref|references|referencing|relative|restrict|result|return|returns|revoke|right|role|rollback|rollup|routine|row|rows|savepoint|schema|scope|scroll|search|second|section|select|sequence|session|session_user|set|sets|size|smallint|some|space|specific|specifictype|sql|sqlexception|sqlstate|sqlwarning|start|state|statement|static|structure|system_user|table|temporary|terminate|than|then|time|timestamp|timezone_hour|timezone_minute|to|trailing|transaction|translation|treat|trigger|true|under|union|unique|unknown|unnest|update|usage|user|using|value|values|varchar|variable|varying|view|when|whenever|where|with|without|work|write|year|zone)$/',
  289. 'keyword' => '/^((?i)abs|ada|asensitive|assignment|asymmetric|atomic|avg|between|bitvar|bit_length|c|called|cardinality|catalog_name|chain|character_length|character_set_catalog|character_set_name|character_set_schema|char_length|checked|class_origin|coalesce|cobol|collation_catalog|collation_name|collation_schema|column_name|command_function|command_function_code|committed|condition_number|connection_name|constraint_catalog|constraint_name|constraint_schema|contains|convert|count|cursor_name|datetime_interval_code|datetime_interval_precision|defined|definer|dispatch|dynamic_function|dynamic_function_code|existing|exists|extract|final|fortran|g|generated|granted|hierarchy|hold|implementation|infix|insensitive|instance|instantiable|invoker|k|key_member|key_type|length|lower|m|max|message_length|message_octet_length|message_text|method|min|mod|more|mumps|name|nullable|nullif|number|octet_length|options|overlaps|overlay|overriding|parameter_mode|parameter_name|parameter_ordinal_position|parameter_specific_catalog|parameter_specific_name|parameter_specific_schema|pascal|pli|position|repeatable|returned_length|returned_octet_length|returned_sqlstate|routine_catalog|routine_name|routine_schema|row_count|scale|schema_name|security|self|sensitive|serializable|server_name|similar|simple|source|specific_name|style|subclass_origin|sublist|substring|sum|symmetric|system|table_name|transactions_committed|transactions_rolled_back|transaction_active|transform|transforms|translate|trigger_catalog|trigger_name|trigger_schema|trim|type|uncommitted|unnamed|upper|user_defined_type_catalog|user_defined_type_name|user_defined_type_schema)$/',
  290. ),
  291. 4 => -1,
  292. 5 => -1,
  293. 6 => -1,
  294. 7 =>
  295. array (
  296. ),
  297. 8 =>
  298. array (
  299. ),
  300. 9 =>
  301. array (
  302. ),
  303. 10 =>
  304. array (
  305. ),
  306. ),
  307. 4 =>
  308. array (
  309. 0 =>
  310. array (
  311. ),
  312. ),
  313. );
  314. $this->_parts = array (
  315. 0 =>
  316. array (
  317. ),
  318. 1 =>
  319. array (
  320. ),
  321. 2 =>
  322. array (
  323. 0 => NULL,
  324. ),
  325. 3 =>
  326. array (
  327. 0 => NULL,
  328. 1 => NULL,
  329. 2 => NULL,
  330. 3 => NULL,
  331. 4 => NULL,
  332. 5 => NULL,
  333. 6 => NULL,
  334. 7 => NULL,
  335. 8 => NULL,
  336. 9 => NULL,
  337. 10 => NULL,
  338. ),
  339. 4 =>
  340. array (
  341. 0 => NULL,
  342. ),
  343. );
  344. $this->_subst = array (
  345. -1 =>
  346. array (
  347. 0 => false,
  348. 1 => false,
  349. 2 => false,
  350. 3 => false,
  351. 4 => false,
  352. 5 => false,
  353. 6 => false,
  354. 7 => false,
  355. 8 => false,
  356. 9 => false,
  357. 10 => false,
  358. ),
  359. 0 =>
  360. array (
  361. ),
  362. 1 =>
  363. array (
  364. ),
  365. 2 =>
  366. array (
  367. 0 => false,
  368. ),
  369. 3 =>
  370. array (
  371. 0 => false,
  372. 1 => false,
  373. 2 => false,
  374. 3 => false,
  375. 4 => false,
  376. 5 => false,
  377. 6 => false,
  378. 7 => false,
  379. 8 => false,
  380. 9 => false,
  381. 10 => false,
  382. ),
  383. 4 =>
  384. array (
  385. 0 => false,
  386. ),
  387. );
  388. $this->_conditions = array (
  389. );
  390. $this->_kwmap = array (
  391. 'reserved' => 'reserved',
  392. 'keyword' => 'var',
  393. );
  394. $this->_defClass = 'code';
  395. $this->_checkDefines();
  396. }
  397. }