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 IN = "in" 20 OUT = "out" 21 INOUT = "inout" 22 UNIFORM = "uniform" 23 CONST = "const" 24 LOWP = "lowp" 25 MEDIUMP = "mediump" 26 HIGHP = "highp" 27 FLAT = "flat" 28 NOPERSPECTIVE = "noperspective" 29 READONLY = "readonly" 30 WRITEONLY = "writeonly" 31 COHERENT = "coherent" 32 VOLATILE = "volatile" 33 RESTRICT = "restrict" 34 BUFFER = "buffer" 35 HASSIDEEFFECTS = "sk_has_side_effects" 36 PLS = "__pixel_localEXT" 37 PLSIN = "__pixel_local_inEXT" 38 PLSOUT = "__pixel_local_outEXT" 39 STRUCT = "struct" 40 LAYOUT = "layout" 41 PRECISION = "precision" 42 ENUM = "enum" 43 CLASS = "class" 44 IDENTIFIER = [a-zA-Z_$]([0-9]|[a-zA-Z_$])* 45 DIRECTIVE = #[a-zA-Z_$]([0-9]|[a-zA-Z_$])* 46 SECTION = @[a-zA-Z_$]([0-9]|[a-zA-Z_$])* 47 LPAREN = "(" 48 RPAREN = ")" 49 LBRACE = "{" 50 RBRACE = "}" 51 LBRACKET = "[" 52 RBRACKET = "]" 53 DOT = "." 54 COMMA = "," 55 PLUSPLUS = "++" 56 MINUSMINUS = "--" 57 PLUS = "+" 58 MINUS = "-" 59 STAR = "*" 60 SLASH = "/" 61 PERCENT = "%" 62 SHL = "<<" 63 SHR = ">>" 64 BITWISEOR = "|" 65 BITWISEXOR = "^" 66 BITWISEAND = "&" 67 BITWISENOT = "~" 68 LOGICALOR = "||" 69 LOGICALXOR = "^^" 70 LOGICALAND = "&&" 71 LOGICALNOT = "!" 72 QUESTION = "?" 73 COLONCOLON = "::" 74 COLON = ":" 75 EQ = "=" 76 EQEQ = "==" 77 NEQ = "!=" 78 GT = ">" 79 LT = "<" 80 GTEQ = ">=" 81 LTEQ = "<=" 82 PLUSEQ = "+=" 83 MINUSEQ = "-=" 84 STAREQ = "*=" 85 SLASHEQ = "/=" 86 PERCENTEQ = "%=" 87 SHLEQ = "<<=" 88 SHREQ = ">>=" 89 BITWISEOREQ = "|=" 90 BITWISEXOREQ = "^=" 91 BITWISEANDEQ = "&=" 92 LOGICALOREQ = "||=" 93 LOGICALXOREQ = "^^=" 94 LOGICALANDEQ = "&&=" 95 SEMICOLON = ";" 96 ARROW = "->" 97 WHITESPACE = \s+ 98 LINE_COMMENT = //.* 99 BLOCK_COMMENT = /\*([^*]|\*[^/])*\*/ 100 INVALID = .