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 unsigned int declaredWithStruct : 1;
774 } __attribute__ ((gcc_struct));
776 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
778 struct __ecereNameSpace__ecere__com__Class
780 struct __ecereNameSpace__ecere__com__Class * prev;
781 struct __ecereNameSpace__ecere__com__Class * next;
787 int (* Constructor)(struct __ecereNameSpace__ecere__com__Instance *);
788 void (* Destructor)(struct __ecereNameSpace__ecere__com__Instance *);
791 struct __ecereNameSpace__ecere__com__Class * base;
792 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
793 struct __ecereNameSpace__ecere__sys__BinaryTree members;
794 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
795 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
796 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
797 struct __ecereNameSpace__ecere__sys__OldList derivatives;
801 struct __ecereNameSpace__ecere__com__Instance * module;
802 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
803 char * dataTypeString;
804 struct Type * dataType;
806 int defaultAlignment;
807 void (* Initialize)();
809 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
810 char * designerClass;
811 unsigned int noExpansion;
812 char * defaultProperty;
813 unsigned int comRedefinition;
815 unsigned int isRemote;
816 unsigned int internalDecl;
818 unsigned int computeSize;
820 int destructionWatchOffset;
822 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
823 int inheritanceAccess;
826 struct __ecereNameSpace__ecere__sys__OldList conversions;
827 struct __ecereNameSpace__ecere__sys__OldList templateParams;
828 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
829 struct __ecereNameSpace__ecere__com__Class * templateClass;
830 struct __ecereNameSpace__ecere__sys__OldList templatized;
832 unsigned int isInstanceClass;
833 } __attribute__ ((gcc_struct));
835 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, char * name);
837 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
839 struct __ecereNameSpace__ecere__com__Instance
842 struct __ecereNameSpace__ecere__com__Class * _class;
844 } __attribute__ ((gcc_struct));
846 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
848 struct __ecereNameSpace__ecere__com__DataMember
850 struct __ecereNameSpace__ecere__com__DataMember * prev;
851 struct __ecereNameSpace__ecere__com__DataMember * next;
853 unsigned int isProperty;
856 struct __ecereNameSpace__ecere__com__Class * _class;
857 char * dataTypeString;
858 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
859 struct Type * dataType;
863 struct __ecereNameSpace__ecere__sys__OldList members;
864 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
867 } __attribute__ ((gcc_struct));
869 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
871 struct __ecereNameSpace__ecere__com__SerialBuffer
873 unsigned char * _buffer;
877 } __attribute__ ((gcc_struct));
879 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
881 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
887 char * dataTypeString;
888 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
889 } __attribute__ ((gcc_struct));
890 struct __ecereNameSpace__ecere__com__DataValue expression;
896 struct __ecereNameSpace__ecere__com__DataMember * member;
897 struct __ecereNameSpace__ecere__com__Property * prop;
898 struct __ecereNameSpace__ecere__com__Method * method;
899 } __attribute__ ((gcc_struct));
900 } __attribute__ ((gcc_struct));
901 } __attribute__ ((gcc_struct));
902 } __attribute__ ((gcc_struct));
906 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
909 typedef union YYSTYPE
914 struct Identifier * id;
915 struct Expression * exp;
916 struct Specifier * specifier;
917 struct __ecereNameSpace__ecere__sys__OldList * list;
918 struct Enumerator * enumerator;
919 struct Declarator * declarator;
920 struct Pointer * pointer;
921 struct Initializer * initializer;
922 struct InitDeclarator * initDeclarator;
923 struct TypeName * typeName;
924 struct Declaration * declaration;
925 struct Statement * stmt;
926 struct FunctionDefinition * function;
927 struct External * external;
928 struct Context * context;
929 struct AsmField * asmField;
930 struct Attrib * attrib;
931 struct ExtDecl * extDecl;
932 struct Attribute * attribute;
933 struct Instantiation * instance;
934 struct MembersInit * membersInit;
935 struct MemberInit * memberInit;
936 struct ClassFunction * classFunction;
937 struct ClassDefinition * _class;
938 struct ClassDef * classDef;
939 struct PropertyDef * prop;
941 struct Symbol * symbol;
942 struct PropertyWatch * propertyWatch;
943 struct TemplateParameter * templateParameter;
944 struct TemplateArgument * templateArgument;
945 struct TemplateDatatype * templateDatatype;
946 struct DBTableEntry * dbtableEntry;
947 struct DBIndexItem * dbindexItem;
948 struct DBTableDef * dbtableDef;
949 } __attribute__ ((gcc_struct)) YYSTYPE;
951 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Enumerator;
955 struct Enumerator * prev;
956 struct Enumerator * next;
958 struct Identifier * id;
959 struct Expression * exp;
960 } __attribute__ ((gcc_struct));
962 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_InitDeclarator;
964 struct InitDeclarator
966 struct InitDeclarator * prev;
967 struct InitDeclarator * next;
969 struct Declarator * declarator;
970 struct Initializer * initializer;
971 } __attribute__ ((gcc_struct));
973 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_AsmField;
977 struct AsmField * prev;
978 struct AsmField * next;
981 struct Expression * expression;
982 } __attribute__ ((gcc_struct));
984 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attribute;
988 struct Attribute * prev;
989 struct Attribute * next;
992 struct Expression * exp;
993 } __attribute__ ((gcc_struct));
995 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassFunction;
999 struct ClassFunction * prev;
1000 struct ClassFunction * next;
1001 struct Location loc;
1002 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1003 struct Declarator * declarator;
1004 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1005 struct Statement * body;
1006 struct __ecereNameSpace__ecere__com__Class * _class;
1007 struct __ecereNameSpace__ecere__sys__OldList attached;
1010 struct Symbol * propSet;
1011 unsigned int isVirtual;
1012 unsigned int isConstructor;
1013 unsigned int isDestructor;
1014 unsigned int dontMangle;
1017 } __attribute__ ((gcc_struct));
1019 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MembersInit;
1023 struct MembersInit * prev;
1024 struct MembersInit * next;
1025 struct Location loc;
1029 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1030 struct ClassFunction * function;
1031 } __attribute__ ((gcc_struct));
1032 } __attribute__ ((gcc_struct));
1034 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MemberInit;
1038 struct MemberInit * prev;
1039 struct MemberInit * next;
1040 struct Location loc;
1041 struct Location realLoc;
1042 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
1043 struct Initializer * initializer;
1045 unsigned int variable;
1046 unsigned int takeOutExp;
1047 } __attribute__ ((gcc_struct));
1049 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyDef;
1053 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyWatch;
1055 struct PropertyWatch;
1057 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDef;
1061 struct ClassDef * prev;
1062 struct ClassDef * next;
1063 struct Location loc;
1067 struct Declaration * decl;
1068 struct ClassFunction * function;
1069 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
1070 struct PropertyDef * propertyDef;
1071 struct PropertyWatch * propertyWatch;
1073 struct Identifier * defaultProperty;
1076 struct Identifier * id;
1077 struct Initializer * initializer;
1078 } __attribute__ ((gcc_struct));
1079 } __attribute__ ((gcc_struct));
1082 } __attribute__ ((gcc_struct));
1084 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableEntry;
1086 struct DBTableEntry;
1088 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBIndexItem;
1092 extern YYSTYPE yylval;
1094 extern struct Location yylloc;
1098 unsigned int memoryGuard = 0x0;
1100 void SetMemoryGuard(unsigned int b)
1105 unsigned int GetMemoryGuard()
1110 extern int strcmp(const char * , const char * );
1112 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts;
1114 static void OutputIdentifier(struct Identifier * id, struct __ecereNameSpace__ecere__com__Instance * f)
1120 if(id->_class->type == 8)
1122 if(id->_class->templateParameter && id->_class->templateParameter->identifier && id->_class->templateParameter->identifier->string)
1123 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, id->_class->templateParameter->identifier->string);
1127 if(id->_class->name)
1129 if(!strcmp(id->_class->name, "class"))
1130 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
1132 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, id->_class->name);
1135 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "::");
1138 ((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)");
1141 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc;
1143 static void OutputOperator(int op, struct __ecereNameSpace__ecere__com__Instance * f)
1148 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "++");
1151 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "--");
1154 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "sizeof ");
1157 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<<");
1160 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">>");
1163 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<=");
1166 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">=");
1169 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "==");
1172 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "!=");
1175 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "&&");
1178 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "||");
1181 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "*=");
1184 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "/=");
1187 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "%=");
1190 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "+=");
1193 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "-=");
1196 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<<=");
1199 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">>=");
1202 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "&=");
1205 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "^=");
1208 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "|=");
1223 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, char ch))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc])(f, (char)op);
1226 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "delete ");
1231 static void OutputSpecifier(struct Specifier * spec, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName);
1233 static void OutputDeclarator(struct Declarator * decl, struct __ecereNameSpace__ecere__com__Instance * f);
1235 void OutputTypeName(struct TypeName * type, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName)
1237 if(type->qualifiers)
1239 struct Specifier * spec;
1241 for(spec = (*type->qualifiers).first; spec; spec = spec->next)
1243 OutputSpecifier(spec, f, typeName);
1245 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1248 if(type->declarator)
1250 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1251 OutputDeclarator(type->declarator, f);
1253 if(!type->qualifiers && !type->declarator)
1254 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "...");
1257 static void OutputStatement(struct Statement * stmt, struct __ecereNameSpace__ecere__com__Instance * f);
1259 static void OutputInstance(struct Instantiation * inst, struct __ecereNameSpace__ecere__com__Instance * f);
1261 extern int printf(char * , ...);
1263 static void OutputInitializer(struct Initializer * initializer, struct __ecereNameSpace__ecere__com__Instance * f);
1265 void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f)
1270 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class(");
1271 if(exp->_classExp.specifiers)
1273 struct Specifier * spec;
1275 for(spec = (*exp->_classExp.specifiers).first; spec; spec = spec->next)
1277 OutputSpecifier(spec, f, 0x0);
1279 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1281 if(exp->_classExp.decl)
1283 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1284 OutputDeclarator(exp->_classExp.decl, f);
1286 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1290 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1291 OutputStatement(exp->compound, f);
1292 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1295 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "new ");
1296 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1297 OutputTypeName(exp->_renew.typeName, f, 0x0);
1298 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1299 OutputExpression(exp->_renew.size, f);
1300 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1303 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "new0 ");
1304 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1305 OutputTypeName(exp->_renew.typeName, f, 0x0);
1306 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1307 OutputExpression(exp->_renew.size, f);
1308 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1311 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "renew ");
1312 OutputExpression(exp->_renew.exp, f);
1313 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1314 OutputTypeName(exp->_renew.typeName, f, 0x0);
1315 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1316 OutputExpression(exp->_renew.size, f);
1317 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1320 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "renew0 ");
1321 OutputExpression(exp->_renew.exp, f);
1322 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1323 OutputTypeName(exp->_renew.typeName, f, 0x0);
1324 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1325 OutputExpression(exp->_renew.size, f);
1326 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1330 OutputIdentifier(exp->identifier, f);
1334 OutputInstance(exp->instance, f);
1338 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, exp->constant);
1344 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, exp->string);
1349 OutputExpression(exp->op.exp1, f);
1351 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1353 OutputOperator(exp->op.op, f);
1356 if(exp->op.exp1 || (exp->op.exp2->type == 4 && !exp->op.exp2->op.exp1 && exp->op.exp2->op.op == exp->op.op))
1357 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1358 OutputExpression(exp->op.exp2, f);
1364 struct Expression * expression;
1367 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1368 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1371 for(expression = (*exp->list).first; expression; expression = expression->next)
1373 OutputExpression(expression, f);
1374 if(expression->next)
1375 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1378 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1383 struct Expression * expression;
1386 OutputExpression(exp->index.exp, f);
1387 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1388 if(exp->index.index)
1389 for(expression = (*exp->index.index).first; expression; expression = expression->next)
1391 OutputExpression(expression, f);
1392 if(expression->next)
1393 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1395 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1400 OutputExpression(exp->call.exp, f);
1401 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1402 if(exp->call.arguments)
1404 struct Expression * expression;
1406 for(expression = (*exp->call.arguments).first; expression; expression = expression->next)
1408 OutputExpression(expression, f);
1409 if(expression->next)
1410 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1413 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1418 OutputExpression(exp->member.exp, f);
1419 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ".");
1420 if(exp->member.member)
1421 OutputIdentifier(exp->member.member, f);
1424 OutputExpression(exp->member.exp, f);
1425 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "->");
1426 OutputIdentifier(exp->member.member, f);
1429 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "sizeof(");
1430 OutputTypeName(exp->typeName, f, 0x0);
1431 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1434 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__alignof__(");
1435 OutputTypeName(exp->typeName, f, 0x0);
1436 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1439 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1440 if(exp->initializer.typeName)
1441 OutputTypeName(exp->initializer.typeName, f, 0x0);
1442 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1443 if(exp->initializer.initializer)
1444 OutputInitializer(exp->initializer.initializer, f);
1447 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1448 OutputTypeName(exp->cast.typeName, f, 0x0);
1449 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1451 OutputExpression(exp->cast.exp, f);
1454 OutputExpression(exp->cond.cond, f);
1455 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ? ");
1457 struct Expression * expression;
1459 for(expression = (*exp->cond.exp).first; expression; expression = expression->next)
1461 OutputExpression(expression, f);
1462 if(expression->next)
1463 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1466 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1467 OutputExpression(exp->cond.elseExp, f);
1470 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__builtin_va_arg(");
1471 OutputExpression(exp->vaArg.exp, f);
1472 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1473 OutputTypeName(exp->vaArg.typeName, f, 0x0);
1474 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1477 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1480 struct Expression * expression;
1482 for(expression = (*exp->list).first; expression; expression = expression->next)
1484 OutputExpression(expression, f);
1485 if(expression->next)
1486 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1489 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1494 static void OutputAsmField(struct AsmField * field, struct __ecereNameSpace__ecere__com__Instance * f)
1496 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, field->command);
1497 if(field->expression)
1499 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1500 OutputExpression(field->expression, f);
1501 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1505 extern char * strchr(const char * , int);
1507 extern char * __ecereNameSpace__ecere__sys__StripLastDirectory(char * string, char * output);
1509 extern char * sourceFile;
1511 extern char * __ecereNameSpace__ecere__sys__PathCat(char * string, char * addedPath);
1513 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
1515 static void GetSourceName(char * name, const char * src)
1520 if(!strchr(src, '/') && !strchr(src, '\\'))
1521 __ecereNameSpace__ecere__sys__StripLastDirectory(sourceFile, name);
1522 __ecereNameSpace__ecere__sys__PathCat(name, src);
1525 __ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
1526 __ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
1529 extern unsigned int inCompiler;
1531 extern char * GetIncludeFileFromID(int id);
1533 extern char * outputFile;
1535 extern unsigned int outputLineNumbers;
1537 static void OutputDeclaration(struct Declaration * decl, struct __ecereNameSpace__ecere__com__Instance * f);
1539 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
1541 extern struct Declarator * SpecDeclFromString(char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
1543 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
1545 extern struct Identifier * MkIdentifier(char * string);
1547 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
1549 extern struct Specifier * CopySpecifier(struct Specifier * spec);
1551 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
1553 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
1555 extern struct Specifier * MkSpecifierName(char * name);
1557 extern void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
1559 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
1561 extern void InstDeclPassTypeName(struct TypeName * type, unsigned int param);
1563 extern void FreeTypeName(struct TypeName * typeName);
1565 int __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(struct __ecereNameSpace__ecere__com__Instance * this, char * format, ...);
1567 static void OutputStatement(struct Statement * stmt, struct __ecereNameSpace__ecere__com__Instance * f)
1569 char name[274] = "";
1570 char origName[274] = "";
1574 GetSourceName(name, stmt->loc.start.included ? GetIncludeFileFromID(stmt->loc.start.included) : (((void *)0)));
1575 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
1576 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
1578 if(inCompiler && outputLineNumbers && stmt->loc.start.line)
1580 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.start.line, name);
1586 OutputDeclaration(stmt->decl, f);
1589 OutputIdentifier(stmt->labeled.id, f);
1590 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":\n");
1592 OutputStatement(stmt->labeled.stmt, f);
1595 if(stmt->caseStmt.exp)
1597 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "case ");
1598 OutputExpression(stmt->caseStmt.exp, f);
1599 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":\n");
1604 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "default:\n");
1607 if(stmt->caseStmt.stmt)
1608 OutputStatement(stmt->caseStmt.stmt, f);
1612 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "{\n");
1614 if(stmt->compound.declarations)
1616 struct Declaration * decl;
1618 for(decl = (*stmt->compound.declarations).first; decl; decl = decl->next)
1620 OutputDeclaration(decl, f);
1623 if(stmt->compound.statements)
1625 struct Statement * statement;
1627 if(stmt->compound.declarations)
1629 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1632 for(statement = (*stmt->compound.statements).first; statement; statement = statement->next)
1634 OutputStatement(statement, f);
1635 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1639 if(inCompiler && outputLineNumbers && stmt->loc.end.line)
1641 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.end.line, name);
1644 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}");
1649 if(stmt->expressions)
1651 struct Expression * exp;
1653 for(exp = (*stmt->expressions).first; exp; exp = exp->next)
1655 OutputExpression(exp, f);
1657 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1660 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1665 struct Expression * exp;
1667 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "if(");
1668 for(exp = (*stmt->ifStmt.exp).first; exp; exp = exp->next)
1670 OutputExpression(exp, f);
1672 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1674 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1676 if(stmt->ifStmt.stmt)
1677 OutputStatement(stmt->ifStmt.stmt, f);
1678 if(stmt->ifStmt.elseStmt)
1680 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1682 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "else");
1683 if(stmt->ifStmt.elseStmt->type != 4)
1685 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1689 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1690 OutputStatement(stmt->ifStmt.elseStmt, f);
1696 struct Expression * exp;
1698 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "switch(");
1699 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1701 OutputExpression(exp, f);
1703 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1705 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1707 OutputStatement(stmt->switchStmt.stmt, f);
1712 struct Expression * exp;
1714 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "while(");
1715 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1717 OutputExpression(exp, f);
1719 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1721 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1723 OutputStatement(stmt->whileStmt.stmt, f);
1728 struct Expression * exp;
1730 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "do\n");
1732 OutputStatement(stmt->whileStmt.stmt, f);
1733 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "while(");
1734 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1736 OutputExpression(exp, f);
1738 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1740 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ");");
1745 struct Expression * exp;
1747 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "for(");
1748 OutputStatement(stmt->forStmt.init, f);
1749 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1750 OutputStatement(stmt->forStmt.check, f);
1751 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1752 if(stmt->forStmt.increment)
1754 if(inCompiler && outputLineNumbers && stmt->loc.end.line)
1756 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.end.line, name);
1759 for(exp = (*stmt->forStmt.increment).first; exp; exp = exp->next)
1761 OutputExpression(exp, f);
1763 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1766 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1768 OutputStatement(stmt->forStmt.stmt, f);
1773 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "goto ");
1774 OutputIdentifier(stmt->gotoStmt.id, f);
1775 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1779 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "continue;");
1782 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "break;");
1786 struct Expression * exp;
1788 if(inCompiler && memoryGuard)
1790 struct Expression * exp = stmt->expressions ? (*stmt->expressions).last : (((void *)0));
1792 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "{ ");
1793 if(exp && exp->expType)
1795 char string[1024] = "";
1796 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
1797 struct Declarator * decl;
1798 struct TypeName * typeName;
1800 if(exp->expType->kind == 20)
1802 if(exp->expType->templateParameter->dataTypeString)
1803 decl = SpecDeclFromString(exp->expType->templateParameter->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1804 else if(exp->expType->templateParameter->dataType)
1806 (__ecereNameSpace__ecere__com__eSystem_Delete(specs), specs = 0);
1807 specs = CopyList(exp->expType->templateParameter->dataType->specifiers, CopySpecifier);
1808 decl = PlugDeclarator(exp->expType->templateParameter->dataType->decl, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1812 ListAdd(specs, MkSpecifierName("uint64"));
1813 decl = MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal"));
1818 PrintTypeNoConst(exp->expType, string, exp->expType->kind == 18 ? 0x1 : 0x0, 0x1);
1819 decl = SpecDeclFromString(string, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1821 typeName = MkTypeName(specs, decl);
1822 InstDeclPassTypeName(typeName, 0x0);
1823 OutputTypeName(typeName, f, 0x0);
1824 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ";");
1825 FreeTypeName(typeName);
1829 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "return ");
1832 struct Expression * exp = stmt->expressions ? (*stmt->expressions).last : (((void *)0));
1834 if(exp && exp->expType)
1835 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "__ecereReturnVal = ");
1837 if(stmt->expressions)
1839 for(exp = (*stmt->expressions).first; exp; exp = exp->next)
1841 OutputExpression(exp, f);
1843 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1846 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1847 if(inCompiler && memoryGuard)
1849 struct Expression * exp = stmt->expressions ? (struct Expression *)(*stmt->expressions).last : (((void *)0));
1851 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PopLoc();");
1852 if(exp && exp->expType)
1853 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "return __ecereReturnVal;");
1855 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "return;");
1856 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "}");
1862 struct AsmField * field;
1864 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__asm__ ");
1865 if(stmt->asmStmt.spec)
1866 OutputSpecifier(stmt->asmStmt.spec, f, 0x0);
1867 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1868 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, stmt->asmStmt.statements);
1869 if(stmt->asmStmt.inputFields || stmt->asmStmt.outputFields || stmt->asmStmt.clobberedFields)
1871 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1872 if(stmt->asmStmt.inputFields)
1874 for(field = (*stmt->asmStmt.inputFields).first; field; field = field->next)
1877 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1878 OutputAsmField(field, f);
1882 if(stmt->asmStmt.outputFields || stmt->asmStmt.clobberedFields)
1884 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1885 if(stmt->asmStmt.outputFields)
1887 for(field = (*stmt->asmStmt.outputFields).first; field; field = field->next)
1890 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1891 OutputAsmField(field, f);
1895 if(stmt->asmStmt.clobberedFields)
1897 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1898 for(field = (*stmt->asmStmt.clobberedFields).first; field; field = field->next)
1901 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1902 OutputAsmField(field, f);
1905 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ");\n");
1910 if(inCompiler && outputLineNumbers && stmt->loc.start.line)
1912 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", outputLine + 2, origName);
1917 static void OutputPointer(struct Pointer * ptr, struct __ecereNameSpace__ecere__com__Instance * f)
1919 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "*");
1922 struct Specifier * spec;
1924 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1925 for(spec = (*ptr->qualifiers).first; spec; spec = spec->next)
1927 OutputSpecifier(spec, f, 0x0);
1929 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1934 OutputPointer(ptr->pointer, f);
1938 static void OutputAttrib(struct Attrib * attr, struct __ecereNameSpace__ecere__com__Instance * f);
1940 static void OutputExtDecl(struct ExtDecl * extDecl, struct __ecereNameSpace__ecere__com__Instance * f);
1942 extern void ProcessExpressionType(struct Expression * exp);
1944 extern void ComputeExpression(struct Expression * exp);
1946 static void OutputDeclarator(struct Declarator * decl, struct __ecereNameSpace__ecere__com__Instance * f)
1951 if(decl->declarator)
1953 OutputDeclarator(decl->declarator, f);
1955 if(decl->structDecl.exp)
1957 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1958 OutputExpression(decl->structDecl.exp, f);
1960 if(decl->structDecl.posExp)
1962 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1963 OutputExpression(decl->structDecl.posExp, f);
1965 if(decl->structDecl.attrib)
1967 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1968 OutputAttrib(decl->structDecl.attrib, f);
1972 OutputIdentifier(decl->identifier, f);
1975 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1976 OutputDeclarator(decl->declarator, f);
1977 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1980 if(decl->extended.extended)
1981 OutputExtDecl(decl->extended.extended, f);
1982 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1983 OutputDeclarator(decl->declarator, f);
1986 OutputDeclarator(decl->declarator, f);
1987 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1988 if(decl->extended.extended)
1989 OutputExtDecl(decl->extended.extended, f);
1992 if(decl->declarator)
1994 OutputDeclarator(decl->declarator, f);
1996 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1999 ProcessExpressionType(decl->array.exp);
2000 ComputeExpression(decl->array.exp);
2001 OutputExpression(decl->array.exp, f);
2003 else if(decl->array.enumClass)
2005 struct Symbol * _class = decl->array.enumClass->symbol;
2007 if(_class && _class->registered)
2009 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%d", (int)__ecereNameSpace__ecere__com__eClass_GetProperty(_class->registered, "enumSize"));
2012 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
2016 struct TypeName * param;
2018 if(decl->declarator)
2019 OutputDeclarator(decl->declarator, f);
2020 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
2021 if(decl->function.parameters && (*decl->function.parameters).first)
2023 for(param = (*decl->function.parameters).first; param; param = param->next)
2025 OutputTypeName(param, f, 0x0);
2027 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2030 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2034 if(decl->pointer.pointer)
2035 OutputPointer(decl->pointer.pointer, f);
2036 if(decl->declarator)
2038 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2039 OutputDeclarator(decl->declarator, f);
2045 static void OutputEnumerator(struct Enumerator * enumerator, struct __ecereNameSpace__ecere__com__Instance * f)
2047 OutputIdentifier(enumerator->id, f);
2050 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2051 OutputExpression(enumerator->exp, f);
2055 static void OutputAttribute(struct Attribute * attr, struct __ecereNameSpace__ecere__com__Instance * f)
2058 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, attr->attr);
2061 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2062 OutputExpression(attr->exp, f);
2066 static void OutputAttrib(struct Attrib * attr, struct __ecereNameSpace__ecere__com__Instance * f)
2071 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute__((");
2074 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute((");
2077 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute_deprecated__((");
2082 struct Attribute * attrib;
2084 for(attrib = (*attr->attribs).first; attrib; attrib = attrib->next)
2087 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2088 OutputAttribute(attrib, f);
2091 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "))");
2094 static void OutputExtDecl(struct ExtDecl * extDecl, struct __ecereNameSpace__ecere__com__Instance * f)
2096 if(extDecl->type == 0 && extDecl->s)
2097 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, extDecl->s);
2098 else if(extDecl->type == 1)
2099 OutputAttrib(extDecl->attr, f);
2102 extern struct Symbol * FindClass(char * name);
2104 static void OutputClassDef(struct ClassDef * def, struct __ecereNameSpace__ecere__com__Instance * f);
2106 static void OutputSpecifier(struct Specifier * spec, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName)
2111 switch(spec->specifier)
2114 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typedef");
2117 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "extern");
2120 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "static");
2123 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "auto");
2126 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "register");
2129 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "const");
2132 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "volatile");
2135 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "void");
2138 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "char");
2141 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "short");
2144 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "int");
2147 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, typeName ? "uint" : "unsigned int");
2150 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, typeName ? "int64" : "long long");
2153 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__builtin_va_list");
2156 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "long");
2159 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "float");
2162 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "double");
2165 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "signed");
2168 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "unsigned");
2171 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
2174 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "any_object");
2177 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class");
2180 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "thisclass");
2186 OutputExtDecl(spec->extDecl, f);
2189 if(spec->name && !strcmp(spec->name, "class"))
2191 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
2195 struct Symbol * symbol = spec->symbol;
2197 if(!symbol && spec->name)
2198 symbol = FindClass(spec->name);
2201 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, symbol->string ? symbol->string : "(null)");
2204 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, spec->name);
2209 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "enum");
2212 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2213 OutputIdentifier(spec->id, f);
2217 struct Enumerator * enumerator;
2219 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2221 for(enumerator = (*spec->list).first; enumerator; enumerator = enumerator->next)
2223 OutputEnumerator(enumerator, f);
2224 if(enumerator->next)
2225 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2227 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n}");
2235 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, (spec->type == 3) ? "struct" : "union");
2236 if(spec->extDeclStruct)
2238 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2239 OutputExtDecl(spec->extDeclStruct, f);
2243 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2244 OutputIdentifier(spec->id, f);
2246 if(spec->definitions)
2248 struct ClassDef * def;
2250 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2252 for(def = (*spec->definitions).first; def; def = def->next)
2254 OutputClassDef(def, f);
2256 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "} __attribute__ ((gcc_struct))");
2261 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__typeof(");
2262 OutputExpression(spec->expression, f);
2263 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2266 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "subclass(");
2267 OutputSpecifier(spec->_class, f, 0x0);
2268 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2271 OutputIdentifier(spec->templateParameter->identifier, f);
2276 static void OutputInitializer(struct Initializer * initializer, struct __ecereNameSpace__ecere__com__Instance * f)
2278 char name[274] = "";
2279 char origName[274] = "";
2283 GetSourceName(name, initializer->loc.start.included ? GetIncludeFileFromID(initializer->loc.start.included) : (((void *)0)));
2284 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
2285 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
2287 switch(initializer->type)
2291 struct Initializer * init;
2293 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2295 if(inCompiler && outputLineNumbers && initializer->loc.start.line)
2297 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", initializer->loc.start.line, name);
2300 for(init = (*initializer->list).first; init; init = init->next)
2302 OutputInitializer(init, f);
2304 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2306 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n}");
2307 if(inCompiler && outputLineNumbers && initializer->loc.start.line)
2309 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", initializer->loc.start.line, name);
2316 if(initializer->exp)
2317 OutputExpression(initializer->exp, f);
2322 static void OutputInitDeclarator(struct InitDeclarator * decl, struct __ecereNameSpace__ecere__com__Instance * f)
2324 OutputDeclarator(decl->declarator, f);
2325 if(decl->initializer)
2327 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2328 OutputInitializer(decl->initializer, f);
2332 static void OutputDeclaration(struct Declaration * decl, struct __ecereNameSpace__ecere__com__Instance * f)
2334 struct Specifier * spec;
2335 char origName[274] = "";
2341 struct InitDeclarator * d;
2345 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
2346 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
2348 if(decl->declarators && (*decl->declarators).first)
2350 for(d = (*decl->declarators).first; d; d = d->next)
2353 char name[274] = "";
2355 GetSourceName(name, decl->loc.start.included ? GetIncludeFileFromID(decl->loc.start.included) : (((void *)0)));
2356 if(inCompiler && outputLineNumbers && decl->loc.start.line)
2358 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", decl->loc.start.line, name);
2364 if(decl->specifiers)
2366 unsigned int inTypeDef = 0x0;
2368 for(spec = (*decl->specifiers).first; spec; spec = spec->next)
2370 if(spec->type == 0 && spec->specifier == TYPEDEF)
2372 OutputSpecifier(spec, f, inTypeDef && !spec->next);
2374 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2377 if(decl->declarators && (*decl->declarators).first)
2379 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2380 for(d = (*decl->declarators).first; d; d = d->next)
2382 OutputInitDeclarator(d, f);
2384 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2391 if(decl->specifiers)
2393 for(spec = (*decl->specifiers).first; spec; spec = spec->next)
2395 OutputSpecifier(spec, f, 0x0);
2397 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2400 if(decl->declarators)
2402 struct Declarator * d;
2404 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2405 for(d = (*decl->declarators).first; d; d = d->next)
2407 OutputDeclarator(d, f);
2409 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2412 if(decl->extStorage)
2414 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2415 OutputSpecifier(decl->extStorage, f, 0x0);
2422 OutputInstance(decl->inst, f);
2428 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n");
2430 if(inCompiler && outputLineNumbers && decl->loc.start.line && decl->type == 1)
2432 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", outputLine + 2, origName);
2437 static struct FunctionDefinition * curFunction;
2439 extern struct Identifier * GetDeclId(struct Declarator * decl);
2441 static void OutputFunction(struct FunctionDefinition * func, struct __ecereNameSpace__ecere__com__Instance * f)
2443 struct FunctionDefinition * oldFunc = curFunction;
2446 if(func->specifiers)
2448 struct Specifier * spec;
2450 for(spec = (*func->specifiers).first; spec; spec = spec->next)
2452 OutputSpecifier(spec, f, 0x0);
2454 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2456 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2458 if(func->declarator)
2459 OutputDeclarator(func->declarator, f);
2460 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2462 if(func->declarations)
2464 struct Declaration * decl;
2466 for(decl = (*func->declarations).first; decl; decl = decl->next)
2468 OutputDeclaration(decl, f);
2470 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2475 if(inCompiler && memoryGuard)
2477 char name[1024] = "";
2478 struct Identifier * id = GetDeclId(func->declarator);
2480 GetSourceName(name, func->loc.start.included ? GetIncludeFileFromID(func->loc.start.included) : (((void *)0)));
2481 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "{\n");
2482 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PushLoc(\"%s:%s\");\n", name, id->string);
2485 OutputStatement(func->body, f);
2486 if(inCompiler && memoryGuard)
2488 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PopLoc();\n");
2489 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "}\n");
2492 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2495 curFunction = oldFunc;
2498 static void OutputMemberInit(struct MemberInit * init, struct __ecereNameSpace__ecere__com__Instance * f)
2500 if(init->identifiers)
2502 if((*init->identifiers).count > 1)
2504 struct Identifier * id;
2506 for(id = (*init->identifiers).first; id; id = id->next)
2508 OutputIdentifier(id, f);
2510 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ".");
2513 else if((*init->identifiers).first)
2514 OutputIdentifier((*init->identifiers).first, f);
2515 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2517 if(init->initializer)
2518 OutputInitializer(init->initializer, f);
2521 static void OutputClassFunction(struct ClassFunction * func, struct __ecereNameSpace__ecere__com__Instance * f);
2523 static void OutputMembersInit(struct MembersInit * init, struct __ecereNameSpace__ecere__com__Instance * f)
2529 struct MemberInit * member;
2531 if(init->dataMembers)
2533 for(member = (*init->dataMembers).first; member; member = member->next)
2535 OutputMemberInit(member, f);
2537 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2543 OutputClassFunction(init->function, f);
2548 static void OutputInstance(struct Instantiation * inst, struct __ecereNameSpace__ecere__com__Instance * f)
2551 OutputSpecifier(inst->_class, f, 0x0);
2554 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2555 OutputExpression(inst->exp, f);
2557 if(inst->members && (*inst->members).count > 1)
2559 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2562 else if(inst->members)
2563 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " { ");
2565 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "{");
2568 struct MembersInit * init;
2570 for(init = (*inst->members).first; init; init = init->next)
2572 OutputMembersInit(init, f);
2573 if(init->type == 0 && init->next)
2575 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n");
2581 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " }");
2583 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}");
2586 static void OutputClassFunction(struct ClassFunction * func, struct __ecereNameSpace__ecere__com__Instance * f)
2588 if(func->specifiers)
2590 struct Specifier * spec;
2592 for(spec = (*func->specifiers).first; spec; spec = spec->next)
2594 OutputSpecifier(spec, f, 0x0);
2596 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2598 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2600 if(func->declarator)
2601 OutputDeclarator(func->declarator, f);
2602 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2604 if(func->declarations)
2606 struct Declaration * decl;
2608 for(decl = (*func->declarations).first; decl; decl = decl->next)
2610 OutputDeclaration(decl, f);
2612 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2617 OutputStatement(func->body, f);
2618 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2622 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
2625 static void OutputClassDef(struct ClassDef * def, struct __ecereNameSpace__ecere__com__Instance * f)
2632 OutputDeclaration(def->decl, f);
2633 if(def->next && def->next->type != 2)
2635 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2642 struct MemberInit * init;
2644 for(init = (*def->defProperties).first; init; init = init->next)
2646 OutputMemberInit(init, f);
2648 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2650 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n\n");
2655 OutputClassFunction(def->function, f);
2656 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2662 static void OutputClass(struct ClassDefinition * _class, struct __ecereNameSpace__ecere__com__Instance * f)
2664 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class ");
2665 OutputSpecifier(_class->_class, f, 0x0);
2666 if(_class->baseSpecs)
2668 struct Specifier * spec;
2670 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
2671 for(spec = (*_class->baseSpecs).first; spec; spec = spec->next)
2673 OutputSpecifier(spec, f, 0x0);
2676 if(_class->definitions)
2678 struct ClassDef * def;
2680 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2682 for(def = (*_class->definitions).first; def; def = def->next)
2684 OutputClassDef(def, f);
2686 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}\n");
2690 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
2693 void OutputTree(struct __ecereNameSpace__ecere__sys__OldList * ast, struct __ecereNameSpace__ecere__com__Instance * f)
2695 struct External * external;
2698 for(external = ast->first; external; external = external->next)
2700 switch(external->type)
2703 OutputFunction(external->function, f);
2704 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2708 OutputDeclaration(external->declaration, f);
2709 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2713 OutputClass(external->_class, f);
2714 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2721 extern char * __ecereNameSpace__ecere__sys__TrimRSpaces(char * string, char * output);
2723 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
2725 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
2727 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize;
2729 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
2731 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
2733 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
2735 char * StringFromSpecDecl(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl)
2738 struct TypeName * typeName = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
2739 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
2742 typeName->qualifiers = specs;
2743 typeName->declarator = decl;
2744 OutputTypeName(typeName, f, 0x1);
2745 ((typeName ? (__ecereClass_TypeName->Destructor ? __ecereClass_TypeName->Destructor(typeName) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(typeName)) : 0), typeName = 0);
2746 size = ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize])(f);
2747 string = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (size + 1));
2748 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(f, 0, 0);
2749 ((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);
2750 string[size] = '\0';
2751 __ecereNameSpace__ecere__sys__TrimRSpaces(string, string);
2752 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
2756 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
2758 struct __ecereNameSpace__ecere__com__GlobalFunction;
2760 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);
2762 void __ecereRegisterModule_output(struct __ecereNameSpace__ecere__com__Instance * module)
2764 struct __ecereNameSpace__ecere__com__Class * class;
2766 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetMemoryGuard", "void SetMemoryGuard(bool b)", SetMemoryGuard, module, 1);
2767 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetMemoryGuard", "bool GetMemoryGuard(void)", GetMemoryGuard, module, 1);
2768 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputTypeName", "void OutputTypeName(TypeName type, ecere::sys::File f, bool typeName)", OutputTypeName, module, 1);
2769 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputExpression", "void OutputExpression(Expression exp, ecere::sys::File f)", OutputExpression, module, 1);
2770 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputTree", "void OutputTree(ecere::sys::OldList ast, ecere::sys::File f)", OutputTree, module, 1);
2771 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("StringFromSpecDecl", "char * StringFromSpecDecl(ecere::sys::OldList specs, Declarator decl)", StringFromSpecDecl, module, 1);
2774 void __ecereUnregisterModule_output(struct __ecereNameSpace__ecere__com__Instance * module)