awk.syntax 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. # AWK syntax by
  2. # Olegarch <olegarch@mail.ru>
  3. # Andres Farfan, <nafraf@linuxmail.org>
  4. # Ilia Maslakov <il.smind gmail com>
  5. #
  6. # (c) 2003, 2004, 2009
  7. # GPL v2
  8. #
  9. context default
  10. keyword whole linestart #!\[\s\]/bin/\[msg\]awk yellow magenta
  11. keyword whole linestart #!\[\s\]/usr/bin/\[msg\]awk yellow magenta
  12. # Keywords
  13. keyword whole AMNOISE white
  14. keyword whole BEGIN white
  15. keyword whole END white
  16. keyword whole func white
  17. keyword whole function white
  18. keyword whole nextfile white
  19. keyword whole return white/26
  20. keyword whole print white/26
  21. keyword whole printf white/26
  22. keyword whole if white/26
  23. keyword whole else white/26
  24. keyword whole while white/26
  25. keyword whole for white/26
  26. keyword whole in white/26
  27. keyword whole do white/26
  28. keyword whole break white/26
  29. keyword whole continue white/26
  30. keyword whole next white/26
  31. keyword whole exit white/26
  32. keyword whole close white/26
  33. keyword whole system white/26
  34. keyword whole getline white/26
  35. # Builtin functions:
  36. keyword whole atan2 white black
  37. keyword whole cos white black
  38. keyword whole exp white black
  39. keyword whole int white black
  40. keyword whole log white black
  41. keyword whole rand white black
  42. keyword whole sin white black
  43. keyword whole sqrt white black
  44. keyword whole srand white black
  45. keyword whole gsub white black
  46. keyword whole index white black
  47. keyword whole length white black
  48. keyword whole match white black
  49. keyword whole split white black
  50. keyword whole sprintf white black
  51. keyword whole sub white black
  52. keyword whole substr white black
  53. keyword whole asort white black
  54. keyword whole asorti white black
  55. keyword whole xor white
  56. keyword whole and white
  57. keyword whole or white
  58. # Gawk builtin functions:
  59. keyword whole fflush white black
  60. keyword whole gensub white black
  61. keyword whole tolower white black
  62. keyword whole toupper white black
  63. keyword whole systime white black
  64. keyword whole strftime white black
  65. keyword whole strtonum white
  66. keyword whole bindtextdomain white
  67. keyword whole dcgettext white
  68. keyword whole dcngettext white
  69. keyword whole compl white
  70. keyword whole delete white
  71. keyword whole extension white
  72. keyword whole mktime white
  73. keyword whole lshift white
  74. keyword whole rshift white
  75. # Builtin variables:
  76. keyword whole ARGIND brightblue
  77. keyword whole BINMODE brightblue
  78. keyword whole CONVFMT brightblue
  79. keyword whole ENVIRON brightblue
  80. keyword whole LINT brightblue
  81. keyword whole TEXTDOMAIN brightblue
  82. keyword whole ARGC brightblue
  83. keyword whole ARGV brightblue
  84. keyword whole FILENAME brightblue
  85. keyword whole FNR brightblue
  86. keyword whole FS brightblue
  87. keyword whole NF brightblue
  88. keyword whole NR brightblue
  89. keyword whole OFMT brightblue
  90. keyword whole OFS brightblue
  91. keyword whole ORS brightblue
  92. keyword whole RLENGTH brightblue
  93. keyword whole RS brightblue
  94. keyword whole RSTART brightblue
  95. keyword whole SUBSEP brightblue
  96. # Gawk builtin variables:
  97. keyword whole ARGIND brightblue
  98. keyword whole ERRNO brightblue
  99. keyword whole RT brightblue
  100. keyword whole IGNORECASE brightblue
  101. keyword whole FIELDWIDTHS brightblue
  102. keyword '\s' brightgreen/16
  103. keyword '+' brightgreen/16
  104. keyword > yellow/24
  105. keyword < yellow/24
  106. keyword \+ yellow/24
  107. keyword - yellow/24
  108. keyword \* yellow/24
  109. keyword % yellow/24
  110. keyword = yellow/24
  111. keyword != yellow/24
  112. keyword == yellow/24
  113. keyword { white/25
  114. keyword } white/25
  115. keyword ( white/25
  116. keyword ) white/25
  117. keyword [*] magenta
  118. keyword , white/25
  119. keyword : white/25
  120. keyword ; lightgray/19
  121. keyword $\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\] brightred/18
  122. # Begin/End:
  123. keyword whole BEGIN red
  124. keyword whole END red
  125. # Function keyword:
  126. keyword whole function brightmagenta
  127. # Hex constant:
  128. keyword 0\{xX\}\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\] magenta/6
  129. # Tab: \t
  130. # keyword linestart \t lightgray/13 blue/6
  131. # Sed:
  132. keyword linestart /^ red
  133. keyword linestart /^# red
  134. context /^#*/ red
  135. # Comments:
  136. context linestart # \n brown
  137. context linestart $ \n brown
  138. # String:
  139. context " " green/6
  140. keyword \\" brightgreen/16
  141. keyword \\\n brightgreen/16
  142. keyword %% brightgreen/16
  143. keyword %\[#0\s-\+,\]\[0123456789\]\[.\]\[0123456789\]\[L\]\{eEfgGoxX\} brightgreen/16
  144. keyword %\[0\s-\+,\]\[0123456789\]\[.\]\[0123456789\]\[hl\]\{diu\} brightgreen/16
  145. keyword %\[hl\]n brightgreen/16
  146. keyword %\[.\]\[0123456789\]s brightgreen/16
  147. keyword %[*] brightgreen/16
  148. keyword %c brightgreen/16
  149. keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen/16
  150. keyword \\\\ brightgreen/16
  151. keyword \\' brightgreen/16
  152. keyword \\\{abtnvfr\} brightgreen/16