opencl.syntax 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. # Syntax rules for the C and the C++ programming languages
  2. #
  3. # List of keywords is based on opencl-mode.el from
  4. # Salmane Bah <salmane.bah@u-bordeaux.fr>
  5. context default
  6. keyword whole auto yellow
  7. keyword whole break yellow
  8. keyword whole case yellow
  9. keyword whole char yellow
  10. keyword whole const yellow
  11. keyword whole continue yellow
  12. keyword whole do yellow
  13. keyword whole double yellow
  14. keyword whole else yellow
  15. keyword whole enum yellow
  16. keyword whole extern yellow
  17. keyword whole float yellow
  18. keyword whole for yellow
  19. keyword whole goto yellow
  20. keyword whole if yellow
  21. keyword whole int yellow
  22. keyword whole long yellow
  23. keyword whole register yellow
  24. keyword whole return yellow
  25. keyword whole short yellow
  26. keyword whole signed yellow
  27. keyword whole sizeof yellow
  28. keyword whole static yellow
  29. keyword whole struct yellow
  30. keyword whole switch yellow
  31. keyword whole typedef yellow
  32. keyword whole union yellow
  33. keyword whole unsigned yellow
  34. keyword whole void yellow
  35. keyword whole volatile yellow
  36. keyword whole while yellow
  37. keyword whole asm yellow
  38. keyword whole inline yellow
  39. keyword whole wchar_t yellow
  40. keyword whole ... yellow
  41. keyword whole linestart \{\s\t\}\[\s\t\]#*\n brightmagenta
  42. keyword whole \[\s\t\]default yellow
  43. keyword whole linestart \[\s\t\]\{ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz\}\[0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz\]: cyan
  44. # Function type qualifiers
  45. keyword whole __kernel white
  46. # Variable type qualifiers
  47. keyword whole __global white
  48. keyword whole __local white
  49. keyword whole __constant white
  50. keyword whole __private white
  51. keyword whole __read_only white
  52. keyword whole __write_only white
  53. keyword whole __read_write white
  54. keyword whole __enable white
  55. keyword whole __disable white
  56. keyword whole global white
  57. keyword whole local white
  58. keyword whole constant white
  59. keyword whole private white
  60. keyword whole read_only white
  61. keyword whole write_only white
  62. keyword whole read_write white
  63. keyword whole enable white
  64. keyword whole disable white
  65. # Built-in functions
  66. keyword whole get_group_id brightmagenta
  67. keyword whole get_local_id brightmagenta
  68. keyword whole get_global_id brightmagenta
  69. keyword whole get_local_size brightmagenta
  70. keyword whole get_global_size brightmagenta
  71. keyword whole get_work_dim brightmagenta
  72. keyword whole get_num_groups brightmagenta
  73. keyword whole get_global_offset brightmagenta
  74. keyword whole barrier brightmagenta
  75. # Constants
  76. keyword whole CLK_LOCAL_MEM_FENCE white
  77. keyword whole CLK_GLOBAL_MEM_FENCE white
  78. keyword whole MAXFLOAT white
  79. keyword whole HUGE_VAL white
  80. keyword whole HUGE_VALF white
  81. keyword whole INFINITY white
  82. keyword whole NAN white
  83. # Built-in types
  84. keyword whole half yellow
  85. keyword whole uchar yellow
  86. keyword whole ushort yellow
  87. keyword whole uint yellow
  88. keyword whole ulong yellow
  89. keyword whole bool yellow
  90. keyword whole size_t yellow
  91. keyword whole ptrdiff_t yellow
  92. keyword whole intptr_t yellow
  93. keyword whole uintptr_t yellow
  94. keyword whole image2d_t yellow
  95. keyword whole image3d_t yellow
  96. keyword whole image2d_array_t yellow
  97. keyword whole image3d_array_t yellow
  98. keyword whole image1d_array_t yellow
  99. keyword whole image1d_t yellow
  100. keyword whole image1d_buffer_t yellow
  101. keyword whole sampler_t yellow
  102. keyword whole event_t yellow
  103. keyword whole cl_khr_\{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\}\{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_\}+ brightgreen
  104. keyword /\* brown
  105. keyword \*/ brown
  106. keyword // brown
  107. keyword '\\\{"abtnvfr\}' brightgreen
  108. keyword '\\\{0123\}\{01234567\}\{01234567\}' brightgreen
  109. keyword '\\'' brightgreen
  110. keyword '\\\\' brightgreen
  111. keyword '\\0' brightgreen
  112. keyword '\{\s!"#$%&()\*\+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~嵗╯丰戍貝物洎悖停眾斯須號獄播噶擱藏霰匸�帊昅恘倳眑婭笫崷窙嗲睧颬睼麧緗鴇膹擨闀貘覷鏷禴矙𡜍𦶠�\}' brightgreen
  113. # punctuation characters, sorted by ASCII code
  114. keyword ! yellow
  115. keyword % yellow
  116. keyword && yellow
  117. keyword & brightmagenta
  118. keyword ( brightcyan
  119. keyword ) brightcyan
  120. keyword \* yellow
  121. keyword \+ yellow
  122. keyword , brightcyan
  123. keyword - yellow
  124. keyword / yellow
  125. keyword : brightcyan
  126. keyword ; brightmagenta
  127. keyword < yellow
  128. keyword = yellow
  129. keyword > yellow
  130. keyword ? brightcyan
  131. keyword [ brightcyan
  132. keyword ] brightcyan
  133. keyword ^ brightmagenta
  134. keyword { brightcyan
  135. keyword || yellow
  136. keyword | brightmagenta
  137. keyword } brightcyan
  138. keyword ~ brightmagenta
  139. context exclusive /\* \*/ brown
  140. spellcheck
  141. context exclusive // \n brown
  142. spellcheck
  143. context linestart # \n brightred
  144. keyword \\\n yellow
  145. keyword /\**\*/ brown
  146. keyword //*\n brown
  147. keyword "+" red
  148. keyword <+> red
  149. context " " green
  150. spellcheck
  151. keyword \\" brightgreen
  152. keyword %% brightgreen
  153. keyword %\[#0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[L\]\{eEfgGoxX\} brightgreen
  154. keyword %\[0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[hl\]\{diuxX\} brightgreen
  155. keyword %\[hl\]n brightgreen
  156. keyword %\[-\]\[0123456789\*\]\[.\]\[0123456789\*\]s brightgreen
  157. keyword %[*] brightgreen
  158. keyword %c brightgreen
  159. keyword %p brightgreen
  160. keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen
  161. keyword \\\\ brightgreen
  162. keyword \\' brightgreen
  163. keyword \\\{abtnvfr\} brightgreen