2 typedef long long int64;
3 typedef unsigned long long uint64;
4 #elif defined(__TINYC__)
6 #define __builtin_va_list va_list
7 #define __builtin_va_start va_start
8 #define __builtin_va_end va_end
10 #define strcasecmp stricmp
11 #define strncasecmp strnicmp
12 #define __declspec(x) __attribute__((x))
14 typedef long long int64;
15 typedef unsigned long long uint64;
17 typedef __int64 int64;
18 typedef unsigned __int64 uint64;
21 #define __ENDIAN_PAD(x) (8 - (x))
23 #define __ENDIAN_PAD(x) 0
25 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
27 struct __ecereNameSpace__ecere__sys__BTNode;
29 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BinaryTree;
31 struct __ecereNameSpace__ecere__sys__BinaryTree
33 struct __ecereNameSpace__ecere__sys__BTNode * root;
35 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, unsigned int a, unsigned int b);
36 void (* FreeKey)(void * key);
39 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldList;
41 struct __ecereNameSpace__ecere__sys__OldList
50 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Method;
52 struct __ecereNameSpace__ecere__com__Method
55 struct __ecereNameSpace__ecere__com__Method * parent;
56 struct __ecereNameSpace__ecere__com__Method * left;
57 struct __ecereNameSpace__ecere__com__Method * right;
62 struct __ecereNameSpace__ecere__com__Class * _class;
64 char * dataTypeString;
65 struct Type * dataType;
69 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Property;
71 struct __ecereNameSpace__ecere__com__Property
73 struct __ecereNameSpace__ecere__com__Property * prev;
74 struct __ecereNameSpace__ecere__com__Property * next;
76 unsigned int isProperty;
79 struct __ecereNameSpace__ecere__com__Class * _class;
80 char * dataTypeString;
81 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
82 struct Type * dataType;
85 unsigned int (* IsSet)();
89 unsigned int conversion;
90 unsigned int watcherOffset;
92 unsigned int compiled;
93 unsigned int selfWatchable;
94 unsigned int isWatchable;
97 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_CodePosition;
104 unsigned int included;
107 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Location;
111 struct CodePosition start;
112 struct CodePosition end;
115 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attrib;
121 struct __ecereNameSpace__ecere__sys__OldList * attribs;
124 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ExtDecl;
133 struct Attrib * attr;
137 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDefinition;
139 struct ClassDefinition
141 struct ClassDefinition * prev;
142 struct ClassDefinition * next;
144 struct Specifier * _class;
145 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
146 struct __ecereNameSpace__ecere__sys__OldList * definitions;
147 struct Symbol * symbol;
148 struct Location blockStart;
149 struct Location nameLoc;
152 unsigned int deleteWatchable;
155 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
159 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Instantiation;
163 struct Instantiation * prev;
164 struct Instantiation * next;
166 struct Specifier * _class;
167 struct Expression * exp;
168 struct __ecereNameSpace__ecere__sys__OldList * members;
169 struct Symbol * symbol;
170 unsigned int fullSet;
171 unsigned int isConstant;
172 unsigned char * data;
173 struct Location nameLoc;
174 struct Location insideLoc;
178 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declaration;
182 struct Declaration * prev;
183 struct Declaration * next;
190 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
191 struct __ecereNameSpace__ecere__sys__OldList * declarators;
193 struct Instantiation * inst;
196 struct Identifier * id;
197 struct Expression * exp;
200 struct Specifier * extStorage;
201 struct Symbol * symbol;
205 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Statement;
209 struct Statement * prev;
210 struct Statement * next;
215 struct __ecereNameSpace__ecere__sys__OldList * expressions;
218 struct Identifier * id;
219 struct Statement * stmt;
223 struct Expression * exp;
224 struct Statement * stmt;
228 struct __ecereNameSpace__ecere__sys__OldList * declarations;
229 struct __ecereNameSpace__ecere__sys__OldList * statements;
230 struct Context * context;
231 unsigned int isSwitch;
235 struct __ecereNameSpace__ecere__sys__OldList * exp;
236 struct Statement * stmt;
237 struct Statement * elseStmt;
241 struct __ecereNameSpace__ecere__sys__OldList * exp;
242 struct Statement * stmt;
246 struct __ecereNameSpace__ecere__sys__OldList * exp;
247 struct Statement * stmt;
251 struct __ecereNameSpace__ecere__sys__OldList * exp;
252 struct Statement * stmt;
256 struct Statement * init;
257 struct Statement * check;
258 struct __ecereNameSpace__ecere__sys__OldList * increment;
259 struct Statement * stmt;
263 struct Identifier * id;
267 struct Specifier * spec;
269 struct __ecereNameSpace__ecere__sys__OldList * inputFields;
270 struct __ecereNameSpace__ecere__sys__OldList * outputFields;
271 struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
275 struct Expression * watcher;
276 struct Expression * object;
277 struct __ecereNameSpace__ecere__sys__OldList * watches;
281 struct Identifier * id;
282 struct __ecereNameSpace__ecere__sys__OldList * exp;
283 struct __ecereNameSpace__ecere__sys__OldList * filter;
284 struct Statement * stmt;
286 struct Declaration * decl;
290 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
294 struct TypeName * prev;
295 struct TypeName * next;
297 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
298 struct Declarator * declarator;
300 struct Expression * bitCount;
303 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Initializer;
307 struct Initializer * prev;
308 struct Initializer * next;
313 struct Expression * exp;
314 struct __ecereNameSpace__ecere__sys__OldList * list;
316 unsigned int isConstant;
319 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
321 struct __ecereNameSpace__ecere__com__DataValue
339 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
343 struct Expression * prev;
344 struct Expression * next;
352 struct Identifier * identifier;
354 struct Statement * compound;
355 struct Instantiation * instance;
357 struct __ecereNameSpace__ecere__sys__OldList * list;
360 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
361 struct Declarator * decl;
365 struct Identifier * id;
369 struct Expression * exp;
370 struct __ecereNameSpace__ecere__sys__OldList * arguments;
371 struct Location argLoc;
375 struct Expression * exp;
376 struct __ecereNameSpace__ecere__sys__OldList * index;
380 struct Expression * exp;
381 struct Identifier * member;
383 unsigned int thisPtr;
388 struct Expression * exp1;
389 struct Expression * exp2;
391 struct TypeName * typeName;
392 struct Specifier * _class;
395 struct TypeName * typeName;
396 struct Expression * exp;
400 struct Expression * cond;
401 struct __ecereNameSpace__ecere__sys__OldList * exp;
402 struct Expression * elseExp;
406 struct TypeName * typeName;
407 struct Expression * size;
411 struct TypeName * typeName;
412 struct Expression * size;
413 struct Expression * exp;
418 struct Identifier * id;
422 struct Expression * ds;
423 struct Expression * name;
427 struct TypeName * typeName;
428 struct Initializer * initializer;
432 struct Expression * exp;
433 struct TypeName * typeName;
436 unsigned int debugValue;
437 struct __ecereNameSpace__ecere__com__DataValue val;
438 unsigned int address;
439 unsigned int hasAddress;
440 struct Type * expType;
441 struct Type * destType;
444 unsigned int byReference;
445 unsigned int isConstant;
446 unsigned int addedThis;
447 unsigned int needCast;
448 unsigned int thisPtr;
451 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
453 struct TemplateDatatype
455 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
456 struct Declarator * decl;
459 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateArgument;
461 struct TemplateArgument;
463 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
465 struct TemplateParameter
467 struct TemplateParameter * prev;
468 struct TemplateParameter * next;
471 struct Identifier * identifier;
474 struct TemplateDatatype * dataType;
477 struct TemplateArgument * defaultArgument;
478 char * dataTypeString;
479 struct Type * baseType;
482 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Specifier;
486 struct Specifier * prev;
487 struct Specifier * next;
495 struct ExtDecl * extDecl;
497 struct Symbol * symbol;
498 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
502 struct Identifier * id;
503 struct __ecereNameSpace__ecere__sys__OldList * list;
504 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
505 struct __ecereNameSpace__ecere__sys__OldList * definitions;
506 unsigned int addNameSpace;
507 struct Context * ctx;
509 struct Expression * expression;
510 struct Specifier * _class;
511 struct TemplateParameter * templateParameter;
515 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Identifier;
519 struct Identifier * prev;
520 struct Identifier * next;
522 struct Symbol * classSym;
523 struct Specifier * _class;
525 struct Identifier * badID;
528 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Pointer;
532 struct Pointer * prev;
533 struct Pointer * next;
535 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
536 struct Pointer * pointer;
539 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declarator;
543 struct Declarator * prev;
544 struct Declarator * next;
547 struct Symbol * symbol;
548 struct Declarator * declarator;
551 struct Identifier * identifier;
554 struct Expression * exp;
555 struct Expression * posExp;
556 struct Attrib * attrib;
560 struct Expression * exp;
561 struct Specifier * enumClass;
565 struct __ecereNameSpace__ecere__sys__OldList * parameters;
569 struct Pointer * pointer;
573 struct ExtDecl * extended;
578 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionDefinition;
580 struct FunctionDefinition
582 struct FunctionDefinition * prev;
583 struct FunctionDefinition * next;
585 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
586 struct Declarator * declarator;
587 struct __ecereNameSpace__ecere__sys__OldList * declarations;
588 struct Statement * body;
589 struct __ecereNameSpace__ecere__com__Class * _class;
590 struct __ecereNameSpace__ecere__sys__OldList attached;
593 struct Symbol * propSet;
595 unsigned int propertyNoThis;
598 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableDef;
602 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
606 struct External * prev;
607 struct External * next;
610 struct Symbol * symbol;
613 struct FunctionDefinition * function;
614 struct ClassDefinition * _class;
615 struct Declaration * declaration;
617 struct Identifier * id;
618 struct DBTableDef * table;
623 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
627 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
631 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
636 struct Symbol * parent;
637 struct Symbol * left;
638 struct Symbol * right;
643 struct __ecereNameSpace__ecere__com__Method * method;
644 struct __ecereNameSpace__ecere__com__Property * _property;
645 struct __ecereNameSpace__ecere__com__Class * registered;
653 struct External * pointerExternal;
654 struct External * structExternal;
658 struct External * externalGet;
659 struct External * externalSet;
660 struct External * externalPtr;
661 struct External * externalIsSet;
665 struct External * methodExternal;
666 struct External * methodCodeExternal;
669 unsigned int imported;
670 unsigned int declaredStructSym;
671 struct __ecereNameSpace__ecere__com__Class * _class;
672 unsigned int declaredStruct;
673 unsigned int needConstructor;
674 unsigned int needDestructor;
675 char * constructorName;
678 char * destructorName;
679 struct ModuleImport * module;
680 struct ClassImport * _import;
681 struct Location nameLoc;
682 unsigned int isParam;
683 unsigned int isRemote;
684 unsigned int isStruct;
685 unsigned int fireWatchersDone;
687 unsigned int classData;
688 unsigned int isStatic;
690 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
691 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
692 struct Context * ctx;
694 struct Expression * propCategory;
697 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
706 struct Symbol * _class;
709 struct __ecereNameSpace__ecere__sys__OldList members;
714 struct Type * returnType;
715 struct __ecereNameSpace__ecere__sys__OldList params;
716 struct Symbol * thisClass;
717 unsigned int staticMethod;
718 struct TemplateParameter * thisClassTemplate;
722 struct __ecereNameSpace__ecere__com__Method * method;
723 struct __ecereNameSpace__ecere__com__Class * methodClass;
724 struct __ecereNameSpace__ecere__com__Class * usedClass;
728 struct Type * arrayType;
730 struct Expression * arraySizeExp;
731 unsigned int freeExp;
732 struct Symbol * enumClass;
735 struct TemplateParameter * templateParameter;
737 unsigned int isSigned;
739 unsigned int constant;
746 unsigned int byReference;
747 unsigned int extraParam;
749 unsigned int directClassAccess;
750 unsigned int computing;
751 unsigned int dllExport;
753 unsigned int keepCast;
754 unsigned int passAsTemplate;
758 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
760 struct __ecereNameSpace__ecere__com__Class
762 struct __ecereNameSpace__ecere__com__Class * prev;
763 struct __ecereNameSpace__ecere__com__Class * next;
769 int (* Constructor)(struct __ecereNameSpace__ecere__com__Instance *);
770 void (* Destructor)(struct __ecereNameSpace__ecere__com__Instance *);
773 struct __ecereNameSpace__ecere__com__Class * base;
774 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
775 struct __ecereNameSpace__ecere__sys__BinaryTree members;
776 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
777 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
778 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
779 struct __ecereNameSpace__ecere__sys__OldList derivatives;
783 struct __ecereNameSpace__ecere__com__Instance * module;
784 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
785 char * dataTypeString;
786 struct Type * dataType;
788 int defaultAlignment;
789 void (* Initialize)();
791 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
792 char * designerClass;
793 unsigned int noExpansion;
794 char * defaultProperty;
795 unsigned int comRedefinition;
797 unsigned int isRemote;
798 unsigned int internalDecl;
800 unsigned int computeSize;
802 int destructionWatchOffset;
804 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
805 int inheritanceAccess;
808 struct __ecereNameSpace__ecere__sys__OldList conversions;
809 struct __ecereNameSpace__ecere__sys__OldList templateParams;
810 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
811 struct __ecereNameSpace__ecere__com__Class * templateClass;
812 struct __ecereNameSpace__ecere__sys__OldList templatized;
816 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
818 struct __ecereNameSpace__ecere__com__Instance
821 struct __ecereNameSpace__ecere__com__Class * _class;
825 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
827 struct __ecereNameSpace__ecere__com__DataMember
829 struct __ecereNameSpace__ecere__com__DataMember * prev;
830 struct __ecereNameSpace__ecere__com__DataMember * next;
832 unsigned int isProperty;
835 struct __ecereNameSpace__ecere__com__Class * _class;
836 char * dataTypeString;
837 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
838 struct Type * dataType;
842 struct __ecereNameSpace__ecere__sys__OldList members;
843 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
848 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
850 struct __ecereNameSpace__ecere__com__SerialBuffer
852 unsigned char * _buffer;
858 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
860 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
866 char * dataTypeString;
867 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
869 struct __ecereNameSpace__ecere__com__DataValue expression;
875 struct __ecereNameSpace__ecere__com__DataMember * member;
876 struct __ecereNameSpace__ecere__com__Property * prop;
877 struct __ecereNameSpace__ecere__com__Method * method;
885 IDENTIFIER = 258, CONSTANT = 259, STRING_LITERAL = 260, SIZEOF = 261, PTR_OP = 262, INC_OP = 263, DEC_OP = 264, LEFT_OP = 265, RIGHT_OP = 266, LE_OP = 267, GE_OP = 268, EQ_OP = 269, NE_OP = 270, AND_OP = 271, OR_OP = 272, MUL_ASSIGN = 273, DIV_ASSIGN = 274, MOD_ASSIGN = 275, ADD_ASSIGN = 276, SUB_ASSIGN = 277, LEFT_ASSIGN = 278, RIGHT_ASSIGN = 279, AND_ASSIGN = 280, XOR_ASSIGN = 281, OR_ASSIGN = 282, TYPE_NAME = 283, TYPEDEF = 284, EXTERN = 285, STATIC = 286, AUTO = 287, REGISTER = 288, CHAR = 289, SHORT = 290, INT = 291, UINT = 292, INT64 = 293, LONG = 294, SIGNED = 295, UNSIGNED = 296, FLOAT = 297, DOUBLE = 298, CONST = 299, VOLATILE = 300, VOID = 301, VALIST = 302, STRUCT = 303, UNION = 304, ENUM = 305, ELLIPSIS = 306, CASE = 307, DEFAULT = 308, IF = 309, SWITCH = 310, WHILE = 311, DO = 312, FOR = 313, GOTO = 314, CONTINUE = 315, BREAK = 316, RETURN = 317, IFX = 318, ELSE = 319, CLASS = 320, THISCLASS = 321, CLASS_NAME = 322, PROPERTY = 323, SETPROP = 324, GETPROP = 325, NEWOP = 326, RENEW = 327, DELETE = 328, EXT_DECL = 329, EXT_STORAGE = 330, IMPORT = 331, DEFINE = 332, VIRTUAL = 333, ATTRIB = 334, PUBLIC = 335, PRIVATE = 336, TYPED_OBJECT = 337, ANY_OBJECT = 338, _INCREF = 339, EXTENSION = 340, ASM = 341, TYPEOF = 342, WATCH = 343, STOPWATCHING = 344, FIREWATCHERS = 345, WATCHABLE = 346, CLASS_DESIGNER = 347, CLASS_NO_EXPANSION = 348, CLASS_FIXED = 349, ISPROPSET = 350, CLASS_DEFAULT_PROPERTY = 351, PROPERTY_CATEGORY = 352, CLASS_DATA = 353, CLASS_PROPERTY = 354, SUBCLASS = 355, NAMESPACE = 356, NEW0OP = 357, RENEW0 = 358, VAARG = 359, DBTABLE = 360, DBFIELD = 361, DBINDEX = 362, DATABASE_OPEN = 363, ALIGNOF = 364, ATTRIB_DEP = 365, __ATTRIB = 366
888 typedef union YYSTYPE
893 struct Identifier * id;
894 struct Expression * exp;
895 struct Specifier * specifier;
896 struct __ecereNameSpace__ecere__sys__OldList * list;
897 struct Enumerator * enumerator;
898 struct Declarator * declarator;
899 struct Pointer * pointer;
900 struct Initializer * initializer;
901 struct InitDeclarator * initDeclarator;
902 struct TypeName * typeName;
903 struct Declaration * declaration;
904 struct Statement * stmt;
905 struct FunctionDefinition * function;
906 struct External * external;
907 struct Context * context;
908 struct AsmField * asmField;
909 struct Attrib * attrib;
910 struct ExtDecl * extDecl;
911 struct Attribute * attribute;
912 struct Instantiation * instance;
913 struct MembersInit * membersInit;
914 struct MemberInit * memberInit;
915 struct ClassFunction * classFunction;
916 struct ClassDefinition * _class;
917 struct ClassDef * classDef;
918 struct PropertyDef * prop;
920 struct Symbol * symbol;
921 struct PropertyWatch * propertyWatch;
922 struct TemplateParameter * templateParameter;
923 struct TemplateArgument * templateArgument;
924 struct TemplateDatatype * templateDatatype;
925 struct DBTableEntry * dbtableEntry;
926 struct DBIndexItem * dbindexItem;
927 struct DBTableDef * dbtableDef;
930 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Enumerator;
934 struct Enumerator * prev;
935 struct Enumerator * next;
937 struct Identifier * id;
938 struct Expression * exp;
941 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_InitDeclarator;
943 struct InitDeclarator
945 struct InitDeclarator * prev;
946 struct InitDeclarator * next;
948 struct Declarator * declarator;
949 struct Initializer * initializer;
952 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_AsmField;
956 struct AsmField * prev;
957 struct AsmField * next;
960 struct Expression * expression;
963 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attribute;
967 struct Attribute * prev;
968 struct Attribute * next;
971 struct Expression * exp;
974 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassFunction;
978 struct ClassFunction * prev;
979 struct ClassFunction * next;
981 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
982 struct Declarator * declarator;
983 struct __ecereNameSpace__ecere__sys__OldList * declarations;
984 struct Statement * body;
985 struct __ecereNameSpace__ecere__com__Class * _class;
986 struct __ecereNameSpace__ecere__sys__OldList attached;
989 struct Symbol * propSet;
990 unsigned int isVirtual;
991 unsigned int isConstructor;
992 unsigned int isDestructor;
993 unsigned int dontMangle;
998 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MembersInit;
1002 struct MembersInit * prev;
1003 struct MembersInit * next;
1004 struct Location loc;
1008 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1009 struct ClassFunction * function;
1013 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MemberInit;
1017 struct MemberInit * prev;
1018 struct MemberInit * next;
1019 struct Location loc;
1020 struct Location realLoc;
1021 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
1022 struct Initializer * initializer;
1024 unsigned int variable;
1025 unsigned int takeOutExp;
1028 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyDef;
1032 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyWatch;
1034 struct PropertyWatch;
1036 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDef;
1040 struct ClassDef * prev;
1041 struct ClassDef * next;
1042 struct Location loc;
1046 struct Declaration * decl;
1047 struct ClassFunction * function;
1048 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
1049 struct PropertyDef * propertyDef;
1050 struct PropertyWatch * propertyWatch;
1052 struct Identifier * defaultProperty;
1055 struct Identifier * id;
1056 struct Initializer * initializer;
1063 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableEntry;
1065 struct DBTableEntry;
1067 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBIndexItem;
1071 extern YYSTYPE yylval;
1073 extern struct Location yylloc;
1077 unsigned int memoryGuard = 0x0;
1079 void SetMemoryGuard(unsigned int b)
1084 unsigned int GetMemoryGuard()
1089 extern int strcmp(const char * , const char * );
1091 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts;
1093 static void OutputIdentifier(struct Identifier * id, struct __ecereNameSpace__ecere__com__Instance * f)
1099 if(id->_class->type == 8)
1101 if(id->_class->templateParameter && id->_class->templateParameter->identifier && id->_class->templateParameter->identifier->string)
1102 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, id->_class->templateParameter->identifier->string);
1106 if(id->_class->name)
1108 if(!strcmp(id->_class->name, "class"))
1109 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
1111 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, id->_class->name);
1114 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "::");
1117 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, (id && id->string) ? id->string : "(null identifier)");
1120 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc;
1122 static void OutputOperator(int op, struct __ecereNameSpace__ecere__com__Instance * f)
1127 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "++");
1130 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "--");
1133 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "sizeof ");
1136 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<<");
1139 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">>");
1142 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<=");
1145 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">=");
1148 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "==");
1151 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "!=");
1154 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "&&");
1157 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "||");
1160 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "*=");
1163 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "/=");
1166 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "%=");
1169 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "+=");
1172 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "-=");
1175 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<<=");
1178 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">>=");
1181 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "&=");
1184 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "^=");
1187 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "|=");
1202 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, char ch))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc])(f, (char)op);
1205 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "delete ");
1210 static void OutputSpecifier(struct Specifier * spec, struct __ecereNameSpace__ecere__com__Instance * f);
1212 static void OutputDeclarator(struct Declarator * decl, struct __ecereNameSpace__ecere__com__Instance * f);
1214 void OutputTypeName(struct TypeName * type, struct __ecereNameSpace__ecere__com__Instance * f)
1216 if(type->qualifiers)
1218 struct Specifier * spec;
1220 for(spec = (*type->qualifiers).first; spec; spec = spec->next)
1222 OutputSpecifier(spec, f);
1224 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1227 if(type->declarator)
1229 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1230 OutputDeclarator(type->declarator, f);
1232 if(!type->qualifiers && !type->declarator)
1233 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "...");
1236 static void OutputStatement(struct Statement * stmt, struct __ecereNameSpace__ecere__com__Instance * f);
1238 static void OutputInstance(struct Instantiation * inst, struct __ecereNameSpace__ecere__com__Instance * f);
1240 extern int printf(char * , ...);
1242 static void OutputInitializer(struct Initializer * initializer, struct __ecereNameSpace__ecere__com__Instance * f);
1244 void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f)
1249 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class(");
1250 if(exp->_classExp.specifiers)
1252 struct Specifier * spec;
1254 for(spec = (*exp->_classExp.specifiers).first; spec; spec = spec->next)
1256 OutputSpecifier(spec, f);
1258 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1260 if(exp->_classExp.decl)
1262 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1263 OutputDeclarator(exp->_classExp.decl, f);
1265 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1269 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1270 OutputStatement(exp->compound, f);
1271 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1274 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "new ");
1275 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1276 OutputTypeName(exp->_renew.typeName, f);
1277 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1278 OutputExpression(exp->_renew.size, f);
1279 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1282 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "new0 ");
1283 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1284 OutputTypeName(exp->_renew.typeName, f);
1285 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1286 OutputExpression(exp->_renew.size, f);
1287 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1290 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "renew ");
1291 OutputExpression(exp->_renew.exp, f);
1292 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1293 OutputTypeName(exp->_renew.typeName, f);
1294 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1295 OutputExpression(exp->_renew.size, f);
1296 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1299 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "renew0 ");
1300 OutputExpression(exp->_renew.exp, f);
1301 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1302 OutputTypeName(exp->_renew.typeName, f);
1303 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1304 OutputExpression(exp->_renew.size, f);
1305 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1309 OutputIdentifier(exp->identifier, f);
1313 OutputInstance(exp->instance, f);
1317 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, exp->constant);
1323 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, exp->string);
1328 OutputExpression(exp->op.exp1, f);
1330 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1332 OutputOperator(exp->op.op, f);
1335 if(exp->op.exp1 || (exp->op.exp2->type == 4 && !exp->op.exp2->op.exp1 && exp->op.exp2->op.op == exp->op.op))
1336 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1337 OutputExpression(exp->op.exp2, f);
1343 struct Expression * expression;
1346 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1347 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1350 for(expression = (*exp->list).first; expression; expression = expression->next)
1352 OutputExpression(expression, f);
1353 if(expression->next)
1354 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1357 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1362 struct Expression * expression;
1365 OutputExpression(exp->index.exp, f);
1366 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1367 if(exp->index.index)
1368 for(expression = (*exp->index.index).first; expression; expression = expression->next)
1370 OutputExpression(expression, f);
1371 if(expression->next)
1372 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1374 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1379 OutputExpression(exp->call.exp, f);
1380 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1381 if(exp->call.arguments)
1383 struct Expression * expression;
1385 for(expression = (*exp->call.arguments).first; expression; expression = expression->next)
1387 OutputExpression(expression, f);
1388 if(expression->next)
1389 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1392 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1397 OutputExpression(exp->member.exp, f);
1398 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ".");
1399 if(exp->member.member)
1400 OutputIdentifier(exp->member.member, f);
1403 OutputExpression(exp->member.exp, f);
1404 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "->");
1405 OutputIdentifier(exp->member.member, f);
1408 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "sizeof(");
1409 OutputTypeName(exp->typeName, f);
1410 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1413 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__alignof__(");
1414 OutputTypeName(exp->typeName, f);
1415 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1418 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1419 if(exp->initializer.typeName)
1420 OutputTypeName(exp->initializer.typeName, f);
1421 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1422 if(exp->initializer.initializer)
1423 OutputInitializer(exp->initializer.initializer, f);
1426 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1427 OutputTypeName(exp->cast.typeName, f);
1428 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1430 OutputExpression(exp->cast.exp, f);
1433 OutputExpression(exp->cond.cond, f);
1434 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ? ");
1436 struct Expression * expression;
1438 for(expression = (*exp->cond.exp).first; expression; expression = expression->next)
1440 OutputExpression(expression, f);
1441 if(expression->next)
1442 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1445 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1446 OutputExpression(exp->cond.elseExp, f);
1449 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__builtin_va_arg(");
1450 OutputExpression(exp->vaArg.exp, f);
1451 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1452 OutputTypeName(exp->vaArg.typeName, f);
1453 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1456 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1459 struct Expression * expression;
1461 for(expression = (*exp->list).first; expression; expression = expression->next)
1463 OutputExpression(expression, f);
1464 if(expression->next)
1465 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1468 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1473 static void OutputAsmField(struct AsmField * field, struct __ecereNameSpace__ecere__com__Instance * f)
1475 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, field->command);
1476 if(field->expression)
1478 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1479 OutputExpression(field->expression, f);
1480 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1484 extern unsigned int inCompiler;
1486 extern char * __ecereNameSpace__ecere__sys__PathCat(char * string, char * addedPath);
1488 extern char * GetIncludeFileFromID(int id);
1490 extern char * sourceFile;
1492 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
1494 extern char * outputFile;
1496 extern unsigned int outputLineNumbers;
1498 static void OutputDeclaration(struct Declaration * decl, struct __ecereNameSpace__ecere__com__Instance * f);
1500 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
1502 extern struct Declarator * SpecDeclFromString(char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
1504 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
1506 extern struct Identifier * MkIdentifier(char * string);
1508 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* )(void * ));
1510 extern struct Specifier * CopySpecifier(struct Specifier * spec);
1512 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
1514 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
1516 extern struct Specifier * MkSpecifierName(char * name);
1518 extern void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
1520 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
1522 extern void InstDeclPassTypeName(struct TypeName * type, unsigned int param);
1524 extern void FreeTypeName(struct TypeName * typeName);
1526 int __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(struct __ecereNameSpace__ecere__com__Instance * this, char * format, ...);
1528 static void OutputStatement(struct Statement * stmt, struct __ecereNameSpace__ecere__com__Instance * f)
1530 char name[274] = "";
1531 char origName[274] = "";
1535 if(yylloc.start.included)
1537 __ecereNameSpace__ecere__sys__PathCat(name, GetIncludeFileFromID((unsigned int)yylloc.start.included));
1541 __ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
1543 __ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
1544 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
1545 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
1547 if(inCompiler && outputLineNumbers && stmt->loc.start.line)
1549 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.start.line, name);
1555 OutputIdentifier(stmt->labeled.id, f);
1556 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":\n");
1558 OutputStatement(stmt->labeled.stmt, f);
1561 if(stmt->caseStmt.exp)
1563 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "case ");
1564 OutputExpression(stmt->caseStmt.exp, f);
1565 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":\n");
1570 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "default:\n");
1573 if(stmt->caseStmt.stmt)
1574 OutputStatement(stmt->caseStmt.stmt, f);
1578 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "{\n");
1580 if(stmt->compound.declarations)
1582 struct Declaration * decl;
1584 for(decl = (*stmt->compound.declarations).first; decl; decl = decl->next)
1586 OutputDeclaration(decl, f);
1589 if(stmt->compound.statements)
1591 struct Statement * statement;
1593 if(stmt->compound.declarations)
1595 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1598 for(statement = (*stmt->compound.statements).first; statement; statement = statement->next)
1600 OutputStatement(statement, f);
1601 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1605 if(inCompiler && outputLineNumbers && stmt->loc.end.line)
1607 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.end.line, name);
1610 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}");
1615 if(stmt->expressions)
1617 struct Expression * exp;
1619 for(exp = (*stmt->expressions).first; exp; exp = exp->next)
1621 OutputExpression(exp, f);
1623 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1626 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1631 struct Expression * exp;
1633 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "if(");
1634 for(exp = (*stmt->ifStmt.exp).first; exp; exp = exp->next)
1636 OutputExpression(exp, f);
1638 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1640 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1642 if(stmt->ifStmt.stmt)
1643 OutputStatement(stmt->ifStmt.stmt, f);
1644 if(stmt->ifStmt.elseStmt)
1646 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1648 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "else");
1649 if(stmt->ifStmt.elseStmt->type != 4)
1651 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1655 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1656 OutputStatement(stmt->ifStmt.elseStmt, f);
1662 struct Expression * exp;
1664 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "switch(");
1665 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1667 OutputExpression(exp, f);
1669 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1671 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1673 OutputStatement(stmt->switchStmt.stmt, f);
1678 struct Expression * exp;
1680 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "while(");
1681 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1683 OutputExpression(exp, f);
1685 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1687 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1689 OutputStatement(stmt->whileStmt.stmt, f);
1694 struct Expression * exp;
1696 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "do\n");
1698 OutputStatement(stmt->whileStmt.stmt, f);
1699 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "while(");
1700 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1702 OutputExpression(exp, f);
1704 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1706 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ");");
1711 struct Expression * exp;
1713 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "for(");
1714 OutputStatement(stmt->forStmt.init, f);
1715 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1716 OutputStatement(stmt->forStmt.check, f);
1717 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1718 if(stmt->forStmt.increment)
1720 if(inCompiler && outputLineNumbers && stmt->loc.end.line)
1722 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.end.line, name);
1725 for(exp = (*stmt->forStmt.increment).first; exp; exp = exp->next)
1727 OutputExpression(exp, f);
1729 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1732 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1734 OutputStatement(stmt->forStmt.stmt, f);
1739 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "goto ");
1740 OutputIdentifier(stmt->gotoStmt.id, f);
1741 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1745 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "continue;");
1748 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "break;");
1752 struct Expression * exp;
1754 if(inCompiler && memoryGuard)
1756 struct Expression * exp = stmt->expressions ? (*stmt->expressions).last : (((void *)0));
1758 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "{ ");
1759 if(exp && exp->expType)
1761 char string[1024] = "";
1762 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
1763 struct Declarator * decl;
1764 struct TypeName * typeName;
1766 if(exp->expType->kind == 20)
1768 if(exp->expType->templateParameter->dataTypeString)
1769 decl = SpecDeclFromString(exp->expType->templateParameter->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1770 else if(exp->expType->templateParameter->dataType)
1772 (__ecereNameSpace__ecere__com__eSystem_Delete(specs), specs = 0);
1773 specs = CopyList(exp->expType->templateParameter->dataType->specifiers, CopySpecifier);
1774 decl = PlugDeclarator(exp->expType->templateParameter->dataType->decl, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1778 ListAdd(specs, MkSpecifierName("uint64"));
1779 decl = MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal"));
1784 PrintType(exp->expType, string, 0x1, 0x1);
1785 decl = SpecDeclFromString(string, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1787 typeName = MkTypeName(specs, decl);
1788 InstDeclPassTypeName(typeName, 0x0);
1789 OutputTypeName(typeName, f);
1790 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ";");
1791 FreeTypeName(typeName);
1795 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "return ");
1798 struct Expression * exp = stmt->expressions ? (*stmt->expressions).last : (((void *)0));
1800 if(exp && exp->expType)
1801 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "__ecereReturnVal = ");
1803 if(stmt->expressions)
1805 for(exp = (*stmt->expressions).first; exp; exp = exp->next)
1807 OutputExpression(exp, f);
1809 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1812 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1813 if(inCompiler && memoryGuard)
1815 struct Expression * exp = stmt->expressions ? (struct Expression *)(*stmt->expressions).last : (((void *)0));
1817 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PopLoc();");
1818 if(exp && exp->expType)
1819 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "return __ecereReturnVal;");
1821 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "return;");
1822 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "}");
1828 struct AsmField * field;
1830 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__asm__ ");
1831 if(stmt->asmStmt.spec)
1832 OutputSpecifier(stmt->asmStmt.spec, f);
1833 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1834 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, stmt->asmStmt.statements);
1835 if(stmt->asmStmt.inputFields || stmt->asmStmt.outputFields || stmt->asmStmt.clobberedFields)
1837 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1838 if(stmt->asmStmt.inputFields)
1840 for(field = (*stmt->asmStmt.inputFields).first; field; field = field->next)
1843 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1844 OutputAsmField(field, f);
1848 if(stmt->asmStmt.outputFields || stmt->asmStmt.clobberedFields)
1850 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1851 if(stmt->asmStmt.outputFields)
1853 for(field = (*stmt->asmStmt.outputFields).first; field; field = field->next)
1856 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1857 OutputAsmField(field, f);
1861 if(stmt->asmStmt.clobberedFields)
1863 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1864 for(field = (*stmt->asmStmt.clobberedFields).first; field; field = field->next)
1867 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1868 OutputAsmField(field, f);
1871 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ");\n");
1875 if(inCompiler && outputLineNumbers && stmt->loc.start.line)
1877 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", outputLine + 2, origName);
1882 static void OutputPointer(struct Pointer * ptr, struct __ecereNameSpace__ecere__com__Instance * f)
1884 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "*");
1887 struct Specifier * spec;
1889 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1890 for(spec = (*ptr->qualifiers).first; spec; spec = spec->next)
1892 OutputSpecifier(spec, f);
1894 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1899 OutputPointer(ptr->pointer, f);
1903 static void OutputAttrib(struct Attrib * attr, struct __ecereNameSpace__ecere__com__Instance * f);
1905 static void OutputExtDecl(struct ExtDecl * extDecl, struct __ecereNameSpace__ecere__com__Instance * f);
1907 extern void ProcessExpressionType(struct Expression * exp);
1909 extern void ComputeExpression(struct Expression * exp);
1911 extern int __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, char * name);
1913 static void OutputDeclarator(struct Declarator * decl, struct __ecereNameSpace__ecere__com__Instance * f)
1918 if(decl->declarator)
1920 OutputDeclarator(decl->declarator, f);
1922 if(decl->structDecl.exp)
1924 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1925 OutputExpression(decl->structDecl.exp, f);
1927 if(decl->structDecl.posExp)
1929 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1930 OutputExpression(decl->structDecl.posExp, f);
1932 if(decl->structDecl.attrib)
1934 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1935 OutputAttrib(decl->structDecl.attrib, f);
1939 OutputIdentifier(decl->identifier, f);
1942 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1943 OutputDeclarator(decl->declarator, f);
1944 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1947 if(decl->extended.extended)
1948 OutputExtDecl(decl->extended.extended, f);
1949 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1950 OutputDeclarator(decl->declarator, f);
1953 OutputDeclarator(decl->declarator, f);
1954 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1955 if(decl->extended.extended)
1956 OutputExtDecl(decl->extended.extended, f);
1959 if(decl->declarator)
1961 OutputDeclarator(decl->declarator, f);
1963 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1966 ProcessExpressionType(decl->array.exp);
1967 ComputeExpression(decl->array.exp);
1968 OutputExpression(decl->array.exp, f);
1970 else if(decl->array.enumClass)
1972 struct Symbol * _class = decl->array.enumClass->symbol;
1974 if(_class && _class->registered)
1976 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%d", __ecereNameSpace__ecere__com__eClass_GetProperty(_class->registered, "enumSize"));
1979 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1983 struct TypeName * param;
1985 if(decl->declarator)
1986 OutputDeclarator(decl->declarator, f);
1987 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1988 if(decl->function.parameters && (*decl->function.parameters).first)
1990 for(param = (*decl->function.parameters).first; param; param = param->next)
1992 OutputTypeName(param, f);
1994 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1997 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2001 if(decl->pointer.pointer)
2002 OutputPointer(decl->pointer.pointer, f);
2003 if(decl->declarator)
2005 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2006 OutputDeclarator(decl->declarator, f);
2012 static void OutputEnumerator(struct Enumerator * enumerator, struct __ecereNameSpace__ecere__com__Instance * f)
2014 OutputIdentifier(enumerator->id, f);
2017 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2018 OutputExpression(enumerator->exp, f);
2022 static void OutputAttribute(struct Attribute * attr, struct __ecereNameSpace__ecere__com__Instance * f)
2025 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, attr->attr);
2028 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2029 OutputExpression(attr->exp, f);
2033 static void OutputAttrib(struct Attrib * attr, struct __ecereNameSpace__ecere__com__Instance * f)
2038 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute__((");
2041 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute((");
2044 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute_deprecated__((");
2049 struct Attribute * attrib;
2051 for(attrib = (*attr->attribs).first; attrib; attrib = attrib->next)
2054 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2055 OutputAttribute(attrib, f);
2058 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "))");
2061 static void OutputExtDecl(struct ExtDecl * extDecl, struct __ecereNameSpace__ecere__com__Instance * f)
2063 if(extDecl->type == 0 && extDecl->s)
2064 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, extDecl->s);
2065 else if(extDecl->type == 1)
2066 OutputAttrib(extDecl->attr, f);
2069 extern struct Symbol * FindClass(char * name);
2071 static void OutputClassDef(struct ClassDef * def, struct __ecereNameSpace__ecere__com__Instance * f);
2073 static void OutputSpecifier(struct Specifier * spec, struct __ecereNameSpace__ecere__com__Instance * f)
2078 switch(spec->specifier)
2081 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typedef");
2084 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "extern");
2087 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "static");
2090 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "auto");
2093 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "register");
2096 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "const");
2099 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "volatile");
2102 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "void");
2105 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "char");
2108 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "short");
2111 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "int");
2114 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "unsigned int");
2117 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "long long");
2120 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__builtin_va_list");
2123 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "long");
2126 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "float");
2129 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "double");
2132 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "signed");
2135 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "unsigned");
2138 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
2141 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "any_object");
2144 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class");
2147 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "thisclass");
2153 OutputExtDecl(spec->extDecl, f);
2156 if(spec->name && !strcmp(spec->name, "class"))
2158 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
2162 struct Symbol * symbol = spec->symbol;
2164 if(!symbol && spec->name)
2165 symbol = FindClass(spec->name);
2168 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, symbol->string ? symbol->string : "(null)");
2171 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, spec->name);
2176 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "enum");
2179 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2180 OutputIdentifier(spec->id, f);
2184 struct Enumerator * enumerator;
2186 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2188 for(enumerator = (*spec->list).first; enumerator; enumerator = enumerator->next)
2190 OutputEnumerator(enumerator, f);
2191 if(enumerator->next)
2192 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2194 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n}");
2202 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, (spec->type == 3) ? "struct" : "union");
2205 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2206 OutputIdentifier(spec->id, f);
2208 if(spec->definitions)
2210 struct ClassDef * def;
2212 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2214 for(def = (*spec->definitions).first; def; def = def->next)
2216 OutputClassDef(def, f);
2218 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}");
2223 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__typeof(");
2224 OutputExpression(spec->expression, f);
2225 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2228 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "subclass(");
2229 OutputSpecifier(spec->_class, f);
2230 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2233 OutputIdentifier(spec->templateParameter->identifier, f);
2238 static void OutputInitializer(struct Initializer * initializer, struct __ecereNameSpace__ecere__com__Instance * f)
2240 char name[274] = "";
2241 char origName[274] = "";
2245 if(yylloc.start.included)
2247 __ecereNameSpace__ecere__sys__PathCat(name, GetIncludeFileFromID((unsigned int)yylloc.start.included));
2251 __ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
2253 __ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
2254 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
2255 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
2257 switch(initializer->type)
2261 struct Initializer * init;
2263 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2265 if(inCompiler && outputLineNumbers && initializer->loc.start.line)
2267 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", initializer->loc.start.line, name);
2270 for(init = (*initializer->list).first; init; init = init->next)
2272 OutputInitializer(init, f);
2274 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2276 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n}");
2277 if(inCompiler && outputLineNumbers && initializer->loc.start.line)
2279 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", initializer->loc.start.line, name);
2286 if(initializer->exp)
2287 OutputExpression(initializer->exp, f);
2292 static void OutputInitDeclarator(struct InitDeclarator * decl, struct __ecereNameSpace__ecere__com__Instance * f)
2294 OutputDeclarator(decl->declarator, f);
2295 if(decl->initializer)
2297 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2298 OutputInitializer(decl->initializer, f);
2302 static void OutputDeclaration(struct Declaration * decl, struct __ecereNameSpace__ecere__com__Instance * f)
2304 struct Specifier * spec;
2305 char origName[274] = "";
2311 struct InitDeclarator * d;
2315 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
2316 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
2318 if(decl->declarators && (*decl->declarators).first)
2320 for(d = (*decl->declarators).first; d; d = d->next)
2323 char name[274] = "";
2325 if(yylloc.start.included)
2327 __ecereNameSpace__ecere__sys__PathCat(name, GetIncludeFileFromID((unsigned int)yylloc.start.included));
2331 __ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
2333 __ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
2334 if(inCompiler && outputLineNumbers && decl->loc.start.line)
2336 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", decl->loc.start.line, name);
2342 if(decl->specifiers)
2344 for(spec = (*decl->specifiers).first; spec; spec = spec->next)
2346 OutputSpecifier(spec, f);
2348 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2351 if(decl->declarators && (*decl->declarators).first)
2353 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2354 for(d = (*decl->declarators).first; d; d = d->next)
2356 OutputInitDeclarator(d, f);
2358 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2365 if(decl->specifiers)
2367 for(spec = (*decl->specifiers).first; spec; spec = spec->next)
2369 OutputSpecifier(spec, f);
2371 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2374 if(decl->declarators)
2376 struct Declarator * d;
2378 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2379 for(d = (*decl->declarators).first; d; d = d->next)
2381 OutputDeclarator(d, f);
2383 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2386 if(decl->extStorage)
2388 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2389 OutputSpecifier(decl->extStorage, f);
2396 OutputInstance(decl->inst, f);
2402 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n");
2404 if(inCompiler && outputLineNumbers && decl->loc.start.line && decl->type == 1)
2406 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", outputLine + 2, origName);
2411 static struct FunctionDefinition * curFunction;
2413 extern struct Identifier * GetDeclId(struct Declarator * decl);
2415 static void OutputFunction(struct FunctionDefinition * func, struct __ecereNameSpace__ecere__com__Instance * f)
2417 struct FunctionDefinition * oldFunc = curFunction;
2420 if(func->specifiers)
2422 struct Specifier * spec;
2424 for(spec = (*func->specifiers).first; spec; spec = spec->next)
2426 OutputSpecifier(spec, f);
2428 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2430 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2432 if(func->declarator)
2433 OutputDeclarator(func->declarator, f);
2434 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2436 if(func->declarations)
2438 struct Declaration * decl;
2440 for(decl = (*func->declarations).first; decl; decl = decl->next)
2442 OutputDeclaration(decl, f);
2444 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2449 if(inCompiler && memoryGuard)
2451 char name[1024] = "";
2452 struct Identifier * id = GetDeclId(func->declarator);
2454 if(yylloc.start.included)
2456 __ecereNameSpace__ecere__sys__PathCat(name, GetIncludeFileFromID((unsigned int)yylloc.start.included));
2460 __ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
2462 __ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
2463 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "{\n");
2464 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PushLoc(\"%s:%s\");\n", name, id->string);
2467 OutputStatement(func->body, f);
2468 if(inCompiler && memoryGuard)
2470 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PopLoc();\n");
2471 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "}\n");
2474 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2477 curFunction = oldFunc;
2480 static void OutputMemberInit(struct MemberInit * init, struct __ecereNameSpace__ecere__com__Instance * f)
2482 if(init->identifiers)
2484 if((*init->identifiers).count > 1)
2486 struct Identifier * id;
2488 for(id = (*init->identifiers).first; id; id = id->next)
2490 OutputIdentifier(id, f);
2492 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ".");
2495 else if((*init->identifiers).first)
2496 OutputIdentifier((*init->identifiers).first, f);
2497 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2499 if(init->initializer)
2500 OutputInitializer(init->initializer, f);
2503 static void OutputClassFunction(struct ClassFunction * func, struct __ecereNameSpace__ecere__com__Instance * f);
2505 static void OutputMembersInit(struct MembersInit * init, struct __ecereNameSpace__ecere__com__Instance * f)
2511 struct MemberInit * member;
2513 if(init->dataMembers)
2515 for(member = (*init->dataMembers).first; member; member = member->next)
2517 OutputMemberInit(member, f);
2519 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2525 OutputClassFunction(init->function, f);
2530 static void OutputInstance(struct Instantiation * inst, struct __ecereNameSpace__ecere__com__Instance * f)
2533 OutputSpecifier(inst->_class, f);
2536 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2537 OutputExpression(inst->exp, f);
2539 if(inst->members && (*inst->members).count > 1)
2541 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2544 else if(inst->members)
2545 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " { ");
2547 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "{");
2550 struct MembersInit * init;
2552 for(init = (*inst->members).first; init; init = init->next)
2554 OutputMembersInit(init, f);
2555 if(init->type == 0 && init->next)
2557 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n");
2563 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " }");
2565 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}");
2568 static void OutputClassFunction(struct ClassFunction * func, struct __ecereNameSpace__ecere__com__Instance * f)
2570 if(func->specifiers)
2572 struct Specifier * spec;
2574 for(spec = (*func->specifiers).first; spec; spec = spec->next)
2576 OutputSpecifier(spec, f);
2578 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2580 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2582 if(func->declarator)
2583 OutputDeclarator(func->declarator, f);
2584 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2586 if(func->declarations)
2588 struct Declaration * decl;
2590 for(decl = (*func->declarations).first; decl; decl = decl->next)
2592 OutputDeclaration(decl, f);
2594 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2599 OutputStatement(func->body, f);
2600 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2604 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
2607 static void OutputClassDef(struct ClassDef * def, struct __ecereNameSpace__ecere__com__Instance * f)
2614 OutputDeclaration(def->decl, f);
2615 if(def->next && def->next->type != 2)
2617 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2624 struct MemberInit * init;
2626 for(init = (*def->defProperties).first; init; init = init->next)
2628 OutputMemberInit(init, f);
2630 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2632 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n\n");
2637 OutputClassFunction(def->function, f);
2638 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2644 static void OutputClass(struct ClassDefinition * _class, struct __ecereNameSpace__ecere__com__Instance * f)
2646 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class ");
2647 OutputSpecifier(_class->_class, f);
2648 if(_class->baseSpecs)
2650 struct Specifier * spec;
2652 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
2653 for(spec = (*_class->baseSpecs).first; spec; spec = spec->next)
2655 OutputSpecifier(spec, f);
2658 if(_class->definitions)
2660 struct ClassDef * def;
2662 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2664 for(def = (*_class->definitions).first; def; def = def->next)
2666 OutputClassDef(def, f);
2668 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}\n");
2672 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
2675 void OutputTree(struct __ecereNameSpace__ecere__sys__OldList * ast, struct __ecereNameSpace__ecere__com__Instance * f)
2677 struct External * external;
2680 for(external = ast->first; external; external = external->next)
2682 switch(external->type)
2685 OutputFunction(external->function, f);
2686 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2690 OutputDeclaration(external->declaration, f);
2691 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2695 OutputClass(external->_class, f);
2696 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2703 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
2705 struct __ecereNameSpace__ecere__sys__TempFile
2707 char __ecere_padding[24];
2710 extern char * __ecereNameSpace__ecere__sys__TrimRSpaces(char * string, char * output);
2712 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
2714 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize;
2716 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
2718 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
2720 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
2722 char * StringFromSpecDecl(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl)
2725 struct TypeName * typeName = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
2726 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
2729 typeName->qualifiers = specs;
2730 typeName->declarator = decl;
2731 OutputTypeName(typeName, f);
2732 ((typeName ? (__ecereClass_TypeName->Destructor ? __ecereClass_TypeName->Destructor(typeName) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(typeName)) : 0), typeName = 0);
2733 size = ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize])(f);
2734 string = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (size + 1));
2735 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(f, 0, 0);
2736 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(f, string, 1, (unsigned int)size);
2737 string[size] = '\0';
2738 __ecereNameSpace__ecere__sys__TrimRSpaces(string, string);
2739 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
2743 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
2745 struct __ecereNameSpace__ecere__com__GlobalFunction;
2747 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_RegisterFunction(char * name, char * type, void * func, struct __ecereNameSpace__ecere__com__Instance * module, int declMode);
2749 void __ecereRegisterModule_output(struct __ecereNameSpace__ecere__com__Instance * module)
2751 struct __ecereNameSpace__ecere__com__Class * class;
2753 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetMemoryGuard", "void SetMemoryGuard(bool b)", SetMemoryGuard, module, 1);
2754 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetMemoryGuard", "bool GetMemoryGuard(void)", GetMemoryGuard, module, 1);
2755 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputTypeName", "void OutputTypeName(TypeName type, ecere::sys::File f)", OutputTypeName, module, 1);
2756 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputExpression", "void OutputExpression(Expression exp, ecere::sys::File f)", OutputExpression, module, 1);
2757 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputTree", "void OutputTree(ecere::sys::OldList ast, ecere::sys::File f)", OutputTree, module, 1);
2758 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("StringFromSpecDecl", "char * StringFromSpecDecl(ecere::sys::OldList specs, Declarator decl)", StringFromSpecDecl, module, 1);
2761 void __ecereUnregisterModule_output(struct __ecereNameSpace__ecere__com__Instance * module)