glsl_tokens.txt 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. {% :operator |identifier>LST_identifier
  2. {* :operator |identifier>LST_identifier
  3. {+ :operator |identifier>LST_identifier
  4. {- :operator |identifier>LST_identifier
  5. {/ :operator |identifier>LST_identifier
  6. :LST_NULL___slash @/>LST_sl_comment
  7. :LST_NULL___slash @*>LST_ml_comment
  8. {; :operator |identifier>LST_identifier
  9. {. :operator |identifier>LST_identifier
  10. {, :operator |identifier>LST_identifier
  11. {= :operator |identifier>LST_identifier
  12. {[ :operator |identifier>LST_identifier
  13. {] :operator |identifier>LST_identifier
  14. {} :operator |identifier>LST_identifier
  15. {{ :operator |identifier>LST_identifier
  16. {) :operator |identifier>LST_identifier
  17. {( :operator |identifier>LST_identifier
  18. {! :operator |identifier>LST_identifier
  19. {? :operator |identifier>LST_identifier
  20. {: :operator |identifier>LST_identifier
  21. {| :operator |identifier>LST_identifier
  22. {^ :operator |identifier>LST_identifier
  23. {& :operator |identifier>LST_identifier
  24. {++ :operator |identifier>LST_identifier
  25. {-- :operator |identifier>LST_identifier
  26. {>> :operator |identifier>LST_identifier
  27. {<< :operator |identifier>LST_identifier
  28. {+= :operator |identifier>LST_identifier
  29. {-= :operator |identifier>LST_identifier
  30. {/= :operator |identifier>LST_identifier
  31. {*= :operator |identifier>LST_identifier
  32. {|| :operator |identifier>LST_identifier
  33. {&& :operator |identifier>LST_identifier
  34. {^^ :operator |identifier>LST_identifier
  35. {!= :operator |identifier>LST_identifier
  36. {== :operator |identifier>LST_identifier
  37. {>= :operator |identifier>LST_identifier
  38. {<= :operator |identifier>LST_identifier
  39. {attribute :keyword |identifier>LST_identifier
  40. {bool :keyword |identifier>LST_identifier
  41. {break :keyword |identifier>LST_identifier
  42. {buffer :keyword |identifier>LST_identifier
  43. {bvec2 :keyword |identifier>LST_identifier
  44. {bvec3 :keyword |identifier>LST_identifier
  45. {bvec4 :keyword |identifier>LST_identifier
  46. {case :keyword |identifier>LST_identifier
  47. {coherent :keyword |identifier>LST_identifier
  48. {const :keyword |identifier>LST_identifier
  49. {continue :keyword |identifier>LST_identifier
  50. {cos :keyword |identifier>LST_identifier
  51. {do :keyword |identifier>LST_identifier
  52. {double :keyword |identifier>LST_identifier
  53. {dvec2 :keyword |identifier>LST_identifier
  54. {dvec3 :keyword |identifier>LST_identifier
  55. {dvec4 :keyword |identifier>LST_identifier
  56. {flat :keyword |identifier>LST_identifier
  57. {float :keyword |identifier>LST_identifier
  58. {for :keyword |identifier>LST_identifier
  59. {gl_BaseInstance :keyword |identifier>LST_identifier
  60. {gl_BaseVertex :keyword |identifier>LST_identifier
  61. {gl_ClipDistance :keyword |identifier>LST_identifier
  62. {gl_DrawID :keyword |identifier>LST_identifier
  63. {gl_InstanceID :keyword |identifier>LST_identifier
  64. {gl_InvocationID :keyword |identifier>LST_identifier
  65. {gl_Layer :keyword |identifier>LST_identifier
  66. {gl_MaxPatchVertices :keyword |identifier>LST_identifier
  67. {gl_PatchVerticesIn :keyword |identifier>LST_identifier
  68. {gl_PerVertex :keyword |identifier>LST_identifier
  69. {gl_PointSize :keyword |identifier>LST_identifier
  70. {gl_Position :keyword |identifier>LST_identifier
  71. {gl_PrimitiveID :keyword |identifier>LST_identifier
  72. {gl_TessCoord :keyword |identifier>LST_identifier
  73. {gl_TessLevelInner :keyword |identifier>LST_identifier
  74. {gl_TessLevelOuter :keyword |identifier>LST_identifier
  75. {gl_VertexID :keyword |identifier>LST_identifier
  76. {gl_ViewportIndex :keyword |identifier>LST_identifier
  77. {gl_in :keyword |identifier>LST_identifier
  78. {gl_out :keyword |identifier>LST_identifier
  79. {if :keyword |identifier>LST_identifier
  80. {inout :keyword |identifier>LST_identifier
  81. {int :keyword |identifier>LST_identifier
  82. {int64_t :keyword |identifier>LST_identifier
  83. {invariant :keyword |identifier>LST_identifier
  84. {ivec2 :keyword |identifier>LST_identifier
  85. {ivec3 :keyword |identifier>LST_identifier
  86. {ivec4 :keyword |identifier>LST_identifier
  87. {layout :keyword |identifier>LST_identifier
  88. {mat2 :keyword |identifier>LST_identifier
  89. {mat2x2 :keyword |identifier>LST_identifier
  90. {mat2x3 :keyword |identifier>LST_identifier
  91. {mat2x4 :keyword |identifier>LST_identifier
  92. {mat3 :keyword |identifier>LST_identifier
  93. {mat3x2 :keyword |identifier>LST_identifier
  94. {mat3x3 :keyword |identifier>LST_identifier
  95. {mat3x4 :keyword |identifier>LST_identifier
  96. {mat4 :keyword |identifier>LST_identifier
  97. {mat4x2 :keyword |identifier>LST_identifier
  98. {mat4x3 :keyword |identifier>LST_identifier
  99. {mat4x4 :keyword |identifier>LST_identifier
  100. {out :keyword |identifier>LST_identifier
  101. {precision :keyword |identifier>LST_identifier
  102. {readonly :keyword |identifier>LST_identifier
  103. {restrict :keyword |identifier>LST_identifier
  104. {return :keyword |identifier>LST_identifier
  105. {sin :keyword |identifier>LST_identifier
  106. {switch :keyword |identifier>LST_identifier
  107. {tan :keyword |identifier>LST_identifier
  108. {texelFetch :keyword |identifier>LST_identifier
  109. {texture :keyword |identifier>LST_identifier
  110. {texture2D :keyword |identifier>LST_identifier
  111. {texture2DArray :keyword |identifier>LST_identifier
  112. {texture3D :keyword |identifier>LST_identifier
  113. {texture3DArray :keyword |identifier>LST_identifier
  114. {textureArray :keyword |identifier>LST_identifier
  115. {uint :keyword |identifier>LST_identifier
  116. {uint64_t :keyword |identifier>LST_identifier
  117. {uniform :keyword |identifier>LST_identifier
  118. {uvec2 :keyword |identifier>LST_identifier
  119. {uvec3 :keyword |identifier>LST_identifier
  120. {uvec4 :keyword |identifier>LST_identifier
  121. {varying :keyword |identifier>LST_identifier
  122. {vec2 :keyword |identifier>LST_identifier
  123. {vec3 :keyword |identifier>LST_identifier
  124. {vec4 :keyword |identifier>LST_identifier
  125. {void :keyword |identifier>LST_identifier
  126. {volatile :keyword |identifier>LST_identifier
  127. {while :keyword |identifier>LST_identifier
  128. {writeonly :keyword |identifier>LST_identifier
  129. # mark some terminal states
  130. &LST_float
  131. &LST_probenum
  132. &LST_intnum
  133. &LST_octalnum
  134. &LST_hexnum
  135. &LST_identifier
  136. &LST_float_exp
  137. # all other identifiers
  138. # + is transition on a character set
  139. :LST_identifier +identifier_chars>LST_identifier
  140. :LST_NULL +identifier_schars>LST_identifier
  141. # ignore whitespace
  142. # ^ discards the char while moving to the next state
  143. :LST_NULL +ws^LST_NULL
  144. # numbers
  145. :LST_NULL @0>LST_probenum
  146. :LST_NULL @1>LST_intnum
  147. :LST_NULL @2>LST_intnum
  148. :LST_NULL @3>LST_intnum
  149. :LST_NULL @4>LST_intnum
  150. :LST_NULL @5>LST_intnum
  151. :LST_NULL @6>LST_intnum
  152. :LST_NULL @7>LST_intnum
  153. :LST_NULL @8>LST_intnum
  154. :LST_NULL @9>LST_intnum
  155. :LST_probenum @.>LST_float
  156. :LST_probenum @x>LST_hexnum
  157. :LST_probenum @X>LST_hexnum
  158. :LST_probefixed @x>LST_hexnum
  159. :LST_probefixed @X>LST_hexnum
  160. :LST_probenum +num_chars>LST_octalnum
  161. :LST_probefixed +num_chars>LST_octalnum
  162. :LST_intnum @.>LST_float
  163. :LST_intnum +num_chars>LST_intnum
  164. :LST_octalnum +octal_chars>LST_octalnum
  165. :LST_hexnum +hex_chars>LST_hexnum
  166. :LST_float @.>LST_INVALID
  167. :LST_float +num_chars>LST_float
  168. :LST_float @e>LST_float_exp_start
  169. :LST_float @E>LST_float_exp_start
  170. :LST_float @d=LST_float
  171. :LST_float @f=LST_float
  172. :LST_float_exp_start +num_chars>LST_float_exp
  173. :LST_float_exp_start @->LST_float_exp
  174. :LST_float_exp_start @+>LST_float_exp
  175. :LST_float_exp +num_chars>LST_float_exp
  176. :LST_float_exp @d=LST_float
  177. :LST_float_exp @f=LST_float
  178. # comments
  179. &LST_sl_comment
  180. :LST_sl_comment !+endl>LST_sl_comment
  181. :LST_sl_comment @\r~LST_sl_comment
  182. :LST_sl_comment @\n~LST_sl_comment
  183. &LST_ml_comment
  184. :LST_ml_comment @*>LST_ml_comment_star
  185. :LST_ml_comment !+star>LST_ml_comment
  186. :LST_ml_comment_star @/=LST_ml_comment
  187. :LST_ml_comment_star !+slash>LST_ml_comment