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.

161 lines
6.1KB

  1. <?php
  2. /*************************************************************************************
  3. * fortran.php
  4. * -----------
  5. * Author: Cedric Arrabie (cedric.arrabie@univ-pau.fr)
  6. * Copyright: (C) 2006 Cetric Arrabie
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2006/04/22
  9. *
  10. * Fortran language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. * 2008/05/23 (1.0.7.22)
  15. * - Added description of extra language features (SF#1970248)
  16. * 2006/04/20 (1.0.0)
  17. * - First Release
  18. *
  19. * TODO
  20. * -------------------------
  21. * - Get a list of inbuilt functions to add (and explore fortran more
  22. * to complete this rather bare language file)
  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'=>'Fortran',
  45. 'COMMENT_SINGLE'=> array(1 =>'!',2=>'Cf2py'),
  46. 'COMMENT_MULTI'=> array(),
  47. //Fortran Comments
  48. 'COMMENT_REGEXP' => array(1 => '/^C.*?$/mi'),
  49. 'CASE_KEYWORDS'=> GESHI_CAPS_NO_CHANGE,
  50. 'QUOTEMARKS'=> array("'",'"'),
  51. 'ESCAPE_CHAR'=>'\\',
  52. 'KEYWORDS'=> array(
  53. 1 => array(
  54. 'allocate','block','call','case','contains','continue','cycle','deallocate',
  55. 'default','do','else','elseif','elsewhere','end','enddo','endif','endwhere',
  56. 'entry','exit','function','go','goto','if','interface','module','nullify','only',
  57. 'operator','procedure','program','recursive','return','select','stop',
  58. 'subroutine','then','to','where','while',
  59. 'access','action','advance','blank','blocksize','carriagecontrol',
  60. 'delim','direct','eor','err','exist','file','flen','fmt','form','formatted',
  61. 'iostat','name','named','nextrec','nml','number','opened','pad','position',
  62. 'readwrite','recl','sequential','status','unformatted','unit'
  63. ),
  64. 2 => array(
  65. '.AND.','.EQ.','.EQV.','.GE.','.GT.','.LE.','.LT.','.NE.','.NEQV.','.NOT.',
  66. '.OR.','.TRUE.','.FALSE.'
  67. ),
  68. 3 => array(
  69. 'allocatable','character','common','complex','data','dimension','double',
  70. 'equivalence','external','implicit','in','inout','integer','intent','intrinsic',
  71. 'kind','logical','namelist','none','optional','out','parameter','pointer',
  72. 'private','public','real','result','save','sequence','target','type','use'
  73. ),
  74. 4 => array(
  75. 'abs','achar','acos','adjustl','adjustr','aimag','aint','all','allocated',
  76. 'anint','any','asin','atan','atan2','bit_size','break','btest','carg',
  77. 'ceiling','char','cmplx','conjg','cos','cosh','cpu_time','count','cshift',
  78. 'date_and_time','dble','digits','dim','dot_product','dprod dvchk',
  79. 'eoshift','epsilon','error','exp','exponent','floor','flush','fraction',
  80. 'getcl','huge','iachar','iand','ibclr','ibits','ibset','ichar','ieor','index',
  81. 'int','intrup','invalop','ior','iostat_msg','ishft','ishftc','lbound',
  82. 'len','len_trim','lge','lgt','lle','llt','log','log10','matmul','max','maxexponent',
  83. 'maxloc','maxval','merge','min','minexponent','minloc','minval','mod','modulo',
  84. 'mvbits','nbreak','ndperr','ndpexc','nearest','nint','not','offset','ovefl',
  85. 'pack','precfill','precision','present','product','prompt','radix',
  86. 'random_number','random_seed','range','repeat','reshape','rrspacing',
  87. 'scale','scan','segment','selected_int_kind','selected_real_kind',
  88. 'set_exponent','shape','sign','sin','sinh','size','spacing','spread','sqrt',
  89. 'sum system','system_clock','tan','tanh','timer','tiny','transfer','transpose',
  90. 'trim','ubound','undfl','unpack','val','verify'
  91. ),
  92. ),
  93. 'SYMBOLS'=> array(
  94. '(',')','{','}','[',']','=','+','-','*','/','!','%','^','&',':'
  95. ),
  96. 'CASE_SENSITIVE'=> array(
  97. GESHI_COMMENTS => true,
  98. 1 => false,
  99. 2 => false,
  100. 3 => false,
  101. 4 => false,
  102. ),
  103. 'STYLES'=> array(
  104. 'KEYWORDS'=> array(
  105. 1 =>'color: #b1b100;',
  106. 2 =>'color: #000000; font-weight: bold;',
  107. 3 =>'color: #000066;',
  108. 4 =>'color: #993333;'
  109. ),
  110. 'COMMENTS'=> array(
  111. 1 =>'color: #666666; font-style: italic;',
  112. 2 =>'color: #339933;',
  113. 'MULTI'=>'color: #808080; font-style: italic;'
  114. ),
  115. 'ESCAPE_CHAR'=> array(
  116. 0 =>'color: #000099; font-weight: bold;'
  117. ),
  118. 'BRACKETS'=> array(
  119. 0 =>'color: #009900;'
  120. ),
  121. 'STRINGS'=> array(
  122. 0 =>'color: #ff0000;'
  123. ),
  124. 'NUMBERS'=> array(
  125. 0 =>'color: #cc66cc;'
  126. ),
  127. 'METHODS'=> array(
  128. 1 =>'color: #202020;',
  129. 2 =>'color: #202020;'
  130. ),
  131. 'SYMBOLS'=> array(
  132. 0 =>'color: #339933;'
  133. ),
  134. 'REGEXPS'=> array(
  135. ),
  136. 'SCRIPT'=> array(
  137. )
  138. ),
  139. 'URLS'=> array(
  140. 1 =>'',
  141. 2 =>'',
  142. 3 =>'',
  143. 4 =>''
  144. ),
  145. 'OOLANG'=> true,
  146. 'OBJECT_SPLITTERS'=> array(
  147. 1 =>'.',
  148. 2 =>'::'
  149. ),
  150. 'REGEXPS'=> array(
  151. ),
  152. 'STRICT_MODE_APPLIES'=> GESHI_NEVER,
  153. 'SCRIPT_DELIMITERS'=> array(
  154. ),
  155. 'HIGHLIGHT_STRICT_BLOCK'=> array(
  156. )
  157. );
  158. ?>