*.cg
//
/*
*/
\\( # leading backslash
[\\\"\'nrtfav\?e] | # escaped character
[0-7]{1,3} | # one, two, or three octal digits
x[0-9A-Fa-f]{0,2} # 'x' followed by zero, one, or two hex digits
)
^\s*#\s*
\%{preproc-start}
(include|import)\s*
(".*?"|<.*>)
(?<![\w\.])
((\.[0-9]+ | [0-9]+\.[0-9]*) ([Ee][+-]?[0-9]*)? |
([0-9]+[Ee][+-]?[0-9]*))
[fFlL]?
(?![\w\.])
(?<![\w\.])
0[xX][a-fA-F0-9]+[uUlL]*
(?![\w\.])
(?<![\w\.])
0[0-7]+[uUlL]*
(?![\w\.])
(?<![\w\.])
[0-9]+[uUlL]*
(?![\w\.])
break
case
continue
default
else
for
if
return
struct
switch
while
bool
float
float2
float3
float4
float2x2
float3x3
float4x4
int
half
fixed
void
sampler1D
sampler2D
sampler3D
samplerRECT
samplerCUBE
uniform
out
inout
in
varying
POSITION
NORMAL
COLOR[0-3]?
TEXUNIT([0-9]|1[0-5])?
TEXCOORD[0-7]?
\.([xyzw]+|[rgba]+)
true
false
(mul|lit|lerp|saturate|abs|cos|acos|sin|asin|tan|atan|all|any|ceil|clamp|
cosh|cross|degress|determinant|dot|exp|exp2|floor|fmod|frac|frexp|isfinite|
isinf|isnan|ldexp|log|log2|log10|max|min|modf|noise|pow|radians|round|
rsqrt|sign|sincos|sinh|smoothstep|step|sqrt|tanh|transpose|distance|
faceforward|length|normalize|reflect|refract|tex1D|tex2D|tex3D|
tex1Dproj|tex2Dproj|tex3Dproj|texRECT|texRECTproj|texCUBE|texCUBEproj|
ddx|ddy|debug)\s*\(
([a-zA-Z_][a-zA-Z_0-9]*)\s*\(