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.

awk.php 4.5KB

11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <?php
  2. /************************************************
  3. * awk.php
  4. * -------
  5. * Author: George Pollard (porges@porg.es)
  6. * Copyright: (c) 2009 George Pollard
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2009/01/28
  9. *
  10. * Awk language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. * 2009/01/28 (1.0.8.5)
  15. * - First Release
  16. *
  17. * TODO (updated 2009/01/28)
  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' => 'awk',
  41. 'COMMENT_SINGLE' => array(
  42. 1 => '#'
  43. ),
  44. 'COMMENT_MULTI' => array(),
  45. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  46. 'QUOTEMARKS' => array('"'),
  47. 'ESCAPE_CHAR' => '\\',
  48. 'KEYWORDS' => array (
  49. 1 => array(
  50. 'for', 'in', 'if', 'else', 'while', 'do', 'continue', 'break'
  51. ),
  52. 2 => array(
  53. 'BEGIN', 'END'
  54. ),
  55. 3 => array(
  56. 'ARGC', 'ARGV', 'CONVFMT', 'ENVIRON',
  57. 'FILENAME', 'FNR', 'FS', 'NF', 'NR', 'OFMT',
  58. 'OFS','ORS','RLENGTH','RS','RSTART','SUBSEP'
  59. ),
  60. 4 => array(
  61. 'gsub','index','length','match','split',
  62. 'sprintf','sub','substr','tolower','toupper',
  63. 'atan2','cos','exp','int','log','rand',
  64. 'sin','sqrt','srand'
  65. ),
  66. 5 => array(
  67. 'print','printf','getline','close','fflush','system'
  68. ),
  69. 6 => array(
  70. 'function', 'return'
  71. )
  72. ),
  73. 'SYMBOLS' => array (
  74. 0 => array(
  75. '(',')','[',']','{','}'
  76. ),
  77. 1 => array(
  78. '!','||','&&'
  79. ),
  80. 2 => array(
  81. '<','>','<=','>=','==','!='
  82. ),
  83. 3 => array(
  84. '+','-','*','/','%','^','++','--'
  85. ),
  86. 4 => array(
  87. '~','!~'
  88. ),
  89. 5 => array(
  90. '?',':'
  91. )
  92. ),
  93. 'CASE_SENSITIVE' => array(
  94. GESHI_COMMENTS => false,
  95. 1 => false,
  96. 2 => false,
  97. 3 => false,
  98. 4 => false,
  99. 5 => false,
  100. 6 => false
  101. ),
  102. 'STYLES' => array(
  103. 'KEYWORDS' => array(
  104. 1 => 'color: #000000; font-weight: bold;',
  105. 2 => 'color: #C20CB9; font-weight: bold;',
  106. 3 => 'color: #4107D5; font-weight: bold;',
  107. 4 => 'color: #07D589; font-weight: bold;',
  108. 5 => 'color: #0BD507; font-weight: bold;',
  109. 6 => 'color: #078CD5; font-weight: bold;'
  110. ),
  111. 'COMMENTS' => array(
  112. 1 => 'color:#808080;'
  113. ),
  114. 'ESCAPE_CHAR' => array(
  115. 0 => 'color: #000099; font-weight: bold;'
  116. ),
  117. 'SYMBOLS' => array(
  118. 0 => 'color:black;',
  119. 1 => 'color:black;',
  120. 2 => 'color:black;',
  121. 3 => 'color:black;',
  122. 4 => 'color:#C4C364;',
  123. 5 => 'color:black;font-weight:bold;'),
  124. 'SCRIPT' => array(),
  125. 'REGEXPS' => array(
  126. 0 => 'color:#000088;'
  127. ),
  128. 'STRINGS' => array(
  129. 0 => 'color: #ff0000;'
  130. ),
  131. 'NUMBERS' => array(
  132. 0 => 'color: #000000;'
  133. ),
  134. 'BRACKETS' => array(
  135. 0 => 'color: #7a0874; font-weight: bold;'
  136. ),
  137. 'METHODS' => array()
  138. ),
  139. 'URLS' => array(
  140. 1 => '',
  141. 2 => '',
  142. 3 => '',
  143. 4 => '',
  144. 5 => '',
  145. 6 => ''
  146. ),
  147. 'OOLANG' => false,
  148. 'OBJECT_SPLITTERS' => array (),
  149. 'REGEXPS' => array(
  150. 0 => "\\$[a-zA-Z0-9_]+"
  151. ),
  152. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  153. 'SCRIPT_DELIMITERS' => array (),
  154. 'HIGHLIGHT_STRICT_BLOCK' => array()
  155. );
  156. ?>