Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenslang_compile_operation.h
Go to the documentation of this file.
00001 /* 00002 * Mesa 3-D graphics library 00003 * Version: 6.5.2 00004 * 00005 * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. 00006 * 00007 * Permission is hereby granted, free of charge, to any person obtaining a 00008 * copy of this software and associated documentation files (the "Software"), 00009 * to deal in the Software without restriction, including without limitation 00010 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00011 * and/or sell copies of the Software, and to permit persons to whom the 00012 * Software is furnished to do so, subject to the following conditions: 00013 * 00014 * The above copyright notice and this permission notice shall be included 00015 * in all copies or substantial portions of the Software. 00016 * 00017 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00018 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00019 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 00020 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 00021 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 00022 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00023 */ 00024 00025 #ifndef SLANG_COMPILE_OPERATION_H 00026 #define SLANG_COMPILE_OPERATION_H 00027 00028 00034 typedef enum slang_operation_type_ 00035 { 00036 SLANG_OPER_NONE, 00037 SLANG_OPER_BLOCK_NO_NEW_SCOPE, /* "{" sequence "}" */ 00038 SLANG_OPER_BLOCK_NEW_SCOPE, /* "{" sequence "}" */ 00039 SLANG_OPER_VARIABLE_DECL, /* [type] [var] or [var] = [expr] */ 00040 SLANG_OPER_ASM, 00041 SLANG_OPER_BREAK, /* "break" statement */ 00042 SLANG_OPER_CONTINUE, /* "continue" statement */ 00043 SLANG_OPER_DISCARD, /* "discard" (kill fragment) statement */ 00044 SLANG_OPER_RETURN, /* "return" [expr] */ 00045 SLANG_OPER_LABEL, /* a jump target */ 00046 SLANG_OPER_EXPRESSION, /* [expr] */ 00047 SLANG_OPER_IF, /* "if" [0] then [1] else [2] */ 00048 SLANG_OPER_WHILE, /* "while" [cond] [body] */ 00049 SLANG_OPER_DO, /* "do" [body] "while" [cond] */ 00050 SLANG_OPER_FOR, /* "for" [init] [while] [incr] [body] */ 00051 SLANG_OPER_VOID, /* nop */ 00052 SLANG_OPER_LITERAL_BOOL, /* "true" or "false" */ 00053 SLANG_OPER_LITERAL_INT, /* integer literal */ 00054 SLANG_OPER_LITERAL_FLOAT, /* float literal */ 00055 SLANG_OPER_IDENTIFIER, /* var name, func name, etc */ 00056 SLANG_OPER_SEQUENCE, /* [expr] "," [expr] "," etc */ 00057 SLANG_OPER_ASSIGN, /* [var] "=" [expr] */ 00058 SLANG_OPER_ADDASSIGN, /* [var] "+=" [expr] */ 00059 SLANG_OPER_SUBASSIGN, /* [var] "-=" [expr] */ 00060 SLANG_OPER_MULASSIGN, /* [var] "*=" [expr] */ 00061 SLANG_OPER_DIVASSIGN, /* [var] "/=" [expr] */ 00062 /*SLANG_OPER_MODASSIGN, */ 00063 /*SLANG_OPER_LSHASSIGN, */ 00064 /*SLANG_OPER_RSHASSIGN, */ 00065 /*SLANG_OPER_ORASSIGN, */ 00066 /*SLANG_OPER_XORASSIGN, */ 00067 /*SLANG_OPER_ANDASSIGN, */ 00068 SLANG_OPER_SELECT, /* [expr] "?" [expr] ":" [expr] */ 00069 SLANG_OPER_LOGICALOR, /* [expr] "||" [expr] */ 00070 SLANG_OPER_LOGICALXOR, /* [expr] "^^" [expr] */ 00071 SLANG_OPER_LOGICALAND, /* [expr] "&&" [expr] */ 00072 /*SLANG_OPER_BITOR, */ 00073 /*SLANG_OPER_BITXOR, */ 00074 /*SLANG_OPER_BITAND, */ 00075 SLANG_OPER_EQUAL, /* [expr] "==" [expr] */ 00076 SLANG_OPER_NOTEQUAL, /* [expr] "!=" [expr] */ 00077 SLANG_OPER_LESS, /* [expr] "<" [expr] */ 00078 SLANG_OPER_GREATER, /* [expr] ">" [expr] */ 00079 SLANG_OPER_LESSEQUAL, /* [expr] "<=" [expr] */ 00080 SLANG_OPER_GREATEREQUAL, /* [expr] ">=" [expr] */ 00081 /*SLANG_OPER_LSHIFT, */ 00082 /*SLANG_OPER_RSHIFT, */ 00083 SLANG_OPER_ADD, /* [expr] "+" [expr] */ 00084 SLANG_OPER_SUBTRACT, /* [expr] "-" [expr] */ 00085 SLANG_OPER_MULTIPLY, /* [expr] "*" [expr] */ 00086 SLANG_OPER_DIVIDE, /* [expr] "/" [expr] */ 00087 /*SLANG_OPER_MODULUS, */ 00088 SLANG_OPER_PREINCREMENT, /* "++" [var] */ 00089 SLANG_OPER_PREDECREMENT, /* "--" [var] */ 00090 SLANG_OPER_PLUS, /* "-" [expr] */ 00091 SLANG_OPER_MINUS, /* "+" [expr] */ 00092 /*SLANG_OPER_COMPLEMENT, */ 00093 SLANG_OPER_NOT, /* "!" [expr] */ 00094 SLANG_OPER_SUBSCRIPT, /* [expr] "[" [expr] "]" */ 00095 SLANG_OPER_CALL, /* [func name] [param] [param] [...] */ 00096 SLANG_OPER_NON_INLINED_CALL, /* a real function call */ 00097 SLANG_OPER_METHOD, /* method call, such as v.length() */ 00098 SLANG_OPER_FIELD, /* i.e.: ".next" or ".xzy" or ".xxx" etc */ 00099 SLANG_OPER_POSTINCREMENT, /* [var] "++" */ 00100 SLANG_OPER_POSTDECREMENT /* [var] "--" */ 00101 } slang_operation_type; 00102 00103 00111 typedef struct slang_operation_ 00112 { 00113 slang_operation_type type; 00114 struct slang_operation_ *children; 00115 GLuint num_children; 00116 GLfloat literal[4]; 00117 GLuint literal_size; 00118 slang_atom a_id; 00119 slang_atom a_obj; 00120 slang_variable_scope *locals; 00121 struct slang_function_ *fun; 00122 struct slang_variable_ *var; 00123 struct slang_label_ *label; 00128 GLboolean array_constructor; 00129 double x; 00130 } slang_operation; 00131 00132 00133 extern GLboolean 00134 slang_operation_construct(slang_operation *); 00135 00136 extern void 00137 slang_operation_destruct(slang_operation *); 00138 00139 extern void 00140 slang_replace_scope(slang_operation *oper, 00141 slang_variable_scope *oldScope, 00142 slang_variable_scope *newScope); 00143 00144 extern GLboolean 00145 slang_operation_copy(slang_operation *, const slang_operation *); 00146 00147 extern slang_operation * 00148 slang_operation_new(GLuint count); 00149 00150 extern void 00151 slang_operation_delete(slang_operation *oper); 00152 00153 extern slang_operation * 00154 slang_operation_grow(GLuint *numChildren, slang_operation **children); 00155 00156 extern slang_operation * 00157 slang_operation_insert(GLuint *numChildren, slang_operation **children, 00158 GLuint pos); 00159 00160 extern void 00161 _slang_operation_swap(slang_operation *oper0, slang_operation *oper1); 00162 00163 00164 #endif /* SLANG_COMPILE_OPERATION_H */ Generated on Wed May 23 2012 04:18:43 for ReactOS by
1.7.6.1
|