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
31 #include <sys/types.h>
32 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
34 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
36 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
38 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
40 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
42 struct __ecereNameSpace__ecere__sys__BTNode;
44 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BinaryTree;
46 struct __ecereNameSpace__ecere__sys__BinaryTree
48 struct __ecereNameSpace__ecere__sys__BTNode * root;
50 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
51 void (* FreeKey)(void * key);
52 } __attribute__ ((gcc_struct));
54 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldList;
56 struct __ecereNameSpace__ecere__sys__OldList
63 } __attribute__ ((gcc_struct));
65 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Method;
67 struct __ecereNameSpace__ecere__com__Method
70 struct __ecereNameSpace__ecere__com__Method * parent;
71 struct __ecereNameSpace__ecere__com__Method * left;
72 struct __ecereNameSpace__ecere__com__Method * right;
77 struct __ecereNameSpace__ecere__com__Class * _class;
79 char * dataTypeString;
80 struct Type * dataType;
82 } __attribute__ ((gcc_struct));
84 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Property;
86 struct __ecereNameSpace__ecere__com__Property
88 struct __ecereNameSpace__ecere__com__Property * prev;
89 struct __ecereNameSpace__ecere__com__Property * next;
91 unsigned int isProperty;
94 struct __ecereNameSpace__ecere__com__Class * _class;
95 char * dataTypeString;
96 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
97 struct Type * dataType;
98 void (* Set)(void * , int);
100 unsigned int (* IsSet)(void * );
104 unsigned int conversion;
105 unsigned int watcherOffset;
107 unsigned int compiled;
108 unsigned int selfWatchable;
109 unsigned int isWatchable;
110 } __attribute__ ((gcc_struct));
112 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_CodePosition;
120 } __attribute__ ((gcc_struct));
122 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Location;
126 struct CodePosition start;
127 struct CodePosition end;
128 } __attribute__ ((gcc_struct));
130 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attrib;
136 struct __ecereNameSpace__ecere__sys__OldList * attribs;
137 } __attribute__ ((gcc_struct));
139 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ExtDecl;
148 struct Attrib * attr;
149 } __attribute__ ((gcc_struct));
150 } __attribute__ ((gcc_struct));
152 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDefinition;
154 struct ClassDefinition
156 struct ClassDefinition * prev;
157 struct ClassDefinition * next;
159 struct Specifier * _class;
160 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
161 struct __ecereNameSpace__ecere__sys__OldList * definitions;
162 struct Symbol * symbol;
163 struct Location blockStart;
164 struct Location nameLoc;
167 unsigned int deleteWatchable;
168 } __attribute__ ((gcc_struct));
170 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
174 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Instantiation;
178 struct Instantiation * prev;
179 struct Instantiation * next;
181 struct Specifier * _class;
182 struct Expression * exp;
183 struct __ecereNameSpace__ecere__sys__OldList * members;
184 struct Symbol * symbol;
185 unsigned int fullSet;
186 unsigned int isConstant;
187 unsigned char * data;
188 struct Location nameLoc;
189 struct Location insideLoc;
191 } __attribute__ ((gcc_struct));
193 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declaration;
197 struct Declaration * prev;
198 struct Declaration * next;
205 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
206 struct __ecereNameSpace__ecere__sys__OldList * declarators;
207 } __attribute__ ((gcc_struct));
208 struct Instantiation * inst;
211 struct Identifier * id;
212 struct Expression * exp;
213 } __attribute__ ((gcc_struct));
214 } __attribute__ ((gcc_struct));
215 struct Specifier * extStorage;
216 struct Symbol * symbol;
218 } __attribute__ ((gcc_struct));
220 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Statement;
224 struct Statement * prev;
225 struct Statement * next;
230 struct __ecereNameSpace__ecere__sys__OldList * expressions;
233 struct Identifier * id;
234 struct Statement * stmt;
235 } __attribute__ ((gcc_struct)) labeled;
238 struct Expression * exp;
239 struct Statement * stmt;
240 } __attribute__ ((gcc_struct)) caseStmt;
243 struct __ecereNameSpace__ecere__sys__OldList * declarations;
244 struct __ecereNameSpace__ecere__sys__OldList * statements;
245 struct Context * context;
246 unsigned int isSwitch;
247 } __attribute__ ((gcc_struct)) compound;
250 struct __ecereNameSpace__ecere__sys__OldList * exp;
251 struct Statement * stmt;
252 struct Statement * elseStmt;
253 } __attribute__ ((gcc_struct)) ifStmt;
256 struct __ecereNameSpace__ecere__sys__OldList * exp;
257 struct Statement * stmt;
258 } __attribute__ ((gcc_struct)) switchStmt;
261 struct __ecereNameSpace__ecere__sys__OldList * exp;
262 struct Statement * stmt;
263 } __attribute__ ((gcc_struct)) whileStmt;
266 struct __ecereNameSpace__ecere__sys__OldList * exp;
267 struct Statement * stmt;
268 } __attribute__ ((gcc_struct)) doWhile;
271 struct Statement * init;
272 struct Statement * check;
273 struct __ecereNameSpace__ecere__sys__OldList * increment;
274 struct Statement * stmt;
275 } __attribute__ ((gcc_struct)) forStmt;
278 struct Identifier * id;
279 } __attribute__ ((gcc_struct)) gotoStmt;
282 struct Specifier * spec;
284 struct __ecereNameSpace__ecere__sys__OldList * inputFields;
285 struct __ecereNameSpace__ecere__sys__OldList * outputFields;
286 struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
287 } __attribute__ ((gcc_struct)) asmStmt;
290 struct Expression * watcher;
291 struct Expression * object;
292 struct __ecereNameSpace__ecere__sys__OldList * watches;
293 } __attribute__ ((gcc_struct)) _watch;
296 struct Identifier * id;
297 struct __ecereNameSpace__ecere__sys__OldList * exp;
298 struct __ecereNameSpace__ecere__sys__OldList * filter;
299 struct Statement * stmt;
300 } __attribute__ ((gcc_struct)) forEachStmt;
301 struct Declaration * decl;
302 } __attribute__ ((gcc_struct));
303 } __attribute__ ((gcc_struct));
305 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
309 struct TypeName * prev;
310 struct TypeName * next;
312 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
313 struct Declarator * declarator;
315 struct Expression * bitCount;
316 } __attribute__ ((gcc_struct));
318 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Initializer;
322 struct Initializer * prev;
323 struct Initializer * next;
328 struct Expression * exp;
329 struct __ecereNameSpace__ecere__sys__OldList * list;
330 } __attribute__ ((gcc_struct));
331 unsigned int isConstant;
332 } __attribute__ ((gcc_struct));
334 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
336 struct __ecereNameSpace__ecere__com__DataValue
351 } __attribute__ ((gcc_struct));
352 } __attribute__ ((gcc_struct));
354 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
358 struct Expression * prev;
359 struct Expression * next;
367 struct Identifier * identifier;
368 } __attribute__ ((gcc_struct));
369 struct Statement * compound;
370 struct Instantiation * instance;
372 struct __ecereNameSpace__ecere__sys__OldList * list;
375 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
376 struct Declarator * decl;
377 } __attribute__ ((gcc_struct)) _classExp;
380 struct Identifier * id;
381 } __attribute__ ((gcc_struct)) classData;
384 struct Expression * exp;
385 struct __ecereNameSpace__ecere__sys__OldList * arguments;
386 struct Location argLoc;
387 } __attribute__ ((gcc_struct)) call;
390 struct Expression * exp;
391 struct __ecereNameSpace__ecere__sys__OldList * index;
392 } __attribute__ ((gcc_struct)) index;
395 struct Expression * exp;
396 struct Identifier * member;
398 unsigned int thisPtr;
399 } __attribute__ ((gcc_struct)) member;
403 struct Expression * exp1;
404 struct Expression * exp2;
405 } __attribute__ ((gcc_struct)) op;
406 struct TypeName * typeName;
407 struct Specifier * _class;
410 struct TypeName * typeName;
411 struct Expression * exp;
412 } __attribute__ ((gcc_struct)) cast;
415 struct Expression * cond;
416 struct __ecereNameSpace__ecere__sys__OldList * exp;
417 struct Expression * elseExp;
418 } __attribute__ ((gcc_struct)) cond;
421 struct TypeName * typeName;
422 struct Expression * size;
423 } __attribute__ ((gcc_struct)) _new;
426 struct TypeName * typeName;
427 struct Expression * size;
428 struct Expression * exp;
429 } __attribute__ ((gcc_struct)) _renew;
433 struct Identifier * id;
434 } __attribute__ ((gcc_struct)) db;
437 struct Expression * ds;
438 struct Expression * name;
439 } __attribute__ ((gcc_struct)) dbopen;
442 struct TypeName * typeName;
443 struct Initializer * initializer;
444 } __attribute__ ((gcc_struct)) initializer;
447 struct Expression * exp;
448 struct TypeName * typeName;
449 } __attribute__ ((gcc_struct)) vaArg;
450 } __attribute__ ((gcc_struct));
451 unsigned int debugValue;
452 struct __ecereNameSpace__ecere__com__DataValue val;
454 unsigned int hasAddress;
455 struct Type * expType;
456 struct Type * destType;
459 unsigned int byReference;
460 unsigned int isConstant;
461 unsigned int addedThis;
462 unsigned int needCast;
463 unsigned int thisPtr;
464 } __attribute__ ((gcc_struct));
466 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
468 struct TemplateDatatype
470 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
471 struct Declarator * decl;
472 } __attribute__ ((gcc_struct));
474 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateArgument;
476 struct TemplateArgument;
478 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
480 struct TemplateParameter
482 struct TemplateParameter * prev;
483 struct TemplateParameter * next;
486 struct Identifier * identifier;
489 struct TemplateDatatype * dataType;
491 } __attribute__ ((gcc_struct));
492 struct TemplateArgument * defaultArgument;
493 char * dataTypeString;
494 struct Type * baseType;
495 } __attribute__ ((gcc_struct));
497 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Specifier;
501 struct Specifier * prev;
502 struct Specifier * next;
510 struct ExtDecl * extDecl;
512 struct Symbol * symbol;
513 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
514 } __attribute__ ((gcc_struct));
517 struct Identifier * id;
518 struct __ecereNameSpace__ecere__sys__OldList * list;
519 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
520 struct __ecereNameSpace__ecere__sys__OldList * definitions;
521 unsigned int addNameSpace;
522 struct Context * ctx;
523 struct ExtDecl * extDeclStruct;
524 } __attribute__ ((gcc_struct));
525 struct Expression * expression;
526 struct Specifier * _class;
527 struct TemplateParameter * templateParameter;
528 } __attribute__ ((gcc_struct));
529 } __attribute__ ((gcc_struct));
531 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Identifier;
535 struct Identifier * prev;
536 struct Identifier * next;
538 struct Symbol * classSym;
539 struct Specifier * _class;
541 struct Identifier * badID;
542 } __attribute__ ((gcc_struct));
544 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Pointer;
548 struct Pointer * prev;
549 struct Pointer * next;
551 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
552 struct Pointer * pointer;
553 } __attribute__ ((gcc_struct));
555 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declarator;
559 struct Declarator * prev;
560 struct Declarator * next;
563 struct Symbol * symbol;
564 struct Declarator * declarator;
567 struct Identifier * identifier;
570 struct Expression * exp;
571 struct Expression * posExp;
572 struct Attrib * attrib;
573 } __attribute__ ((gcc_struct)) structDecl;
576 struct Expression * exp;
577 struct Specifier * enumClass;
578 } __attribute__ ((gcc_struct)) array;
581 struct __ecereNameSpace__ecere__sys__OldList * parameters;
582 } __attribute__ ((gcc_struct)) function;
585 struct Pointer * pointer;
586 } __attribute__ ((gcc_struct)) pointer;
589 struct ExtDecl * extended;
590 } __attribute__ ((gcc_struct)) extended;
591 } __attribute__ ((gcc_struct));
592 } __attribute__ ((gcc_struct));
594 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionDefinition;
596 struct FunctionDefinition
598 struct FunctionDefinition * prev;
599 struct FunctionDefinition * next;
601 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
602 struct Declarator * declarator;
603 struct __ecereNameSpace__ecere__sys__OldList * declarations;
604 struct Statement * body;
605 struct __ecereNameSpace__ecere__com__Class * _class;
606 struct __ecereNameSpace__ecere__sys__OldList attached;
609 struct Symbol * propSet;
611 unsigned int propertyNoThis;
612 } __attribute__ ((gcc_struct));
614 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableDef;
618 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
622 struct External * prev;
623 struct External * next;
626 struct Symbol * symbol;
629 struct FunctionDefinition * function;
630 struct ClassDefinition * _class;
631 struct Declaration * declaration;
633 struct Identifier * id;
634 struct DBTableDef * table;
635 } __attribute__ ((gcc_struct));
637 } __attribute__ ((gcc_struct));
639 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
643 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
647 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
652 struct Symbol * parent;
653 struct Symbol * left;
654 struct Symbol * right;
659 struct __ecereNameSpace__ecere__com__Method * method;
660 struct __ecereNameSpace__ecere__com__Property * _property;
661 struct __ecereNameSpace__ecere__com__Class * registered;
662 } __attribute__ ((gcc_struct));
669 struct External * pointerExternal;
670 struct External * structExternal;
671 } __attribute__ ((gcc_struct));
674 struct External * externalGet;
675 struct External * externalSet;
676 struct External * externalPtr;
677 struct External * externalIsSet;
678 } __attribute__ ((gcc_struct));
681 struct External * methodExternal;
682 struct External * methodCodeExternal;
683 } __attribute__ ((gcc_struct));
684 } __attribute__ ((gcc_struct));
685 unsigned int imported;
686 unsigned int declaredStructSym;
687 struct __ecereNameSpace__ecere__com__Class * _class;
688 unsigned int declaredStruct;
689 unsigned int needConstructor;
690 unsigned int needDestructor;
691 char * constructorName;
694 char * destructorName;
695 struct ModuleImport * module;
696 struct ClassImport * _import;
697 struct Location nameLoc;
698 unsigned int isParam;
699 unsigned int isRemote;
700 unsigned int isStruct;
701 unsigned int fireWatchersDone;
703 unsigned int classData;
704 unsigned int isStatic;
706 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
707 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
708 struct Context * ctx;
710 struct Expression * propCategory;
711 } __attribute__ ((gcc_struct));
713 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
722 struct Symbol * _class;
725 struct __ecereNameSpace__ecere__sys__OldList members;
727 } __attribute__ ((gcc_struct));
730 struct Type * returnType;
731 struct __ecereNameSpace__ecere__sys__OldList params;
732 struct Symbol * thisClass;
733 unsigned int staticMethod;
734 struct TemplateParameter * thisClassTemplate;
735 } __attribute__ ((gcc_struct));
738 struct __ecereNameSpace__ecere__com__Method * method;
739 struct __ecereNameSpace__ecere__com__Class * methodClass;
740 struct __ecereNameSpace__ecere__com__Class * usedClass;
741 } __attribute__ ((gcc_struct));
744 struct Type * arrayType;
746 struct Expression * arraySizeExp;
747 unsigned int freeExp;
748 struct Symbol * enumClass;
749 } __attribute__ ((gcc_struct));
751 struct TemplateParameter * templateParameter;
752 } __attribute__ ((gcc_struct));
762 unsigned int isSigned : 1;
763 unsigned int constant : 1;
764 unsigned int truth : 1;
765 unsigned int byReference : 1;
766 unsigned int extraParam : 1;
767 unsigned int directClassAccess : 1;
768 unsigned int computing : 1;
769 unsigned int keepCast : 1;
770 unsigned int passAsTemplate : 1;
771 unsigned int dllExport : 1;
772 unsigned int attrStdcall : 1;
773 } __attribute__ ((gcc_struct));
775 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
777 struct __ecereNameSpace__ecere__com__Class
779 struct __ecereNameSpace__ecere__com__Class * prev;
780 struct __ecereNameSpace__ecere__com__Class * next;
786 int (* Constructor)(struct __ecereNameSpace__ecere__com__Instance *);
787 void (* Destructor)(struct __ecereNameSpace__ecere__com__Instance *);
790 struct __ecereNameSpace__ecere__com__Class * base;
791 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
792 struct __ecereNameSpace__ecere__sys__BinaryTree members;
793 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
794 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
795 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
796 struct __ecereNameSpace__ecere__sys__OldList derivatives;
800 struct __ecereNameSpace__ecere__com__Instance * module;
801 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
802 char * dataTypeString;
803 struct Type * dataType;
805 int defaultAlignment;
806 void (* Initialize)();
808 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
809 char * designerClass;
810 unsigned int noExpansion;
811 char * defaultProperty;
812 unsigned int comRedefinition;
814 unsigned int isRemote;
815 unsigned int internalDecl;
817 unsigned int computeSize;
819 int destructionWatchOffset;
821 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
822 int inheritanceAccess;
825 struct __ecereNameSpace__ecere__sys__OldList conversions;
826 struct __ecereNameSpace__ecere__sys__OldList templateParams;
827 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
828 struct __ecereNameSpace__ecere__com__Class * templateClass;
829 struct __ecereNameSpace__ecere__sys__OldList templatized;
831 unsigned int isInstanceClass;
832 } __attribute__ ((gcc_struct));
834 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, char * name);
836 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
838 struct __ecereNameSpace__ecere__com__Instance
841 struct __ecereNameSpace__ecere__com__Class * _class;
843 } __attribute__ ((gcc_struct));
845 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
847 struct __ecereNameSpace__ecere__com__DataMember
849 struct __ecereNameSpace__ecere__com__DataMember * prev;
850 struct __ecereNameSpace__ecere__com__DataMember * next;
852 unsigned int isProperty;
855 struct __ecereNameSpace__ecere__com__Class * _class;
856 char * dataTypeString;
857 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
858 struct Type * dataType;
862 struct __ecereNameSpace__ecere__sys__OldList members;
863 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
866 } __attribute__ ((gcc_struct));
868 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
870 struct __ecereNameSpace__ecere__com__SerialBuffer
872 unsigned char * _buffer;
876 } __attribute__ ((gcc_struct));
878 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
880 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
886 char * dataTypeString;
887 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
888 } __attribute__ ((gcc_struct));
889 struct __ecereNameSpace__ecere__com__DataValue expression;
895 struct __ecereNameSpace__ecere__com__DataMember * member;
896 struct __ecereNameSpace__ecere__com__Property * prop;
897 struct __ecereNameSpace__ecere__com__Method * method;
898 } __attribute__ ((gcc_struct));
899 } __attribute__ ((gcc_struct));
900 } __attribute__ ((gcc_struct));
901 } __attribute__ ((gcc_struct));
905 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
908 typedef union YYSTYPE
913 struct Identifier * id;
914 struct Expression * exp;
915 struct Specifier * specifier;
916 struct __ecereNameSpace__ecere__sys__OldList * list;
917 struct Enumerator * enumerator;
918 struct Declarator * declarator;
919 struct Pointer * pointer;
920 struct Initializer * initializer;
921 struct InitDeclarator * initDeclarator;
922 struct TypeName * typeName;
923 struct Declaration * declaration;
924 struct Statement * stmt;
925 struct FunctionDefinition * function;
926 struct External * external;
927 struct Context * context;
928 struct AsmField * asmField;
929 struct Attrib * attrib;
930 struct ExtDecl * extDecl;
931 struct Attribute * attribute;
932 struct Instantiation * instance;
933 struct MembersInit * membersInit;
934 struct MemberInit * memberInit;
935 struct ClassFunction * classFunction;
936 struct ClassDefinition * _class;
937 struct ClassDef * classDef;
938 struct PropertyDef * prop;
940 struct Symbol * symbol;
941 struct PropertyWatch * propertyWatch;
942 struct TemplateParameter * templateParameter;
943 struct TemplateArgument * templateArgument;
944 struct TemplateDatatype * templateDatatype;
945 struct DBTableEntry * dbtableEntry;
946 struct DBIndexItem * dbindexItem;
947 struct DBTableDef * dbtableDef;
948 } __attribute__ ((gcc_struct)) YYSTYPE;
950 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Enumerator;
954 struct Enumerator * prev;
955 struct Enumerator * next;
957 struct Identifier * id;
958 struct Expression * exp;
959 } __attribute__ ((gcc_struct));
961 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_InitDeclarator;
963 struct InitDeclarator
965 struct InitDeclarator * prev;
966 struct InitDeclarator * next;
968 struct Declarator * declarator;
969 struct Initializer * initializer;
970 } __attribute__ ((gcc_struct));
972 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_AsmField;
976 struct AsmField * prev;
977 struct AsmField * next;
980 struct Expression * expression;
981 } __attribute__ ((gcc_struct));
983 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attribute;
987 struct Attribute * prev;
988 struct Attribute * next;
991 struct Expression * exp;
992 } __attribute__ ((gcc_struct));
994 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassFunction;
998 struct ClassFunction * prev;
999 struct ClassFunction * next;
1000 struct Location loc;
1001 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1002 struct Declarator * declarator;
1003 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1004 struct Statement * body;
1005 struct __ecereNameSpace__ecere__com__Class * _class;
1006 struct __ecereNameSpace__ecere__sys__OldList attached;
1009 struct Symbol * propSet;
1010 unsigned int isVirtual;
1011 unsigned int isConstructor;
1012 unsigned int isDestructor;
1013 unsigned int dontMangle;
1016 } __attribute__ ((gcc_struct));
1018 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MembersInit;
1022 struct MembersInit * prev;
1023 struct MembersInit * next;
1024 struct Location loc;
1028 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1029 struct ClassFunction * function;
1030 } __attribute__ ((gcc_struct));
1031 } __attribute__ ((gcc_struct));
1033 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MemberInit;
1037 struct MemberInit * prev;
1038 struct MemberInit * next;
1039 struct Location loc;
1040 struct Location realLoc;
1041 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
1042 struct Initializer * initializer;
1044 unsigned int variable;
1045 unsigned int takeOutExp;
1046 } __attribute__ ((gcc_struct));
1048 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyDef;
1052 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyWatch;
1054 struct PropertyWatch;
1056 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDef;
1060 struct ClassDef * prev;
1061 struct ClassDef * next;
1062 struct Location loc;
1066 struct Declaration * decl;
1067 struct ClassFunction * function;
1068 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
1069 struct PropertyDef * propertyDef;
1070 struct PropertyWatch * propertyWatch;
1072 struct Identifier * defaultProperty;
1075 struct Identifier * id;
1076 struct Initializer * initializer;
1077 } __attribute__ ((gcc_struct));
1078 } __attribute__ ((gcc_struct));
1081 } __attribute__ ((gcc_struct));
1083 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableEntry;
1085 struct DBTableEntry;
1087 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBIndexItem;
1091 extern YYSTYPE yylval;
1093 extern struct Location yylloc;
1097 unsigned int memoryGuard = 0x0;
1099 void SetMemoryGuard(unsigned int b)
1104 unsigned int GetMemoryGuard()
1109 extern int strcmp(const char * , const char * );
1111 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts;
1113 static void OutputIdentifier(struct Identifier * id, struct __ecereNameSpace__ecere__com__Instance * f)
1119 if(id->_class->type == 8)
1121 if(id->_class->templateParameter && id->_class->templateParameter->identifier && id->_class->templateParameter->identifier->string)
1122 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, id->_class->templateParameter->identifier->string);
1126 if(id->_class->name)
1128 if(!strcmp(id->_class->name, "class"))
1129 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
1131 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, id->_class->name);
1134 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "::");
1137 ((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)");
1140 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc;
1142 static void OutputOperator(int op, struct __ecereNameSpace__ecere__com__Instance * f)
1147 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "++");
1150 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "--");
1153 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "sizeof ");
1156 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<<");
1159 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">>");
1162 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<=");
1165 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">=");
1168 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "==");
1171 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "!=");
1174 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "&&");
1177 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "||");
1180 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "*=");
1183 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "/=");
1186 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "%=");
1189 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "+=");
1192 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "-=");
1195 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<<=");
1198 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">>=");
1201 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "&=");
1204 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "^=");
1207 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "|=");
1222 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, char ch))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc])(f, (char)op);
1225 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "delete ");
1230 static void OutputSpecifier(struct Specifier * spec, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName);
1232 static void OutputDeclarator(struct Declarator * decl, struct __ecereNameSpace__ecere__com__Instance * f);
1234 void OutputTypeName(struct TypeName * type, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName)
1236 if(type->qualifiers)
1238 struct Specifier * spec;
1240 for(spec = (*type->qualifiers).first; spec; spec = spec->next)
1242 OutputSpecifier(spec, f, typeName);
1244 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1247 if(type->declarator)
1249 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1250 OutputDeclarator(type->declarator, f);
1252 if(!type->qualifiers && !type->declarator)
1253 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "...");
1256 static void OutputStatement(struct Statement * stmt, struct __ecereNameSpace__ecere__com__Instance * f);
1258 static void OutputInstance(struct Instantiation * inst, struct __ecereNameSpace__ecere__com__Instance * f);
1260 extern int printf(char * , ...);
1262 static void OutputInitializer(struct Initializer * initializer, struct __ecereNameSpace__ecere__com__Instance * f);
1264 void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f)
1269 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class(");
1270 if(exp->_classExp.specifiers)
1272 struct Specifier * spec;
1274 for(spec = (*exp->_classExp.specifiers).first; spec; spec = spec->next)
1276 OutputSpecifier(spec, f, 0x0);
1278 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1280 if(exp->_classExp.decl)
1282 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1283 OutputDeclarator(exp->_classExp.decl, f);
1285 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1289 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1290 OutputStatement(exp->compound, f);
1291 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1294 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "new ");
1295 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1296 OutputTypeName(exp->_renew.typeName, f, 0x0);
1297 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1298 OutputExpression(exp->_renew.size, f);
1299 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1302 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "new0 ");
1303 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1304 OutputTypeName(exp->_renew.typeName, f, 0x0);
1305 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1306 OutputExpression(exp->_renew.size, f);
1307 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1310 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "renew ");
1311 OutputExpression(exp->_renew.exp, f);
1312 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1313 OutputTypeName(exp->_renew.typeName, f, 0x0);
1314 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1315 OutputExpression(exp->_renew.size, f);
1316 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1319 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "renew0 ");
1320 OutputExpression(exp->_renew.exp, f);
1321 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1322 OutputTypeName(exp->_renew.typeName, f, 0x0);
1323 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1324 OutputExpression(exp->_renew.size, f);
1325 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1329 OutputIdentifier(exp->identifier, f);
1333 OutputInstance(exp->instance, f);
1337 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, exp->constant);
1343 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, exp->string);
1348 OutputExpression(exp->op.exp1, f);
1350 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1352 OutputOperator(exp->op.op, f);
1355 if(exp->op.exp1 || (exp->op.exp2->type == 4 && !exp->op.exp2->op.exp1 && exp->op.exp2->op.op == exp->op.op))
1356 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1357 OutputExpression(exp->op.exp2, f);
1363 struct Expression * expression;
1366 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1367 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1370 for(expression = (*exp->list).first; expression; expression = expression->next)
1372 OutputExpression(expression, f);
1373 if(expression->next)
1374 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1377 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1382 struct Expression * expression;
1385 OutputExpression(exp->index.exp, f);
1386 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1387 if(exp->index.index)
1388 for(expression = (*exp->index.index).first; expression; expression = expression->next)
1390 OutputExpression(expression, f);
1391 if(expression->next)
1392 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1394 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1399 OutputExpression(exp->call.exp, f);
1400 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1401 if(exp->call.arguments)
1403 struct Expression * expression;
1405 for(expression = (*exp->call.arguments).first; expression; expression = expression->next)
1407 OutputExpression(expression, f);
1408 if(expression->next)
1409 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1412 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1417 OutputExpression(exp->member.exp, f);
1418 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ".");
1419 if(exp->member.member)
1420 OutputIdentifier(exp->member.member, f);
1423 OutputExpression(exp->member.exp, f);
1424 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "->");
1425 OutputIdentifier(exp->member.member, f);
1428 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "sizeof(");
1429 OutputTypeName(exp->typeName, f, 0x0);
1430 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1433 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__alignof__(");
1434 OutputTypeName(exp->typeName, f, 0x0);
1435 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1438 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1439 if(exp->initializer.typeName)
1440 OutputTypeName(exp->initializer.typeName, f, 0x0);
1441 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1442 if(exp->initializer.initializer)
1443 OutputInitializer(exp->initializer.initializer, f);
1446 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1447 OutputTypeName(exp->cast.typeName, f, 0x0);
1448 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1450 OutputExpression(exp->cast.exp, f);
1453 OutputExpression(exp->cond.cond, f);
1454 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ? ");
1456 struct Expression * expression;
1458 for(expression = (*exp->cond.exp).first; expression; expression = expression->next)
1460 OutputExpression(expression, f);
1461 if(expression->next)
1462 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1465 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1466 OutputExpression(exp->cond.elseExp, f);
1469 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__builtin_va_arg(");
1470 OutputExpression(exp->vaArg.exp, f);
1471 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1472 OutputTypeName(exp->vaArg.typeName, f, 0x0);
1473 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1476 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1479 struct Expression * expression;
1481 for(expression = (*exp->list).first; expression; expression = expression->next)
1483 OutputExpression(expression, f);
1484 if(expression->next)
1485 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1488 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1493 static void OutputAsmField(struct AsmField * field, struct __ecereNameSpace__ecere__com__Instance * f)
1495 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, field->command);
1496 if(field->expression)
1498 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1499 OutputExpression(field->expression, f);
1500 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1504 extern char * strchr(const char * , int);
1506 extern char * __ecereNameSpace__ecere__sys__StripLastDirectory(char * string, char * output);
1508 extern char * sourceFile;
1510 extern char * __ecereNameSpace__ecere__sys__PathCat(char * string, char * addedPath);
1512 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
1514 static void GetSourceName(char * name, const char * src)
1519 if(!strchr(src, '/') && !strchr(src, '\\'))
1520 __ecereNameSpace__ecere__sys__StripLastDirectory(sourceFile, name);
1521 __ecereNameSpace__ecere__sys__PathCat(name, src);
1524 __ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
1525 __ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
1528 extern unsigned int inCompiler;
1530 extern char * GetIncludeFileFromID(int id);
1532 extern char * outputFile;
1534 extern unsigned int outputLineNumbers;
1536 static void OutputDeclaration(struct Declaration * decl, struct __ecereNameSpace__ecere__com__Instance * f);
1538 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
1540 extern struct Declarator * SpecDeclFromString(char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
1542 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
1544 extern struct Identifier * MkIdentifier(char * string);
1546 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
1548 extern struct Specifier * CopySpecifier(struct Specifier * spec);
1550 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
1552 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
1554 extern struct Specifier * MkSpecifierName(char * name);
1556 extern void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
1558 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
1560 extern void InstDeclPassTypeName(struct TypeName * type, unsigned int param);
1562 extern void FreeTypeName(struct TypeName * typeName);
1564 int __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(struct __ecereNameSpace__ecere__com__Instance * this, char * format, ...);
1566 static void OutputStatement(struct Statement * stmt, struct __ecereNameSpace__ecere__com__Instance * f)
1568 char name[274] = "";
1569 char origName[274] = "";
1573 GetSourceName(name, stmt->loc.start.included ? GetIncludeFileFromID(stmt->loc.start.included) : (((void *)0)));
1574 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
1575 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
1577 if(inCompiler && outputLineNumbers && stmt->loc.start.line)
1579 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.start.line, name);
1585 OutputDeclaration(stmt->decl, f);
1588 OutputIdentifier(stmt->labeled.id, f);
1589 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":\n");
1591 OutputStatement(stmt->labeled.stmt, f);
1594 if(stmt->caseStmt.exp)
1596 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "case ");
1597 OutputExpression(stmt->caseStmt.exp, f);
1598 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":\n");
1603 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "default:\n");
1606 if(stmt->caseStmt.stmt)
1607 OutputStatement(stmt->caseStmt.stmt, f);
1611 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "{\n");
1613 if(stmt->compound.declarations)
1615 struct Declaration * decl;
1617 for(decl = (*stmt->compound.declarations).first; decl; decl = decl->next)
1619 OutputDeclaration(decl, f);
1622 if(stmt->compound.statements)
1624 struct Statement * statement;
1626 if(stmt->compound.declarations)
1628 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1631 for(statement = (*stmt->compound.statements).first; statement; statement = statement->next)
1633 OutputStatement(statement, f);
1634 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1638 if(inCompiler && outputLineNumbers && stmt->loc.end.line)
1640 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.end.line, name);
1643 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}");
1648 if(stmt->expressions)
1650 struct Expression * exp;
1652 for(exp = (*stmt->expressions).first; exp; exp = exp->next)
1654 OutputExpression(exp, f);
1656 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1659 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1664 struct Expression * exp;
1666 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "if(");
1667 for(exp = (*stmt->ifStmt.exp).first; exp; exp = exp->next)
1669 OutputExpression(exp, f);
1671 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1673 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1675 if(stmt->ifStmt.stmt)
1676 OutputStatement(stmt->ifStmt.stmt, f);
1677 if(stmt->ifStmt.elseStmt)
1679 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1681 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "else");
1682 if(stmt->ifStmt.elseStmt->type != 4)
1684 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1688 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1689 OutputStatement(stmt->ifStmt.elseStmt, f);
1695 struct Expression * exp;
1697 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "switch(");
1698 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1700 OutputExpression(exp, f);
1702 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1704 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1706 OutputStatement(stmt->switchStmt.stmt, f);
1711 struct Expression * exp;
1713 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "while(");
1714 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1716 OutputExpression(exp, f);
1718 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1720 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1722 OutputStatement(stmt->whileStmt.stmt, f);
1727 struct Expression * exp;
1729 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "do\n");
1731 OutputStatement(stmt->whileStmt.stmt, f);
1732 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "while(");
1733 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1735 OutputExpression(exp, f);
1737 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1739 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ");");
1744 struct Expression * exp;
1746 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "for(");
1747 OutputStatement(stmt->forStmt.init, f);
1748 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1749 OutputStatement(stmt->forStmt.check, f);
1750 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1751 if(stmt->forStmt.increment)
1753 if(inCompiler && outputLineNumbers && stmt->loc.end.line)
1755 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.end.line, name);
1758 for(exp = (*stmt->forStmt.increment).first; exp; exp = exp->next)
1760 OutputExpression(exp, f);
1762 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1765 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1767 OutputStatement(stmt->forStmt.stmt, f);
1772 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "goto ");
1773 OutputIdentifier(stmt->gotoStmt.id, f);
1774 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1778 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "continue;");
1781 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "break;");
1785 struct Expression * exp;
1787 if(inCompiler && memoryGuard)
1789 struct Expression * exp = stmt->expressions ? (*stmt->expressions).last : (((void *)0));
1791 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "{ ");
1792 if(exp && exp->expType)
1794 char string[1024] = "";
1795 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
1796 struct Declarator * decl;
1797 struct TypeName * typeName;
1799 if(exp->expType->kind == 20)
1801 if(exp->expType->templateParameter->dataTypeString)
1802 decl = SpecDeclFromString(exp->expType->templateParameter->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1803 else if(exp->expType->templateParameter->dataType)
1805 (__ecereNameSpace__ecere__com__eSystem_Delete(specs), specs = 0);
1806 specs = CopyList(exp->expType->templateParameter->dataType->specifiers, CopySpecifier);
1807 decl = PlugDeclarator(exp->expType->templateParameter->dataType->decl, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1811 ListAdd(specs, MkSpecifierName("uint64"));
1812 decl = MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal"));
1817 PrintTypeNoConst(exp->expType, string, exp->expType->kind == 18 ? 0x1 : 0x0, 0x1);
1818 decl = SpecDeclFromString(string, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1820 typeName = MkTypeName(specs, decl);
1821 InstDeclPassTypeName(typeName, 0x0);
1822 OutputTypeName(typeName, f, 0x0);
1823 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ";");
1824 FreeTypeName(typeName);
1828 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "return ");
1831 struct Expression * exp = stmt->expressions ? (*stmt->expressions).last : (((void *)0));
1833 if(exp && exp->expType)
1834 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "__ecereReturnVal = ");
1836 if(stmt->expressions)
1838 for(exp = (*stmt->expressions).first; exp; exp = exp->next)
1840 OutputExpression(exp, f);
1842 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1845 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1846 if(inCompiler && memoryGuard)
1848 struct Expression * exp = stmt->expressions ? (struct Expression *)(*stmt->expressions).last : (((void *)0));
1850 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PopLoc();");
1851 if(exp && exp->expType)
1852 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "return __ecereReturnVal;");
1854 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "return;");
1855 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "}");
1861 struct AsmField * field;
1863 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__asm__ ");
1864 if(stmt->asmStmt.spec)
1865 OutputSpecifier(stmt->asmStmt.spec, f, 0x0);
1866 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1867 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, stmt->asmStmt.statements);
1868 if(stmt->asmStmt.inputFields || stmt->asmStmt.outputFields || stmt->asmStmt.clobberedFields)
1870 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1871 if(stmt->asmStmt.inputFields)
1873 for(field = (*stmt->asmStmt.inputFields).first; field; field = field->next)
1876 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1877 OutputAsmField(field, f);
1881 if(stmt->asmStmt.outputFields || stmt->asmStmt.clobberedFields)
1883 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1884 if(stmt->asmStmt.outputFields)
1886 for(field = (*stmt->asmStmt.outputFields).first; field; field = field->next)
1889 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1890 OutputAsmField(field, f);
1894 if(stmt->asmStmt.clobberedFields)
1896 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1897 for(field = (*stmt->asmStmt.clobberedFields).first; field; field = field->next)
1900 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1901 OutputAsmField(field, f);
1904 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ");\n");
1909 if(inCompiler && outputLineNumbers && stmt->loc.start.line)
1911 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", outputLine + 2, origName);
1916 static void OutputPointer(struct Pointer * ptr, struct __ecereNameSpace__ecere__com__Instance * f)
1918 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "*");
1921 struct Specifier * spec;
1923 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1924 for(spec = (*ptr->qualifiers).first; spec; spec = spec->next)
1926 OutputSpecifier(spec, f, 0x0);
1928 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1933 OutputPointer(ptr->pointer, f);
1937 static void OutputAttrib(struct Attrib * attr, struct __ecereNameSpace__ecere__com__Instance * f);
1939 static void OutputExtDecl(struct ExtDecl * extDecl, struct __ecereNameSpace__ecere__com__Instance * f);
1941 extern void ProcessExpressionType(struct Expression * exp);
1943 extern void ComputeExpression(struct Expression * exp);
1945 static void OutputDeclarator(struct Declarator * decl, struct __ecereNameSpace__ecere__com__Instance * f)
1950 if(decl->declarator)
1952 OutputDeclarator(decl->declarator, f);
1954 if(decl->structDecl.exp)
1956 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1957 OutputExpression(decl->structDecl.exp, f);
1959 if(decl->structDecl.posExp)
1961 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1962 OutputExpression(decl->structDecl.posExp, f);
1964 if(decl->structDecl.attrib)
1966 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1967 OutputAttrib(decl->structDecl.attrib, f);
1971 OutputIdentifier(decl->identifier, 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);
1976 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1979 if(decl->extended.extended)
1980 OutputExtDecl(decl->extended.extended, f);
1981 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1982 OutputDeclarator(decl->declarator, f);
1985 OutputDeclarator(decl->declarator, f);
1986 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1987 if(decl->extended.extended)
1988 OutputExtDecl(decl->extended.extended, f);
1991 if(decl->declarator)
1993 OutputDeclarator(decl->declarator, f);
1995 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1998 ProcessExpressionType(decl->array.exp);
1999 ComputeExpression(decl->array.exp);
2000 OutputExpression(decl->array.exp, f);
2002 else if(decl->array.enumClass)
2004 struct Symbol * _class = decl->array.enumClass->symbol;
2006 if(_class && _class->registered)
2008 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%d", (int)__ecereNameSpace__ecere__com__eClass_GetProperty(_class->registered, "enumSize"));
2011 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
2015 struct TypeName * param;
2017 if(decl->declarator)
2018 OutputDeclarator(decl->declarator, f);
2019 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
2020 if(decl->function.parameters && (*decl->function.parameters).first)
2022 for(param = (*decl->function.parameters).first; param; param = param->next)
2024 OutputTypeName(param, f, 0x0);
2026 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2029 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2033 if(decl->pointer.pointer)
2034 OutputPointer(decl->pointer.pointer, f);
2035 if(decl->declarator)
2037 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2038 OutputDeclarator(decl->declarator, f);
2044 static void OutputEnumerator(struct Enumerator * enumerator, struct __ecereNameSpace__ecere__com__Instance * f)
2046 OutputIdentifier(enumerator->id, f);
2049 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2050 OutputExpression(enumerator->exp, f);
2054 static void OutputAttribute(struct Attribute * attr, struct __ecereNameSpace__ecere__com__Instance * f)
2057 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, attr->attr);
2060 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2061 OutputExpression(attr->exp, f);
2065 static void OutputAttrib(struct Attrib * attr, struct __ecereNameSpace__ecere__com__Instance * f)
2070 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute__((");
2073 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute((");
2076 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute_deprecated__((");
2081 struct Attribute * attrib;
2083 for(attrib = (*attr->attribs).first; attrib; attrib = attrib->next)
2086 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2087 OutputAttribute(attrib, f);
2090 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "))");
2093 static void OutputExtDecl(struct ExtDecl * extDecl, struct __ecereNameSpace__ecere__com__Instance * f)
2095 if(extDecl->type == 0 && extDecl->s)
2096 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, extDecl->s);
2097 else if(extDecl->type == 1)
2098 OutputAttrib(extDecl->attr, f);
2101 extern struct Symbol * FindClass(char * name);
2103 static void OutputClassDef(struct ClassDef * def, struct __ecereNameSpace__ecere__com__Instance * f);
2105 static void OutputSpecifier(struct Specifier * spec, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName)
2110 switch(spec->specifier)
2113 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typedef");
2116 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "extern");
2119 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "static");
2122 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "auto");
2125 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "register");
2128 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "const");
2131 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "volatile");
2134 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "void");
2137 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "char");
2140 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "short");
2143 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "int");
2146 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, typeName ? "uint" : "unsigned int");
2149 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, typeName ? "int64" : "long long");
2152 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__builtin_va_list");
2155 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "long");
2158 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "float");
2161 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "double");
2164 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "signed");
2167 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "unsigned");
2170 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
2173 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "any_object");
2176 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class");
2179 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "thisclass");
2185 OutputExtDecl(spec->extDecl, f);
2188 if(spec->name && !strcmp(spec->name, "class"))
2190 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
2194 struct Symbol * symbol = spec->symbol;
2196 if(!symbol && spec->name)
2197 symbol = FindClass(spec->name);
2200 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, symbol->string ? symbol->string : "(null)");
2203 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, spec->name);
2208 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "enum");
2211 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2212 OutputIdentifier(spec->id, f);
2216 struct Enumerator * enumerator;
2218 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2220 for(enumerator = (*spec->list).first; enumerator; enumerator = enumerator->next)
2222 OutputEnumerator(enumerator, f);
2223 if(enumerator->next)
2224 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2226 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n}");
2234 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, (spec->type == 3) ? "struct" : "union");
2235 if(spec->extDeclStruct)
2237 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2238 OutputExtDecl(spec->extDeclStruct, f);
2242 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2243 OutputIdentifier(spec->id, f);
2245 if(spec->definitions)
2247 struct ClassDef * def;
2249 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2251 for(def = (*spec->definitions).first; def; def = def->next)
2253 OutputClassDef(def, f);
2255 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "} __attribute__ ((gcc_struct))");
2260 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__typeof(");
2261 OutputExpression(spec->expression, f);
2262 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2265 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "subclass(");
2266 OutputSpecifier(spec->_class, f, 0x0);
2267 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2270 OutputIdentifier(spec->templateParameter->identifier, f);
2275 static void OutputInitializer(struct Initializer * initializer, struct __ecereNameSpace__ecere__com__Instance * f)
2277 char name[274] = "";
2278 char origName[274] = "";
2282 GetSourceName(name, initializer->loc.start.included ? GetIncludeFileFromID(initializer->loc.start.included) : (((void *)0)));
2283 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
2284 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
2286 switch(initializer->type)
2290 struct Initializer * init;
2292 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2294 if(inCompiler && outputLineNumbers && initializer->loc.start.line)
2296 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", initializer->loc.start.line, name);
2299 for(init = (*initializer->list).first; init; init = init->next)
2301 OutputInitializer(init, f);
2303 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2305 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n}");
2306 if(inCompiler && outputLineNumbers && initializer->loc.start.line)
2308 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", initializer->loc.start.line, name);
2315 if(initializer->exp)
2316 OutputExpression(initializer->exp, f);
2321 static void OutputInitDeclarator(struct InitDeclarator * decl, struct __ecereNameSpace__ecere__com__Instance * f)
2323 OutputDeclarator(decl->declarator, f);
2324 if(decl->initializer)
2326 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2327 OutputInitializer(decl->initializer, f);
2331 static void OutputDeclaration(struct Declaration * decl, struct __ecereNameSpace__ecere__com__Instance * f)
2333 struct Specifier * spec;
2334 char origName[274] = "";
2340 struct InitDeclarator * d;
2344 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
2345 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
2347 if(decl->declarators && (*decl->declarators).first)
2349 for(d = (*decl->declarators).first; d; d = d->next)
2352 char name[274] = "";
2354 GetSourceName(name, decl->loc.start.included ? GetIncludeFileFromID(decl->loc.start.included) : (((void *)0)));
2355 if(inCompiler && outputLineNumbers && decl->loc.start.line)
2357 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", decl->loc.start.line, name);
2363 if(decl->specifiers)
2365 unsigned int inTypeDef = 0x0;
2367 for(spec = (*decl->specifiers).first; spec; spec = spec->next)
2369 if(spec->type == 0 && spec->specifier == TYPEDEF)
2371 OutputSpecifier(spec, f, inTypeDef && !spec->next);
2373 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2376 if(decl->declarators && (*decl->declarators).first)
2378 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2379 for(d = (*decl->declarators).first; d; d = d->next)
2381 OutputInitDeclarator(d, f);
2383 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2390 if(decl->specifiers)
2392 for(spec = (*decl->specifiers).first; spec; spec = spec->next)
2394 OutputSpecifier(spec, f, 0x0);
2396 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2399 if(decl->declarators)
2401 struct Declarator * d;
2403 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2404 for(d = (*decl->declarators).first; d; d = d->next)
2406 OutputDeclarator(d, f);
2408 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2411 if(decl->extStorage)
2413 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2414 OutputSpecifier(decl->extStorage, f, 0x0);
2421 OutputInstance(decl->inst, f);
2427 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n");
2429 if(inCompiler && outputLineNumbers && decl->loc.start.line && decl->type == 1)
2431 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", outputLine + 2, origName);
2436 static struct FunctionDefinition * curFunction;
2438 extern struct Identifier * GetDeclId(struct Declarator * decl);
2440 static void OutputFunction(struct FunctionDefinition * func, struct __ecereNameSpace__ecere__com__Instance * f)
2442 struct FunctionDefinition * oldFunc = curFunction;
2445 if(func->specifiers)
2447 struct Specifier * spec;
2449 for(spec = (*func->specifiers).first; spec; spec = spec->next)
2451 OutputSpecifier(spec, f, 0x0);
2453 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2455 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2457 if(func->declarator)
2458 OutputDeclarator(func->declarator, f);
2459 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2461 if(func->declarations)
2463 struct Declaration * decl;
2465 for(decl = (*func->declarations).first; decl; decl = decl->next)
2467 OutputDeclaration(decl, f);
2469 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2474 if(inCompiler && memoryGuard)
2476 char name[1024] = "";
2477 struct Identifier * id = GetDeclId(func->declarator);
2479 GetSourceName(name, func->loc.start.included ? GetIncludeFileFromID(func->loc.start.included) : (((void *)0)));
2480 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "{\n");
2481 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PushLoc(\"%s:%s\");\n", name, id->string);
2484 OutputStatement(func->body, f);
2485 if(inCompiler && memoryGuard)
2487 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PopLoc();\n");
2488 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "}\n");
2491 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2494 curFunction = oldFunc;
2497 static void OutputMemberInit(struct MemberInit * init, struct __ecereNameSpace__ecere__com__Instance * f)
2499 if(init->identifiers)
2501 if((*init->identifiers).count > 1)
2503 struct Identifier * id;
2505 for(id = (*init->identifiers).first; id; id = id->next)
2507 OutputIdentifier(id, f);
2509 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ".");
2512 else if((*init->identifiers).first)
2513 OutputIdentifier((*init->identifiers).first, f);
2514 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2516 if(init->initializer)
2517 OutputInitializer(init->initializer, f);
2520 static void OutputClassFunction(struct ClassFunction * func, struct __ecereNameSpace__ecere__com__Instance * f);
2522 static void OutputMembersInit(struct MembersInit * init, struct __ecereNameSpace__ecere__com__Instance * f)
2528 struct MemberInit * member;
2530 if(init->dataMembers)
2532 for(member = (*init->dataMembers).first; member; member = member->next)
2534 OutputMemberInit(member, f);
2536 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2542 OutputClassFunction(init->function, f);
2547 static void OutputInstance(struct Instantiation * inst, struct __ecereNameSpace__ecere__com__Instance * f)
2550 OutputSpecifier(inst->_class, f, 0x0);
2553 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2554 OutputExpression(inst->exp, f);
2556 if(inst->members && (*inst->members).count > 1)
2558 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2561 else if(inst->members)
2562 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " { ");
2564 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "{");
2567 struct MembersInit * init;
2569 for(init = (*inst->members).first; init; init = init->next)
2571 OutputMembersInit(init, f);
2572 if(init->type == 0 && init->next)
2574 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n");
2580 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " }");
2582 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}");
2585 static void OutputClassFunction(struct ClassFunction * func, struct __ecereNameSpace__ecere__com__Instance * f)
2587 if(func->specifiers)
2589 struct Specifier * spec;
2591 for(spec = (*func->specifiers).first; spec; spec = spec->next)
2593 OutputSpecifier(spec, f, 0x0);
2595 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2597 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2599 if(func->declarator)
2600 OutputDeclarator(func->declarator, f);
2601 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2603 if(func->declarations)
2605 struct Declaration * decl;
2607 for(decl = (*func->declarations).first; decl; decl = decl->next)
2609 OutputDeclaration(decl, f);
2611 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2616 OutputStatement(func->body, f);
2617 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2621 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
2624 static void OutputClassDef(struct ClassDef * def, struct __ecereNameSpace__ecere__com__Instance * f)
2631 OutputDeclaration(def->decl, f);
2632 if(def->next && def->next->type != 2)
2634 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2641 struct MemberInit * init;
2643 for(init = (*def->defProperties).first; init; init = init->next)
2645 OutputMemberInit(init, f);
2647 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2649 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n\n");
2654 OutputClassFunction(def->function, f);
2655 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2661 static void OutputClass(struct ClassDefinition * _class, struct __ecereNameSpace__ecere__com__Instance * f)
2663 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class ");
2664 OutputSpecifier(_class->_class, f, 0x0);
2665 if(_class->baseSpecs)
2667 struct Specifier * spec;
2669 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
2670 for(spec = (*_class->baseSpecs).first; spec; spec = spec->next)
2672 OutputSpecifier(spec, f, 0x0);
2675 if(_class->definitions)
2677 struct ClassDef * def;
2679 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2681 for(def = (*_class->definitions).first; def; def = def->next)
2683 OutputClassDef(def, f);
2685 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}\n");
2689 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
2692 void OutputTree(struct __ecereNameSpace__ecere__sys__OldList * ast, struct __ecereNameSpace__ecere__com__Instance * f)
2694 struct External * external;
2697 for(external = ast->first; external; external = external->next)
2699 switch(external->type)
2702 OutputFunction(external->function, f);
2703 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2707 OutputDeclaration(external->declaration, f);
2708 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2712 OutputClass(external->_class, f);
2713 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2720 extern char * __ecereNameSpace__ecere__sys__TrimRSpaces(char * string, char * output);
2722 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
2724 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
2726 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize;
2728 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
2730 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
2732 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
2734 char * StringFromSpecDecl(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl)
2737 struct TypeName * typeName = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
2738 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
2741 typeName->qualifiers = specs;
2742 typeName->declarator = decl;
2743 OutputTypeName(typeName, f, 0x1);
2744 ((typeName ? (__ecereClass_TypeName->Destructor ? __ecereClass_TypeName->Destructor(typeName) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(typeName)) : 0), typeName = 0);
2745 size = ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize])(f);
2746 string = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (size + 1));
2747 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(f, 0, 0);
2748 ((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);
2749 string[size] = '\0';
2750 __ecereNameSpace__ecere__sys__TrimRSpaces(string, string);
2751 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
2755 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
2757 struct __ecereNameSpace__ecere__com__GlobalFunction;
2759 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);
2761 void __ecereRegisterModule_output(struct __ecereNameSpace__ecere__com__Instance * module)
2763 struct __ecereNameSpace__ecere__com__Class * class;
2765 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetMemoryGuard", "void SetMemoryGuard(bool b)", SetMemoryGuard, module, 1);
2766 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetMemoryGuard", "bool GetMemoryGuard(void)", GetMemoryGuard, module, 1);
2767 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputTypeName", "void OutputTypeName(TypeName type, ecere::sys::File f, bool typeName)", OutputTypeName, module, 1);
2768 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputExpression", "void OutputExpression(Expression exp, ecere::sys::File f)", OutputExpression, module, 1);
2769 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputTree", "void OutputTree(ecere::sys::OldList ast, ecere::sys::File f)", OutputTree, module, 1);
2770 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("StringFromSpecDecl", "char * StringFromSpecDecl(ecere::sys::OldList specs, Declarator decl)", StringFromSpecDecl, module, 1);
2773 void __ecereUnregisterModule_output(struct __ecereNameSpace__ecere__com__Instance * module)