KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

299 lines
14KB

  1. <?php
  2. /*************************************************************************************
  3. * cfm.php
  4. * -------
  5. * Author: Diego
  6. * Copyright: (c) 2006 Diego
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2006/02/25
  9. *
  10. * ColdFusion language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. * 2006/02/25 (1.0.0)
  15. * - First Release
  16. *
  17. * TODO (updated 2006/02/25)
  18. * -------------------------
  19. *
  20. *************************************************************************************
  21. *
  22. * This file is part of GeSHi.
  23. *
  24. * GeSHi is free software; you can redistribute it and/or modify
  25. * it under the terms of the GNU General Public License as published by
  26. * the Free Software Foundation; either version 2 of the License, or
  27. * (at your option) any later version.
  28. *
  29. * GeSHi is distributed in the hope that it will be useful,
  30. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  31. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  32. * GNU General Public License for more details.
  33. *
  34. * You should have received a copy of the GNU General Public License
  35. * along with GeSHi; if not, write to the Free Software
  36. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  37. *
  38. ************************************************************************************/
  39. $language_data = array (
  40. 'LANG_NAME' => 'ColdFusion',
  41. 'COMMENT_SINGLE' => array(1 => '//'),
  42. 'COMMENT_MULTI' => array('/*' => '*/'),
  43. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  44. 'QUOTEMARKS' => array("'", '"'),
  45. 'ESCAPE_CHAR' => '\\',
  46. 'KEYWORDS' => array(
  47. /* CFM Tags */
  48. 1 => array(
  49. 'cfabort', 'cfapplet', 'cfapplication', 'cfargument', 'cfassociate',
  50. 'cfbreak', 'cfcache', 'cfcase', 'cfcatch', 'cfchart', 'cfchartdata',
  51. 'cfchartseries', 'cfcol', 'cfcollection', 'cfcomponent',
  52. 'cfcontent', 'cfcookie', 'cfdefaultcase', 'cfdirectory',
  53. 'cfdocument', 'cfdocumentitem', 'cfdocumentsection', 'cfdump',
  54. 'cfelse', 'cfelseif', 'cferror', 'cfexecute', 'cfexit', 'cffile',
  55. 'cfflush', 'cfform', 'cfformgroup', 'cfformitem', 'cfftp',
  56. 'cffunction', 'cfgrid', 'cfgridcolumn', 'cfgridrow', 'cfgridupdate',
  57. 'cfheader', 'cfhtmlhead', 'cfhttp', 'cfhttpparam', 'cfif',
  58. 'cfimport', 'cfinclude', 'cfindex', 'cfinput', 'cfinsert',
  59. 'cfinvoke', 'cfinvokeargument', 'cfldap', 'cflocation', 'cflock',
  60. 'cflog', 'cflogin', 'cfloginuser', 'cflogout', 'cfloop', 'cfmail',
  61. 'cfmailparam', 'cfmailpart', 'cfmodule', 'cfNTauthenticate',
  62. 'cfobject', 'cfobjectcache', 'cfoutput', 'cfparam', 'cfpop',
  63. 'cfprocessingdirective', 'cfprocparam',
  64. 'cfprocresult', 'cfproperty', 'cfquery', 'cfqueryparam',
  65. 'cfregistry', 'cfreport', 'cfreportparam', 'cfrethrow', 'cfreturn',
  66. 'cfsavecontent', 'cfschedule', 'cfscript', 'cfsearch', 'cfselect',
  67. 'cfset', 'cfsetting', 'cfsilent', 'cfstoredproc',
  68. 'cfswitch', 'cftable', 'cftextarea', 'cfthrow', 'cftimer',
  69. 'cftrace', 'cftransaction', 'cftree', 'cftreeitem', 'cftry',
  70. 'cfupdate', 'cfwddx'
  71. ),
  72. /* HTML Tags */
  73. 2 => array(
  74. 'a', 'abbr', 'acronym', 'address', 'applet',
  75. 'base', 'basefont', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'b',
  76. 'caption', 'center', 'cite', 'code', 'colgroup', 'col',
  77. 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt',
  78. 'em',
  79. 'fieldset', 'font', 'form', 'frame', 'frameset',
  80. 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html',
  81. 'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i',
  82. 'kbd',
  83. 'label', 'legend', 'link', 'li',
  84. 'map', 'meta',
  85. 'noframes', 'noscript',
  86. 'object', 'ol', 'optgroup', 'option',
  87. 'param', 'pre', 'p',
  88. 'q',
  89. 'samp', 'script', 'select', 'small', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 's',
  90. 'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'tt',
  91. 'ul', 'u',
  92. 'var',
  93. ),
  94. /* HTML attributes */
  95. 3 => array(
  96. 'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis',
  97. 'background', 'bgcolor', 'border',
  98. 'cellpadding', 'cellspacing', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords',
  99. 'data', 'datetime', 'declare', 'defer', 'dir', 'disabled',
  100. 'enctype',
  101. 'face', 'for', 'frame', 'frameborder',
  102. 'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv',
  103. 'id', 'ismap',
  104. 'label', 'lang', 'language', 'link', 'longdesc',
  105. 'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple',
  106. 'name', 'nohref', 'noresize', 'noshade', 'nowrap',
  107. 'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload',
  108. 'profile', 'prompt',
  109. 'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules',
  110. 'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary',
  111. 'tabindex', 'target', 'text', 'title', 'type',
  112. 'usemap',
  113. 'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace',
  114. 'width'
  115. ),
  116. /* CFM Script delimeters */
  117. 4 => array(
  118. 'var', 'function', 'while', 'if','else'
  119. ),
  120. /* CFM Functions */
  121. 5 => array(
  122. 'Abs', 'GetFunctionList', 'LSTimeFormat','ACos','GetGatewayHelper','LTrim','AddSOAPRequestHeader','GetHttpRequestData',
  123. 'Max','AddSOAPResponseHeader','GetHttpTimeString','Mid','ArrayAppend','GetLocale','Min','ArrayAvg','GetLocaleDisplayName',
  124. 'Minute','ArrayClear','GetMetaData','Month','ArrayDeleteAt','GetMetricData','MonthAsString','ArrayInsertAt','GetPageContext',
  125. 'Now','ArrayIsEmpty','GetProfileSections','NumberFormat','ArrayLen','GetProfileString','ParagraphFormat','ArrayMax',
  126. 'GetLocalHostIP','ParseDateTime','ArrayMin','GetSOAPRequest','Pi','ArrayNew','GetSOAPRequestHeader','PreserveSingleQuotes',
  127. 'ArrayPrepend','GetSOAPResponse','Quarter','ArrayResize','GetSOAPResponseHeader','QueryAddColumn','ArraySet',
  128. 'GetTempDirectory','QueryAddRow','ArraySort','QueryNew','ArraySum','GetTempFile','QuerySetCell',
  129. 'ArraySwap','GetTickCount','QuotedValueList','ArrayToList','GetTimeZoneInfo','Rand','Asc','GetToken','Randomize',
  130. 'ASin','Hash','RandRange','Atn','Hour','REFind','BinaryDecode','HTMLCodeFormat','REFindNoCase','BinaryEncode',
  131. 'HTMLEditFormat','ReleaseComObject','BitAnd','IIf','RemoveChars','BitMaskClear','IncrementValue','RepeatString',
  132. 'BitMaskRead','InputBaseN','Replace','BitMaskSet','Insert','ReplaceList','BitNot','Int','ReplaceNoCase','BitOr',
  133. 'IsArray','REReplace','BitSHLN','IsBinary','REReplaceNoCase','BitSHRN','IsBoolean','Reverse','BitXor','IsCustomFunction',
  134. 'Right','Ceiling','IsDate','RJustify','CharsetDecode','IsDebugMode','Round','CharsetEncode','IsDefined','RTrim',
  135. 'Chr','IsLeapYear','Second','CJustify','IsLocalHost','SendGatewayMessage','Compare','IsNumeric','SetEncoding',
  136. 'CompareNoCase','IsNumericDate','SetLocale','Cos','IsObject','SetProfileString','CreateDate','IsQuery','SetVariable',
  137. 'CreateDateTime','IsSimpleValue','Sgn','CreateObject','IsSOAPRequest','Sin','CreateODBCDate','IsStruct','SpanExcluding',
  138. 'CreateODBCDateTime','IsUserInRole','SpanIncluding','CreateODBCTime','IsValid','Sqr','CreateTime','IsWDDX','StripCR',
  139. 'CreateTimeSpan','IsXML','StructAppend','CreateUUID','IsXmlAttribute','StructClear','DateAdd','IsXmlDoc','StructCopy',
  140. 'DateCompare','IsXmlElem','StructCount','DateConvert','IsXmlNode','StructDelete','DateDiff','IsXmlRoot','StructFind',
  141. 'DateFormat','JavaCast','StructFindKey','DatePart','JSStringFormat','StructFindValue','Day','LCase','StructGet',
  142. 'DayOfWeek','Left','StructInsert','DayOfWeekAsString','Len','StructIsEmpty','DayOfYear','ListAppend','StructKeyArray',
  143. 'DaysInMonth','ListChangeDelims','StructKeyExists','DaysInYear','ListContains','StructKeyList','DE','ListContainsNoCase',
  144. 'StructNew','DecimalFormat','ListDeleteAt','StructSort','DecrementValue','ListFind','StructUpdate','Decrypt','ListFindNoCase',
  145. 'Tan','DecryptBinary','ListFirst','TimeFormat','DeleteClientVariable','ListGetAt','ToBase64','DirectoryExists',
  146. 'ListInsertAt','ToBinary','DollarFormat','ListLast','ToScript','Duplicate','ListLen','ToString','Encrypt','ListPrepend',
  147. 'Trim','EncryptBinary','ListQualify','UCase','Evaluate','ListRest','URLDecode','Exp','ListSetAt','URLEncodedFormat',
  148. 'ExpandPath','ListSort','URLSessionFormat','FileExists','ListToArray','Val','Find','ListValueCount','ValueList',
  149. 'FindNoCase','ListValueCountNoCase','Week','FindOneOf','LJustify','Wrap','FirstDayOfMonth','Log','WriteOutput',
  150. 'Fix','Log10','XmlChildPos','FormatBaseN','LSCurrencyFormat','XmlElemNew','GetAuthUser','LSDateFormat','XmlFormat',
  151. 'GetBaseTagData','LSEuroCurrencyFormat','XmlGetNodeType','GetBaseTagList','LSIsCurrency','XmlNew','GetBaseTemplatePath',
  152. 'LSIsDate','XmlParse','GetClientVariablesList','LSIsNumeric','XmlSearch','GetCurrentTemplatePath','LSNumberFormat',
  153. 'XmlTransform','GetDirectoryFromPath','LSParseCurrency','XmlValidate','GetEncoding','LSParseDateTime','Year',
  154. 'GetException','LSParseEuroCurrency','YesNoFormat','GetFileFromPath','LSParseNumber'
  155. ),
  156. /* CFM Attributes */
  157. 6 => array(
  158. 'dbtype','connectstring','datasource','username','password','query','delimeter','description','required','hint','default','access','from','to','list','index'
  159. ),
  160. 7 => array(
  161. 'EQ', 'GT', 'LT', 'GTE', 'LTE', 'IS', 'LIKE', 'NEQ'
  162. )
  163. ),
  164. 'SYMBOLS' => array(
  165. '/', '=', '{', '}', '(', ')', '[', ']', '<', '>', '&'
  166. ),
  167. 'CASE_SENSITIVE' => array(
  168. GESHI_COMMENTS => false,
  169. 1 => false,
  170. 2 => false,
  171. 3 => false,
  172. 4 => false,
  173. 5 => false,
  174. 6 => false,
  175. 7 => false
  176. ),
  177. 'STYLES' => array(
  178. 'KEYWORDS' => array(
  179. 1 => 'color: #990000; font-weight: bold;',
  180. 2 => 'color: #000000; font-weight: bold;',
  181. 3 => 'color: #0000FF;',
  182. 4 => 'color: #000000; font-weight: bold;',
  183. 5 => 'color: #0000FF;',
  184. 6 => 'color: #0000FF;',
  185. 7 => 'color: #0000FF;'
  186. ),
  187. 'COMMENTS' => array(
  188. 1 => 'color: #808080; font-style: italic;',
  189. 'MULTI' => 'color: #808080; font-style: italic;'
  190. ),
  191. 'ESCAPE_CHAR' => array(
  192. 0 => 'color: #000099; font-weight: bold;'
  193. ),
  194. 'BRACKETS' => array(
  195. 0 => 'color: #0000FF;'
  196. ),
  197. 'STRINGS' => array(
  198. 0 => 'color: #009900;'
  199. ),
  200. 'NUMBERS' => array(
  201. 0 => 'color: #FF0000;'
  202. ),
  203. 'METHODS' => array(
  204. ),
  205. 'SYMBOLS' => array(
  206. 0 => 'color: #0000FF;'
  207. ),
  208. 'SCRIPT' => array(
  209. 0 => 'color: #808080; font-style: italic;',
  210. 1 => 'color: #00bbdd;',
  211. 2 => 'color: #0000FF;',
  212. 3 => 'color: #000099;',
  213. 4 => 'color: #333333;',
  214. 5 => 'color: #333333;'
  215. ),
  216. 'REGEXPS' => array(
  217. )
  218. ),
  219. 'URLS' => array(
  220. 1 => '',
  221. 2 => 'http://december.com/html/4/element/{FNAMEL}.html',
  222. 3 => '',
  223. 4 => '',
  224. 5 => '',
  225. 6 => '',
  226. 7 => ''
  227. ),
  228. 'OOLANG' => false,
  229. 'OBJECT_SPLITTERS' => array(
  230. ),
  231. 'REGEXPS' => array(
  232. ),
  233. 'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
  234. 'SCRIPT_DELIMITERS' => array(
  235. 0 => array(
  236. '<!--' => '-->'
  237. ),
  238. 1 => array(
  239. '<!DOCTYPE' => '>'
  240. ),
  241. 2 => "/(?!<#)(?:(?:##)*)(#)[a-zA-Z0-9_\.\(\)]+(#)/",
  242. 3 => array(
  243. '<cfscript>' => '</cfscript>'
  244. ),
  245. 4 => array(
  246. '<' => '>'
  247. ),
  248. 5 => '/((?!<!)<)(?:"[^"]*"|\'[^\']*\'|(?R)|[^">])+?(>)/si'
  249. ),
  250. 'HIGHLIGHT_STRICT_BLOCK' => array(
  251. 0 => false,
  252. 1 => false,
  253. 2 => true,
  254. 3 => true,
  255. 4 => true,
  256. 5 => true
  257. ),
  258. 'PARSER_CONTROL' => array(
  259. 'KEYWORDS' => array(
  260. 1 => array(
  261. 'DISALLOWED_BEFORE' => '(?<=&lt;|&lt;\/)',
  262. 'DISALLOWED_AFTER' => '(?=\s|\/|&gt;)',
  263. ),
  264. 2 => array(
  265. 'DISALLOWED_BEFORE' => '(?<=&lt;|&lt;\/)',
  266. 'DISALLOWED_AFTER' => '(?=\s|\/|&gt;)',
  267. ),
  268. 3 => array(
  269. 'DISALLOWED_BEFORE' => '(?<![a-zA-Z0-9\$_\|\#>|^])', // allow ; before keywords
  270. 'DISALLOWED_AFTER' => '(?![a-zA-Z0-9_\|%\\-])', // allow & after keywords
  271. ),
  272. 7 => array(
  273. 'DISALLOWED_BEFORE' => '(?<![a-zA-Z0-9\$_\|\#>&|^])', // allow ; before keywords
  274. 'DISALLOWED_AFTER' => '(?![a-zA-Z0-9_\|%\\-])', // allow & after keywords
  275. )
  276. )
  277. )
  278. );
  279. ?>