John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 1 | // |
| 2 | //Copyright (C) 2016 Google, Inc. |
LoopDawg | 4886f69 | 2016-06-29 10:58:58 -0600 | [diff] [blame] | 3 | //Copyright (C) 2016 LunarG, Inc. |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 4 | // |
| 5 | //All rights reserved. |
| 6 | // |
| 7 | //Redistribution and use in source and binary forms, with or without |
| 8 | //modification, are permitted provided that the following conditions |
| 9 | //are met: |
| 10 | // |
| 11 | // Redistributions of source code must retain the above copyright |
| 12 | // notice, this list of conditions and the following disclaimer. |
| 13 | // |
| 14 | // Redistributions in binary form must reproduce the above |
| 15 | // copyright notice, this list of conditions and the following |
| 16 | // disclaimer in the documentation and/or other materials provided |
| 17 | // with the distribution. |
| 18 | // |
| 19 | // Neither the name of Google, Inc., nor the names of its |
| 20 | // contributors may be used to endorse or promote products derived |
| 21 | // from this software without specific prior written permission. |
| 22 | // |
| 23 | //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 24 | //"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 25 | //LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 26 | //FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
| 27 | //COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 28 | //INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
| 29 | //BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 30 | //LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 31 | //CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 32 | //LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
| 33 | //ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 34 | //POSSIBILITY OF SUCH DAMAGE. |
| 35 | // |
| 36 | |
| 37 | #ifndef EHLSLTOKENS_H_ |
| 38 | #define EHLSLTOKENS_H_ |
| 39 | |
| 40 | namespace glslang { |
| 41 | |
| 42 | enum EHlslTokenClass { |
| 43 | EHTokNone = 0, |
| 44 | |
| 45 | // qualifiers |
| 46 | EHTokStatic, |
| 47 | EHTokConst, |
| 48 | EHTokSNorm, |
| 49 | EHTokUnorm, |
| 50 | EHTokExtern, |
| 51 | EHTokUniform, |
| 52 | EHTokVolatile, |
John Kessenich | 630dd7d | 2016-06-12 23:52:12 -0600 | [diff] [blame] | 53 | EHTokPrecise, |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 54 | EHTokShared, |
| 55 | EHTokGroupShared, |
| 56 | EHTokLinear, |
| 57 | EHTokCentroid, |
| 58 | EHTokNointerpolation, |
| 59 | EHTokNoperspective, |
| 60 | EHTokSample, |
| 61 | EHTokRowMajor, |
| 62 | EHTokColumnMajor, |
| 63 | EHTokPackOffset, |
LoopDawg | 9249c70 | 2016-07-12 20:44:32 -0600 | [diff] [blame] | 64 | EHTokIn, |
| 65 | EHTokOut, |
| 66 | EHTokInOut, |
John Kessenich | b9e3912 | 2016-08-17 10:22:08 -0600 | [diff] [blame] | 67 | EHTokLayout, |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 68 | |
| 69 | // template types |
| 70 | EHTokBuffer, |
| 71 | EHTokVector, |
| 72 | EHTokMatrix, |
| 73 | |
| 74 | // scalar types |
| 75 | EHTokVoid, |
John Kessenich | a1e2d49 | 2016-09-20 13:22:58 -0600 | [diff] [blame^] | 76 | EHTokString, |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 77 | EHTokBool, |
| 78 | EHTokInt, |
| 79 | EHTokUint, |
| 80 | EHTokDword, |
| 81 | EHTokHalf, |
| 82 | EHTokFloat, |
| 83 | EHTokDouble, |
| 84 | EHTokMin16float, |
| 85 | EHTokMin10float, |
| 86 | EHTokMin16int, |
| 87 | EHTokMin12int, |
| 88 | EHTokMin16uint, |
| 89 | |
| 90 | // vector types |
| 91 | EHTokBool1, |
| 92 | EHTokBool2, |
| 93 | EHTokBool3, |
| 94 | EHTokBool4, |
| 95 | EHTokFloat1, |
| 96 | EHTokFloat2, |
| 97 | EHTokFloat3, |
| 98 | EHTokFloat4, |
| 99 | EHTokInt1, |
| 100 | EHTokInt2, |
| 101 | EHTokInt3, |
| 102 | EHTokInt4, |
| 103 | EHTokDouble1, |
| 104 | EHTokDouble2, |
| 105 | EHTokDouble3, |
| 106 | EHTokDouble4, |
| 107 | EHTokUint1, |
| 108 | EHTokUint2, |
| 109 | EHTokUint3, |
| 110 | EHTokUint4, |
| 111 | |
| 112 | // matrix types |
| 113 | EHTokInt1x1, |
| 114 | EHTokInt1x2, |
| 115 | EHTokInt1x3, |
| 116 | EHTokInt1x4, |
| 117 | EHTokInt2x1, |
| 118 | EHTokInt2x2, |
| 119 | EHTokInt2x3, |
| 120 | EHTokInt2x4, |
| 121 | EHTokInt3x1, |
| 122 | EHTokInt3x2, |
| 123 | EHTokInt3x3, |
| 124 | EHTokInt3x4, |
| 125 | EHTokInt4x1, |
| 126 | EHTokInt4x2, |
| 127 | EHTokInt4x3, |
| 128 | EHTokInt4x4, |
John Kessenich | 71351de | 2016-06-08 12:50:56 -0600 | [diff] [blame] | 129 | EHTokUint1x1, |
| 130 | EHTokUint1x2, |
| 131 | EHTokUint1x3, |
| 132 | EHTokUint1x4, |
| 133 | EHTokUint2x1, |
| 134 | EHTokUint2x2, |
| 135 | EHTokUint2x3, |
| 136 | EHTokUint2x4, |
| 137 | EHTokUint3x1, |
| 138 | EHTokUint3x2, |
| 139 | EHTokUint3x3, |
| 140 | EHTokUint3x4, |
| 141 | EHTokUint4x1, |
| 142 | EHTokUint4x2, |
| 143 | EHTokUint4x3, |
| 144 | EHTokUint4x4, |
| 145 | EHTokBool1x1, |
| 146 | EHTokBool1x2, |
| 147 | EHTokBool1x3, |
| 148 | EHTokBool1x4, |
| 149 | EHTokBool2x1, |
| 150 | EHTokBool2x2, |
| 151 | EHTokBool2x3, |
| 152 | EHTokBool2x4, |
| 153 | EHTokBool3x1, |
| 154 | EHTokBool3x2, |
| 155 | EHTokBool3x3, |
| 156 | EHTokBool3x4, |
| 157 | EHTokBool4x1, |
| 158 | EHTokBool4x2, |
| 159 | EHTokBool4x3, |
| 160 | EHTokBool4x4, |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 161 | EHTokFloat1x1, |
| 162 | EHTokFloat1x2, |
| 163 | EHTokFloat1x3, |
| 164 | EHTokFloat1x4, |
| 165 | EHTokFloat2x1, |
| 166 | EHTokFloat2x2, |
| 167 | EHTokFloat2x3, |
| 168 | EHTokFloat2x4, |
| 169 | EHTokFloat3x1, |
| 170 | EHTokFloat3x2, |
| 171 | EHTokFloat3x3, |
| 172 | EHTokFloat3x4, |
| 173 | EHTokFloat4x1, |
| 174 | EHTokFloat4x2, |
| 175 | EHTokFloat4x3, |
| 176 | EHTokFloat4x4, |
| 177 | EHTokDouble1x1, |
| 178 | EHTokDouble1x2, |
| 179 | EHTokDouble1x3, |
| 180 | EHTokDouble1x4, |
| 181 | EHTokDouble2x1, |
| 182 | EHTokDouble2x2, |
| 183 | EHTokDouble2x3, |
| 184 | EHTokDouble2x4, |
| 185 | EHTokDouble3x1, |
| 186 | EHTokDouble3x2, |
| 187 | EHTokDouble3x3, |
| 188 | EHTokDouble3x4, |
| 189 | EHTokDouble4x1, |
| 190 | EHTokDouble4x2, |
| 191 | EHTokDouble4x3, |
| 192 | EHTokDouble4x4, |
| 193 | |
| 194 | // texturing types |
| 195 | EHTokSampler, |
| 196 | EHTokSampler1d, |
| 197 | EHTokSampler2d, |
| 198 | EHTokSampler3d, |
| 199 | EHTokSamplerCube, |
| 200 | EHTokSamplerState, |
| 201 | EHTokSamplerComparisonState, |
| 202 | EHTokTexture, |
| 203 | EHTokTexture1d, |
| 204 | EHTokTexture1darray, |
| 205 | EHTokTexture2d, |
| 206 | EHTokTexture2darray, |
| 207 | EHTokTexture3d, |
| 208 | EHTokTextureCube, |
LoopDawg | 4886f69 | 2016-06-29 10:58:58 -0600 | [diff] [blame] | 209 | EHTokTextureCubearray, |
| 210 | EHTokTexture2DMS, |
| 211 | EHTokTexture2DMSarray, |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 212 | |
| 213 | // variable, user type, ... |
| 214 | EHTokIdentifier, |
| 215 | EHTokTypeName, |
| 216 | EHTokStruct, |
John Kessenich | 3d157c5 | 2016-07-25 16:05:33 -0600 | [diff] [blame] | 217 | EHTokCBuffer, |
| 218 | EHTokTBuffer, |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 219 | EHTokTypedef, |
| 220 | |
| 221 | // constant |
| 222 | EHTokFloatConstant, |
| 223 | EHTokDoubleConstant, |
| 224 | EHTokIntConstant, |
| 225 | EHTokUintConstant, |
| 226 | EHTokBoolConstant, |
steve-lunarg | efe9724 | 2016-08-22 16:13:47 -0600 | [diff] [blame] | 227 | EHTokStringConstant, |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 228 | |
| 229 | // control flow |
| 230 | EHTokFor, |
| 231 | EHTokDo, |
| 232 | EHTokWhile, |
| 233 | EHTokBreak, |
| 234 | EHTokContinue, |
| 235 | EHTokIf, |
| 236 | EHTokElse, |
| 237 | EHTokDiscard, |
| 238 | EHTokReturn, |
| 239 | EHTokSwitch, |
| 240 | EHTokCase, |
| 241 | EHTokDefault, |
| 242 | |
| 243 | // expressions |
| 244 | EHTokLeftOp, |
| 245 | EHTokRightOp, |
| 246 | EHTokIncOp, |
| 247 | EHTokDecOp, |
| 248 | EHTokLeOp, |
| 249 | EHTokGeOp, |
| 250 | EHTokEqOp, |
| 251 | EHTokNeOp, |
| 252 | EHTokAndOp, |
| 253 | EHTokOrOp, |
| 254 | EHTokXorOp, |
John Kessenich | 34fb036 | 2016-05-03 23:17:20 -0600 | [diff] [blame] | 255 | EHTokAssign, |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 256 | EHTokMulAssign, |
| 257 | EHTokDivAssign, |
| 258 | EHTokAddAssign, |
| 259 | EHTokModAssign, |
| 260 | EHTokLeftAssign, |
| 261 | EHTokRightAssign, |
| 262 | EHTokAndAssign, |
| 263 | EHTokXorAssign, |
| 264 | EHTokOrAssign, |
| 265 | EHTokSubAssign, |
| 266 | EHTokLeftParen, |
| 267 | EHTokRightParen, |
| 268 | EHTokLeftBracket, |
| 269 | EHTokRightBracket, |
| 270 | EHTokLeftBrace, |
| 271 | EHTokRightBrace, |
| 272 | EHTokDot, |
| 273 | EHTokComma, |
| 274 | EHTokColon, |
John Kessenich | e01a9bc | 2016-03-12 20:11:22 -0700 | [diff] [blame] | 275 | EHTokSemicolon, |
| 276 | EHTokBang, |
| 277 | EHTokDash, |
| 278 | EHTokTilde, |
| 279 | EHTokPlus, |
| 280 | EHTokStar, |
| 281 | EHTokSlash, |
| 282 | EHTokPercent, |
| 283 | EHTokLeftAngle, |
| 284 | EHTokRightAngle, |
| 285 | EHTokVerticalBar, |
| 286 | EHTokCaret, |
| 287 | EHTokAmpersand, |
| 288 | EHTokQuestion, |
| 289 | }; |
| 290 | |
| 291 | } // end namespace glslang |
| 292 | |
LoopDawg | 4886f69 | 2016-06-29 10:58:58 -0600 | [diff] [blame] | 293 | #endif // EHLSLTOKENS_H_ |