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 STRUCT = "struct" 37 LAYOUT = "layout" 38 PRECISION = "precision" 39 ENUM = "enum" 40 CLASS = "class" 41 IDENTIFIER = [a-zA-Z_$]([0-9]|[a-zA-Z_$])* 42 DIRECTIVE = #[a-zA-Z_$]([0-9]|[a-zA-Z_$])* 43 SECTION = @[a-zA-Z_$]([0-9]|[a-zA-Z_$])* 44 LPAREN = "(" 45 RPAREN = ")" 46 LBRACE = "{" 47 RBRACE = "}" 48 LBRACKET = "[" 49 RBRACKET = "]" 50 DOT = "." 51 COMMA = "," 52 PLUSPLUS = "++" 53 MINUSMINUS = "--" 54 PLUS = "+" 55 MINUS = "-" 56 STAR = "*" 57 SLASH = "/" 58 PERCENT = "%" 59 SHL = "<<" 60 SHR = ">>" 61 BITWISEOR = "|" 62 BITWISEXOR = "^" 63 BITWISEAND = "&" 64 BITWISENOT = "~" 65 LOGICALOR = "||" 66 LOGICALXOR = "^^" 67 LOGICALAND = "&&" 68 LOGICALNOT = "!" 69 QUESTION = "?" 70 COLONCOLON = "::" 71 COLON = ":" 72 EQ = "=" 73 EQEQ = "==" 74 NEQ = "!=" 75 GT = ">" 76 LT = "<" 77 GTEQ = ">=" 78 LTEQ = "<=" 79 PLUSEQ = "+=" 80 MINUSEQ = "-=" 81 STAREQ = "*=" 82 SLASHEQ = "/=" 83 PERCENTEQ = "%=" 84 SHLEQ = "<<=" 85 SHREQ = ">>=" 86 BITWISEOREQ = "|=" 87 BITWISEXOREQ = "^=" 88 BITWISEANDEQ = "&=" 89 LOGICALOREQ = "||=" 90 LOGICALXOREQ = "^^=" 91 LOGICALANDEQ = "&&=" 92 SEMICOLON = ";" 93 ARROW = "->" 94 WHITESPACE = \s+ 95 LINE_COMMENT = //.* 96 BLOCK_COMMENT = /\*([^*]|\*[^/])*\*/ 97 INVALID = .