2 typedef long long int64;
3 typedef unsigned long long uint64;
7 #elif defined(__TINYC__)
9 #define __builtin_va_list va_list
10 #define __builtin_va_start va_start
11 #define __builtin_va_end va_end
13 #define strcasecmp stricmp
14 #define strncasecmp strnicmp
15 #define __declspec(x) __attribute__((x))
19 typedef long long int64;
20 typedef unsigned long long uint64;
22 typedef __int64 int64;
23 typedef unsigned __int64 uint64;
26 #define __ENDIAN_PAD(x) (8 - (x))
28 #define __ENDIAN_PAD(x) 0
32 typedef unsigned long long int uintptr_t;
33 typedef long long int intptr_t;
35 typedef unsigned int uintptr_t;
41 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
43 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
45 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
47 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
49 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
51 struct __ecereNameSpace__ecere__sys__BTNode;
53 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BinaryTree;
55 struct __ecereNameSpace__ecere__sys__BinaryTree
57 struct __ecereNameSpace__ecere__sys__BTNode * root;
59 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
60 void (* FreeKey)(void * key);
61 } __attribute__ ((gcc_struct));
63 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldList;
65 struct __ecereNameSpace__ecere__sys__OldList
72 } __attribute__ ((gcc_struct));
74 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Method;
76 struct __ecereNameSpace__ecere__com__Method
79 struct __ecereNameSpace__ecere__com__Method * parent;
80 struct __ecereNameSpace__ecere__com__Method * left;
81 struct __ecereNameSpace__ecere__com__Method * right;
86 struct __ecereNameSpace__ecere__com__Class * _class;
88 char * dataTypeString;
89 struct Type * dataType;
91 } __attribute__ ((gcc_struct));
93 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Property;
95 struct __ecereNameSpace__ecere__com__Property
97 struct __ecereNameSpace__ecere__com__Property * prev;
98 struct __ecereNameSpace__ecere__com__Property * next;
100 unsigned int isProperty;
103 struct __ecereNameSpace__ecere__com__Class * _class;
104 char * dataTypeString;
105 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
106 struct Type * dataType;
109 unsigned int (* IsSet)();
113 unsigned int conversion;
114 unsigned int watcherOffset;
116 unsigned int compiled;
117 unsigned int selfWatchable;
118 unsigned int isWatchable;
119 } __attribute__ ((gcc_struct));
121 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_CodePosition;
128 unsigned int included;
129 } __attribute__ ((gcc_struct));
131 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Location;
135 struct CodePosition start;
136 struct CodePosition end;
137 } __attribute__ ((gcc_struct));
139 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attrib;
145 struct __ecereNameSpace__ecere__sys__OldList * attribs;
146 } __attribute__ ((gcc_struct));
148 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ExtDecl;
157 struct Attrib * attr;
158 } __attribute__ ((gcc_struct));
159 } __attribute__ ((gcc_struct));
161 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDefinition;
163 struct ClassDefinition
165 struct ClassDefinition * prev;
166 struct ClassDefinition * next;
168 struct Specifier * _class;
169 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
170 struct __ecereNameSpace__ecere__sys__OldList * definitions;
171 struct Symbol * symbol;
172 struct Location blockStart;
173 struct Location nameLoc;
176 unsigned int deleteWatchable;
177 } __attribute__ ((gcc_struct));
179 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
183 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Instantiation;
187 struct Instantiation * prev;
188 struct Instantiation * next;
190 struct Specifier * _class;
191 struct Expression * exp;
192 struct __ecereNameSpace__ecere__sys__OldList * members;
193 struct Symbol * symbol;
194 unsigned int fullSet;
195 unsigned int isConstant;
196 unsigned char * data;
197 struct Location nameLoc;
198 struct Location insideLoc;
200 } __attribute__ ((gcc_struct));
202 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declaration;
206 struct Declaration * prev;
207 struct Declaration * next;
214 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
215 struct __ecereNameSpace__ecere__sys__OldList * declarators;
216 } __attribute__ ((gcc_struct));
217 struct Instantiation * inst;
220 struct Identifier * id;
221 struct Expression * exp;
222 } __attribute__ ((gcc_struct));
223 } __attribute__ ((gcc_struct));
224 struct Specifier * extStorage;
225 struct Symbol * symbol;
227 } __attribute__ ((gcc_struct));
229 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Statement;
233 struct Statement * prev;
234 struct Statement * next;
239 struct __ecereNameSpace__ecere__sys__OldList * expressions;
242 struct Identifier * id;
243 struct Statement * stmt;
244 } __attribute__ ((gcc_struct)) labeled;
247 struct Expression * exp;
248 struct Statement * stmt;
249 } __attribute__ ((gcc_struct)) caseStmt;
252 struct __ecereNameSpace__ecere__sys__OldList * declarations;
253 struct __ecereNameSpace__ecere__sys__OldList * statements;
254 struct Context * context;
255 unsigned int isSwitch;
256 } __attribute__ ((gcc_struct)) compound;
259 struct __ecereNameSpace__ecere__sys__OldList * exp;
260 struct Statement * stmt;
261 struct Statement * elseStmt;
262 } __attribute__ ((gcc_struct)) ifStmt;
265 struct __ecereNameSpace__ecere__sys__OldList * exp;
266 struct Statement * stmt;
267 } __attribute__ ((gcc_struct)) switchStmt;
270 struct __ecereNameSpace__ecere__sys__OldList * exp;
271 struct Statement * stmt;
272 } __attribute__ ((gcc_struct)) whileStmt;
275 struct __ecereNameSpace__ecere__sys__OldList * exp;
276 struct Statement * stmt;
277 } __attribute__ ((gcc_struct)) doWhile;
280 struct Statement * init;
281 struct Statement * check;
282 struct __ecereNameSpace__ecere__sys__OldList * increment;
283 struct Statement * stmt;
284 } __attribute__ ((gcc_struct)) forStmt;
287 struct Identifier * id;
288 } __attribute__ ((gcc_struct)) gotoStmt;
291 struct Specifier * spec;
293 struct __ecereNameSpace__ecere__sys__OldList * inputFields;
294 struct __ecereNameSpace__ecere__sys__OldList * outputFields;
295 struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
296 } __attribute__ ((gcc_struct)) asmStmt;
299 struct Expression * watcher;
300 struct Expression * object;
301 struct __ecereNameSpace__ecere__sys__OldList * watches;
302 } __attribute__ ((gcc_struct)) _watch;
305 struct Identifier * id;
306 struct __ecereNameSpace__ecere__sys__OldList * exp;
307 struct __ecereNameSpace__ecere__sys__OldList * filter;
308 struct Statement * stmt;
309 } __attribute__ ((gcc_struct)) forEachStmt;
310 struct Declaration * decl;
311 } __attribute__ ((gcc_struct));
312 } __attribute__ ((gcc_struct));
314 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
318 struct TypeName * prev;
319 struct TypeName * next;
321 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
322 struct Declarator * declarator;
324 struct Expression * bitCount;
325 } __attribute__ ((gcc_struct));
327 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Initializer;
331 struct Initializer * prev;
332 struct Initializer * next;
337 struct Expression * exp;
338 struct __ecereNameSpace__ecere__sys__OldList * list;
339 } __attribute__ ((gcc_struct));
340 unsigned int isConstant;
341 } __attribute__ ((gcc_struct));
343 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
345 struct __ecereNameSpace__ecere__com__DataValue
360 } __attribute__ ((gcc_struct));
361 } __attribute__ ((gcc_struct));
363 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
367 struct Expression * prev;
368 struct Expression * next;
376 struct Identifier * identifier;
377 } __attribute__ ((gcc_struct));
378 struct Statement * compound;
379 struct Instantiation * instance;
381 struct __ecereNameSpace__ecere__sys__OldList * list;
384 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
385 struct Declarator * decl;
386 } __attribute__ ((gcc_struct)) _classExp;
389 struct Identifier * id;
390 } __attribute__ ((gcc_struct)) classData;
393 struct Expression * exp;
394 struct __ecereNameSpace__ecere__sys__OldList * arguments;
395 struct Location argLoc;
396 } __attribute__ ((gcc_struct)) call;
399 struct Expression * exp;
400 struct __ecereNameSpace__ecere__sys__OldList * index;
401 } __attribute__ ((gcc_struct)) index;
404 struct Expression * exp;
405 struct Identifier * member;
407 unsigned int thisPtr;
408 } __attribute__ ((gcc_struct)) member;
412 struct Expression * exp1;
413 struct Expression * exp2;
414 } __attribute__ ((gcc_struct)) op;
415 struct TypeName * typeName;
416 struct Specifier * _class;
419 struct TypeName * typeName;
420 struct Expression * exp;
421 } __attribute__ ((gcc_struct)) cast;
424 struct Expression * cond;
425 struct __ecereNameSpace__ecere__sys__OldList * exp;
426 struct Expression * elseExp;
427 } __attribute__ ((gcc_struct)) cond;
430 struct TypeName * typeName;
431 struct Expression * size;
432 } __attribute__ ((gcc_struct)) _new;
435 struct TypeName * typeName;
436 struct Expression * size;
437 struct Expression * exp;
438 } __attribute__ ((gcc_struct)) _renew;
442 struct Identifier * id;
443 } __attribute__ ((gcc_struct)) db;
446 struct Expression * ds;
447 struct Expression * name;
448 } __attribute__ ((gcc_struct)) dbopen;
451 struct TypeName * typeName;
452 struct Initializer * initializer;
453 } __attribute__ ((gcc_struct)) initializer;
456 struct Expression * exp;
457 struct TypeName * typeName;
458 } __attribute__ ((gcc_struct)) vaArg;
459 } __attribute__ ((gcc_struct));
460 unsigned int debugValue;
461 struct __ecereNameSpace__ecere__com__DataValue val;
462 unsigned int address;
463 unsigned int hasAddress;
464 struct Type * expType;
465 struct Type * destType;
468 unsigned int byReference;
469 unsigned int isConstant;
470 unsigned int addedThis;
471 unsigned int needCast;
472 unsigned int thisPtr;
473 } __attribute__ ((gcc_struct));
475 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
477 struct TemplateDatatype
479 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
480 struct Declarator * decl;
481 } __attribute__ ((gcc_struct));
483 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateArgument;
485 struct TemplateArgument;
487 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
489 struct TemplateParameter
491 struct TemplateParameter * prev;
492 struct TemplateParameter * next;
495 struct Identifier * identifier;
498 struct TemplateDatatype * dataType;
500 } __attribute__ ((gcc_struct));
501 struct TemplateArgument * defaultArgument;
502 char * dataTypeString;
503 struct Type * baseType;
504 } __attribute__ ((gcc_struct));
506 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Specifier;
510 struct Specifier * prev;
511 struct Specifier * next;
519 struct ExtDecl * extDecl;
521 struct Symbol * symbol;
522 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
523 } __attribute__ ((gcc_struct));
526 struct Identifier * id;
527 struct __ecereNameSpace__ecere__sys__OldList * list;
528 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
529 struct __ecereNameSpace__ecere__sys__OldList * definitions;
530 unsigned int addNameSpace;
531 struct Context * ctx;
532 struct ExtDecl * extDeclStruct;
533 } __attribute__ ((gcc_struct));
534 struct Expression * expression;
535 struct Specifier * _class;
536 struct TemplateParameter * templateParameter;
537 } __attribute__ ((gcc_struct));
538 } __attribute__ ((gcc_struct));
540 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Identifier;
544 struct Identifier * prev;
545 struct Identifier * next;
547 struct Symbol * classSym;
548 struct Specifier * _class;
550 struct Identifier * badID;
551 } __attribute__ ((gcc_struct));
553 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Pointer;
557 struct Pointer * prev;
558 struct Pointer * next;
560 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
561 struct Pointer * pointer;
562 } __attribute__ ((gcc_struct));
564 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declarator;
568 struct Declarator * prev;
569 struct Declarator * next;
572 struct Symbol * symbol;
573 struct Declarator * declarator;
576 struct Identifier * identifier;
579 struct Expression * exp;
580 struct Expression * posExp;
581 struct Attrib * attrib;
582 } __attribute__ ((gcc_struct)) structDecl;
585 struct Expression * exp;
586 struct Specifier * enumClass;
587 } __attribute__ ((gcc_struct)) array;
590 struct __ecereNameSpace__ecere__sys__OldList * parameters;
591 } __attribute__ ((gcc_struct)) function;
594 struct Pointer * pointer;
595 } __attribute__ ((gcc_struct)) pointer;
598 struct ExtDecl * extended;
599 } __attribute__ ((gcc_struct)) extended;
600 } __attribute__ ((gcc_struct));
601 } __attribute__ ((gcc_struct));
603 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionDefinition;
605 struct FunctionDefinition
607 struct FunctionDefinition * prev;
608 struct FunctionDefinition * next;
610 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
611 struct Declarator * declarator;
612 struct __ecereNameSpace__ecere__sys__OldList * declarations;
613 struct Statement * body;
614 struct __ecereNameSpace__ecere__com__Class * _class;
615 struct __ecereNameSpace__ecere__sys__OldList attached;
618 struct Symbol * propSet;
620 unsigned int propertyNoThis;
621 } __attribute__ ((gcc_struct));
623 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableDef;
627 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
631 struct External * prev;
632 struct External * next;
635 struct Symbol * symbol;
638 struct FunctionDefinition * function;
639 struct ClassDefinition * _class;
640 struct Declaration * declaration;
642 struct Identifier * id;
643 struct DBTableDef * table;
644 } __attribute__ ((gcc_struct));
646 } __attribute__ ((gcc_struct));
648 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
652 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
656 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
661 struct Symbol * parent;
662 struct Symbol * left;
663 struct Symbol * right;
668 struct __ecereNameSpace__ecere__com__Method * method;
669 struct __ecereNameSpace__ecere__com__Property * _property;
670 struct __ecereNameSpace__ecere__com__Class * registered;
671 } __attribute__ ((gcc_struct));
678 struct External * pointerExternal;
679 struct External * structExternal;
680 } __attribute__ ((gcc_struct));
683 struct External * externalGet;
684 struct External * externalSet;
685 struct External * externalPtr;
686 struct External * externalIsSet;
687 } __attribute__ ((gcc_struct));
690 struct External * methodExternal;
691 struct External * methodCodeExternal;
692 } __attribute__ ((gcc_struct));
693 } __attribute__ ((gcc_struct));
694 unsigned int imported;
695 unsigned int declaredStructSym;
696 struct __ecereNameSpace__ecere__com__Class * _class;
697 unsigned int declaredStruct;
698 unsigned int needConstructor;
699 unsigned int needDestructor;
700 char * constructorName;
703 char * destructorName;
704 struct ModuleImport * module;
705 struct ClassImport * _import;
706 struct Location nameLoc;
707 unsigned int isParam;
708 unsigned int isRemote;
709 unsigned int isStruct;
710 unsigned int fireWatchersDone;
712 unsigned int classData;
713 unsigned int isStatic;
715 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
716 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
717 struct Context * ctx;
719 struct Expression * propCategory;
720 } __attribute__ ((gcc_struct));
722 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
731 struct Symbol * _class;
734 struct __ecereNameSpace__ecere__sys__OldList members;
736 } __attribute__ ((gcc_struct));
739 struct Type * returnType;
740 struct __ecereNameSpace__ecere__sys__OldList params;
741 struct Symbol * thisClass;
742 unsigned int staticMethod;
743 struct TemplateParameter * thisClassTemplate;
744 } __attribute__ ((gcc_struct));
747 struct __ecereNameSpace__ecere__com__Method * method;
748 struct __ecereNameSpace__ecere__com__Class * methodClass;
749 struct __ecereNameSpace__ecere__com__Class * usedClass;
750 } __attribute__ ((gcc_struct));
753 struct Type * arrayType;
755 struct Expression * arraySizeExp;
756 unsigned int freeExp;
757 struct Symbol * enumClass;
758 } __attribute__ ((gcc_struct));
760 struct TemplateParameter * templateParameter;
761 } __attribute__ ((gcc_struct));
762 unsigned int isSigned;
764 unsigned int constant;
771 unsigned int byReference;
772 unsigned int extraParam;
774 unsigned int directClassAccess;
775 unsigned int computing;
776 unsigned int dllExport;
778 unsigned int keepCast;
779 unsigned int passAsTemplate;
781 } __attribute__ ((gcc_struct));
783 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
785 struct __ecereNameSpace__ecere__com__Class
787 struct __ecereNameSpace__ecere__com__Class * prev;
788 struct __ecereNameSpace__ecere__com__Class * next;
794 int (* Constructor)(struct __ecereNameSpace__ecere__com__Instance *);
795 void (* Destructor)(struct __ecereNameSpace__ecere__com__Instance *);
798 struct __ecereNameSpace__ecere__com__Class * base;
799 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
800 struct __ecereNameSpace__ecere__sys__BinaryTree members;
801 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
802 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
803 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
804 struct __ecereNameSpace__ecere__sys__OldList derivatives;
808 struct __ecereNameSpace__ecere__com__Instance * module;
809 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
810 char * dataTypeString;
811 struct Type * dataType;
813 int defaultAlignment;
814 void (* Initialize)();
816 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
817 char * designerClass;
818 unsigned int noExpansion;
819 char * defaultProperty;
820 unsigned int comRedefinition;
822 unsigned int isRemote;
823 unsigned int internalDecl;
825 unsigned int computeSize;
827 int destructionWatchOffset;
829 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
830 int inheritanceAccess;
833 struct __ecereNameSpace__ecere__sys__OldList conversions;
834 struct __ecereNameSpace__ecere__sys__OldList templateParams;
835 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
836 struct __ecereNameSpace__ecere__com__Class * templateClass;
837 struct __ecereNameSpace__ecere__sys__OldList templatized;
839 } __attribute__ ((gcc_struct));
841 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, char * name);
843 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
845 struct __ecereNameSpace__ecere__com__Instance
848 struct __ecereNameSpace__ecere__com__Class * _class;
850 } __attribute__ ((gcc_struct));
852 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
854 struct __ecereNameSpace__ecere__com__DataMember
856 struct __ecereNameSpace__ecere__com__DataMember * prev;
857 struct __ecereNameSpace__ecere__com__DataMember * next;
859 unsigned int isProperty;
862 struct __ecereNameSpace__ecere__com__Class * _class;
863 char * dataTypeString;
864 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
865 struct Type * dataType;
869 struct __ecereNameSpace__ecere__sys__OldList members;
870 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
873 } __attribute__ ((gcc_struct));
875 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
877 struct __ecereNameSpace__ecere__com__SerialBuffer
879 unsigned char * _buffer;
883 } __attribute__ ((gcc_struct));
885 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
887 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
893 char * dataTypeString;
894 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
895 } __attribute__ ((gcc_struct));
896 struct __ecereNameSpace__ecere__com__DataValue expression;
902 struct __ecereNameSpace__ecere__com__DataMember * member;
903 struct __ecereNameSpace__ecere__com__Property * prop;
904 struct __ecereNameSpace__ecere__com__Method * method;
905 } __attribute__ ((gcc_struct));
906 } __attribute__ ((gcc_struct));
907 } __attribute__ ((gcc_struct));
908 } __attribute__ ((gcc_struct));
912 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
915 typedef union YYSTYPE
920 struct Identifier * id;
921 struct Expression * exp;
922 struct Specifier * specifier;
923 struct __ecereNameSpace__ecere__sys__OldList * list;
924 struct Enumerator * enumerator;
925 struct Declarator * declarator;
926 struct Pointer * pointer;
927 struct Initializer * initializer;
928 struct InitDeclarator * initDeclarator;
929 struct TypeName * typeName;
930 struct Declaration * declaration;
931 struct Statement * stmt;
932 struct FunctionDefinition * function;
933 struct External * external;
934 struct Context * context;
935 struct AsmField * asmField;
936 struct Attrib * attrib;
937 struct ExtDecl * extDecl;
938 struct Attribute * attribute;
939 struct Instantiation * instance;
940 struct MembersInit * membersInit;
941 struct MemberInit * memberInit;
942 struct ClassFunction * classFunction;
943 struct ClassDefinition * _class;
944 struct ClassDef * classDef;
945 struct PropertyDef * prop;
947 struct Symbol * symbol;
948 struct PropertyWatch * propertyWatch;
949 struct TemplateParameter * templateParameter;
950 struct TemplateArgument * templateArgument;
951 struct TemplateDatatype * templateDatatype;
952 struct DBTableEntry * dbtableEntry;
953 struct DBIndexItem * dbindexItem;
954 struct DBTableDef * dbtableDef;
955 } __attribute__ ((gcc_struct)) YYSTYPE;
957 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Enumerator;
961 struct Enumerator * prev;
962 struct Enumerator * next;
964 struct Identifier * id;
965 struct Expression * exp;
966 } __attribute__ ((gcc_struct));
968 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_InitDeclarator;
970 struct InitDeclarator
972 struct InitDeclarator * prev;
973 struct InitDeclarator * next;
975 struct Declarator * declarator;
976 struct Initializer * initializer;
977 } __attribute__ ((gcc_struct));
979 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_AsmField;
983 struct AsmField * prev;
984 struct AsmField * next;
987 struct Expression * expression;
988 } __attribute__ ((gcc_struct));
990 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attribute;
994 struct Attribute * prev;
995 struct Attribute * next;
998 struct Expression * exp;
999 } __attribute__ ((gcc_struct));
1001 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassFunction;
1003 struct ClassFunction
1005 struct ClassFunction * prev;
1006 struct ClassFunction * next;
1007 struct Location loc;
1008 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1009 struct Declarator * declarator;
1010 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1011 struct Statement * body;
1012 struct __ecereNameSpace__ecere__com__Class * _class;
1013 struct __ecereNameSpace__ecere__sys__OldList attached;
1016 struct Symbol * propSet;
1017 unsigned int isVirtual;
1018 unsigned int isConstructor;
1019 unsigned int isDestructor;
1020 unsigned int dontMangle;
1023 } __attribute__ ((gcc_struct));
1025 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MembersInit;
1029 struct MembersInit * prev;
1030 struct MembersInit * next;
1031 struct Location loc;
1035 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1036 struct ClassFunction * function;
1037 } __attribute__ ((gcc_struct));
1038 } __attribute__ ((gcc_struct));
1040 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MemberInit;
1044 struct MemberInit * prev;
1045 struct MemberInit * next;
1046 struct Location loc;
1047 struct Location realLoc;
1048 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
1049 struct Initializer * initializer;
1051 unsigned int variable;
1052 unsigned int takeOutExp;
1053 } __attribute__ ((gcc_struct));
1055 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyDef;
1059 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyWatch;
1061 struct PropertyWatch;
1063 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDef;
1067 struct ClassDef * prev;
1068 struct ClassDef * next;
1069 struct Location loc;
1073 struct Declaration * decl;
1074 struct ClassFunction * function;
1075 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
1076 struct PropertyDef * propertyDef;
1077 struct PropertyWatch * propertyWatch;
1079 struct Identifier * defaultProperty;
1082 struct Identifier * id;
1083 struct Initializer * initializer;
1084 } __attribute__ ((gcc_struct));
1085 } __attribute__ ((gcc_struct));
1088 } __attribute__ ((gcc_struct));
1090 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableEntry;
1092 struct DBTableEntry;
1094 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBIndexItem;
1098 extern YYSTYPE yylval;
1100 extern struct Location yylloc;
1104 unsigned int memoryGuard = 0x0;
1106 void SetMemoryGuard(unsigned int b)
1111 unsigned int GetMemoryGuard()
1116 extern int strcmp(const char * , const char * );
1118 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts;
1120 static void OutputIdentifier(struct Identifier * id, struct __ecereNameSpace__ecere__com__Instance * f)
1126 if(id->_class->type == 8)
1128 if(id->_class->templateParameter && id->_class->templateParameter->identifier && id->_class->templateParameter->identifier->string)
1129 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, id->_class->templateParameter->identifier->string);
1133 if(id->_class->name)
1135 if(!strcmp(id->_class->name, "class"))
1136 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
1138 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, id->_class->name);
1141 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "::");
1144 ((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)");
1147 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc;
1149 static void OutputOperator(int op, struct __ecereNameSpace__ecere__com__Instance * 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, "sizeof ");
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, "*=");
1190 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "/=");
1193 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "%=");
1196 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "+=");
1199 ((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 *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<<=");
1205 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">>=");
1208 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "&=");
1211 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "^=");
1214 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "|=");
1229 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, char ch))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc])(f, (char)op);
1232 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "delete ");
1237 static void OutputSpecifier(struct Specifier * spec, struct __ecereNameSpace__ecere__com__Instance * f);
1239 static void OutputDeclarator(struct Declarator * decl, struct __ecereNameSpace__ecere__com__Instance * f);
1241 void OutputTypeName(struct TypeName * type, struct __ecereNameSpace__ecere__com__Instance * f)
1243 if(type->qualifiers)
1245 struct Specifier * spec;
1247 for(spec = (*type->qualifiers).first; spec; spec = spec->next)
1249 OutputSpecifier(spec, f);
1251 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1254 if(type->declarator)
1256 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1257 OutputDeclarator(type->declarator, f);
1259 if(!type->qualifiers && !type->declarator)
1260 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "...");
1263 static void OutputStatement(struct Statement * stmt, struct __ecereNameSpace__ecere__com__Instance * f);
1265 static void OutputInstance(struct Instantiation * inst, struct __ecereNameSpace__ecere__com__Instance * f);
1267 extern int printf(char * , ...);
1269 static void OutputInitializer(struct Initializer * initializer, struct __ecereNameSpace__ecere__com__Instance * f);
1271 void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f)
1276 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class(");
1277 if(exp->_classExp.specifiers)
1279 struct Specifier * spec;
1281 for(spec = (*exp->_classExp.specifiers).first; spec; spec = spec->next)
1283 OutputSpecifier(spec, f);
1285 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1287 if(exp->_classExp.decl)
1289 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1290 OutputDeclarator(exp->_classExp.decl, f);
1292 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1296 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1297 OutputStatement(exp->compound, f);
1298 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1301 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "new ");
1302 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1303 OutputTypeName(exp->_renew.typeName, f);
1304 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1305 OutputExpression(exp->_renew.size, f);
1306 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1309 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "new0 ");
1310 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1311 OutputTypeName(exp->_renew.typeName, f);
1312 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1313 OutputExpression(exp->_renew.size, f);
1314 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1317 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "renew ");
1318 OutputExpression(exp->_renew.exp, f);
1319 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1320 OutputTypeName(exp->_renew.typeName, f);
1321 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1322 OutputExpression(exp->_renew.size, f);
1323 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1326 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "renew0 ");
1327 OutputExpression(exp->_renew.exp, f);
1328 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1329 OutputTypeName(exp->_renew.typeName, f);
1330 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1331 OutputExpression(exp->_renew.size, f);
1332 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1336 OutputIdentifier(exp->identifier, f);
1340 OutputInstance(exp->instance, f);
1344 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, exp->constant);
1350 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, exp->string);
1355 OutputExpression(exp->op.exp1, f);
1357 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1359 OutputOperator(exp->op.op, f);
1362 if(exp->op.exp1 || (exp->op.exp2->type == 4 && !exp->op.exp2->op.exp1 && exp->op.exp2->op.op == exp->op.op))
1363 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1364 OutputExpression(exp->op.exp2, f);
1370 struct Expression * expression;
1373 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1374 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1377 for(expression = (*exp->list).first; expression; expression = expression->next)
1379 OutputExpression(expression, f);
1380 if(expression->next)
1381 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1384 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1389 struct Expression * expression;
1392 OutputExpression(exp->index.exp, f);
1393 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1394 if(exp->index.index)
1395 for(expression = (*exp->index.index).first; expression; expression = expression->next)
1397 OutputExpression(expression, f);
1398 if(expression->next)
1399 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1401 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1406 OutputExpression(exp->call.exp, f);
1407 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1408 if(exp->call.arguments)
1410 struct Expression * expression;
1412 for(expression = (*exp->call.arguments).first; expression; expression = expression->next)
1414 OutputExpression(expression, f);
1415 if(expression->next)
1416 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1419 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1424 OutputExpression(exp->member.exp, f);
1425 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ".");
1426 if(exp->member.member)
1427 OutputIdentifier(exp->member.member, f);
1430 OutputExpression(exp->member.exp, f);
1431 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "->");
1432 OutputIdentifier(exp->member.member, f);
1435 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "sizeof(");
1436 OutputTypeName(exp->typeName, f);
1437 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1440 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__alignof__(");
1441 OutputTypeName(exp->typeName, f);
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, "__extension__ (");
1446 if(exp->initializer.typeName)
1447 OutputTypeName(exp->initializer.typeName, f);
1448 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1449 if(exp->initializer.initializer)
1450 OutputInitializer(exp->initializer.initializer, f);
1453 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1454 OutputTypeName(exp->cast.typeName, f);
1455 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1457 OutputExpression(exp->cast.exp, f);
1460 OutputExpression(exp->cond.cond, f);
1461 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ? ");
1463 struct Expression * expression;
1465 for(expression = (*exp->cond.exp).first; expression; expression = expression->next)
1467 OutputExpression(expression, f);
1468 if(expression->next)
1469 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1472 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1473 OutputExpression(exp->cond.elseExp, f);
1476 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__builtin_va_arg(");
1477 OutputExpression(exp->vaArg.exp, f);
1478 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1479 OutputTypeName(exp->vaArg.typeName, f);
1480 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1483 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1486 struct Expression * expression;
1488 for(expression = (*exp->list).first; expression; expression = expression->next)
1490 OutputExpression(expression, f);
1491 if(expression->next)
1492 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1495 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1500 static void OutputAsmField(struct AsmField * field, struct __ecereNameSpace__ecere__com__Instance * f)
1502 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, field->command);
1503 if(field->expression)
1505 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1506 OutputExpression(field->expression, f);
1507 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1511 extern unsigned int inCompiler;
1513 extern char * __ecereNameSpace__ecere__sys__PathCat(char * string, char * addedPath);
1515 extern char * GetIncludeFileFromID(int id);
1517 extern char * sourceFile;
1519 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
1521 extern char * outputFile;
1523 extern unsigned int outputLineNumbers;
1525 static void OutputDeclaration(struct Declaration * decl, struct __ecereNameSpace__ecere__com__Instance * f);
1527 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
1529 extern struct Declarator * SpecDeclFromString(char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
1531 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
1533 extern struct Identifier * MkIdentifier(char * string);
1535 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* )(void * ));
1537 extern struct Specifier * CopySpecifier(struct Specifier * spec);
1539 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
1541 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
1543 extern struct Specifier * MkSpecifierName(char * name);
1545 extern void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
1547 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
1549 extern void InstDeclPassTypeName(struct TypeName * type, unsigned int param);
1551 extern void FreeTypeName(struct TypeName * typeName);
1553 int __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(struct __ecereNameSpace__ecere__com__Instance * this, char * format, ...);
1555 static void OutputStatement(struct Statement * stmt, struct __ecereNameSpace__ecere__com__Instance * f)
1557 char name[274] = "";
1558 char origName[274] = "";
1562 if(yylloc.start.included)
1564 __ecereNameSpace__ecere__sys__PathCat(name, GetIncludeFileFromID((unsigned int)yylloc.start.included));
1568 __ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
1570 __ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
1571 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
1572 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
1574 if(inCompiler && outputLineNumbers && stmt->loc.start.line)
1576 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.start.line, name);
1582 OutputIdentifier(stmt->labeled.id, f);
1583 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":\n");
1585 OutputStatement(stmt->labeled.stmt, f);
1588 if(stmt->caseStmt.exp)
1590 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "case ");
1591 OutputExpression(stmt->caseStmt.exp, f);
1592 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":\n");
1597 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "default:\n");
1600 if(stmt->caseStmt.stmt)
1601 OutputStatement(stmt->caseStmt.stmt, f);
1605 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "{\n");
1607 if(stmt->compound.declarations)
1609 struct Declaration * decl;
1611 for(decl = (*stmt->compound.declarations).first; decl; decl = decl->next)
1613 OutputDeclaration(decl, f);
1616 if(stmt->compound.statements)
1618 struct Statement * statement;
1620 if(stmt->compound.declarations)
1622 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1625 for(statement = (*stmt->compound.statements).first; statement; statement = statement->next)
1627 OutputStatement(statement, f);
1628 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1632 if(inCompiler && outputLineNumbers && stmt->loc.end.line)
1634 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.end.line, name);
1637 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}");
1642 if(stmt->expressions)
1644 struct Expression * exp;
1646 for(exp = (*stmt->expressions).first; exp; exp = exp->next)
1648 OutputExpression(exp, f);
1650 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1653 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1658 struct Expression * exp;
1660 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "if(");
1661 for(exp = (*stmt->ifStmt.exp).first; exp; exp = exp->next)
1663 OutputExpression(exp, f);
1665 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1667 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1669 if(stmt->ifStmt.stmt)
1670 OutputStatement(stmt->ifStmt.stmt, f);
1671 if(stmt->ifStmt.elseStmt)
1673 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1675 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "else");
1676 if(stmt->ifStmt.elseStmt->type != 4)
1678 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1682 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1683 OutputStatement(stmt->ifStmt.elseStmt, f);
1689 struct Expression * exp;
1691 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "switch(");
1692 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1694 OutputExpression(exp, f);
1696 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1698 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1700 OutputStatement(stmt->switchStmt.stmt, f);
1705 struct Expression * exp;
1707 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "while(");
1708 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1710 OutputExpression(exp, f);
1712 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1714 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1716 OutputStatement(stmt->whileStmt.stmt, f);
1721 struct Expression * exp;
1723 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "do\n");
1725 OutputStatement(stmt->whileStmt.stmt, f);
1726 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "while(");
1727 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1729 OutputExpression(exp, f);
1731 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1733 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ");");
1738 struct Expression * exp;
1740 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "for(");
1741 OutputStatement(stmt->forStmt.init, f);
1742 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1743 OutputStatement(stmt->forStmt.check, f);
1744 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1745 if(stmt->forStmt.increment)
1747 if(inCompiler && outputLineNumbers && stmt->loc.end.line)
1749 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.end.line, name);
1752 for(exp = (*stmt->forStmt.increment).first; exp; exp = exp->next)
1754 OutputExpression(exp, f);
1756 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1759 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1761 OutputStatement(stmt->forStmt.stmt, f);
1766 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "goto ");
1767 OutputIdentifier(stmt->gotoStmt.id, f);
1768 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1772 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "continue;");
1775 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "break;");
1779 struct Expression * exp;
1781 if(inCompiler && memoryGuard)
1783 struct Expression * exp = stmt->expressions ? (*stmt->expressions).last : (((void *)0));
1785 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "{ ");
1786 if(exp && exp->expType)
1788 char string[1024] = "";
1789 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
1790 struct Declarator * decl;
1791 struct TypeName * typeName;
1793 if(exp->expType->kind == 20)
1795 if(exp->expType->templateParameter->dataTypeString)
1796 decl = SpecDeclFromString(exp->expType->templateParameter->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1797 else if(exp->expType->templateParameter->dataType)
1799 (__ecereNameSpace__ecere__com__eSystem_Delete(specs), specs = 0);
1800 specs = CopyList(exp->expType->templateParameter->dataType->specifiers, CopySpecifier);
1801 decl = PlugDeclarator(exp->expType->templateParameter->dataType->decl, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1805 ListAdd(specs, MkSpecifierName("uint64"));
1806 decl = MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal"));
1811 PrintType(exp->expType, string, 0x1, 0x1);
1812 decl = SpecDeclFromString(string, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1814 typeName = MkTypeName(specs, decl);
1815 InstDeclPassTypeName(typeName, 0x0);
1816 OutputTypeName(typeName, f);
1817 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ";");
1818 FreeTypeName(typeName);
1822 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "return ");
1825 struct Expression * exp = stmt->expressions ? (*stmt->expressions).last : (((void *)0));
1827 if(exp && exp->expType)
1828 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "__ecereReturnVal = ");
1830 if(stmt->expressions)
1832 for(exp = (*stmt->expressions).first; exp; exp = exp->next)
1834 OutputExpression(exp, f);
1836 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1839 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1840 if(inCompiler && memoryGuard)
1842 struct Expression * exp = stmt->expressions ? (struct Expression *)(*stmt->expressions).last : (((void *)0));
1844 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PopLoc();");
1845 if(exp && exp->expType)
1846 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "return __ecereReturnVal;");
1848 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "return;");
1849 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "}");
1855 struct AsmField * field;
1857 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__asm__ ");
1858 if(stmt->asmStmt.spec)
1859 OutputSpecifier(stmt->asmStmt.spec, f);
1860 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1861 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, stmt->asmStmt.statements);
1862 if(stmt->asmStmt.inputFields || stmt->asmStmt.outputFields || stmt->asmStmt.clobberedFields)
1864 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1865 if(stmt->asmStmt.inputFields)
1867 for(field = (*stmt->asmStmt.inputFields).first; field; field = field->next)
1870 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1871 OutputAsmField(field, f);
1875 if(stmt->asmStmt.outputFields || stmt->asmStmt.clobberedFields)
1877 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1878 if(stmt->asmStmt.outputFields)
1880 for(field = (*stmt->asmStmt.outputFields).first; field; field = field->next)
1883 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1884 OutputAsmField(field, f);
1888 if(stmt->asmStmt.clobberedFields)
1890 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1891 for(field = (*stmt->asmStmt.clobberedFields).first; field; field = field->next)
1894 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1895 OutputAsmField(field, f);
1898 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ");\n");
1902 if(inCompiler && outputLineNumbers && stmt->loc.start.line)
1904 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", outputLine + 2, origName);
1909 static void OutputPointer(struct Pointer * ptr, struct __ecereNameSpace__ecere__com__Instance * f)
1911 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "*");
1914 struct Specifier * spec;
1916 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1917 for(spec = (*ptr->qualifiers).first; spec; spec = spec->next)
1919 OutputSpecifier(spec, f);
1921 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1926 OutputPointer(ptr->pointer, f);
1930 static void OutputAttrib(struct Attrib * attr, struct __ecereNameSpace__ecere__com__Instance * f);
1932 static void OutputExtDecl(struct ExtDecl * extDecl, struct __ecereNameSpace__ecere__com__Instance * f);
1934 extern void ProcessExpressionType(struct Expression * exp);
1936 extern void ComputeExpression(struct Expression * exp);
1938 static void OutputDeclarator(struct Declarator * decl, struct __ecereNameSpace__ecere__com__Instance * f)
1943 if(decl->declarator)
1945 OutputDeclarator(decl->declarator, f);
1947 if(decl->structDecl.exp)
1949 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1950 OutputExpression(decl->structDecl.exp, f);
1952 if(decl->structDecl.posExp)
1954 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1955 OutputExpression(decl->structDecl.posExp, f);
1957 if(decl->structDecl.attrib)
1959 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1960 OutputAttrib(decl->structDecl.attrib, f);
1964 OutputIdentifier(decl->identifier, f);
1967 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1968 OutputDeclarator(decl->declarator, f);
1969 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1972 if(decl->extended.extended)
1973 OutputExtDecl(decl->extended.extended, f);
1974 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1975 OutputDeclarator(decl->declarator, f);
1978 OutputDeclarator(decl->declarator, f);
1979 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1980 if(decl->extended.extended)
1981 OutputExtDecl(decl->extended.extended, f);
1984 if(decl->declarator)
1986 OutputDeclarator(decl->declarator, f);
1988 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1991 ProcessExpressionType(decl->array.exp);
1992 ComputeExpression(decl->array.exp);
1993 OutputExpression(decl->array.exp, f);
1995 else if(decl->array.enumClass)
1997 struct Symbol * _class = decl->array.enumClass->symbol;
1999 if(_class && _class->registered)
2001 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%d", __ecereNameSpace__ecere__com__eClass_GetProperty(_class->registered, "enumSize"));
2004 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
2008 struct TypeName * param;
2010 if(decl->declarator)
2011 OutputDeclarator(decl->declarator, f);
2012 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
2013 if(decl->function.parameters && (*decl->function.parameters).first)
2015 for(param = (*decl->function.parameters).first; param; param = param->next)
2017 OutputTypeName(param, f);
2019 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2022 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2026 if(decl->pointer.pointer)
2027 OutputPointer(decl->pointer.pointer, f);
2028 if(decl->declarator)
2030 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2031 OutputDeclarator(decl->declarator, f);
2037 static void OutputEnumerator(struct Enumerator * enumerator, struct __ecereNameSpace__ecere__com__Instance * f)
2039 OutputIdentifier(enumerator->id, f);
2042 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2043 OutputExpression(enumerator->exp, f);
2047 static void OutputAttribute(struct Attribute * attr, struct __ecereNameSpace__ecere__com__Instance * f)
2050 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, attr->attr);
2053 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2054 OutputExpression(attr->exp, f);
2058 static void OutputAttrib(struct Attrib * attr, struct __ecereNameSpace__ecere__com__Instance * f)
2063 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute__((");
2066 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute((");
2069 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute_deprecated__((");
2074 struct Attribute * attrib;
2076 for(attrib = (*attr->attribs).first; attrib; attrib = attrib->next)
2079 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2080 OutputAttribute(attrib, f);
2083 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "))");
2086 static void OutputExtDecl(struct ExtDecl * extDecl, struct __ecereNameSpace__ecere__com__Instance * f)
2088 if(extDecl->type == 0 && extDecl->s)
2089 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, extDecl->s);
2090 else if(extDecl->type == 1)
2091 OutputAttrib(extDecl->attr, f);
2094 extern struct Symbol * FindClass(char * name);
2096 static void OutputClassDef(struct ClassDef * def, struct __ecereNameSpace__ecere__com__Instance * f);
2098 static void OutputSpecifier(struct Specifier * spec, struct __ecereNameSpace__ecere__com__Instance * f)
2103 switch(spec->specifier)
2106 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typedef");
2109 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "extern");
2112 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "static");
2115 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "auto");
2118 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "register");
2121 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "const");
2124 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "volatile");
2127 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "void");
2130 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "char");
2133 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "short");
2136 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "int");
2139 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "unsigned int");
2142 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "long long");
2145 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__builtin_va_list");
2148 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "long");
2151 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "float");
2154 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "double");
2157 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "signed");
2160 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "unsigned");
2163 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
2166 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "any_object");
2169 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class");
2172 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "thisclass");
2178 OutputExtDecl(spec->extDecl, f);
2181 if(spec->name && !strcmp(spec->name, "class"))
2183 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
2187 struct Symbol * symbol = spec->symbol;
2189 if(!symbol && spec->name)
2190 symbol = FindClass(spec->name);
2193 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, symbol->string ? symbol->string : "(null)");
2196 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, spec->name);
2201 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "enum");
2204 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2205 OutputIdentifier(spec->id, f);
2209 struct Enumerator * enumerator;
2211 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2213 for(enumerator = (*spec->list).first; enumerator; enumerator = enumerator->next)
2215 OutputEnumerator(enumerator, f);
2216 if(enumerator->next)
2217 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2219 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n}");
2227 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, (spec->type == 3) ? "struct" : "union");
2228 if(spec->extDeclStruct)
2230 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2231 OutputExtDecl(spec->extDeclStruct, f);
2235 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2236 OutputIdentifier(spec->id, f);
2238 if(spec->definitions)
2240 struct ClassDef * def;
2242 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2244 for(def = (*spec->definitions).first; def; def = def->next)
2246 OutputClassDef(def, f);
2248 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "} __attribute__ ((gcc_struct))");
2253 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__typeof(");
2254 OutputExpression(spec->expression, f);
2255 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2258 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "subclass(");
2259 OutputSpecifier(spec->_class, f);
2260 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2263 OutputIdentifier(spec->templateParameter->identifier, f);
2268 static void OutputInitializer(struct Initializer * initializer, struct __ecereNameSpace__ecere__com__Instance * f)
2270 char name[274] = "";
2271 char origName[274] = "";
2275 if(yylloc.start.included)
2277 __ecereNameSpace__ecere__sys__PathCat(name, GetIncludeFileFromID((unsigned int)yylloc.start.included));
2281 __ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
2283 __ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
2284 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
2285 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
2287 switch(initializer->type)
2291 struct Initializer * init;
2293 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2295 if(inCompiler && outputLineNumbers && initializer->loc.start.line)
2297 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", initializer->loc.start.line, name);
2300 for(init = (*initializer->list).first; init; init = init->next)
2302 OutputInitializer(init, f);
2304 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2306 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n}");
2307 if(inCompiler && outputLineNumbers && initializer->loc.start.line)
2309 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", initializer->loc.start.line, name);
2316 if(initializer->exp)
2317 OutputExpression(initializer->exp, f);
2322 static void OutputInitDeclarator(struct InitDeclarator * decl, struct __ecereNameSpace__ecere__com__Instance * f)
2324 OutputDeclarator(decl->declarator, f);
2325 if(decl->initializer)
2327 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2328 OutputInitializer(decl->initializer, f);
2332 static void OutputDeclaration(struct Declaration * decl, struct __ecereNameSpace__ecere__com__Instance * f)
2334 struct Specifier * spec;
2335 char origName[274] = "";
2341 struct InitDeclarator * d;
2345 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
2346 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
2348 if(decl->declarators && (*decl->declarators).first)
2350 for(d = (*decl->declarators).first; d; d = d->next)
2353 char name[274] = "";
2355 if(yylloc.start.included)
2357 __ecereNameSpace__ecere__sys__PathCat(name, GetIncludeFileFromID((unsigned int)yylloc.start.included));
2361 __ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
2363 __ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
2364 if(inCompiler && outputLineNumbers && decl->loc.start.line)
2366 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", decl->loc.start.line, name);
2372 if(decl->specifiers)
2374 for(spec = (*decl->specifiers).first; spec; spec = spec->next)
2376 OutputSpecifier(spec, f);
2378 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2381 if(decl->declarators && (*decl->declarators).first)
2383 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2384 for(d = (*decl->declarators).first; d; d = d->next)
2386 OutputInitDeclarator(d, f);
2388 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2395 if(decl->specifiers)
2397 for(spec = (*decl->specifiers).first; spec; spec = spec->next)
2399 OutputSpecifier(spec, f);
2401 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2404 if(decl->declarators)
2406 struct Declarator * d;
2408 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2409 for(d = (*decl->declarators).first; d; d = d->next)
2411 OutputDeclarator(d, f);
2413 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2416 if(decl->extStorage)
2418 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2419 OutputSpecifier(decl->extStorage, f);
2426 OutputInstance(decl->inst, f);
2432 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n");
2434 if(inCompiler && outputLineNumbers && decl->loc.start.line && decl->type == 1)
2436 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", outputLine + 2, origName);
2441 static struct FunctionDefinition * curFunction;
2443 extern struct Identifier * GetDeclId(struct Declarator * decl);
2445 static void OutputFunction(struct FunctionDefinition * func, struct __ecereNameSpace__ecere__com__Instance * f)
2447 struct FunctionDefinition * oldFunc = curFunction;
2450 if(func->specifiers)
2452 struct Specifier * spec;
2454 for(spec = (*func->specifiers).first; spec; spec = spec->next)
2456 OutputSpecifier(spec, f);
2458 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2460 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2462 if(func->declarator)
2463 OutputDeclarator(func->declarator, f);
2464 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2466 if(func->declarations)
2468 struct Declaration * decl;
2470 for(decl = (*func->declarations).first; decl; decl = decl->next)
2472 OutputDeclaration(decl, f);
2474 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2479 if(inCompiler && memoryGuard)
2481 char name[1024] = "";
2482 struct Identifier * id = GetDeclId(func->declarator);
2484 if(yylloc.start.included)
2486 __ecereNameSpace__ecere__sys__PathCat(name, GetIncludeFileFromID((unsigned int)yylloc.start.included));
2490 __ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
2492 __ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
2493 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "{\n");
2494 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PushLoc(\"%s:%s\");\n", name, id->string);
2497 OutputStatement(func->body, f);
2498 if(inCompiler && memoryGuard)
2500 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PopLoc();\n");
2501 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "}\n");
2504 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2507 curFunction = oldFunc;
2510 static void OutputMemberInit(struct MemberInit * init, struct __ecereNameSpace__ecere__com__Instance * f)
2512 if(init->identifiers)
2514 if((*init->identifiers).count > 1)
2516 struct Identifier * id;
2518 for(id = (*init->identifiers).first; id; id = id->next)
2520 OutputIdentifier(id, f);
2522 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ".");
2525 else if((*init->identifiers).first)
2526 OutputIdentifier((*init->identifiers).first, f);
2527 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2529 if(init->initializer)
2530 OutputInitializer(init->initializer, f);
2533 static void OutputClassFunction(struct ClassFunction * func, struct __ecereNameSpace__ecere__com__Instance * f);
2535 static void OutputMembersInit(struct MembersInit * init, struct __ecereNameSpace__ecere__com__Instance * f)
2541 struct MemberInit * member;
2543 if(init->dataMembers)
2545 for(member = (*init->dataMembers).first; member; member = member->next)
2547 OutputMemberInit(member, f);
2549 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2555 OutputClassFunction(init->function, f);
2560 static void OutputInstance(struct Instantiation * inst, struct __ecereNameSpace__ecere__com__Instance * f)
2563 OutputSpecifier(inst->_class, f);
2566 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2567 OutputExpression(inst->exp, f);
2569 if(inst->members && (*inst->members).count > 1)
2571 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2574 else if(inst->members)
2575 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " { ");
2577 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "{");
2580 struct MembersInit * init;
2582 for(init = (*inst->members).first; init; init = init->next)
2584 OutputMembersInit(init, f);
2585 if(init->type == 0 && init->next)
2587 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n");
2593 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " }");
2595 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}");
2598 static void OutputClassFunction(struct ClassFunction * func, struct __ecereNameSpace__ecere__com__Instance * f)
2600 if(func->specifiers)
2602 struct Specifier * spec;
2604 for(spec = (*func->specifiers).first; spec; spec = spec->next)
2606 OutputSpecifier(spec, f);
2608 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2610 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2612 if(func->declarator)
2613 OutputDeclarator(func->declarator, f);
2614 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2616 if(func->declarations)
2618 struct Declaration * decl;
2620 for(decl = (*func->declarations).first; decl; decl = decl->next)
2622 OutputDeclaration(decl, f);
2624 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2629 OutputStatement(func->body, f);
2630 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2634 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
2637 static void OutputClassDef(struct ClassDef * def, struct __ecereNameSpace__ecere__com__Instance * f)
2644 OutputDeclaration(def->decl, f);
2645 if(def->next && def->next->type != 2)
2647 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2654 struct MemberInit * init;
2656 for(init = (*def->defProperties).first; init; init = init->next)
2658 OutputMemberInit(init, f);
2660 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2662 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n\n");
2667 OutputClassFunction(def->function, f);
2668 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2674 static void OutputClass(struct ClassDefinition * _class, struct __ecereNameSpace__ecere__com__Instance * f)
2676 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class ");
2677 OutputSpecifier(_class->_class, f);
2678 if(_class->baseSpecs)
2680 struct Specifier * spec;
2682 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
2683 for(spec = (*_class->baseSpecs).first; spec; spec = spec->next)
2685 OutputSpecifier(spec, f);
2688 if(_class->definitions)
2690 struct ClassDef * def;
2692 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2694 for(def = (*_class->definitions).first; def; def = def->next)
2696 OutputClassDef(def, f);
2698 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}\n");
2702 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
2705 void OutputTree(struct __ecereNameSpace__ecere__sys__OldList * ast, struct __ecereNameSpace__ecere__com__Instance * f)
2707 struct External * external;
2710 for(external = ast->first; external; external = external->next)
2712 switch(external->type)
2715 OutputFunction(external->function, f);
2716 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2720 OutputDeclaration(external->declaration, f);
2721 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2725 OutputClass(external->_class, f);
2726 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2733 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
2735 struct __ecereNameSpace__ecere__sys__TempFile
2737 char __ecere_padding[24];
2738 } __attribute__ ((gcc_struct));
2740 extern char * __ecereNameSpace__ecere__sys__TrimRSpaces(char * string, char * output);
2742 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
2744 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize;
2746 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
2748 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
2750 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
2752 char * StringFromSpecDecl(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl)
2755 struct TypeName * typeName = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
2756 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
2759 typeName->qualifiers = specs;
2760 typeName->declarator = decl;
2761 OutputTypeName(typeName, f);
2762 ((typeName ? (__ecereClass_TypeName->Destructor ? __ecereClass_TypeName->Destructor(typeName) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(typeName)) : 0), typeName = 0);
2763 size = ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize])(f);
2764 string = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (size + 1));
2765 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(f, 0, 0);
2766 ((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);
2767 string[size] = '\0';
2768 __ecereNameSpace__ecere__sys__TrimRSpaces(string, string);
2769 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
2773 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
2775 struct __ecereNameSpace__ecere__com__GlobalFunction;
2777 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);
2779 void __ecereRegisterModule_output(struct __ecereNameSpace__ecere__com__Instance * module)
2781 struct __ecereNameSpace__ecere__com__Class * class;
2783 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetMemoryGuard", "void SetMemoryGuard(bool b)", SetMemoryGuard, module, 1);
2784 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetMemoryGuard", "bool GetMemoryGuard(void)", GetMemoryGuard, module, 1);
2785 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputTypeName", "void OutputTypeName(TypeName type, ecere::sys::File f)", OutputTypeName, module, 1);
2786 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputExpression", "void OutputExpression(Expression exp, ecere::sys::File f)", OutputExpression, module, 1);
2787 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputTree", "void OutputTree(ecere::sys::OldList ast, ecere::sys::File f)", OutputTree, module, 1);
2788 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("StringFromSpecDecl", "char * StringFromSpecDecl(ecere::sys::OldList specs, Declarator decl)", StringFromSpecDecl, module, 1);
2791 void __ecereUnregisterModule_output(struct __ecereNameSpace__ecere__com__Instance * module)