lscript_tree.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LSCRIPT_TREE_H
00033 #define LL_LSCRIPT_TREE_H
00034 
00035 #include "v3math.h"
00036 #include "llquaternion.h"
00037 #include "linked_lists.h"
00038 #include "lscript_error.h"
00039 #include "lscript_typecheck.h"
00040 #include "lscript_byteformat.h"
00041 
00042 
00043 // Nota Bene:  Class destructors don't delete pointed to classes because it isn't guaranteed that lex/yacc will build
00044 //                              complete data structures.  Instead various chunks that are allocated are stored and deleted by allocation lists
00045 
00046 class LLScriptType : public LLScriptFilePosition
00047 {
00048 public:
00049         LLScriptType(S32 line, S32 col, LSCRIPTType type)
00050                 : LLScriptFilePosition(line, col), mType(type)
00051         {
00052         }
00053 
00054         ~LLScriptType() {}
00055 
00056         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00057         S32 getSize();
00058 
00059         LSCRIPTType     mType;
00060 };
00061 
00062 // contains a literal or constant value
00063 class LLScriptConstant : public LLScriptFilePosition
00064 {
00065 public:
00066         LLScriptConstant(S32 line, S32 col, LSCRIPTType type)
00067                 : LLScriptFilePosition(line, col), mType(type)
00068         {
00069         }
00070 
00071         virtual ~LLScriptConstant() {}
00072 
00073         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00074         S32 getSize();
00075 
00076         LSCRIPTType mType;
00077 };
00078 
00079 class LLScriptConstantInteger : public LLScriptConstant
00080 {
00081 public:
00082         LLScriptConstantInteger(S32 line, S32 col, S32 value)
00083                 : LLScriptConstant(line, col, LST_INTEGER), mValue(value)
00084         {
00085         }
00086 
00087         ~LLScriptConstantInteger() {}
00088 
00089         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00090         S32 getSize();
00091 
00092         S32 mValue;
00093 };
00094 
00095 class LLScriptConstantFloat : public LLScriptConstant
00096 {
00097 public:
00098         LLScriptConstantFloat(S32 line, S32 col, F32 value)
00099                 : LLScriptConstant(line, col, LST_FLOATINGPOINT), mValue(value)
00100         {
00101         }
00102 
00103         ~LLScriptConstantFloat() {}
00104 
00105         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00106         S32 getSize();
00107 
00108         F32 mValue;
00109 };
00110 
00111 class LLScriptConstantString : public LLScriptConstant
00112 {
00113 public:
00114         LLScriptConstantString(S32 line, S32 col, char *value)
00115                 : LLScriptConstant(line, col, LST_STRING), mValue(value)
00116         {
00117         }
00118 
00119         ~LLScriptConstantString() 
00120         {
00121                 delete [] mValue;
00122                 mValue = NULL;
00123         }
00124 
00125         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00126         S32 getSize();
00127 
00128         char *mValue;
00129 };
00130 
00131 // container for individual identifiers
00132 class LLScriptIdentifier : public LLScriptFilePosition
00133 {
00134 public:
00135         LLScriptIdentifier(S32 line, S32 col, char *name, LLScriptType *type = NULL)
00136                 : LLScriptFilePosition(line, col), mName(name), mScopeEntry(NULL), mType(type)
00137         {
00138         }
00139 
00140         ~LLScriptIdentifier() 
00141         {
00142                 delete [] mName;
00143                 mName = NULL;
00144         }
00145 
00146         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00147         S32 getSize();
00148 
00149         char                                    *mName;
00150         LLScriptScopeEntry              *mScopeEntry;
00151         LLScriptType                    *mType;
00152 };
00153 
00154 typedef enum e_lscript_simple_assignable_type
00155 {
00156         LSSAT_NULL,
00157         LSSAT_IDENTIFIER,
00158         LSSAT_CONSTANT,
00159         LSSAT_VECTOR_CONSTANT,
00160         LSSAT_QUATERNION_CONSTANT,
00161         LSSAT_LIST_CONSTANT,
00162         LSSAT_EOF
00163 } LSCRIPTSimpleAssignableType;
00164 
00165 class LLScriptSimpleAssignable : public LLScriptFilePosition
00166 {
00167 public:
00168         LLScriptSimpleAssignable(S32 line, S32 col, LSCRIPTSimpleAssignableType type)
00169                 : LLScriptFilePosition(line, col), mType(type), mNextp(NULL)
00170         {
00171         }
00172 
00173         void addAssignable(LLScriptSimpleAssignable *assign);
00174 
00175         virtual ~LLScriptSimpleAssignable() 
00176         {
00177                 // don't delete next pointer because we're going to store allocation lists and delete from those
00178         }
00179 
00180         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00181         S32 getSize();
00182 
00183         LSCRIPTSimpleAssignableType             mType;
00184         LLScriptSimpleAssignable                *mNextp;
00185 };
00186 
00187 class LLScriptSAIdentifier : public LLScriptSimpleAssignable
00188 {
00189 public:
00190         LLScriptSAIdentifier(S32 line, S32 col, LLScriptIdentifier *identifier)
00191                 : LLScriptSimpleAssignable(line, col, LSSAT_IDENTIFIER), mIdentifier(identifier)
00192         {
00193         }
00194 
00195         ~LLScriptSAIdentifier() 
00196         {
00197         }
00198 
00199         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00200         S32 getSize();
00201 
00202         LLScriptIdentifier *mIdentifier;
00203 };
00204 
00205 class LLScriptSAConstant : public LLScriptSimpleAssignable
00206 {
00207 public:
00208         LLScriptSAConstant(S32 line, S32 col, LLScriptConstant *constant)
00209                 : LLScriptSimpleAssignable(line, col, LSSAT_CONSTANT), mConstant(constant)
00210         {
00211         }
00212 
00213         ~LLScriptSAConstant() 
00214         {
00215         }
00216 
00217         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00218         S32 getSize();
00219 
00220         LLScriptConstant *mConstant;
00221 };
00222 
00223 class LLScriptSAVector : public LLScriptSimpleAssignable
00224 {
00225 public:
00226         LLScriptSAVector(S32 line, S32 col, LLScriptSimpleAssignable *e1, 
00227                                                                                 LLScriptSimpleAssignable *e2, 
00228                                                                                 LLScriptSimpleAssignable *e3)
00229                 : LLScriptSimpleAssignable(line, col, LSSAT_VECTOR_CONSTANT), 
00230                         mEntry1(e1), mEntry2(e2), mEntry3(e3)
00231         {
00232         }
00233 
00234         ~LLScriptSAVector() 
00235         {
00236         }
00237 
00238         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00239         S32 getSize();
00240 
00241         LLScriptSimpleAssignable *mEntry1;
00242         LLScriptSimpleAssignable *mEntry2;
00243         LLScriptSimpleAssignable *mEntry3;
00244 };
00245 
00246 class LLScriptSAQuaternion : public LLScriptSimpleAssignable
00247 {
00248 public:
00249         LLScriptSAQuaternion(S32 line, S32 col, LLScriptSimpleAssignable *e1, 
00250                                                                                         LLScriptSimpleAssignable *e2, 
00251                                                                                         LLScriptSimpleAssignable *e3, 
00252                                                                                         LLScriptSimpleAssignable *e4)
00253                 : LLScriptSimpleAssignable(line, col, LSSAT_QUATERNION_CONSTANT), 
00254                         mEntry1(e1), mEntry2(e2), mEntry3(e3), mEntry4(e4)
00255         {
00256         }
00257 
00258         ~LLScriptSAQuaternion() 
00259         {
00260         }
00261 
00262         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00263         S32 getSize();
00264 
00265         LLScriptSimpleAssignable *mEntry1;
00266         LLScriptSimpleAssignable *mEntry2;
00267         LLScriptSimpleAssignable *mEntry3;
00268         LLScriptSimpleAssignable *mEntry4;
00269 };
00270 
00271 class LLScriptSAList : public LLScriptSimpleAssignable
00272 {
00273 public:
00274         LLScriptSAList(S32 line, S32 col, LLScriptSimpleAssignable *elist)
00275                 : LLScriptSimpleAssignable(line, col, LSSAT_QUATERNION_CONSTANT), mEntryList(elist)
00276         {
00277         }
00278 
00279         ~LLScriptSAList() 
00280         {
00281         }
00282 
00283         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00284         S32 getSize();
00285 
00286         LLScriptSimpleAssignable        *mEntryList;
00287 };
00288 
00289 // global variables
00290 class LLScriptGlobalVariable : public LLScriptFilePosition
00291 {
00292 public:
00293         LLScriptGlobalVariable(S32 line, S32 col, LLScriptType *type,
00294                                                                                           LLScriptIdentifier *identifier,
00295                                                                                           LLScriptSimpleAssignable *assignable)
00296                 : LLScriptFilePosition(line, col), mType(type), mIdentifier(identifier), mAssignable(assignable), mNextp(NULL), mAssignableType(LST_NULL)
00297         {
00298         }
00299 
00300         void addGlobal(LLScriptGlobalVariable *global);
00301 
00302         ~LLScriptGlobalVariable() 
00303         {
00304         }
00305         
00306         void gonext(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00307 
00308         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00309         S32 getSize();
00310 
00311         LLScriptType                            *mType;
00312         LLScriptIdentifier                      *mIdentifier;
00313         LLScriptSimpleAssignable        *mAssignable;
00314         LLScriptGlobalVariable          *mNextp;
00315         LSCRIPTType                                     mAssignableType;
00316 };
00317 
00318 // events
00319 
00320 class LLScriptEvent : public LLScriptFilePosition
00321 {
00322 public:
00323         LLScriptEvent(S32 line, S32 col, LSCRIPTStateEventType type)
00324                 : LLScriptFilePosition(line, col), mType(type)
00325         {
00326         }
00327 
00328         virtual ~LLScriptEvent()
00329         {
00330                 // don't delete next pointer because we're going to store allocation lists and delete from those
00331         }
00332 
00333         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00334         S32 getSize();
00335 
00336         LSCRIPTStateEventType   mType;
00337 };
00338 
00339 class LLScriptStateEntryEvent : public LLScriptEvent
00340 {
00341 public:
00342         LLScriptStateEntryEvent(S32 line, S32 col)
00343                 : LLScriptEvent(line, col, LSTT_STATE_ENTRY)
00344         {
00345         }
00346 
00347         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00348         S32 getSize();
00349 
00350         ~LLScriptStateEntryEvent() {}
00351 };
00352 
00353 class LLScriptStateExitEvent : public LLScriptEvent
00354 {
00355 public:
00356         LLScriptStateExitEvent(S32 line, S32 col)
00357                 : LLScriptEvent(line, col, LSTT_STATE_EXIT)
00358         {
00359         }
00360 
00361         ~LLScriptStateExitEvent() {}
00362 
00363         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00364         S32 getSize();
00365 };
00366 
00367 class LLScriptTouchStartEvent : public LLScriptEvent
00368 {
00369 public:
00370         LLScriptTouchStartEvent(S32 line, S32 col, LLScriptIdentifier *count)
00371                 : LLScriptEvent(line, col, LSTT_TOUCH_START), mCount(count)
00372         {
00373         }
00374 
00375         ~LLScriptTouchStartEvent() 
00376         {
00377         }
00378 
00379         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00380         S32 getSize();
00381 
00382         LLScriptIdentifier      *mCount;
00383 };
00384 
00385 class LLScriptTouchEvent : public LLScriptEvent
00386 {
00387 public:
00388         LLScriptTouchEvent(S32 line, S32 col, LLScriptIdentifier *count)
00389                 : LLScriptEvent(line, col, LSTT_TOUCH), mCount(count)
00390         {
00391         }
00392 
00393         ~LLScriptTouchEvent() 
00394         {
00395         }
00396 
00397         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00398         S32 getSize();
00399 
00400         LLScriptIdentifier      *mCount;
00401 };
00402 
00403 class LLScriptTouchEndEvent : public LLScriptEvent
00404 {
00405 public:
00406         LLScriptTouchEndEvent(S32 line, S32 col, LLScriptIdentifier *count)
00407                 : LLScriptEvent(line, col, LSTT_TOUCH_END), mCount(count)
00408         {
00409         }
00410 
00411         ~LLScriptTouchEndEvent() 
00412         {
00413         }
00414 
00415         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00416         S32 getSize();
00417 
00418         LLScriptIdentifier      *mCount;
00419 };
00420 
00421 class LLScriptCollisionStartEvent : public LLScriptEvent
00422 {
00423 public:
00424         LLScriptCollisionStartEvent(S32 line, S32 col, LLScriptIdentifier *count)
00425                 : LLScriptEvent(line, col, LSTT_COLLISION_START), mCount(count)
00426         {
00427         }
00428 
00429         ~LLScriptCollisionStartEvent() 
00430         {
00431         }
00432 
00433         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00434         S32 getSize();
00435 
00436         LLScriptIdentifier      *mCount;
00437 };
00438 
00439 class LLScriptCollisionEvent : public LLScriptEvent
00440 {
00441 public:
00442         LLScriptCollisionEvent(S32 line, S32 col, LLScriptIdentifier *count)
00443                 : LLScriptEvent(line, col, LSTT_COLLISION), mCount(count)
00444         {
00445         }
00446 
00447         ~LLScriptCollisionEvent() 
00448         {
00449         }
00450 
00451         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00452         S32 getSize();
00453 
00454         LLScriptIdentifier      *mCount;
00455 };
00456 
00457 class LLScriptCollisionEndEvent : public LLScriptEvent
00458 {
00459 public:
00460         LLScriptCollisionEndEvent(S32 line, S32 col, LLScriptIdentifier *count)
00461                 : LLScriptEvent(line, col, LSTT_COLLISION_END), mCount(count)
00462         {
00463         }
00464 
00465         ~LLScriptCollisionEndEvent() 
00466         {
00467         }
00468 
00469         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00470         S32 getSize();
00471 
00472         LLScriptIdentifier      *mCount;
00473 };
00474 
00475 class LLScriptLandCollisionStartEvent : public LLScriptEvent
00476 {
00477 public:
00478         LLScriptLandCollisionStartEvent(S32 line, S32 col, LLScriptIdentifier *pos)
00479                 : LLScriptEvent(line, col, LSTT_LAND_COLLISION_START), mPosition(pos)
00480         {
00481         }
00482 
00483         ~LLScriptLandCollisionStartEvent() 
00484         {
00485         }
00486 
00487         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00488         S32 getSize();
00489 
00490         LLScriptIdentifier      *mPosition;
00491 };
00492 
00493 class LLScriptLandCollisionEvent : public LLScriptEvent
00494 {
00495 public:
00496         LLScriptLandCollisionEvent(S32 line, S32 col, LLScriptIdentifier *pos)
00497                 : LLScriptEvent(line, col, LSTT_LAND_COLLISION), mPosition(pos)
00498         {
00499         }
00500 
00501         ~LLScriptLandCollisionEvent() 
00502         {
00503         }
00504 
00505         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00506         S32 getSize();
00507 
00508         LLScriptIdentifier      *mPosition;
00509 };
00510 
00511 class LLScriptLandCollisionEndEvent : public LLScriptEvent
00512 {
00513 public:
00514         LLScriptLandCollisionEndEvent(S32 line, S32 col, LLScriptIdentifier *pos)
00515                 : LLScriptEvent(line, col, LSTT_LAND_COLLISION_END), mPosition(pos)
00516         {
00517         }
00518 
00519         ~LLScriptLandCollisionEndEvent() 
00520         {
00521         }
00522 
00523         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00524         S32 getSize();
00525 
00526         LLScriptIdentifier      *mPosition;
00527 };
00528 
00529 class LLScriptInventoryEvent : public LLScriptEvent
00530 {
00531 public:
00532         LLScriptInventoryEvent(S32 line, S32 col, LLScriptIdentifier *change)
00533                 : LLScriptEvent(line, col, LSTT_INVENTORY), mChange(change)
00534         {
00535         }
00536 
00537         ~LLScriptInventoryEvent() {}
00538 
00539         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00540         S32 getSize();
00541 
00542         LLScriptIdentifier      *mChange;
00543 };
00544 
00545 class LLScriptAttachEvent : public LLScriptEvent
00546 {
00547 public:
00548         LLScriptAttachEvent(S32 line, S32 col, LLScriptIdentifier *attach)
00549                 : LLScriptEvent(line, col, LSTT_ATTACH), mAttach(attach)
00550         {
00551         }
00552 
00553         ~LLScriptAttachEvent() {}
00554 
00555         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00556         S32 getSize();
00557 
00558         LLScriptIdentifier      *mAttach;
00559 };
00560 
00561 class LLScriptDataserverEvent : public LLScriptEvent
00562 {
00563 public:
00564         LLScriptDataserverEvent(S32 line, S32 col, LLScriptIdentifier *id, LLScriptIdentifier *data)
00565                 : LLScriptEvent(line, col, LSTT_DATASERVER), mID(id), mData(data)
00566         {
00567         }
00568 
00569         ~LLScriptDataserverEvent() {}
00570 
00571         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00572         S32 getSize();
00573 
00574         LLScriptIdentifier      *mID;
00575         LLScriptIdentifier      *mData;
00576 };
00577 
00578 class LLScriptTimerEvent : public LLScriptEvent
00579 {
00580 public:
00581         LLScriptTimerEvent(S32 line, S32 col)
00582                 : LLScriptEvent(line, col, LSTT_TIMER)
00583         {
00584         }
00585 
00586         ~LLScriptTimerEvent() {}
00587 
00588         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00589         S32 getSize();
00590 };
00591 
00592 class LLScriptMovingStartEvent : public LLScriptEvent
00593 {
00594 public:
00595         LLScriptMovingStartEvent(S32 line, S32 col)
00596                 : LLScriptEvent(line, col, LSTT_MOVING_START)
00597         {
00598         }
00599 
00600         ~LLScriptMovingStartEvent() {}
00601 
00602         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00603         S32 getSize();
00604 };
00605 
00606 class LLScriptMovingEndEvent : public LLScriptEvent
00607 {
00608 public:
00609         LLScriptMovingEndEvent(S32 line, S32 col)
00610                 : LLScriptEvent(line, col, LSTT_MOVING_END)
00611         {
00612         }
00613 
00614         ~LLScriptMovingEndEvent() {}
00615 
00616         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00617         S32 getSize();
00618 };
00619 
00620 class LLScriptRTPEvent : public LLScriptEvent
00621 {
00622 public:
00623         LLScriptRTPEvent(S32 line, S32 col, LLScriptIdentifier *rtperm)
00624                 : LLScriptEvent(line, col, LSTT_RTPERMISSIONS), mRTPermissions(rtperm) 
00625         {
00626         }
00627 
00628         ~LLScriptRTPEvent() {}
00629 
00630         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00631         S32 getSize();
00632 
00633         LLScriptIdentifier      *mRTPermissions;
00634 };
00635 
00636 class LLScriptChatEvent : public LLScriptEvent
00637 {
00638 public:
00639         LLScriptChatEvent(S32 line, S32 col, LLScriptIdentifier *channel, LLScriptIdentifier *name, LLScriptIdentifier *id, LLScriptIdentifier *message)
00640                 : LLScriptEvent(line, col, LSTT_CHAT), mChannel(channel), mName(name), mID(id), mMessage(message)
00641         {
00642         }
00643 
00644         ~LLScriptChatEvent() 
00645         {
00646         }
00647 
00648         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00649         S32 getSize();
00650 
00651         LLScriptIdentifier      *mChannel;
00652         LLScriptIdentifier      *mName;
00653         LLScriptIdentifier      *mID;
00654         LLScriptIdentifier      *mMessage;
00655 };
00656 
00657 class LLScriptObjectRezEvent : public LLScriptEvent
00658 {
00659 public:
00660         LLScriptObjectRezEvent(S32 line, S32 col, LLScriptIdentifier *id)
00661                 : LLScriptEvent(line, col, LSTT_OBJECT_REZ), mID(id)
00662         {
00663         }
00664 
00665         ~LLScriptObjectRezEvent() 
00666         {
00667         }
00668 
00669         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00670         S32 getSize();
00671 
00672         LLScriptIdentifier      *mID;
00673 };
00674 
00675 class LLScriptSensorEvent : public LLScriptEvent
00676 {
00677 public:
00678         LLScriptSensorEvent(S32 line, S32 col, LLScriptIdentifier *number)
00679                 : LLScriptEvent(line, col, LSTT_SENSOR), mNumber(number)
00680         {
00681         }
00682 
00683         ~LLScriptSensorEvent() 
00684         {
00685         }
00686 
00687         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00688         S32 getSize();
00689 
00690         LLScriptIdentifier      *mNumber;
00691 };
00692 
00693 class LLScriptControlEvent : public LLScriptEvent
00694 {
00695 public:
00696         LLScriptControlEvent(S32 line, S32 col, LLScriptIdentifier *name, LLScriptIdentifier *levels, LLScriptIdentifier *edges)
00697                 : LLScriptEvent(line, col, LSTT_CONTROL), mName(name), mLevels(levels), mEdges(edges)
00698         {
00699         }
00700 
00701         ~LLScriptControlEvent() 
00702         {
00703         }
00704 
00705         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00706         S32 getSize();
00707 
00708         LLScriptIdentifier      *mName;
00709         LLScriptIdentifier      *mLevels;
00710         LLScriptIdentifier      *mEdges;
00711 };
00712 
00713 class LLScriptLinkMessageEvent : public LLScriptEvent
00714 {
00715 public:
00716         LLScriptLinkMessageEvent(S32 line, S32 col, LLScriptIdentifier *sender, LLScriptIdentifier *num, LLScriptIdentifier *str, LLScriptIdentifier *id)
00717                 : LLScriptEvent(line, col, LSTT_LINK_MESSAGE), mSender(sender), mNum(num), mStr(str), mID(id)
00718         {
00719         }
00720 
00721         ~LLScriptLinkMessageEvent() 
00722         {
00723         }
00724 
00725         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00726         S32 getSize();
00727 
00728         LLScriptIdentifier      *mSender;
00729         LLScriptIdentifier      *mNum;
00730         LLScriptIdentifier      *mStr;
00731         LLScriptIdentifier      *mID;
00732 };
00733 
00734 class LLScriptRemoteEvent : public LLScriptEvent
00735 {
00736 public:
00737         LLScriptRemoteEvent(S32 line, S32 col, LLScriptIdentifier *type, LLScriptIdentifier *channel, LLScriptIdentifier *message_id, LLScriptIdentifier *sender, LLScriptIdentifier *int_val, LLScriptIdentifier *str_val)
00738                 : LLScriptEvent(line, col, LSTT_REMOTE_DATA), mType(type), mChannel(channel), mMessageID(message_id), mSender(sender), mIntVal(int_val), mStrVal(str_val)
00739         {
00740         }
00741 
00742         ~LLScriptRemoteEvent() 
00743         {
00744         }
00745 
00746         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00747         S32 getSize();
00748 
00749         LLScriptIdentifier      *mType;
00750         LLScriptIdentifier      *mChannel;
00751         LLScriptIdentifier      *mMessageID;
00752         LLScriptIdentifier      *mSender;
00753         LLScriptIdentifier      *mIntVal;
00754         LLScriptIdentifier      *mStrVal;
00755 };
00756 
00757 class LLScriptHTTPResponseEvent : public LLScriptEvent
00758 {
00759 public:
00760         LLScriptHTTPResponseEvent(S32 line, S32 col,
00761                 LLScriptIdentifier *reqeust_id,
00762                 LLScriptIdentifier *status,
00763                 LLScriptIdentifier *metadata,
00764                 LLScriptIdentifier *body)
00765                 : LLScriptEvent(line, col, LSTT_HTTP_RESPONSE),
00766                  mRequestId(reqeust_id), mStatus(status), mMetadata(metadata), mBody(body)
00767         {
00768         }
00769 
00770         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass,
00771                 LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope,
00772                 LSCRIPTType &type, LSCRIPTType basetype, U64 &count,
00773                 LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap,
00774                 S32 stacksize, LLScriptScopeEntry *entry,
00775                 S32 entrycount, LLScriptLibData **ldata);
00776                 
00777         S32 getSize();
00778 
00779         LLScriptIdentifier      *mRequestId;
00780         LLScriptIdentifier      *mStatus;
00781         LLScriptIdentifier      *mMetadata;
00782         LLScriptIdentifier      *mBody;
00783 };
00784 
00785 class LLScriptRezEvent : public LLScriptEvent
00786 {
00787 public:
00788         LLScriptRezEvent(S32 line, S32 col, LLScriptIdentifier *start_param)
00789                 : LLScriptEvent(line, col, LSTT_REZ), mStartParam(start_param)
00790         {
00791         }
00792         ~LLScriptRezEvent() {}
00793 
00794         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00795         S32 getSize();
00796 
00797         LLScriptIdentifier      *mStartParam;
00798 };
00799 
00800 class LLScriptNoSensorEvent : public LLScriptEvent
00801 {
00802 public:
00803         LLScriptNoSensorEvent(S32 line, S32 col)
00804                 : LLScriptEvent(line, col, LSTT_NO_SENSOR)
00805         {
00806         }
00807 
00808         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00809         S32 getSize();
00810 
00811         ~LLScriptNoSensorEvent() {}
00812 };
00813 
00814 class LLScriptAtTarget : public LLScriptEvent
00815 {
00816 public:
00817         LLScriptAtTarget(S32 line, S32 col, LLScriptIdentifier *tnumber, LLScriptIdentifier *tpos, LLScriptIdentifier *ourpos)
00818                 : LLScriptEvent(line, col, LSTT_AT_TARGET), mTargetNumber(tnumber), mTargetPosition(tpos), mOurPosition(ourpos)
00819         {
00820         }
00821 
00822         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00823         S32 getSize();
00824 
00825         ~LLScriptAtTarget() {}
00826 
00827         LLScriptIdentifier      *mTargetNumber;
00828         LLScriptIdentifier      *mTargetPosition;
00829         LLScriptIdentifier      *mOurPosition;
00830 };
00831 
00832 class LLScriptNotAtTarget : public LLScriptEvent
00833 {
00834 public:
00835         LLScriptNotAtTarget(S32 line, S32 col)
00836                 : LLScriptEvent(line, col, LSTT_NOT_AT_TARGET)
00837         {
00838         }
00839 
00840         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00841         S32 getSize();
00842 
00843         ~LLScriptNotAtTarget() {}
00844 };
00845 
00846 class LLScriptAtRotTarget : public LLScriptEvent
00847 {
00848 public:
00849         LLScriptAtRotTarget(S32 line, S32 col, LLScriptIdentifier *tnumber, LLScriptIdentifier *trot, LLScriptIdentifier *ourrot)
00850                 : LLScriptEvent(line, col, LSTT_AT_ROT_TARGET), mTargetNumber(tnumber), mTargetRotation(trot), mOurRotation(ourrot)
00851         {
00852         }
00853 
00854         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00855         S32 getSize();
00856 
00857         ~LLScriptAtRotTarget() {}
00858 
00859         LLScriptIdentifier      *mTargetNumber;
00860         LLScriptIdentifier      *mTargetRotation;
00861         LLScriptIdentifier      *mOurRotation;
00862 };
00863 
00864 class LLScriptNotAtRotTarget : public LLScriptEvent
00865 {
00866 public:
00867         LLScriptNotAtRotTarget(S32 line, S32 col)
00868                 : LLScriptEvent(line, col, LSTT_NOT_AT_ROT_TARGET)
00869         {
00870         }
00871 
00872         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00873         S32 getSize();
00874 
00875         ~LLScriptNotAtRotTarget() {}
00876 };
00877 
00878 class LLScriptMoneyEvent : public LLScriptEvent
00879 {
00880 public:
00881         LLScriptMoneyEvent(S32 line, S32 col, LLScriptIdentifier *name, LLScriptIdentifier *amount)
00882                 : LLScriptEvent(line, col, LSTT_MONEY), mName(name), mAmount(amount)
00883         {
00884         }
00885 
00886         ~LLScriptMoneyEvent() 
00887         {
00888         }
00889 
00890         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00891         S32 getSize();
00892 
00893         LLScriptIdentifier      *mName;
00894         LLScriptIdentifier      *mAmount;
00895 };
00896 
00897 class LLScriptEmailEvent : public LLScriptEvent
00898 {
00899 public:
00900         LLScriptEmailEvent(S32 line, S32 col, LLScriptIdentifier *time, LLScriptIdentifier *address, LLScriptIdentifier *subject, LLScriptIdentifier *body, LLScriptIdentifier *number)
00901                 : LLScriptEvent(line, col, LSTT_EMAIL), mTime(time), mAddress(address), mSubject(subject), mBody(body), mNumber(number)
00902         {
00903         }
00904 
00905         ~LLScriptEmailEvent() 
00906         {
00907         }
00908 
00909         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00910         S32 getSize();
00911 
00912         LLScriptIdentifier      *mTime;
00913         LLScriptIdentifier      *mAddress;
00914         LLScriptIdentifier      *mSubject;
00915         LLScriptIdentifier      *mBody;
00916         LLScriptIdentifier      *mNumber;
00917 };
00918 
00919 
00920 class LLScriptExpression : public LLScriptFilePosition
00921 {
00922 public:
00923         LLScriptExpression(S32 line, S32 col, LSCRIPTExpressionType type)
00924                 : LLScriptFilePosition(line, col), mType(type), mNextp(NULL), mLeftType(LST_NULL), mRightType(LST_NULL), mReturnType(LST_NULL)
00925         {
00926         }
00927 
00928         void addExpression(LLScriptExpression *expression);
00929 
00930         virtual ~LLScriptExpression() 
00931         {
00932                 // don't delete next pointer because we're going to store allocation lists and delete from those
00933         }
00934 
00935         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00936 
00937         void gonext(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00938         S32 getSize();
00939 
00940         LSCRIPTExpressionType   mType;
00941         LLScriptExpression              *mNextp;
00942         LSCRIPTType                             mLeftType, mRightType, mReturnType;
00943 
00944 };
00945 
00946 class LLScriptForExpressionList : public LLScriptExpression
00947 {
00948 public:
00949         LLScriptForExpressionList(S32 line, S32 col, LLScriptExpression *first, LLScriptExpression *second)
00950                 : LLScriptExpression(line, col, LET_FOR_EXPRESSION_LIST), mFirstp(first), mSecondp(second)
00951         {
00952         }
00953 
00954         ~LLScriptForExpressionList() 
00955         {
00956         }
00957 
00958         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00959         S32 getSize();
00960 
00961         LLScriptExpression      *mFirstp;
00962         LLScriptExpression      *mSecondp;
00963 };
00964 
00965 class LLScriptFuncExpressionList : public LLScriptExpression
00966 {
00967 public:
00968         LLScriptFuncExpressionList(S32 line, S32 col, LLScriptExpression *first, LLScriptExpression *second)
00969                 : LLScriptExpression(line, col, LET_FUNC_EXPRESSION_LIST), mFirstp(first), mSecondp(second)
00970         {
00971         }
00972 
00973         ~LLScriptFuncExpressionList() 
00974         {
00975         }
00976 
00977         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00978         S32 getSize();
00979 
00980         LLScriptExpression      *mFirstp;
00981         LLScriptExpression      *mSecondp;
00982 };
00983 
00984 class LLScriptListExpressionList : public LLScriptExpression
00985 {
00986 public:
00987         LLScriptListExpressionList(S32 line, S32 col, LLScriptExpression *first, LLScriptExpression *second)
00988                 : LLScriptExpression(line, col, LET_LIST_EXPRESSION_LIST), mFirstp(first), mSecondp(second)
00989         {
00990         }
00991 
00992         ~LLScriptListExpressionList() 
00993         {
00994         }
00995 
00996         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
00997         S32 getSize();
00998 
00999         LLScriptExpression      *mFirstp;
01000         LLScriptExpression      *mSecondp;
01001 };
01002 
01003 class LLScriptLValue : public LLScriptExpression
01004 {
01005 public:
01006         LLScriptLValue(S32 line, S32 col, LLScriptIdentifier *identifier, LLScriptIdentifier *accessor)
01007                 : LLScriptExpression(line, col, LET_LVALUE), mOffset(0), mIdentifier(identifier), mAccessor(accessor)
01008         {
01009         }
01010 
01011         ~LLScriptLValue() 
01012         {
01013         }
01014 
01015         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01016         S32 getSize();
01017 
01018         S32                                     mOffset;
01019         LLScriptIdentifier      *mIdentifier;
01020         LLScriptIdentifier      *mAccessor;
01021 };
01022 
01023 class LLScriptAssignment : public LLScriptExpression
01024 {
01025 public:
01026         LLScriptAssignment(S32 line, S32 col, LLScriptExpression *lvalue, LLScriptExpression *rightside)
01027                 : LLScriptExpression(line, col, LET_ASSIGNMENT), mLValue(lvalue), mRightSide(rightside)
01028         {
01029         }
01030 
01031         ~LLScriptAssignment() 
01032         {
01033         }
01034 
01035         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01036         S32 getSize();
01037 
01038         LLScriptExpression      *mLValue;
01039         LLScriptExpression      *mRightSide;
01040 };
01041 
01042 class LLScriptAddAssignment : public LLScriptExpression
01043 {
01044 public:
01045         LLScriptAddAssignment(S32 line, S32 col, LLScriptExpression *lvalue, LLScriptExpression *rightside)
01046                 : LLScriptExpression(line, col, LET_ADD_ASSIGN), mLValue(lvalue), mRightSide(rightside)
01047         {
01048         }
01049 
01050         ~LLScriptAddAssignment() 
01051         {
01052         }
01053 
01054         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01055         S32 getSize();
01056 
01057         LLScriptExpression      *mLValue;
01058         LLScriptExpression      *mRightSide;
01059 };
01060 
01061 class LLScriptSubAssignment : public LLScriptExpression
01062 {
01063 public:
01064         LLScriptSubAssignment(S32 line, S32 col, LLScriptExpression *lvalue, LLScriptExpression *rightside)
01065                 : LLScriptExpression(line, col, LET_SUB_ASSIGN), mLValue(lvalue), mRightSide(rightside)
01066         {
01067         }
01068 
01069         ~LLScriptSubAssignment() 
01070         {
01071         }
01072 
01073         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01074         S32 getSize();
01075 
01076         LLScriptExpression      *mLValue;
01077         LLScriptExpression      *mRightSide;
01078 };
01079 
01080 class LLScriptMulAssignment : public LLScriptExpression
01081 {
01082 public:
01083         LLScriptMulAssignment(S32 line, S32 col, LLScriptExpression *lvalue, LLScriptExpression *rightside)
01084                 : LLScriptExpression(line, col, LET_MUL_ASSIGN), mLValue(lvalue), mRightSide(rightside)
01085         {
01086         }
01087 
01088         ~LLScriptMulAssignment() 
01089         {
01090         }
01091 
01092         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01093         S32 getSize();
01094 
01095         LLScriptExpression      *mLValue;
01096         LLScriptExpression      *mRightSide;
01097 };
01098 
01099 class LLScriptDivAssignment : public LLScriptExpression
01100 {
01101 public:
01102         LLScriptDivAssignment(S32 line, S32 col, LLScriptExpression *lvalue, LLScriptExpression *rightside)
01103                 : LLScriptExpression(line, col, LET_DIV_ASSIGN), mLValue(lvalue), mRightSide(rightside)
01104         {
01105         }
01106 
01107         ~LLScriptDivAssignment() 
01108         {
01109         }
01110 
01111         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01112         S32 getSize();
01113 
01114         LLScriptExpression      *mLValue;
01115         LLScriptExpression      *mRightSide;
01116 };
01117 
01118 class LLScriptModAssignment : public LLScriptExpression
01119 {
01120 public:
01121         LLScriptModAssignment(S32 line, S32 col, LLScriptExpression *lvalue, LLScriptExpression *rightside)
01122                 : LLScriptExpression(line, col, LET_MOD_ASSIGN), mLValue(lvalue), mRightSide(rightside)
01123         {
01124         }
01125 
01126         ~LLScriptModAssignment() 
01127         {
01128         }
01129 
01130         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01131         S32 getSize();
01132 
01133         LLScriptExpression      *mLValue;
01134         LLScriptExpression      *mRightSide;
01135 };
01136 
01137 class LLScriptEquality : public LLScriptExpression
01138 {
01139 public:
01140         LLScriptEquality(S32 line, S32 col, LLScriptExpression *leftside, LLScriptExpression *rightside)
01141                 : LLScriptExpression(line, col, LET_EQUALITY), mLeftSide(leftside), mRightSide(rightside)
01142         {
01143         }
01144 
01145         ~LLScriptEquality() 
01146         {
01147         }
01148 
01149         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01150         S32 getSize();
01151 
01152         LLScriptExpression      *mLeftSide;
01153         LLScriptExpression      *mRightSide;
01154 };
01155 
01156 class LLScriptNotEquals : public LLScriptExpression
01157 {
01158 public:
01159         LLScriptNotEquals(S32 line, S32 col, LLScriptExpression *leftside, LLScriptExpression *rightside)
01160                 : LLScriptExpression(line, col, LET_NOT_EQUALS), mLeftSide(leftside), mRightSide(rightside)
01161         {
01162         }
01163 
01164         ~LLScriptNotEquals() 
01165         {
01166         }
01167 
01168         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01169         S32 getSize();
01170 
01171         LLScriptExpression      *mLeftSide;
01172         LLScriptExpression      *mRightSide;
01173 };
01174 
01175 class LLScriptLessEquals : public LLScriptExpression
01176 {
01177 public:
01178         LLScriptLessEquals(S32 line, S32 col, LLScriptExpression *leftside, LLScriptExpression *rightside)
01179                 : LLScriptExpression(line, col, LET_LESS_EQUALS), mLeftSide(leftside), mRightSide(rightside)
01180         {
01181         }
01182 
01183         ~LLScriptLessEquals() 
01184         {
01185         }
01186 
01187         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01188         S32 getSize();
01189 
01190         LLScriptExpression      *mLeftSide;
01191         LLScriptExpression      *mRightSide;
01192 };
01193 
01194 class LLScriptGreaterEquals : public LLScriptExpression
01195 {
01196 public:
01197         LLScriptGreaterEquals(S32 line, S32 col, LLScriptExpression *leftside, LLScriptExpression *rightside)
01198                 : LLScriptExpression(line, col, LET_GREATER_EQUALS), mLeftSide(leftside), mRightSide(rightside)
01199         {
01200         }
01201 
01202         ~LLScriptGreaterEquals() 
01203         {
01204         }
01205 
01206         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01207         S32 getSize();
01208 
01209         LLScriptExpression      *mLeftSide;
01210         LLScriptExpression      *mRightSide;
01211 };
01212 
01213 class LLScriptLessThan : public LLScriptExpression
01214 {
01215 public:
01216         LLScriptLessThan(S32 line, S32 col, LLScriptExpression *leftside, LLScriptExpression *rightside)
01217                 : LLScriptExpression(line, col, LET_LESS_THAN), mLeftSide(leftside), mRightSide(rightside)
01218         {
01219         }
01220 
01221         ~LLScriptLessThan() 
01222         {
01223         }
01224 
01225         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01226         S32 getSize();
01227 
01228         LLScriptExpression      *mLeftSide;
01229         LLScriptExpression      *mRightSide;
01230 };
01231 
01232 class LLScriptGreaterThan : public LLScriptExpression
01233 {
01234 public:
01235         LLScriptGreaterThan(S32 line, S32 col, LLScriptExpression *leftside, LLScriptExpression *rightside)
01236                 : LLScriptExpression(line, col, LET_GREATER_THAN), mLeftSide(leftside), mRightSide(rightside)
01237         {
01238         }
01239 
01240         ~LLScriptGreaterThan() 
01241         {
01242         }
01243 
01244         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01245         S32 getSize();
01246 
01247         LLScriptExpression      *mLeftSide;
01248         LLScriptExpression      *mRightSide;
01249 };
01250 
01251 class LLScriptPlus : public LLScriptExpression
01252 {
01253 public:
01254         LLScriptPlus(S32 line, S32 col, LLScriptExpression *leftside, LLScriptExpression *rightside)
01255                 : LLScriptExpression(line, col, LET_PLUS), mLeftSide(leftside), mRightSide(rightside)
01256         {
01257         }
01258 
01259         ~LLScriptPlus() 
01260         {
01261         }
01262 
01263         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01264         S32 getSize();
01265 
01266         LLScriptExpression      *mLeftSide;
01267         LLScriptExpression      *mRightSide;
01268 };
01269 
01270 class LLScriptMinus : public LLScriptExpression
01271 {
01272 public:
01273         LLScriptMinus(S32 line, S32 col, LLScriptExpression *leftside, LLScriptExpression *rightside)
01274                 : LLScriptExpression(line, col, LET_MINUS), mLeftSide(leftside), mRightSide(rightside)
01275         {
01276         }
01277 
01278         ~LLScriptMinus() 
01279         {
01280         }
01281 
01282         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01283         S32 getSize();
01284 
01285         LLScriptExpression      *mLeftSide;
01286         LLScriptExpression      *mRightSide;
01287 };
01288 
01289 class LLScriptTimes : public LLScriptExpression
01290 {
01291 public:
01292         LLScriptTimes(S32 line, S32 col, LLScriptExpression *leftside, LLScriptExpression *rightside)
01293                 : LLScriptExpression(line, col, LET_TIMES), mLeftSide(leftside), mRightSide(rightside)
01294         {
01295         }
01296 
01297         ~LLScriptTimes() 
01298         {
01299         }
01300 
01301         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01302         S32 getSize();
01303 
01304         LLScriptExpression      *mLeftSide;
01305         LLScriptExpression      *mRightSide;
01306 };
01307 
01308 class LLScriptDivide : public LLScriptExpression
01309 {
01310 public:
01311         LLScriptDivide(S32 line, S32 col, LLScriptExpression *leftside, LLScriptExpression *rightside)
01312                 : LLScriptExpression(line, col, LET_DIVIDE), mLeftSide(leftside), mRightSide(rightside)
01313         {
01314         }
01315 
01316         ~LLScriptDivide() 
01317         {
01318         }
01319 
01320         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01321         S32 getSize();
01322 
01323         LLScriptExpression      *mLeftSide;
01324         LLScriptExpression      *mRightSide;
01325 };
01326 
01327 class LLScriptMod : public LLScriptExpression
01328 {
01329 public:
01330         LLScriptMod(S32 line, S32 col, LLScriptExpression *leftside, LLScriptExpression *rightside)
01331                 : LLScriptExpression(line, col, LET_MOD), mLeftSide(leftside), mRightSide(rightside)
01332         {
01333         }
01334 
01335         ~LLScriptMod() 
01336         {
01337         }
01338 
01339         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01340         S32 getSize();
01341 
01342         LLScriptExpression      *mLeftSide;
01343         LLScriptExpression      *mRightSide;
01344 };
01345 
01346 class LLScriptBitAnd : public LLScriptExpression
01347 {
01348 public:
01349         LLScriptBitAnd(S32 line, S32 col, LLScriptExpression *leftside, LLScriptExpression *rightside)
01350                 : LLScriptExpression(line, col, LET_BIT_AND), mLeftSide(leftside), mRightSide(rightside)
01351         {
01352         }
01353 
01354         ~LLScriptBitAnd() 
01355         {
01356         }
01357 
01358         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01359         S32 getSize();
01360 
01361         LLScriptExpression      *mLeftSide;
01362         LLScriptExpression      *mRightSide;
01363 };
01364 
01365 class LLScriptBitOr : public LLScriptExpression
01366 {
01367 public:
01368         LLScriptBitOr(S32 line, S32 col, LLScriptExpression *leftside, LLScriptExpression *rightside)
01369                 : LLScriptExpression(line, col, LET_BIT_OR), mLeftSide(leftside), mRightSide(rightside)
01370         {
01371         }
01372 
01373         ~LLScriptBitOr() 
01374         {
01375         }
01376 
01377         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01378         S32 getSize();
01379 
01380         LLScriptExpression      *mLeftSide;
01381         LLScriptExpression      *mRightSide;
01382 };
01383 
01384 class LLScriptBitXor : public LLScriptExpression
01385 {
01386 public:
01387         LLScriptBitXor(S32 line, S32 col, LLScriptExpression *leftside, LLScriptExpression *rightside)
01388                 : LLScriptExpression(line, col, LET_BIT_XOR), mLeftSide(leftside), mRightSide(rightside)
01389         {
01390         }
01391 
01392         ~LLScriptBitXor() 
01393         {
01394         }
01395 
01396         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01397         S32 getSize();
01398 
01399         LLScriptExpression      *mLeftSide;
01400         LLScriptExpression      *mRightSide;
01401 };
01402 
01403 class LLScriptBooleanAnd : public LLScriptExpression
01404 {
01405 public:
01406         LLScriptBooleanAnd(S32 line, S32 col, LLScriptExpression *leftside, LLScriptExpression *rightside)
01407                 : LLScriptExpression(line, col, LET_BOOLEAN_AND), mLeftSide(leftside), mRightSide(rightside)
01408         {
01409         }
01410 
01411         ~LLScriptBooleanAnd() 
01412         {
01413         }
01414 
01415         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01416         S32 getSize();
01417 
01418         LLScriptExpression      *mLeftSide;
01419         LLScriptExpression      *mRightSide;
01420 };
01421 
01422 class LLScriptBooleanOr : public LLScriptExpression
01423 {
01424 public:
01425         LLScriptBooleanOr(S32 line, S32 col, LLScriptExpression *leftside, LLScriptExpression *rightside)
01426                 : LLScriptExpression(line, col, LET_BOOLEAN_OR), mLeftSide(leftside), mRightSide(rightside)
01427         {
01428         }
01429 
01430         ~LLScriptBooleanOr() 
01431         {
01432         }
01433 
01434         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01435         S32 getSize();
01436 
01437         LLScriptExpression      *mLeftSide;
01438         LLScriptExpression      *mRightSide;
01439 };
01440 
01441 class LLScriptShiftLeft : public LLScriptExpression
01442 {
01443 public:
01444         LLScriptShiftLeft(S32 line, S32 col, LLScriptExpression *leftside, LLScriptExpression *rightside)
01445                 : LLScriptExpression(line, col, LET_SHIFT_LEFT), mLeftSide(leftside), mRightSide(rightside)
01446         {
01447         }
01448 
01449         ~LLScriptShiftLeft() 
01450         {
01451         }
01452 
01453         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01454         S32 getSize();
01455 
01456         LLScriptExpression      *mLeftSide;
01457         LLScriptExpression      *mRightSide;
01458 };
01459 
01460 class LLScriptShiftRight : public LLScriptExpression
01461 {
01462 public:
01463         LLScriptShiftRight(S32 line, S32 col, LLScriptExpression *leftside, LLScriptExpression *rightside)
01464                 : LLScriptExpression(line, col, LET_SHIFT_RIGHT), mLeftSide(leftside), mRightSide(rightside)
01465         {
01466         }
01467 
01468         ~LLScriptShiftRight() 
01469         {
01470         }
01471 
01472         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01473         S32 getSize();
01474 
01475         LLScriptExpression      *mLeftSide;
01476         LLScriptExpression      *mRightSide;
01477 };
01478 
01479 class LLScriptParenthesis : public LLScriptExpression
01480 {
01481 public:
01482         LLScriptParenthesis(S32 line, S32 col, LLScriptExpression *expression)
01483                 : LLScriptExpression(line, col, LET_PARENTHESIS), mExpression(expression)
01484         {
01485         }
01486 
01487         ~LLScriptParenthesis() 
01488         {
01489         }
01490 
01491         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01492         S32 getSize();
01493 
01494         LLScriptExpression      *mExpression;
01495 };
01496 
01497 class LLScriptUnaryMinus : public LLScriptExpression
01498 {
01499 public:
01500         LLScriptUnaryMinus(S32 line, S32 col, LLScriptExpression *expression)
01501                 : LLScriptExpression(line, col, LET_UNARY_MINUS), mExpression(expression)
01502         {
01503         }
01504 
01505         ~LLScriptUnaryMinus() 
01506         {
01507         }
01508 
01509         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01510         S32 getSize();
01511 
01512         LLScriptExpression      *mExpression;
01513 };
01514 
01515 class LLScriptBooleanNot : public LLScriptExpression
01516 {
01517 public:
01518         LLScriptBooleanNot(S32 line, S32 col, LLScriptExpression *expression)
01519                 : LLScriptExpression(line, col, LET_BOOLEAN_NOT), mExpression(expression)
01520         {
01521         }
01522 
01523         ~LLScriptBooleanNot() 
01524         {
01525         }
01526 
01527         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01528         S32 getSize();
01529 
01530         LLScriptExpression      *mExpression;
01531 };
01532 
01533 class LLScriptBitNot : public LLScriptExpression
01534 {
01535 public:
01536         LLScriptBitNot(S32 line, S32 col, LLScriptExpression *expression)
01537                 : LLScriptExpression(line, col, LET_BIT_NOT), mExpression(expression)
01538         {
01539         }
01540 
01541         ~LLScriptBitNot() 
01542         {
01543         }
01544 
01545         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01546         S32 getSize();
01547 
01548         LLScriptExpression      *mExpression;
01549 };
01550 
01551 class LLScriptPreIncrement : public LLScriptExpression
01552 {
01553 public:
01554         LLScriptPreIncrement(S32 line, S32 col, LLScriptExpression *expression)
01555                 : LLScriptExpression(line, col, LET_PRE_INCREMENT), mExpression(expression)
01556         {
01557         }
01558 
01559         ~LLScriptPreIncrement() 
01560         {
01561         }
01562 
01563         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01564         S32 getSize();
01565 
01566         LLScriptExpression      *mExpression;
01567 };
01568 
01569 class LLScriptPreDecrement : public LLScriptExpression
01570 {
01571 public:
01572         LLScriptPreDecrement(S32 line, S32 col, LLScriptExpression *expression)
01573                 : LLScriptExpression(line, col, LET_PRE_DECREMENT), mExpression(expression)
01574         {
01575         }
01576 
01577         ~LLScriptPreDecrement() 
01578         {
01579         }
01580 
01581         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01582         S32 getSize();
01583 
01584         LLScriptExpression      *mExpression;
01585 };
01586 
01587 class LLScriptTypeCast : public LLScriptExpression
01588 {
01589 public:
01590         LLScriptTypeCast(S32 line, S32 col, LLScriptType *type, LLScriptExpression *expression)
01591                 : LLScriptExpression(line, col, LET_CAST), mType(type), mExpression(expression)
01592         {
01593         }
01594 
01595         ~LLScriptTypeCast() 
01596         {
01597         }
01598 
01599         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01600         S32 getSize();
01601 
01602         LLScriptType            *mType;
01603         LLScriptExpression      *mExpression;
01604 };
01605 
01606 class LLScriptVectorInitializer : public LLScriptExpression
01607 {
01608 public:
01609         LLScriptVectorInitializer(S32 line, S32 col, LLScriptExpression *expression1, 
01610                                                                                                  LLScriptExpression *expression2, 
01611                                                                                                  LLScriptExpression *expression3)
01612                 : LLScriptExpression(line, col, LET_VECTOR_INITIALIZER), 
01613                         mExpression1(expression1),
01614                         mExpression2(expression2),
01615                         mExpression3(expression3)
01616         {
01617         }
01618 
01619         ~LLScriptVectorInitializer() 
01620         {
01621         }
01622 
01623         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01624         S32 getSize();
01625 
01626         LLScriptExpression      *mExpression1;
01627         LLScriptExpression      *mExpression2;
01628         LLScriptExpression      *mExpression3;
01629 };
01630 
01631 class LLScriptQuaternionInitializer : public LLScriptExpression
01632 {
01633 public:
01634         LLScriptQuaternionInitializer(S32 line, S32 col, LLScriptExpression *expression1, 
01635                                                                                                          LLScriptExpression *expression2, 
01636                                                                                                          LLScriptExpression *expression3,
01637                                                                                                          LLScriptExpression *expression4)
01638                 : LLScriptExpression(line, col, LET_VECTOR_INITIALIZER), 
01639                         mExpression1(expression1),
01640                         mExpression2(expression2),
01641                         mExpression3(expression3),
01642                         mExpression4(expression4)
01643         {
01644         }
01645 
01646         ~LLScriptQuaternionInitializer() 
01647         {
01648         }
01649 
01650         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01651         S32 getSize();
01652 
01653         LLScriptExpression      *mExpression1;
01654         LLScriptExpression      *mExpression2;
01655         LLScriptExpression      *mExpression3;
01656         LLScriptExpression      *mExpression4;
01657 };
01658 
01659 class LLScriptListInitializer : public LLScriptExpression
01660 {
01661 public:
01662         LLScriptListInitializer(S32 line, S32 col, LLScriptExpression *expressionlist)
01663                 : LLScriptExpression(line, col, LET_LIST_INITIALIZER), mExpressionList(expressionlist)
01664         {
01665         }
01666 
01667         ~LLScriptListInitializer() 
01668         {
01669         }
01670 
01671         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01672         S32 getSize();
01673 
01674         LLScriptExpression      *mExpressionList;
01675 };
01676 
01677 class LLScriptPostIncrement : public LLScriptExpression
01678 {
01679 public:
01680         LLScriptPostIncrement(S32 line, S32 col, LLScriptExpression *expression)
01681                 : LLScriptExpression(line, col, LET_POST_INCREMENT), mExpression(expression)
01682         {
01683         }
01684 
01685         ~LLScriptPostIncrement() 
01686         {
01687         }
01688 
01689         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01690         S32 getSize();
01691 
01692         LLScriptExpression      *mExpression;
01693 };
01694 
01695 class LLScriptPostDecrement : public LLScriptExpression
01696 {
01697 public:
01698         LLScriptPostDecrement(S32 line, S32 col, LLScriptExpression *expression)
01699                 : LLScriptExpression(line, col, LET_POST_DECREMENT), mExpression(expression)
01700         {
01701         }
01702 
01703         ~LLScriptPostDecrement() 
01704         {
01705         }
01706 
01707         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01708         S32 getSize();
01709 
01710         LLScriptExpression      *mExpression;
01711 };
01712 
01713 class LLScriptFunctionCall : public LLScriptExpression
01714 {
01715 public:
01716         LLScriptFunctionCall(S32 line, S32 col, LLScriptIdentifier *identifier, LLScriptExpression *expressionlist)
01717                 : LLScriptExpression(line, col, LET_FUNCTION_CALL), mIdentifier(identifier), mExpressionList(expressionlist)
01718         {
01719         }
01720 
01721         ~LLScriptFunctionCall() 
01722         {
01723         }
01724 
01725         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01726         S32 getSize();
01727 
01728         LLScriptIdentifier      *mIdentifier;
01729         LLScriptExpression      *mExpressionList;
01730 };
01731 
01732 class LLScriptPrint : public LLScriptExpression
01733 {
01734 public:
01735         LLScriptPrint(S32 line, S32 col, LLScriptExpression *expression)
01736                 : LLScriptExpression(line, col, LET_PRINT), mExpression(expression)
01737         {
01738         }
01739 
01740         ~LLScriptPrint() 
01741         {
01742         }
01743 
01744         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01745         S32 getSize();
01746 
01747         LLScriptExpression      *mExpression;
01748 };
01749 
01750 class LLScriptConstantExpression : public LLScriptExpression
01751 {
01752 public:
01753         LLScriptConstantExpression(S32 line, S32 col, LLScriptConstant *constant)
01754                 : LLScriptExpression(line, col, LET_CONSTANT), mConstant(constant)
01755         {
01756         }
01757 
01758         ~LLScriptConstantExpression() 
01759         {
01760         }
01761 
01762         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01763         S32 getSize();
01764 
01765         LLScriptConstant        *mConstant;
01766 };
01767 
01768 // statement
01769 typedef enum e_lscript_statement_types
01770 {
01771         LSSMT_NULL,
01772         LSSMT_SEQUENCE,
01773         LSSMT_NOOP,
01774         LSSMT_STATE_CHANGE,
01775         LSSMT_JUMP,
01776         LSSMT_LABEL,
01777         LSSMT_RETURN,
01778         LSSMT_EXPRESSION,
01779         LSSMT_IF,
01780         LSSMT_IF_ELSE,
01781         LSSMT_FOR,
01782         LSSMT_DO_WHILE,
01783         LSSMT_WHILE,
01784         LSSMT_DECLARATION,
01785         LSSMT_COMPOUND_STATEMENT,
01786         LSSMT_EOF
01787 } LSCRIPTStatementType;
01788 
01789 class LLScriptStatement : public LLScriptFilePosition
01790 {
01791 public:
01792         LLScriptStatement(S32 line, S32 col, LSCRIPTStatementType type)
01793                 : LLScriptFilePosition(line, col), mType(type), mNextp(NULL), mStatementScope(NULL), mAllowDeclarations(TRUE)
01794         {
01795         }
01796 
01797         virtual ~LLScriptStatement() 
01798         {
01799                 delete mStatementScope;
01800         }
01801 
01802         void addStatement(LLScriptStatement *event);
01803 
01804         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01805 
01806         void gonext(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01807         S32 getSize();
01808 
01809         LSCRIPTStatementType    mType;
01810         LLScriptStatement               *mNextp;
01811         LLScriptScope                   *mStatementScope;
01812         BOOL                                    mAllowDeclarations;
01813 };
01814 
01815 class LLScriptStatementSequence : public LLScriptStatement
01816 {
01817 public:
01818         LLScriptStatementSequence(S32 line, S32 col, LLScriptStatement *first, LLScriptStatement *second)
01819                 : LLScriptStatement(line, col, LSSMT_SEQUENCE), mFirstp(first), mSecondp(second)
01820         {
01821         }
01822 
01823         ~LLScriptStatementSequence() 
01824         {
01825         }
01826 
01827         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01828         S32 getSize();
01829 
01830         LLScriptStatement *mFirstp;
01831         LLScriptStatement *mSecondp;
01832 };
01833 
01834 class LLScriptNOOP : public LLScriptStatement
01835 {
01836 public:
01837         LLScriptNOOP(S32 line, S32 col)
01838                 : LLScriptStatement(line, col, LSSMT_NOOP)
01839         {
01840         }
01841 
01842         ~LLScriptNOOP() {}
01843 
01844         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01845         S32 getSize();
01846 };
01847 
01848 class LLScriptStateChange : public LLScriptStatement
01849 {
01850 public:
01851         LLScriptStateChange(S32 line, S32 col, LLScriptIdentifier *identifier)
01852                 : LLScriptStatement(line, col, LSSMT_STATE_CHANGE), mIdentifier(identifier)
01853         {
01854         }
01855 
01856         ~LLScriptStateChange() 
01857         {
01858         }
01859 
01860         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01861         S32 getSize();
01862 
01863         LLScriptIdentifier *mIdentifier;
01864 };
01865 
01866 class LLScriptJump : public LLScriptStatement
01867 {
01868 public:
01869         LLScriptJump(S32 line, S32 col, LLScriptIdentifier *identifier)
01870                 : LLScriptStatement(line, col, LSSMT_JUMP), mIdentifier(identifier)
01871         {
01872         }
01873 
01874         ~LLScriptJump() 
01875         {
01876         }
01877 
01878         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01879         S32 getSize();
01880 
01881         LLScriptIdentifier *mIdentifier;
01882 };
01883 
01884 class LLScriptLabel : public LLScriptStatement
01885 {
01886 public:
01887         LLScriptLabel(S32 line, S32 col, LLScriptIdentifier *identifier)
01888                 : LLScriptStatement(line, col, LSSMT_LABEL), mIdentifier(identifier)
01889         {
01890         }
01891 
01892         ~LLScriptLabel()
01893         {
01894         }
01895 
01896         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01897         S32 getSize();
01898 
01899         LLScriptIdentifier *mIdentifier;
01900 };
01901 
01902 class LLScriptReturn : public LLScriptStatement
01903 {
01904 public:
01905         LLScriptReturn(S32 line, S32 col, LLScriptExpression *expression)
01906                 : LLScriptStatement(line, col, LSSMT_RETURN), mExpression(expression), mType(LST_NULL)
01907         {
01908         }
01909 
01910         ~LLScriptReturn() 
01911         {
01912         }
01913 
01914         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01915         S32 getSize();
01916 
01917         LLScriptExpression      *mExpression;
01918         LSCRIPTType                     mType;
01919 };
01920 
01921 class LLScriptExpressionStatement : public LLScriptStatement
01922 {
01923 public:
01924         LLScriptExpressionStatement(S32 line, S32 col, LLScriptExpression *expression)
01925                 : LLScriptStatement(line, col, LSSMT_EXPRESSION), mExpression(expression)
01926         {
01927         }
01928 
01929         ~LLScriptExpressionStatement() 
01930         {
01931         }
01932 
01933         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01934         S32 getSize();
01935 
01936         LLScriptExpression      *mExpression;
01937 };
01938 
01939 class LLScriptIf : public LLScriptStatement
01940 {
01941 public:
01942         LLScriptIf(S32 line, S32 col, LLScriptExpression *expression, LLScriptStatement *statement)
01943                 : LLScriptStatement(line, col, LSSMT_IF), mType(LST_NULL), mExpression(expression), mStatement(statement)
01944         {
01945         }
01946 
01947         ~LLScriptIf() 
01948         {
01949         }
01950 
01951         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01952         S32 getSize();
01953 
01954         LSCRIPTType                             mType;
01955         LLScriptExpression              *mExpression;
01956         LLScriptStatement               *mStatement;
01957 };
01958 
01959 class LLScriptIfElse : public LLScriptStatement
01960 {
01961 public:
01962         LLScriptIfElse(S32 line, S32 col, LLScriptExpression *expression, LLScriptStatement *statement1, LLScriptStatement *statement2)
01963                 : LLScriptStatement(line, col, LSSMT_IF_ELSE), mExpression(expression), mStatement1(statement1), mStatement2(statement2), mType(LST_NULL)
01964         {
01965         }
01966 
01967         ~LLScriptIfElse() 
01968         {
01969         }
01970 
01971         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01972         S32 getSize();
01973 
01974         LLScriptExpression              *mExpression;
01975         LLScriptStatement               *mStatement1;
01976         LLScriptStatement               *mStatement2;
01977         LSCRIPTType                             mType;
01978 };
01979 
01980 class LLScriptFor : public LLScriptStatement
01981 {
01982 public:
01983         LLScriptFor(S32 line, S32 col, LLScriptExpression *sequence, LLScriptExpression *expression, LLScriptExpression *expressionlist, LLScriptStatement *statement)
01984                 : LLScriptStatement(line, col, LSSMT_FOR), mSequence(sequence), mExpression(expression), mExpressionList(expressionlist), mStatement(statement), mType(LST_NULL)
01985         {
01986         }
01987 
01988         ~LLScriptFor() 
01989         {
01990         }
01991 
01992         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
01993         S32 getSize();
01994 
01995         LLScriptExpression              *mSequence;
01996         LLScriptExpression              *mExpression;
01997         LLScriptExpression              *mExpressionList;
01998         LLScriptStatement               *mStatement;
01999         LSCRIPTType                             mType;
02000 };
02001 
02002 class LLScriptDoWhile : public LLScriptStatement
02003 {
02004 public:
02005         LLScriptDoWhile(S32 line, S32 col, LLScriptStatement *statement, LLScriptExpression *expression)
02006                 : LLScriptStatement(line, col, LSSMT_DO_WHILE), mStatement(statement), mExpression(expression), mType(LST_NULL)
02007         {
02008         }
02009 
02010         ~LLScriptDoWhile() 
02011         {
02012         }
02013 
02014         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
02015         S32 getSize();
02016 
02017         LLScriptStatement               *mStatement;
02018         LLScriptExpression              *mExpression;
02019         LSCRIPTType                             mType;
02020 };
02021 
02022 class LLScriptWhile : public LLScriptStatement
02023 {
02024 public:
02025         LLScriptWhile(S32 line, S32 col, LLScriptExpression *expression, LLScriptStatement *statement)
02026                 : LLScriptStatement(line, col, LSSMT_WHILE), mExpression(expression), mStatement(statement), mType(LST_NULL)
02027         {
02028         }
02029 
02030         ~LLScriptWhile() 
02031         {
02032         }
02033 
02034         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
02035         S32 getSize();
02036 
02037         LLScriptExpression                      *mExpression;
02038         LLScriptStatement                       *mStatement;
02039         LSCRIPTType                                     mType;
02040 };
02041 
02042 // local variables
02043 class LLScriptDeclaration : public LLScriptStatement
02044 {
02045 public:
02046         LLScriptDeclaration(S32 line, S32 col, LLScriptType *type, LLScriptIdentifier *identifier, LLScriptExpression *expression)
02047                 : LLScriptStatement(line, col, LSSMT_DECLARATION), mType(type), mIdentifier(identifier), mExpression(expression)
02048         {
02049         }
02050 
02051         ~LLScriptDeclaration() 
02052         {
02053         }
02054 
02055         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
02056         S32 getSize();
02057 
02058         LLScriptType            *mType;
02059         LLScriptIdentifier      *mIdentifier;
02060         LLScriptExpression      *mExpression;
02061 };
02062 
02063 class LLScriptCompoundStatement : public LLScriptStatement
02064 {
02065 public:
02066         LLScriptCompoundStatement(S32 line, S32 col, LLScriptStatement *statement)
02067                 : LLScriptStatement(line, col, LSSMT_COMPOUND_STATEMENT),  mStatement(statement)
02068         {
02069         }
02070 
02071         ~LLScriptCompoundStatement() 
02072         {
02073         }
02074 
02075         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
02076         S32 getSize();
02077 
02078         LLScriptStatement       *mStatement;
02079 };
02080 
02081 class LLScriptEventHandler : public LLScriptFilePosition
02082 {
02083 public:
02084         LLScriptEventHandler(S32 line, S32 col, LLScriptEvent *event, LLScriptStatement *statement)
02085                 : LLScriptFilePosition(line, col), mEventp(event), mStatement(statement), mNextp(NULL), mEventScope(NULL), mbNeedTrailingReturn(FALSE), mScopeEntry(NULL), mStackSpace(0)
02086         {
02087         }
02088 
02089         ~LLScriptEventHandler()
02090         {
02091                 delete mEventScope;
02092                 delete mScopeEntry;
02093         }
02094 
02095         void addEvent(LLScriptEventHandler *event);
02096 
02097         void gonext(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
02098 
02099         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
02100         S32 getSize();
02101 
02102         LLScriptEvent                   *mEventp;
02103         LLScriptStatement               *mStatement;
02104         LLScriptEventHandler    *mNextp;
02105         LLScriptScope                   *mEventScope;
02106         BOOL                                    mbNeedTrailingReturn;
02107         LLScriptScopeEntry              *mScopeEntry;
02108 
02109         S32                                             mStackSpace;
02110 
02111 };
02112 
02113 
02114 // global functions
02115 class LLScriptFunctionDec : public LLScriptFilePosition
02116 {
02117 public:
02118         LLScriptFunctionDec(S32 line, S32 col, LLScriptType *type, LLScriptIdentifier *identifier)
02119                 : LLScriptFilePosition(line, col), mType(type), mIdentifier(identifier), mNextp(NULL)
02120         {
02121         }
02122 
02123         ~LLScriptFunctionDec() 
02124         {
02125         }
02126 
02127         void addFunctionParameter(LLScriptFunctionDec *dec);
02128 
02129         void gonext(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
02130 
02131         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
02132         S32 getSize();
02133 
02134         LLScriptType            *mType;
02135         LLScriptIdentifier      *mIdentifier;
02136         LLScriptFunctionDec     *mNextp;
02137 };
02138 
02139 class LLScriptGlobalFunctions : public LLScriptFilePosition
02140 {
02141 public:
02142         LLScriptGlobalFunctions(S32 line, S32 col, LLScriptType *type, 
02143                                                                                            LLScriptIdentifier *identifier, 
02144                                                                                            LLScriptFunctionDec *parameters, 
02145                                                                                            LLScriptStatement *statements)
02146                 : LLScriptFilePosition(line, col), mType(type), mIdentifier(identifier), mParameters(parameters), mStatements(statements), mNextp(NULL), mFunctionScope(NULL), mbNeedTrailingReturn(FALSE)
02147         {
02148         }
02149 
02150         void addGlobalFunction(LLScriptGlobalFunctions *global);
02151 
02152         ~LLScriptGlobalFunctions()
02153         {
02154                 delete mFunctionScope;
02155         }
02156 
02157         void gonext(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
02158 
02159         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
02160         S32 getSize();
02161 
02162         LLScriptType                            *mType;
02163         LLScriptIdentifier                      *mIdentifier;
02164         LLScriptFunctionDec                     *mParameters;
02165         LLScriptStatement                       *mStatements;
02166         LLScriptGlobalFunctions         *mNextp;
02167         LLScriptScope                           *mFunctionScope;
02168         BOOL                                            mbNeedTrailingReturn;
02169 
02170 };
02171 
02172 typedef enum e_lscript_state_type
02173 {
02174         LSSTYPE_NULL,
02175         LSSTYPE_DEFAULT,
02176         LSSTYPE_USER,
02177         LSSTYPE_EOF
02178 } LSCRIPTStateType;
02179 
02180 // info on state
02181 class LLScriptState : public LLScriptFilePosition
02182 {
02183 public:
02184         LLScriptState(S32 line, S32 col, LSCRIPTStateType type, LLScriptIdentifier *identifier, LLScriptEventHandler *event)
02185                 : LLScriptFilePosition(line, col), mType(type), mIdentifier(identifier), mEvent(event), mNextp(NULL)
02186         {
02187         }
02188 
02189         void addState(LLScriptState *state);
02190 
02191         ~LLScriptState() 
02192         {
02193         }
02194 
02195         void gonext(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
02196 
02197         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
02198         S32 getSize();
02199 
02200         LSCRIPTStateType                mType;
02201         LLScriptIdentifier              *mIdentifier;
02202         LLScriptEventHandler    *mEvent;
02203         LLScriptState                   *mNextp;
02204 
02205 };
02206 
02207 class LLScritpGlobalStorage : public LLScriptFilePosition
02208 {
02209 public:
02210 
02211         LLScritpGlobalStorage(LLScriptGlobalVariable *var)
02212                 : LLScriptFilePosition(0, 0), mGlobal(var), mbGlobalFunction(FALSE), mNextp(NULL)
02213         {
02214         }
02215 
02216         LLScritpGlobalStorage(LLScriptGlobalFunctions *func)
02217                 : LLScriptFilePosition(0, 0), mGlobal(func), mbGlobalFunction(TRUE), mNextp(NULL)
02218         {
02219         }
02220 
02221         ~LLScritpGlobalStorage()
02222         {
02223         }
02224 
02225         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata)
02226         {
02227         }
02228         
02229         S32 getSize()
02230         {
02231                 return 0;
02232         }
02233 
02234         void addGlobal(LLScritpGlobalStorage *global)
02235         {
02236                 if (mNextp)
02237                 {
02238                         global->mNextp = mNextp;
02239                 }
02240                 mNextp = global;
02241         }
02242 
02243         LLScriptFilePosition    *mGlobal;
02244         BOOL                                    mbGlobalFunction;
02245         LLScritpGlobalStorage   *mNextp;
02246 };
02247 
02248 // top level container for entire script
02249 class LLScriptScript : public LLScriptFilePosition
02250 {
02251 public:
02252         LLScriptScript(LLScritpGlobalStorage *globals, 
02253                                    LLScriptState *states);
02254 
02255         ~LLScriptScript()
02256         {
02257                 delete mGlobalScope;
02258         }
02259 
02260         void recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pass, LSCRIPTPruneType ptype, BOOL &prunearg, LLScriptScope *scope, LSCRIPTType &type, LSCRIPTType basetype, U64 &count, LLScriptByteCodeChunk *chunk, LLScriptByteCodeChunk *heap, S32 stacksize, LLScriptScopeEntry *entry, S32 entrycount, LLScriptLibData **ldata);
02261         S32 getSize();
02262 
02263         void setBytecodeDest(const char* dst_filename);
02264 
02265         LLScriptState                   *mStates;
02266         LLScriptScope                   *mGlobalScope;
02267         LLScriptGlobalVariable  *mGlobals;
02268         LLScriptGlobalFunctions *mGlobalFunctions;
02269         BOOL                                    mGodLike;
02270 
02271 private:
02272         char mBytecodeDest[MAX_STRING];         /*Flawfinder: ignore*/
02273 };
02274 
02275 class LLScriptAllocationManager
02276 {
02277 public:
02278         LLScriptAllocationManager() {}
02279         ~LLScriptAllocationManager() 
02280         {
02281                 mAllocationList.deleteAllData();
02282         }
02283 
02284         void addAllocation(LLScriptFilePosition *ptr)
02285         {
02286                 mAllocationList.addData(ptr);
02287         }
02288 
02289         void deleteAllocations()
02290         {
02291                 mAllocationList.deleteAllData();
02292         }
02293 
02294         LLLinkedList<LLScriptFilePosition> mAllocationList;
02295 };
02296 
02297 extern LLScriptAllocationManager *gAllocationManager;
02298 extern LLScriptScript                    *gScriptp;
02299 
02300 #endif

Generated on Thu Jul 1 06:09:53 2010 for Second Life Viewer by  doxygen 1.4.7