PageRenderTime 52ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/external/libvpx/examples/includes/geshi/geshi/csharp.php

https://gitlab.com/brian0218/rk3188_r-box_android4.2.2_sdk
PHP | 249 lines | 204 code | 2 blank | 43 comment | 0 complexity | 6e675e221d4d87202631e98f3e32a170 MD5 | raw file
  1. <?php
  2. /*************************************************************************************
  3. * csharp.php
  4. * ----------
  5. * Author: Alan Juden (alan@judenware.org)
  6. * Copyright: (c) 2004 Alan Juden, Nigel McNie (http://qbnz.com/highlighter/)
  7. * Release Version: 1.0.8.3
  8. * Date Started: 2004/06/04
  9. *
  10. * C# language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. * 2008/05/25 (1.0.7.22)
  15. * - Added highlighting of using and namespace directives as non-OOP
  16. * 2005/01/05 (1.0.1)
  17. * - Used hardquote support for @"..." strings (Cliff Stanford)
  18. * 2004/11/27 (1.0.0)
  19. * - Initial release
  20. *
  21. * TODO (updated 2004/11/27)
  22. * -------------------------
  23. *
  24. *************************************************************************************
  25. *
  26. * This file is part of GeSHi.
  27. *
  28. * GeSHi is free software; you can redistribute it and/or modify
  29. * it under the terms of the GNU General Public License as published by
  30. * the Free Software Foundation; either version 2 of the License, or
  31. * (at your option) any later version.
  32. *
  33. * GeSHi is distributed in the hope that it will be useful,
  34. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  35. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  36. * GNU General Public License for more details.
  37. *
  38. * You should have received a copy of the GNU General Public License
  39. * along with GeSHi; if not, write to the Free Software
  40. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  41. *
  42. ************************************************************************************/
  43. $language_data = array (
  44. 'LANG_NAME' => 'C#',
  45. 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
  46. 'COMMENT_MULTI' => array('/*' => '*/'),
  47. 'COMMENT_REGEXP' => array(
  48. //Using and Namespace directives (basic support)
  49. //Please note that the alias syntax for using is not supported
  50. 3 => '/(?:(?<=using[\\n\\s])|(?<=namespace[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*[a-zA-Z0-9_]+[\n\s]*(?=[;=])/i'),
  51. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  52. 'QUOTEMARKS' => array("'", '"'),
  53. 'HARDQUOTE' => array('@"', '"'),
  54. 'HARDESCAPE' => array('""'),
  55. 'ESCAPE_CHAR' => '\\',
  56. 'KEYWORDS' => array(
  57. 1 => array(
  58. 'as', 'auto', 'base', 'break', 'case', 'catch', 'const', 'continue',
  59. 'default', 'do', 'else', 'event', 'explicit', 'extern', 'false',
  60. 'finally', 'fixed', 'for', 'foreach', 'goto', 'if', 'implicit',
  61. 'in', 'internal', 'lock', 'namespace', 'null', 'operator', 'out',
  62. 'override', 'params', 'partial', 'private', 'protected', 'public',
  63. 'readonly', 'ref', 'return', 'sealed', 'stackalloc', 'static',
  64. 'switch', 'this', 'throw', 'true', 'try', 'unsafe', 'using',
  65. 'virtual', 'void', 'while'
  66. ),
  67. 2 => array(
  68. '#elif', '#endif', '#endregion', '#else', '#error', '#define', '#if',
  69. '#line', '#region', '#undef', '#warning'
  70. ),
  71. 3 => array(
  72. 'checked', 'is', 'new', 'sizeof', 'typeof', 'unchecked'
  73. ),
  74. 4 => array(
  75. 'bool', 'byte', 'char', 'class', 'decimal', 'delegate', 'double',
  76. 'enum', 'float', 'int', 'interface', 'long', 'object', 'sbyte',
  77. 'short', 'string', 'struct', 'uint', 'ulong', 'ushort'
  78. ),
  79. 5 => array(
  80. 'Microsoft.Win32',
  81. 'System',
  82. 'System.CodeDOM',
  83. 'System.CodeDOM.Compiler',
  84. 'System.Collections',
  85. 'System.Collections.Bases',
  86. 'System.ComponentModel',
  87. 'System.ComponentModel.Design',
  88. 'System.ComponentModel.Design.CodeModel',
  89. 'System.Configuration',
  90. 'System.Configuration.Assemblies',
  91. 'System.Configuration.Core',
  92. 'System.Configuration.Install',
  93. 'System.Configuration.Interceptors',
  94. 'System.Configuration.Schema',
  95. 'System.Configuration.Web',
  96. 'System.Core',
  97. 'System.Data',
  98. 'System.Data.ADO',
  99. 'System.Data.Design',
  100. 'System.Data.Internal',
  101. 'System.Data.SQL',
  102. 'System.Data.SQLTypes',
  103. 'System.Data.XML',
  104. 'System.Data.XML.DOM',
  105. 'System.Data.XML.XPath',
  106. 'System.Data.XML.XSLT',
  107. 'System.Diagnostics',
  108. 'System.Diagnostics.SymbolStore',
  109. 'System.DirectoryServices',
  110. 'System.Drawing',
  111. 'System.Drawing.Design',
  112. 'System.Drawing.Drawing2D',
  113. 'System.Drawing.Imaging',
  114. 'System.Drawing.Printing',
  115. 'System.Drawing.Text',
  116. 'System.Globalization',
  117. 'System.IO',
  118. 'System.IO.IsolatedStorage',
  119. 'System.Messaging',
  120. 'System.Net',
  121. 'System.Net.Sockets',
  122. 'System.NewXml',
  123. 'System.NewXml.XPath',
  124. 'System.NewXml.Xsl',
  125. 'System.Reflection',
  126. 'System.Reflection.Emit',
  127. 'System.Resources',
  128. 'System.Runtime.InteropServices',
  129. 'System.Runtime.InteropServices.Expando',
  130. 'System.Runtime.Remoting',
  131. 'System.Runtime.Serialization',
  132. 'System.Runtime.Serialization.Formatters',
  133. 'System.Runtime.Serialization.Formatters.Binary',
  134. 'System.Security',
  135. 'System.Security.Cryptography',
  136. 'System.Security.Cryptography.X509Certificates',
  137. 'System.Security.Permissions',
  138. 'System.Security.Policy',
  139. 'System.Security.Principal',
  140. 'System.ServiceProcess',
  141. 'System.Text',
  142. 'System.Text.RegularExpressions',
  143. 'System.Threading',
  144. 'System.Timers',
  145. 'System.Web',
  146. 'System.Web.Caching',
  147. 'System.Web.Configuration',
  148. 'System.Web.Security',
  149. 'System.Web.Services',
  150. 'System.Web.Services.Description',
  151. 'System.Web.Services.Discovery',
  152. 'System.Web.Services.Protocols',
  153. 'System.Web.UI',
  154. 'System.Web.UI.Design',
  155. 'System.Web.UI.Design.WebControls',
  156. 'System.Web.UI.Design.WebControls.ListControls',
  157. 'System.Web.UI.HtmlControls',
  158. 'System.Web.UI.WebControls',
  159. 'System.WinForms',
  160. 'System.WinForms.ComponentModel',
  161. 'System.WinForms.Design',
  162. 'System.Xml',
  163. 'System.Xml.Serialization',
  164. 'System.Xml.Serialization.Code',
  165. 'System.Xml.Serialization.Schema'
  166. ),
  167. ),
  168. 'SYMBOLS' => array(
  169. '+', '-', '*', '?', '=', '/', '%', '&', '>', '<', '^', '!', ':', ';',
  170. '(', ')', '{', '}', '[', ']', '|'
  171. ),
  172. 'CASE_SENSITIVE' => array(
  173. GESHI_COMMENTS => false,
  174. 1 => false,
  175. 2 => false,
  176. 3 => false,
  177. 4 => false,
  178. 5 => false,
  179. ),
  180. 'STYLES' => array(
  181. 'KEYWORDS' => array(
  182. 1 => 'color: #0600FF;',
  183. 2 => 'color: #FF8000; font-weight: bold;',
  184. 3 => 'color: #008000;',
  185. 4 => 'color: #FF0000;',
  186. 5 => 'color: #000000;'
  187. ),
  188. 'COMMENTS' => array(
  189. 1 => 'color: #008080; font-style: italic;',
  190. 2 => 'color: #008080;',
  191. 3 => 'color: #008080;',
  192. 'MULTI' => 'color: #008080; font-style: italic;'
  193. ),
  194. 'ESCAPE_CHAR' => array(
  195. 0 => 'color: #008080; font-weight: bold;',
  196. 'HARD' => 'color: #008080; font-weight: bold;'
  197. ),
  198. 'BRACKETS' => array(
  199. 0 => 'color: #000000;'
  200. ),
  201. 'STRINGS' => array(
  202. 0 => 'color: #666666;',
  203. 'HARD' => 'color: #666666;'
  204. ),
  205. 'NUMBERS' => array(
  206. 0 => 'color: #FF0000;'
  207. ),
  208. 'METHODS' => array(
  209. 1 => 'color: #0000FF;',
  210. 2 => 'color: #0000FF;'
  211. ),
  212. 'SYMBOLS' => array(
  213. 0 => 'color: #008000;'
  214. ),
  215. 'REGEXPS' => array(
  216. ),
  217. 'SCRIPT' => array(
  218. )
  219. ),
  220. 'URLS' => array(
  221. 1 => '',
  222. 2 => '',
  223. 3 => 'http://www.google.com/search?q={FNAMEL}+msdn.microsoft.com',
  224. 4 => '',
  225. 5 => ''
  226. ),
  227. 'OOLANG' => true,
  228. 'OBJECT_SPLITTERS' => array(
  229. 1 => '.',
  230. 2 => '::'
  231. ),
  232. 'REGEXPS' => array(
  233. ),
  234. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  235. 'SCRIPT_DELIMITERS' => array(
  236. ),
  237. 'HIGHLIGHT_STRICT_BLOCK' => array(
  238. ),
  239. 'TAB_WIDTH' => 4,
  240. 'PARSER_CONTROL' => array(
  241. 'KEYWORDS' => array(
  242. 'DISALLOWED_BEFORE' => "(?<![a-zA-Z0-9\$_\|\#>|^])",
  243. 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%\\-])"
  244. )
  245. )
  246. );
  247. ?>