1 FLOAT_LITERAL = [0-9]*\.[0-9]+([eE][+-]?[0-9]+)?|[0-9]+\.[0-9]*([eE][+-]?[0-9]+)?|[0-9]+([eE][+-]?[0-9]+) 2 INT_LITERAL = [0-9]+|0x[0-9a-fA-F]+ 3 TRUE_LITERAL = "true" 4 FALSE_LITERAL = "false" 5 IF = "if" 6 STATIC_IF = "@if" 7 ELSE = "else" 8 FOR = "for" 9 WHILE = "while" 10 DO = "do" 11 SWITCH = "switch" 12 STATIC_SWITCH = "@switch" 13 CASE = "case" 14 DEFAULT = "default" 15 BREAK = "break" 16 CONTINUE = "continue" 17 DISCARD = "discard" 18 RETURN = "return" 19 NULL_LITERAL = "null" 20 IN = "in" 21 OUT = "out" 22 INOUT = "inout" 23 UNIFORM = "uniform" 24 CONST = "const" 25 FLAT = "flat" 26 NOPERSPECTIVE = "noperspective" 27 READONLY = "readonly" 28 WRITEONLY = "writeonly" 29 COHERENT = "coherent" 30 VOLATILE = "volatile" 31 RESTRICT = "restrict" 32 BUFFER = "buffer" 33 HASSIDEEFFECTS = "sk_has_side_effects" 34 PLS = "__pixel_localEXT" 35 PLSIN = "__pixel_local_inEXT" 36 PLSOUT = "__pixel_local_outEXT" 37 STRUCT = "struct" 38 LAYOUT = "layout" 39 PRECISION = "precision" 40 ENUM = "enum" 41 CLASS = "class" 42 IDENTIFIER = [a-zA-Z_$]([0-9]|[a-zA-Z_$])* 43 DIRECTIVE = #[a-zA-Z_$]([0-9]|[a-zA-Z_$])* 44 SECTION = @[a-zA-Z_$]([0-9]|[a-zA-Z_$])* 45 LPAREN = "(" 46 RPAREN = ")" 47 LBRACE = "{" 48 RBRACE = "}" 49 LBRACKET = "[" 50 RBRACKET = "]" 51 DOT = "." 52 COMMA = "," 53 PLUSPLUS = "++" 54 MINUSMINUS = "--" 55 PLUS = "+" 56 MINUS = "-" 57 STAR = "*" 58 SLASH = "/" 59 PERCENT = "%" 60 SHL = "<<" 61 SHR = ">>" 62 BITWISEOR = "|" 63 BITWISEXOR = "^" 64 BITWISEAND = "&" 65 BITWISENOT = "~" 66 LOGICALOR = "||" 67 LOGICALXOR = "^^" 68 LOGICALAND = "&&" 69 LOGICALNOT = "!" 70 QUESTION = "?" 71 COLONCOLON = "::" 72 COLON = ":" 73 EQ = "=" 74 EQEQ = "==" 75 NEQ = "!=" 76 GT = ">" 77 LT = "<" 78 GTEQ = ">=" 79 LTEQ = "<=" 80 PLUSEQ = "+=" 81 MINUSEQ = "-=" 82 STAREQ = "*=" 83 SLASHEQ = "/=" 84 PERCENTEQ = "%=" 85 SHLEQ = "<<=" 86 SHREQ = ">>=" 87 BITWISEOREQ = "|=" 88 BITWISEXOREQ = "^=" 89 BITWISEANDEQ = "&=" 90 LOGICALOREQ = "||=" 91 LOGICALXOREQ = "^^=" 92 LOGICALANDEQ = "&&=" 93 SEMICOLON = ";" 94 ARROW = "->" 95 WHITESPACE = \s+ 96 LINE_COMMENT = //.* 97 BLOCK_COMMENT = /\*([^*]|\*[^/])*\*/ 98 INVALID = .