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;
119 unsigned int included;
120 } __attribute__ ((gcc_struct));
122 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Location;
126 struct CodePosition start;
127 struct CodePosition end;
128 } __attribute__ ((gcc_struct));
130 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attrib;
136 struct __ecereNameSpace__ecere__sys__OldList * attribs;
137 } __attribute__ ((gcc_struct));
139 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ExtDecl;
148 struct Attrib * attr;
149 } __attribute__ ((gcc_struct));
150 } __attribute__ ((gcc_struct));
152 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDefinition;
154 struct ClassDefinition
156 struct ClassDefinition * prev;
157 struct ClassDefinition * next;
159 struct Specifier * _class;
160 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
161 struct __ecereNameSpace__ecere__sys__OldList * definitions;
162 struct Symbol * symbol;
163 struct Location blockStart;
164 struct Location nameLoc;
167 unsigned int deleteWatchable;
168 } __attribute__ ((gcc_struct));
170 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
174 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Instantiation;
178 struct Instantiation * prev;
179 struct Instantiation * next;
181 struct Specifier * _class;
182 struct Expression * exp;
183 struct __ecereNameSpace__ecere__sys__OldList * members;
184 struct Symbol * symbol;
185 unsigned int fullSet;
186 unsigned int isConstant;
187 unsigned char * data;
188 struct Location nameLoc;
189 struct Location insideLoc;
191 } __attribute__ ((gcc_struct));
193 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declaration;
197 struct Declaration * prev;
198 struct Declaration * next;
205 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
206 struct __ecereNameSpace__ecere__sys__OldList * declarators;
207 } __attribute__ ((gcc_struct));
208 struct Instantiation * inst;
211 struct Identifier * id;
212 struct Expression * exp;
213 } __attribute__ ((gcc_struct));
214 } __attribute__ ((gcc_struct));
215 struct Specifier * extStorage;
216 struct Symbol * symbol;
218 } __attribute__ ((gcc_struct));
220 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Statement;
224 struct Statement * prev;
225 struct Statement * next;
230 struct __ecereNameSpace__ecere__sys__OldList * expressions;
233 struct Identifier * id;
234 struct Statement * stmt;
235 } __attribute__ ((gcc_struct)) labeled;
238 struct Expression * exp;
239 struct Statement * stmt;
240 } __attribute__ ((gcc_struct)) caseStmt;
243 struct __ecereNameSpace__ecere__sys__OldList * declarations;
244 struct __ecereNameSpace__ecere__sys__OldList * statements;
245 struct Context * context;
246 unsigned int isSwitch;
247 } __attribute__ ((gcc_struct)) compound;
250 struct __ecereNameSpace__ecere__sys__OldList * exp;
251 struct Statement * stmt;
252 struct Statement * elseStmt;
253 } __attribute__ ((gcc_struct)) ifStmt;
256 struct __ecereNameSpace__ecere__sys__OldList * exp;
257 struct Statement * stmt;
258 } __attribute__ ((gcc_struct)) switchStmt;
261 struct __ecereNameSpace__ecere__sys__OldList * exp;
262 struct Statement * stmt;
263 } __attribute__ ((gcc_struct)) whileStmt;
266 struct __ecereNameSpace__ecere__sys__OldList * exp;
267 struct Statement * stmt;
268 } __attribute__ ((gcc_struct)) doWhile;
271 struct Statement * init;
272 struct Statement * check;
273 struct __ecereNameSpace__ecere__sys__OldList * increment;
274 struct Statement * stmt;
275 } __attribute__ ((gcc_struct)) forStmt;
278 struct Identifier * id;
279 } __attribute__ ((gcc_struct)) gotoStmt;
282 struct Specifier * spec;
284 struct __ecereNameSpace__ecere__sys__OldList * inputFields;
285 struct __ecereNameSpace__ecere__sys__OldList * outputFields;
286 struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
287 } __attribute__ ((gcc_struct)) asmStmt;
290 struct Expression * watcher;
291 struct Expression * object;
292 struct __ecereNameSpace__ecere__sys__OldList * watches;
293 } __attribute__ ((gcc_struct)) _watch;
296 struct Identifier * id;
297 struct __ecereNameSpace__ecere__sys__OldList * exp;
298 struct __ecereNameSpace__ecere__sys__OldList * filter;
299 struct Statement * stmt;
300 } __attribute__ ((gcc_struct)) forEachStmt;
301 struct Declaration * decl;
302 } __attribute__ ((gcc_struct));
303 } __attribute__ ((gcc_struct));
305 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
309 struct TypeName * prev;
310 struct TypeName * next;
312 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
313 struct Declarator * declarator;
315 struct Expression * bitCount;
316 } __attribute__ ((gcc_struct));
318 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Initializer;
322 struct Initializer * prev;
323 struct Initializer * next;
328 struct Expression * exp;
329 struct __ecereNameSpace__ecere__sys__OldList * list;
330 } __attribute__ ((gcc_struct));
331 unsigned int isConstant;
332 } __attribute__ ((gcc_struct));
334 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
336 struct __ecereNameSpace__ecere__com__DataValue
351 } __attribute__ ((gcc_struct));
352 } __attribute__ ((gcc_struct));
354 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
358 struct Expression * prev;
359 struct Expression * next;
367 struct Identifier * identifier;
368 } __attribute__ ((gcc_struct));
369 struct Statement * compound;
370 struct Instantiation * instance;
372 struct __ecereNameSpace__ecere__sys__OldList * list;
375 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
376 struct Declarator * decl;
377 } __attribute__ ((gcc_struct)) _classExp;
380 struct Identifier * id;
381 } __attribute__ ((gcc_struct)) classData;
384 struct Expression * exp;
385 struct __ecereNameSpace__ecere__sys__OldList * arguments;
386 struct Location argLoc;
387 } __attribute__ ((gcc_struct)) call;
390 struct Expression * exp;
391 struct __ecereNameSpace__ecere__sys__OldList * index;
392 } __attribute__ ((gcc_struct)) index;
395 struct Expression * exp;
396 struct Identifier * member;
398 unsigned int thisPtr;
399 } __attribute__ ((gcc_struct)) member;
403 struct Expression * exp1;
404 struct Expression * exp2;
405 } __attribute__ ((gcc_struct)) op;
406 struct TypeName * typeName;
407 struct Specifier * _class;
410 struct TypeName * typeName;
411 struct Expression * exp;
412 } __attribute__ ((gcc_struct)) cast;
415 struct Expression * cond;
416 struct __ecereNameSpace__ecere__sys__OldList * exp;
417 struct Expression * elseExp;
418 } __attribute__ ((gcc_struct)) cond;
421 struct TypeName * typeName;
422 struct Expression * size;
423 } __attribute__ ((gcc_struct)) _new;
426 struct TypeName * typeName;
427 struct Expression * size;
428 struct Expression * exp;
429 } __attribute__ ((gcc_struct)) _renew;
433 struct Identifier * id;
434 } __attribute__ ((gcc_struct)) db;
437 struct Expression * ds;
438 struct Expression * name;
439 } __attribute__ ((gcc_struct)) dbopen;
442 struct TypeName * typeName;
443 struct Initializer * initializer;
444 } __attribute__ ((gcc_struct)) initializer;
447 struct Expression * exp;
448 struct TypeName * typeName;
449 } __attribute__ ((gcc_struct)) vaArg;
450 } __attribute__ ((gcc_struct));
451 unsigned int debugValue;
452 struct __ecereNameSpace__ecere__com__DataValue val;
454 unsigned int hasAddress;
455 struct Type * expType;
456 struct Type * destType;
459 unsigned int byReference;
460 unsigned int isConstant;
461 unsigned int addedThis;
462 unsigned int needCast;
463 unsigned int thisPtr;
464 } __attribute__ ((gcc_struct));
466 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
468 struct TemplateDatatype
470 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
471 struct Declarator * decl;
472 } __attribute__ ((gcc_struct));
474 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateArgument;
476 struct TemplateArgument;
478 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
480 struct TemplateParameter
482 struct TemplateParameter * prev;
483 struct TemplateParameter * next;
486 struct Identifier * identifier;
489 struct TemplateDatatype * dataType;
491 } __attribute__ ((gcc_struct));
492 struct TemplateArgument * defaultArgument;
493 char * dataTypeString;
494 struct Type * baseType;
495 } __attribute__ ((gcc_struct));
497 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Specifier;
501 struct Specifier * prev;
502 struct Specifier * next;
510 struct ExtDecl * extDecl;
512 struct Symbol * symbol;
513 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
514 } __attribute__ ((gcc_struct));
517 struct Identifier * id;
518 struct __ecereNameSpace__ecere__sys__OldList * list;
519 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
520 struct __ecereNameSpace__ecere__sys__OldList * definitions;
521 unsigned int addNameSpace;
522 struct Context * ctx;
523 struct ExtDecl * extDeclStruct;
524 } __attribute__ ((gcc_struct));
525 struct Expression * expression;
526 struct Specifier * _class;
527 struct TemplateParameter * templateParameter;
528 } __attribute__ ((gcc_struct));
529 } __attribute__ ((gcc_struct));
531 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Identifier;
535 struct Identifier * prev;
536 struct Identifier * next;
538 struct Symbol * classSym;
539 struct Specifier * _class;
541 struct Identifier * badID;
542 } __attribute__ ((gcc_struct));
544 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Pointer;
548 struct Pointer * prev;
549 struct Pointer * next;
551 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
552 struct Pointer * pointer;
553 } __attribute__ ((gcc_struct));
555 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declarator;
559 struct Declarator * prev;
560 struct Declarator * next;
563 struct Symbol * symbol;
564 struct Declarator * declarator;
567 struct Identifier * identifier;
570 struct Expression * exp;
571 struct Expression * posExp;
572 struct Attrib * attrib;
573 } __attribute__ ((gcc_struct)) structDecl;
576 struct Expression * exp;
577 struct Specifier * enumClass;
578 } __attribute__ ((gcc_struct)) array;
581 struct __ecereNameSpace__ecere__sys__OldList * parameters;
582 } __attribute__ ((gcc_struct)) function;
585 struct Pointer * pointer;
586 } __attribute__ ((gcc_struct)) pointer;
589 struct ExtDecl * extended;
590 } __attribute__ ((gcc_struct)) extended;
591 } __attribute__ ((gcc_struct));
592 } __attribute__ ((gcc_struct));
594 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionDefinition;
596 struct FunctionDefinition
598 struct FunctionDefinition * prev;
599 struct FunctionDefinition * next;
601 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
602 struct Declarator * declarator;
603 struct __ecereNameSpace__ecere__sys__OldList * declarations;
604 struct Statement * body;
605 struct __ecereNameSpace__ecere__com__Class * _class;
606 struct __ecereNameSpace__ecere__sys__OldList attached;
609 struct Symbol * propSet;
611 unsigned int propertyNoThis;
612 } __attribute__ ((gcc_struct));
614 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableDef;
618 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
622 struct External * prev;
623 struct External * next;
626 struct Symbol * symbol;
629 struct FunctionDefinition * function;
630 struct ClassDefinition * _class;
631 struct Declaration * declaration;
633 struct Identifier * id;
634 struct DBTableDef * table;
635 } __attribute__ ((gcc_struct));
637 } __attribute__ ((gcc_struct));
639 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
643 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
647 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
652 struct Symbol * parent;
653 struct Symbol * left;
654 struct Symbol * right;
659 struct __ecereNameSpace__ecere__com__Method * method;
660 struct __ecereNameSpace__ecere__com__Property * _property;
661 struct __ecereNameSpace__ecere__com__Class * registered;
662 } __attribute__ ((gcc_struct));
669 struct External * pointerExternal;
670 struct External * structExternal;
671 } __attribute__ ((gcc_struct));
674 struct External * externalGet;
675 struct External * externalSet;
676 struct External * externalPtr;
677 struct External * externalIsSet;
678 } __attribute__ ((gcc_struct));
681 struct External * methodExternal;
682 struct External * methodCodeExternal;
683 } __attribute__ ((gcc_struct));
684 } __attribute__ ((gcc_struct));
685 unsigned int imported;
686 unsigned int declaredStructSym;
687 struct __ecereNameSpace__ecere__com__Class * _class;
688 unsigned int declaredStruct;
689 unsigned int needConstructor;
690 unsigned int needDestructor;
691 char * constructorName;
694 char * destructorName;
695 struct ModuleImport * module;
696 struct ClassImport * _import;
697 struct Location nameLoc;
698 unsigned int isParam;
699 unsigned int isRemote;
700 unsigned int isStruct;
701 unsigned int fireWatchersDone;
703 unsigned int classData;
704 unsigned int isStatic;
706 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
707 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
708 struct Context * ctx;
710 struct Expression * propCategory;
711 } __attribute__ ((gcc_struct));
713 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
722 struct Symbol * _class;
725 struct __ecereNameSpace__ecere__sys__OldList members;
727 } __attribute__ ((gcc_struct));
730 struct Type * returnType;
731 struct __ecereNameSpace__ecere__sys__OldList params;
732 struct Symbol * thisClass;
733 unsigned int staticMethod;
734 struct TemplateParameter * thisClassTemplate;
735 } __attribute__ ((gcc_struct));
738 struct __ecereNameSpace__ecere__com__Method * method;
739 struct __ecereNameSpace__ecere__com__Class * methodClass;
740 struct __ecereNameSpace__ecere__com__Class * usedClass;
741 } __attribute__ ((gcc_struct));
744 struct Type * arrayType;
746 struct Expression * arraySizeExp;
747 unsigned int freeExp;
748 struct Symbol * enumClass;
749 } __attribute__ ((gcc_struct));
751 struct TemplateParameter * templateParameter;
752 } __attribute__ ((gcc_struct));
762 unsigned int isSigned : 1;
763 unsigned int constant : 1;
764 unsigned int truth : 1;
765 unsigned int byReference : 1;
766 unsigned int extraParam : 1;
767 unsigned int directClassAccess : 1;
768 unsigned int computing : 1;
769 unsigned int keepCast : 1;
770 unsigned int passAsTemplate : 1;
771 unsigned int dllExport : 1;
772 unsigned int attrStdcall : 1;
773 } __attribute__ ((gcc_struct));
775 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
777 struct __ecereNameSpace__ecere__com__Class
779 struct __ecereNameSpace__ecere__com__Class * prev;
780 struct __ecereNameSpace__ecere__com__Class * next;
786 int (* Constructor)(struct __ecereNameSpace__ecere__com__Instance *);
787 void (* Destructor)(struct __ecereNameSpace__ecere__com__Instance *);
790 struct __ecereNameSpace__ecere__com__Class * base;
791 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
792 struct __ecereNameSpace__ecere__sys__BinaryTree members;
793 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
794 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
795 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
796 struct __ecereNameSpace__ecere__sys__OldList derivatives;
800 struct __ecereNameSpace__ecere__com__Instance * module;
801 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
802 char * dataTypeString;
803 struct Type * dataType;
805 int defaultAlignment;
806 void (* Initialize)();
808 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
809 char * designerClass;
810 unsigned int noExpansion;
811 char * defaultProperty;
812 unsigned int comRedefinition;
814 unsigned int isRemote;
815 unsigned int internalDecl;
817 unsigned int computeSize;
819 int destructionWatchOffset;
821 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
822 int inheritanceAccess;
825 struct __ecereNameSpace__ecere__sys__OldList conversions;
826 struct __ecereNameSpace__ecere__sys__OldList templateParams;
827 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
828 struct __ecereNameSpace__ecere__com__Class * templateClass;
829 struct __ecereNameSpace__ecere__sys__OldList templatized;
831 unsigned int isInstanceClass;
832 } __attribute__ ((gcc_struct));
834 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, char * name);
836 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
838 struct __ecereNameSpace__ecere__com__Instance
841 struct __ecereNameSpace__ecere__com__Class * _class;
843 } __attribute__ ((gcc_struct));
845 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
847 struct __ecereNameSpace__ecere__com__DataMember
849 struct __ecereNameSpace__ecere__com__DataMember * prev;
850 struct __ecereNameSpace__ecere__com__DataMember * next;
852 unsigned int isProperty;
855 struct __ecereNameSpace__ecere__com__Class * _class;
856 char * dataTypeString;
857 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
858 struct Type * dataType;
862 struct __ecereNameSpace__ecere__sys__OldList members;
863 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
866 } __attribute__ ((gcc_struct));
868 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
870 struct __ecereNameSpace__ecere__com__SerialBuffer
872 unsigned char * _buffer;
876 } __attribute__ ((gcc_struct));
878 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
880 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
886 char * dataTypeString;
887 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
888 } __attribute__ ((gcc_struct));
889 struct __ecereNameSpace__ecere__com__DataValue expression;
895 struct __ecereNameSpace__ecere__com__DataMember * member;
896 struct __ecereNameSpace__ecere__com__Property * prop;
897 struct __ecereNameSpace__ecere__com__Method * method;
898 } __attribute__ ((gcc_struct));
899 } __attribute__ ((gcc_struct));
900 } __attribute__ ((gcc_struct));
901 } __attribute__ ((gcc_struct));
905 IDENTIFIER = 258, CONSTANT = 259, STRING_LITERAL = 260, SIZEOF = 261, PTR_OP = 262, INC_OP = 263, DEC_OP = 264, LEFT_OP = 265, RIGHT_OP = 266, LE_OP = 267, GE_OP = 268, EQ_OP = 269, NE_OP = 270, AND_OP = 271, OR_OP = 272, MUL_ASSIGN = 273, DIV_ASSIGN = 274, MOD_ASSIGN = 275, ADD_ASSIGN = 276, SUB_ASSIGN = 277, LEFT_ASSIGN = 278, RIGHT_ASSIGN = 279, AND_ASSIGN = 280, XOR_ASSIGN = 281, OR_ASSIGN = 282, TYPE_NAME = 283, TYPEDEF = 284, EXTERN = 285, STATIC = 286, AUTO = 287, REGISTER = 288, CHAR = 289, SHORT = 290, INT = 291, UINT = 292, INT64 = 293, LONG = 294, SIGNED = 295, UNSIGNED = 296, FLOAT = 297, DOUBLE = 298, CONST = 299, VOLATILE = 300, VOID = 301, VALIST = 302, STRUCT = 303, UNION = 304, ENUM = 305, ELLIPSIS = 306, CASE = 307, DEFAULT = 308, IF = 309, SWITCH = 310, WHILE = 311, DO = 312, FOR = 313, GOTO = 314, CONTINUE = 315, BREAK = 316, RETURN = 317, IFX = 318, ELSE = 319, CLASS = 320, THISCLASS = 321, CLASS_NAME = 322, PROPERTY = 323, SETPROP = 324, GETPROP = 325, NEWOP = 326, RENEW = 327, DELETE = 328, EXT_DECL = 329, EXT_STORAGE = 330, IMPORT = 331, DEFINE = 332, VIRTUAL = 333, ATTRIB = 334, PUBLIC = 335, PRIVATE = 336, TYPED_OBJECT = 337, ANY_OBJECT = 338, _INCREF = 339, EXTENSION = 340, ASM = 341, TYPEOF = 342, WATCH = 343, STOPWATCHING = 344, FIREWATCHERS = 345, WATCHABLE = 346, CLASS_DESIGNER = 347, CLASS_NO_EXPANSION = 348, CLASS_FIXED = 349, ISPROPSET = 350, CLASS_DEFAULT_PROPERTY = 351, PROPERTY_CATEGORY = 352, CLASS_DATA = 353, CLASS_PROPERTY = 354, SUBCLASS = 355, NAMESPACE = 356, NEW0OP = 357, RENEW0 = 358, VAARG = 359, DBTABLE = 360, DBFIELD = 361, DBINDEX = 362, DATABASE_OPEN = 363, ALIGNOF = 364, ATTRIB_DEP = 365, __ATTRIB = 366
908 typedef union YYSTYPE
913 struct Identifier * id;
914 struct Expression * exp;
915 struct Specifier * specifier;
916 struct __ecereNameSpace__ecere__sys__OldList * list;
917 struct Enumerator * enumerator;
918 struct Declarator * declarator;
919 struct Pointer * pointer;
920 struct Initializer * initializer;
921 struct InitDeclarator * initDeclarator;
922 struct TypeName * typeName;
923 struct Declaration * declaration;
924 struct Statement * stmt;
925 struct FunctionDefinition * function;
926 struct External * external;
927 struct Context * context;
928 struct AsmField * asmField;
929 struct Attrib * attrib;
930 struct ExtDecl * extDecl;
931 struct Attribute * attribute;
932 struct Instantiation * instance;
933 struct MembersInit * membersInit;
934 struct MemberInit * memberInit;
935 struct ClassFunction * classFunction;
936 struct ClassDefinition * _class;
937 struct ClassDef * classDef;
938 struct PropertyDef * prop;
940 struct Symbol * symbol;
941 struct PropertyWatch * propertyWatch;
942 struct TemplateParameter * templateParameter;
943 struct TemplateArgument * templateArgument;
944 struct TemplateDatatype * templateDatatype;
945 struct DBTableEntry * dbtableEntry;
946 struct DBIndexItem * dbindexItem;
947 struct DBTableDef * dbtableDef;
948 } __attribute__ ((gcc_struct)) YYSTYPE;
950 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Enumerator;
954 struct Enumerator * prev;
955 struct Enumerator * next;
957 struct Identifier * id;
958 struct Expression * exp;
959 } __attribute__ ((gcc_struct));
961 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_InitDeclarator;
963 struct InitDeclarator
965 struct InitDeclarator * prev;
966 struct InitDeclarator * next;
968 struct Declarator * declarator;
969 struct Initializer * initializer;
970 } __attribute__ ((gcc_struct));
972 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_AsmField;
976 struct AsmField * prev;
977 struct AsmField * next;
980 struct Expression * expression;
981 } __attribute__ ((gcc_struct));
983 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attribute;
987 struct Attribute * prev;
988 struct Attribute * next;
991 struct Expression * exp;
992 } __attribute__ ((gcc_struct));
994 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassFunction;
998 struct ClassFunction * prev;
999 struct ClassFunction * next;
1000 struct Location loc;
1001 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1002 struct Declarator * declarator;
1003 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1004 struct Statement * body;
1005 struct __ecereNameSpace__ecere__com__Class * _class;
1006 struct __ecereNameSpace__ecere__sys__OldList attached;
1009 struct Symbol * propSet;
1010 unsigned int isVirtual;
1011 unsigned int isConstructor;
1012 unsigned int isDestructor;
1013 unsigned int dontMangle;
1016 } __attribute__ ((gcc_struct));
1018 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MembersInit;
1022 struct MembersInit * prev;
1023 struct MembersInit * next;
1024 struct Location loc;
1028 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1029 struct ClassFunction * function;
1030 } __attribute__ ((gcc_struct));
1031 } __attribute__ ((gcc_struct));
1033 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MemberInit;
1037 struct MemberInit * prev;
1038 struct MemberInit * next;
1039 struct Location loc;
1040 struct Location realLoc;
1041 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
1042 struct Initializer * initializer;
1044 unsigned int variable;
1045 unsigned int takeOutExp;
1046 } __attribute__ ((gcc_struct));
1048 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyDef;
1052 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyWatch;
1054 struct PropertyWatch;
1056 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDef;
1060 struct ClassDef * prev;
1061 struct ClassDef * next;
1062 struct Location loc;
1066 struct Declaration * decl;
1067 struct ClassFunction * function;
1068 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
1069 struct PropertyDef * propertyDef;
1070 struct PropertyWatch * propertyWatch;
1072 struct Identifier * defaultProperty;
1075 struct Identifier * id;
1076 struct Initializer * initializer;
1077 } __attribute__ ((gcc_struct));
1078 } __attribute__ ((gcc_struct));
1081 } __attribute__ ((gcc_struct));
1083 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableEntry;
1085 struct DBTableEntry;
1087 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBIndexItem;
1091 extern YYSTYPE yylval;
1093 extern struct Location yylloc;
1097 unsigned int memoryGuard = 0x0;
1099 void SetMemoryGuard(unsigned int b)
1104 unsigned int GetMemoryGuard()
1109 extern int strcmp(const char * , const char * );
1111 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts;
1113 static void OutputIdentifier(struct Identifier * id, struct __ecereNameSpace__ecere__com__Instance * f)
1119 if(id->_class->type == 8)
1121 if(id->_class->templateParameter && id->_class->templateParameter->identifier && id->_class->templateParameter->identifier->string)
1122 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, id->_class->templateParameter->identifier->string);
1126 if(id->_class->name)
1128 if(!strcmp(id->_class->name, "class"))
1129 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
1131 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, id->_class->name);
1134 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "::");
1137 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, (id && id->string) ? id->string : "(null identifier)");
1140 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc;
1142 static void OutputOperator(int op, struct __ecereNameSpace__ecere__com__Instance * f)
1147 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "++");
1150 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "--");
1153 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "sizeof ");
1156 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<<");
1159 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">>");
1162 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<=");
1165 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">=");
1168 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "==");
1171 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "!=");
1174 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "&&");
1177 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "||");
1180 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "*=");
1183 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "/=");
1186 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "%=");
1189 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "+=");
1192 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "-=");
1195 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<<=");
1198 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">>=");
1201 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "&=");
1204 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "^=");
1207 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "|=");
1222 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, char ch))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc])(f, (char)op);
1225 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "delete ");
1230 static void OutputSpecifier(struct Specifier * spec, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName);
1232 static void OutputDeclarator(struct Declarator * decl, struct __ecereNameSpace__ecere__com__Instance * f);
1234 void OutputTypeName(struct TypeName * type, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName)
1236 if(type->qualifiers)
1238 struct Specifier * spec;
1240 for(spec = (*type->qualifiers).first; spec; spec = spec->next)
1242 OutputSpecifier(spec, f, typeName);
1244 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1247 if(type->declarator)
1249 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1250 OutputDeclarator(type->declarator, f);
1252 if(!type->qualifiers && !type->declarator)
1253 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "...");
1256 static void OutputStatement(struct Statement * stmt, struct __ecereNameSpace__ecere__com__Instance * f);
1258 static void OutputInstance(struct Instantiation * inst, struct __ecereNameSpace__ecere__com__Instance * f);
1260 extern int printf(char * , ...);
1262 static void OutputInitializer(struct Initializer * initializer, struct __ecereNameSpace__ecere__com__Instance * f);
1264 void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f)
1269 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class(");
1270 if(exp->_classExp.specifiers)
1272 struct Specifier * spec;
1274 for(spec = (*exp->_classExp.specifiers).first; spec; spec = spec->next)
1276 OutputSpecifier(spec, f, 0x0);
1278 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1280 if(exp->_classExp.decl)
1282 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1283 OutputDeclarator(exp->_classExp.decl, f);
1285 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1289 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1290 OutputStatement(exp->compound, f);
1291 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1294 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "new ");
1295 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1296 OutputTypeName(exp->_renew.typeName, f, 0x0);
1297 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1298 OutputExpression(exp->_renew.size, f);
1299 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1302 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "new0 ");
1303 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1304 OutputTypeName(exp->_renew.typeName, f, 0x0);
1305 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1306 OutputExpression(exp->_renew.size, f);
1307 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1310 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "renew ");
1311 OutputExpression(exp->_renew.exp, f);
1312 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1313 OutputTypeName(exp->_renew.typeName, f, 0x0);
1314 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1315 OutputExpression(exp->_renew.size, f);
1316 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1319 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "renew0 ");
1320 OutputExpression(exp->_renew.exp, f);
1321 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1322 OutputTypeName(exp->_renew.typeName, f, 0x0);
1323 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1324 OutputExpression(exp->_renew.size, f);
1325 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1329 OutputIdentifier(exp->identifier, f);
1333 OutputInstance(exp->instance, f);
1337 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, exp->constant);
1343 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, exp->string);
1348 OutputExpression(exp->op.exp1, f);
1350 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1352 OutputOperator(exp->op.op, f);
1355 if(exp->op.exp1 || (exp->op.exp2->type == 4 && !exp->op.exp2->op.exp1 && exp->op.exp2->op.op == exp->op.op))
1356 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1357 OutputExpression(exp->op.exp2, f);
1363 struct Expression * expression;
1366 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1367 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1370 for(expression = (*exp->list).first; expression; expression = expression->next)
1372 OutputExpression(expression, f);
1373 if(expression->next)
1374 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1377 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1382 struct Expression * expression;
1385 OutputExpression(exp->index.exp, f);
1386 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1387 if(exp->index.index)
1388 for(expression = (*exp->index.index).first; expression; expression = expression->next)
1390 OutputExpression(expression, f);
1391 if(expression->next)
1392 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1394 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1399 OutputExpression(exp->call.exp, f);
1400 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1401 if(exp->call.arguments)
1403 struct Expression * expression;
1405 for(expression = (*exp->call.arguments).first; expression; expression = expression->next)
1407 OutputExpression(expression, f);
1408 if(expression->next)
1409 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1412 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1417 OutputExpression(exp->member.exp, f);
1418 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ".");
1419 if(exp->member.member)
1420 OutputIdentifier(exp->member.member, f);
1423 OutputExpression(exp->member.exp, f);
1424 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "->");
1425 OutputIdentifier(exp->member.member, f);
1428 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "sizeof(");
1429 OutputTypeName(exp->typeName, f, 0x0);
1430 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1433 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__alignof__(");
1434 OutputTypeName(exp->typeName, f, 0x0);
1435 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1438 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1439 if(exp->initializer.typeName)
1440 OutputTypeName(exp->initializer.typeName, f, 0x0);
1441 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1442 if(exp->initializer.initializer)
1443 OutputInitializer(exp->initializer.initializer, f);
1446 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1447 OutputTypeName(exp->cast.typeName, f, 0x0);
1448 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1450 OutputExpression(exp->cast.exp, f);
1453 OutputExpression(exp->cond.cond, f);
1454 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ? ");
1456 struct Expression * expression;
1458 for(expression = (*exp->cond.exp).first; expression; expression = expression->next)
1460 OutputExpression(expression, f);
1461 if(expression->next)
1462 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1465 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1466 OutputExpression(exp->cond.elseExp, f);
1469 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__builtin_va_arg(");
1470 OutputExpression(exp->vaArg.exp, f);
1471 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1472 OutputTypeName(exp->vaArg.typeName, f, 0x0);
1473 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1476 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1479 struct Expression * expression;
1481 for(expression = (*exp->list).first; expression; expression = expression->next)
1483 OutputExpression(expression, f);
1484 if(expression->next)
1485 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1488 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1493 static void OutputAsmField(struct AsmField * field, struct __ecereNameSpace__ecere__com__Instance * f)
1495 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, field->command);
1496 if(field->expression)
1498 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1499 OutputExpression(field->expression, f);
1500 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1504 extern unsigned int inCompiler;
1506 extern char * __ecereNameSpace__ecere__sys__PathCat(char * string, char * addedPath);
1508 extern char * GetIncludeFileFromID(int id);
1510 extern char * sourceFile;
1512 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
1514 extern char * outputFile;
1516 extern unsigned int outputLineNumbers;
1518 static void OutputDeclaration(struct Declaration * decl, struct __ecereNameSpace__ecere__com__Instance * f);
1520 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
1522 extern struct Declarator * SpecDeclFromString(char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
1524 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
1526 extern struct Identifier * MkIdentifier(char * string);
1528 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
1530 extern struct Specifier * CopySpecifier(struct Specifier * spec);
1532 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
1534 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
1536 extern struct Specifier * MkSpecifierName(char * name);
1538 extern void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
1540 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
1542 extern void InstDeclPassTypeName(struct TypeName * type, unsigned int param);
1544 extern void FreeTypeName(struct TypeName * typeName);
1546 int __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(struct __ecereNameSpace__ecere__com__Instance * this, char * format, ...);
1548 static void OutputStatement(struct Statement * stmt, struct __ecereNameSpace__ecere__com__Instance * f)
1550 char name[274] = "";
1551 char origName[274] = "";
1555 if(yylloc.start.included)
1557 __ecereNameSpace__ecere__sys__PathCat(name, GetIncludeFileFromID((unsigned int)yylloc.start.included));
1561 __ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
1563 __ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
1564 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
1565 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
1567 if(inCompiler && outputLineNumbers && stmt->loc.start.line)
1569 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.start.line, name);
1575 OutputDeclaration(stmt->decl, f);
1578 OutputIdentifier(stmt->labeled.id, f);
1579 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":\n");
1581 OutputStatement(stmt->labeled.stmt, f);
1584 if(stmt->caseStmt.exp)
1586 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "case ");
1587 OutputExpression(stmt->caseStmt.exp, f);
1588 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":\n");
1593 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "default:\n");
1596 if(stmt->caseStmt.stmt)
1597 OutputStatement(stmt->caseStmt.stmt, f);
1601 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "{\n");
1603 if(stmt->compound.declarations)
1605 struct Declaration * decl;
1607 for(decl = (*stmt->compound.declarations).first; decl; decl = decl->next)
1609 OutputDeclaration(decl, f);
1612 if(stmt->compound.statements)
1614 struct Statement * statement;
1616 if(stmt->compound.declarations)
1618 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1621 for(statement = (*stmt->compound.statements).first; statement; statement = statement->next)
1623 OutputStatement(statement, f);
1624 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1628 if(inCompiler && outputLineNumbers && stmt->loc.end.line)
1630 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.end.line, name);
1633 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}");
1638 if(stmt->expressions)
1640 struct Expression * exp;
1642 for(exp = (*stmt->expressions).first; exp; exp = exp->next)
1644 OutputExpression(exp, f);
1646 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1649 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1654 struct Expression * exp;
1656 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "if(");
1657 for(exp = (*stmt->ifStmt.exp).first; exp; exp = exp->next)
1659 OutputExpression(exp, f);
1661 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1663 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1665 if(stmt->ifStmt.stmt)
1666 OutputStatement(stmt->ifStmt.stmt, f);
1667 if(stmt->ifStmt.elseStmt)
1669 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1671 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "else");
1672 if(stmt->ifStmt.elseStmt->type != 4)
1674 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1678 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1679 OutputStatement(stmt->ifStmt.elseStmt, f);
1685 struct Expression * exp;
1687 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "switch(");
1688 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1690 OutputExpression(exp, f);
1692 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1694 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1696 OutputStatement(stmt->switchStmt.stmt, f);
1701 struct Expression * exp;
1703 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "while(");
1704 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1706 OutputExpression(exp, f);
1708 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1710 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1712 OutputStatement(stmt->whileStmt.stmt, f);
1717 struct Expression * exp;
1719 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "do\n");
1721 OutputStatement(stmt->whileStmt.stmt, f);
1722 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "while(");
1723 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1725 OutputExpression(exp, f);
1727 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1729 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ");");
1734 struct Expression * exp;
1736 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "for(");
1737 OutputStatement(stmt->forStmt.init, f);
1738 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1739 OutputStatement(stmt->forStmt.check, f);
1740 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1741 if(stmt->forStmt.increment)
1743 if(inCompiler && outputLineNumbers && stmt->loc.end.line)
1745 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.end.line, name);
1748 for(exp = (*stmt->forStmt.increment).first; exp; exp = exp->next)
1750 OutputExpression(exp, f);
1752 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1755 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1757 OutputStatement(stmt->forStmt.stmt, f);
1762 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "goto ");
1763 OutputIdentifier(stmt->gotoStmt.id, f);
1764 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1768 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "continue;");
1771 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "break;");
1775 struct Expression * exp;
1777 if(inCompiler && memoryGuard)
1779 struct Expression * exp = stmt->expressions ? (*stmt->expressions).last : (((void *)0));
1781 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "{ ");
1782 if(exp && exp->expType)
1784 char string[1024] = "";
1785 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
1786 struct Declarator * decl;
1787 struct TypeName * typeName;
1789 if(exp->expType->kind == 20)
1791 if(exp->expType->templateParameter->dataTypeString)
1792 decl = SpecDeclFromString(exp->expType->templateParameter->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1793 else if(exp->expType->templateParameter->dataType)
1795 (__ecereNameSpace__ecere__com__eSystem_Delete(specs), specs = 0);
1796 specs = CopyList(exp->expType->templateParameter->dataType->specifiers, CopySpecifier);
1797 decl = PlugDeclarator(exp->expType->templateParameter->dataType->decl, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1801 ListAdd(specs, MkSpecifierName("uint64"));
1802 decl = MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal"));
1807 PrintTypeNoConst(exp->expType, string, exp->expType->kind == 18 ? 0x1 : 0x0, 0x1);
1808 decl = SpecDeclFromString(string, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1810 typeName = MkTypeName(specs, decl);
1811 InstDeclPassTypeName(typeName, 0x0);
1812 OutputTypeName(typeName, f, 0x0);
1813 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ";");
1814 FreeTypeName(typeName);
1818 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "return ");
1821 struct Expression * exp = stmt->expressions ? (*stmt->expressions).last : (((void *)0));
1823 if(exp && exp->expType)
1824 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "__ecereReturnVal = ");
1826 if(stmt->expressions)
1828 for(exp = (*stmt->expressions).first; exp; exp = exp->next)
1830 OutputExpression(exp, f);
1832 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1835 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1836 if(inCompiler && memoryGuard)
1838 struct Expression * exp = stmt->expressions ? (struct Expression *)(*stmt->expressions).last : (((void *)0));
1840 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PopLoc();");
1841 if(exp && exp->expType)
1842 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "return __ecereReturnVal;");
1844 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "return;");
1845 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "}");
1851 struct AsmField * field;
1853 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__asm__ ");
1854 if(stmt->asmStmt.spec)
1855 OutputSpecifier(stmt->asmStmt.spec, f, 0x0);
1856 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1857 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, stmt->asmStmt.statements);
1858 if(stmt->asmStmt.inputFields || stmt->asmStmt.outputFields || stmt->asmStmt.clobberedFields)
1860 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1861 if(stmt->asmStmt.inputFields)
1863 for(field = (*stmt->asmStmt.inputFields).first; field; field = field->next)
1866 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1867 OutputAsmField(field, f);
1871 if(stmt->asmStmt.outputFields || stmt->asmStmt.clobberedFields)
1873 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1874 if(stmt->asmStmt.outputFields)
1876 for(field = (*stmt->asmStmt.outputFields).first; field; field = field->next)
1879 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1880 OutputAsmField(field, f);
1884 if(stmt->asmStmt.clobberedFields)
1886 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1887 for(field = (*stmt->asmStmt.clobberedFields).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);
1894 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ");\n");
1898 if(inCompiler && outputLineNumbers && stmt->loc.start.line)
1900 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", outputLine + 2, origName);
1905 static void OutputPointer(struct Pointer * ptr, struct __ecereNameSpace__ecere__com__Instance * f)
1907 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "*");
1910 struct Specifier * spec;
1912 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1913 for(spec = (*ptr->qualifiers).first; spec; spec = spec->next)
1915 OutputSpecifier(spec, f, 0x0);
1917 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1922 OutputPointer(ptr->pointer, f);
1926 static void OutputAttrib(struct Attrib * attr, struct __ecereNameSpace__ecere__com__Instance * f);
1928 static void OutputExtDecl(struct ExtDecl * extDecl, struct __ecereNameSpace__ecere__com__Instance * f);
1930 extern void ProcessExpressionType(struct Expression * exp);
1932 extern void ComputeExpression(struct Expression * exp);
1934 static void OutputDeclarator(struct Declarator * decl, struct __ecereNameSpace__ecere__com__Instance * f)
1939 if(decl->declarator)
1941 OutputDeclarator(decl->declarator, f);
1943 if(decl->structDecl.exp)
1945 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1946 OutputExpression(decl->structDecl.exp, f);
1948 if(decl->structDecl.posExp)
1950 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1951 OutputExpression(decl->structDecl.posExp, f);
1953 if(decl->structDecl.attrib)
1955 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1956 OutputAttrib(decl->structDecl.attrib, f);
1960 OutputIdentifier(decl->identifier, f);
1963 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1964 OutputDeclarator(decl->declarator, f);
1965 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1968 if(decl->extended.extended)
1969 OutputExtDecl(decl->extended.extended, f);
1970 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1971 OutputDeclarator(decl->declarator, f);
1974 OutputDeclarator(decl->declarator, f);
1975 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1976 if(decl->extended.extended)
1977 OutputExtDecl(decl->extended.extended, f);
1980 if(decl->declarator)
1982 OutputDeclarator(decl->declarator, f);
1984 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1987 ProcessExpressionType(decl->array.exp);
1988 ComputeExpression(decl->array.exp);
1989 OutputExpression(decl->array.exp, f);
1991 else if(decl->array.enumClass)
1993 struct Symbol * _class = decl->array.enumClass->symbol;
1995 if(_class && _class->registered)
1997 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%d", (int)__ecereNameSpace__ecere__com__eClass_GetProperty(_class->registered, "enumSize"));
2000 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
2004 struct TypeName * param;
2006 if(decl->declarator)
2007 OutputDeclarator(decl->declarator, f);
2008 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
2009 if(decl->function.parameters && (*decl->function.parameters).first)
2011 for(param = (*decl->function.parameters).first; param; param = param->next)
2013 OutputTypeName(param, f, 0x0);
2015 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2018 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2022 if(decl->pointer.pointer)
2023 OutputPointer(decl->pointer.pointer, f);
2024 if(decl->declarator)
2026 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2027 OutputDeclarator(decl->declarator, f);
2033 static void OutputEnumerator(struct Enumerator * enumerator, struct __ecereNameSpace__ecere__com__Instance * f)
2035 OutputIdentifier(enumerator->id, f);
2038 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2039 OutputExpression(enumerator->exp, f);
2043 static void OutputAttribute(struct Attribute * attr, struct __ecereNameSpace__ecere__com__Instance * f)
2046 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, attr->attr);
2049 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2050 OutputExpression(attr->exp, f);
2054 static void OutputAttrib(struct Attrib * attr, struct __ecereNameSpace__ecere__com__Instance * f)
2059 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute__((");
2062 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute((");
2065 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute_deprecated__((");
2070 struct Attribute * attrib;
2072 for(attrib = (*attr->attribs).first; attrib; attrib = attrib->next)
2075 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2076 OutputAttribute(attrib, f);
2079 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "))");
2082 static void OutputExtDecl(struct ExtDecl * extDecl, struct __ecereNameSpace__ecere__com__Instance * f)
2084 if(extDecl->type == 0 && extDecl->s)
2085 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, extDecl->s);
2086 else if(extDecl->type == 1)
2087 OutputAttrib(extDecl->attr, f);
2090 extern struct Symbol * FindClass(char * name);
2092 static void OutputClassDef(struct ClassDef * def, struct __ecereNameSpace__ecere__com__Instance * f);
2094 static void OutputSpecifier(struct Specifier * spec, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName)
2099 switch(spec->specifier)
2102 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typedef");
2105 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "extern");
2108 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "static");
2111 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "auto");
2114 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "register");
2117 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "const");
2120 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "volatile");
2123 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "void");
2126 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "char");
2129 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "short");
2132 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "int");
2135 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, typeName ? "uint" : "unsigned int");
2138 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, typeName ? "int64" : "long long");
2141 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__builtin_va_list");
2144 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "long");
2147 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "float");
2150 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "double");
2153 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "signed");
2156 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "unsigned");
2159 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
2162 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "any_object");
2165 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class");
2168 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "thisclass");
2174 OutputExtDecl(spec->extDecl, f);
2177 if(spec->name && !strcmp(spec->name, "class"))
2179 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
2183 struct Symbol * symbol = spec->symbol;
2185 if(!symbol && spec->name)
2186 symbol = FindClass(spec->name);
2189 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, symbol->string ? symbol->string : "(null)");
2192 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, spec->name);
2197 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "enum");
2200 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2201 OutputIdentifier(spec->id, f);
2205 struct Enumerator * enumerator;
2207 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2209 for(enumerator = (*spec->list).first; enumerator; enumerator = enumerator->next)
2211 OutputEnumerator(enumerator, f);
2212 if(enumerator->next)
2213 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2215 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n}");
2223 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, (spec->type == 3) ? "struct" : "union");
2224 if(spec->extDeclStruct)
2226 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2227 OutputExtDecl(spec->extDeclStruct, f);
2231 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2232 OutputIdentifier(spec->id, f);
2234 if(spec->definitions)
2236 struct ClassDef * def;
2238 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2240 for(def = (*spec->definitions).first; def; def = def->next)
2242 OutputClassDef(def, f);
2244 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "} __attribute__ ((gcc_struct))");
2249 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__typeof(");
2250 OutputExpression(spec->expression, f);
2251 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2254 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "subclass(");
2255 OutputSpecifier(spec->_class, f, 0x0);
2256 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2259 OutputIdentifier(spec->templateParameter->identifier, f);
2264 static void OutputInitializer(struct Initializer * initializer, struct __ecereNameSpace__ecere__com__Instance * f)
2266 char name[274] = "";
2267 char origName[274] = "";
2271 if(yylloc.start.included)
2273 __ecereNameSpace__ecere__sys__PathCat(name, GetIncludeFileFromID((unsigned int)yylloc.start.included));
2277 __ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
2279 __ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
2280 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
2281 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
2283 switch(initializer->type)
2287 struct Initializer * init;
2289 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2291 if(inCompiler && outputLineNumbers && initializer->loc.start.line)
2293 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", initializer->loc.start.line, name);
2296 for(init = (*initializer->list).first; init; init = init->next)
2298 OutputInitializer(init, f);
2300 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2302 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n}");
2303 if(inCompiler && outputLineNumbers && initializer->loc.start.line)
2305 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", initializer->loc.start.line, name);
2312 if(initializer->exp)
2313 OutputExpression(initializer->exp, f);
2318 static void OutputInitDeclarator(struct InitDeclarator * decl, struct __ecereNameSpace__ecere__com__Instance * f)
2320 OutputDeclarator(decl->declarator, f);
2321 if(decl->initializer)
2323 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2324 OutputInitializer(decl->initializer, f);
2328 static void OutputDeclaration(struct Declaration * decl, struct __ecereNameSpace__ecere__com__Instance * f)
2330 struct Specifier * spec;
2331 char origName[274] = "";
2337 struct InitDeclarator * d;
2341 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
2342 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
2344 if(decl->declarators && (*decl->declarators).first)
2346 for(d = (*decl->declarators).first; d; d = d->next)
2349 char name[274] = "";
2351 if(yylloc.start.included)
2353 __ecereNameSpace__ecere__sys__PathCat(name, GetIncludeFileFromID((unsigned int)yylloc.start.included));
2357 __ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
2359 __ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
2360 if(inCompiler && outputLineNumbers && decl->loc.start.line)
2362 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", decl->loc.start.line, name);
2368 if(decl->specifiers)
2370 unsigned int inTypeDef = 0x0;
2372 for(spec = (*decl->specifiers).first; spec; spec = spec->next)
2374 if(spec->type == 0 && spec->specifier == TYPEDEF)
2376 OutputSpecifier(spec, f, inTypeDef && !spec->next);
2378 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2381 if(decl->declarators && (*decl->declarators).first)
2383 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2384 for(d = (*decl->declarators).first; d; d = d->next)
2386 OutputInitDeclarator(d, f);
2388 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2395 if(decl->specifiers)
2397 for(spec = (*decl->specifiers).first; spec; spec = spec->next)
2399 OutputSpecifier(spec, f, 0x0);
2401 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2404 if(decl->declarators)
2406 struct Declarator * d;
2408 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2409 for(d = (*decl->declarators).first; d; d = d->next)
2411 OutputDeclarator(d, f);
2413 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2416 if(decl->extStorage)
2418 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2419 OutputSpecifier(decl->extStorage, f, 0x0);
2426 OutputInstance(decl->inst, f);
2432 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n");
2434 if(inCompiler && outputLineNumbers && decl->loc.start.line && decl->type == 1)
2436 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", outputLine + 2, origName);
2441 static struct FunctionDefinition * curFunction;
2443 extern struct Identifier * GetDeclId(struct Declarator * decl);
2445 static void OutputFunction(struct FunctionDefinition * func, struct __ecereNameSpace__ecere__com__Instance * f)
2447 struct FunctionDefinition * oldFunc = curFunction;
2450 if(func->specifiers)
2452 struct Specifier * spec;
2454 for(spec = (*func->specifiers).first; spec; spec = spec->next)
2456 OutputSpecifier(spec, f, 0x0);
2458 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2460 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2462 if(func->declarator)
2463 OutputDeclarator(func->declarator, f);
2464 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2466 if(func->declarations)
2468 struct Declaration * decl;
2470 for(decl = (*func->declarations).first; decl; decl = decl->next)
2472 OutputDeclaration(decl, f);
2474 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2479 if(inCompiler && memoryGuard)
2481 char name[1024] = "";
2482 struct Identifier * id = GetDeclId(func->declarator);
2484 if(yylloc.start.included)
2486 __ecereNameSpace__ecere__sys__PathCat(name, GetIncludeFileFromID((unsigned int)yylloc.start.included));
2490 __ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
2492 __ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
2493 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "{\n");
2494 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PushLoc(\"%s:%s\");\n", name, id->string);
2497 OutputStatement(func->body, f);
2498 if(inCompiler && memoryGuard)
2500 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PopLoc();\n");
2501 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "}\n");
2504 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2507 curFunction = oldFunc;
2510 static void OutputMemberInit(struct MemberInit * init, struct __ecereNameSpace__ecere__com__Instance * f)
2512 if(init->identifiers)
2514 if((*init->identifiers).count > 1)
2516 struct Identifier * id;
2518 for(id = (*init->identifiers).first; id; id = id->next)
2520 OutputIdentifier(id, f);
2522 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ".");
2525 else if((*init->identifiers).first)
2526 OutputIdentifier((*init->identifiers).first, f);
2527 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2529 if(init->initializer)
2530 OutputInitializer(init->initializer, f);
2533 static void OutputClassFunction(struct ClassFunction * func, struct __ecereNameSpace__ecere__com__Instance * f);
2535 static void OutputMembersInit(struct MembersInit * init, struct __ecereNameSpace__ecere__com__Instance * f)
2541 struct MemberInit * member;
2543 if(init->dataMembers)
2545 for(member = (*init->dataMembers).first; member; member = member->next)
2547 OutputMemberInit(member, f);
2549 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2555 OutputClassFunction(init->function, f);
2560 static void OutputInstance(struct Instantiation * inst, struct __ecereNameSpace__ecere__com__Instance * f)
2563 OutputSpecifier(inst->_class, f, 0x0);
2566 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2567 OutputExpression(inst->exp, f);
2569 if(inst->members && (*inst->members).count > 1)
2571 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2574 else if(inst->members)
2575 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " { ");
2577 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "{");
2580 struct MembersInit * init;
2582 for(init = (*inst->members).first; init; init = init->next)
2584 OutputMembersInit(init, f);
2585 if(init->type == 0 && init->next)
2587 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n");
2593 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " }");
2595 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}");
2598 static void OutputClassFunction(struct ClassFunction * func, struct __ecereNameSpace__ecere__com__Instance * f)
2600 if(func->specifiers)
2602 struct Specifier * spec;
2604 for(spec = (*func->specifiers).first; spec; spec = spec->next)
2606 OutputSpecifier(spec, f, 0x0);
2608 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2610 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2612 if(func->declarator)
2613 OutputDeclarator(func->declarator, f);
2614 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2616 if(func->declarations)
2618 struct Declaration * decl;
2620 for(decl = (*func->declarations).first; decl; decl = decl->next)
2622 OutputDeclaration(decl, f);
2624 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2629 OutputStatement(func->body, f);
2630 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2634 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
2637 static void OutputClassDef(struct ClassDef * def, struct __ecereNameSpace__ecere__com__Instance * f)
2644 OutputDeclaration(def->decl, f);
2645 if(def->next && def->next->type != 2)
2647 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2654 struct MemberInit * init;
2656 for(init = (*def->defProperties).first; init; init = init->next)
2658 OutputMemberInit(init, f);
2660 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2662 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n\n");
2667 OutputClassFunction(def->function, f);
2668 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2674 static void OutputClass(struct ClassDefinition * _class, struct __ecereNameSpace__ecere__com__Instance * f)
2676 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class ");
2677 OutputSpecifier(_class->_class, f, 0x0);
2678 if(_class->baseSpecs)
2680 struct Specifier * spec;
2682 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
2683 for(spec = (*_class->baseSpecs).first; spec; spec = spec->next)
2685 OutputSpecifier(spec, f, 0x0);
2688 if(_class->definitions)
2690 struct ClassDef * def;
2692 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2694 for(def = (*_class->definitions).first; def; def = def->next)
2696 OutputClassDef(def, f);
2698 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}\n");
2702 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
2705 void OutputTree(struct __ecereNameSpace__ecere__sys__OldList * ast, struct __ecereNameSpace__ecere__com__Instance * f)
2707 struct External * external;
2710 for(external = ast->first; external; external = external->next)
2712 switch(external->type)
2715 OutputFunction(external->function, f);
2716 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2720 OutputDeclaration(external->declaration, f);
2721 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2725 OutputClass(external->_class, f);
2726 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2733 extern char * __ecereNameSpace__ecere__sys__TrimRSpaces(char * string, char * output);
2735 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
2737 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
2739 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize;
2741 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
2743 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
2745 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
2747 char * StringFromSpecDecl(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl)
2750 struct TypeName * typeName = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
2751 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
2754 typeName->qualifiers = specs;
2755 typeName->declarator = decl;
2756 OutputTypeName(typeName, f, 0x1);
2757 ((typeName ? (__ecereClass_TypeName->Destructor ? __ecereClass_TypeName->Destructor(typeName) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(typeName)) : 0), typeName = 0);
2758 size = ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize])(f);
2759 string = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (size + 1));
2760 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(f, 0, 0);
2761 ((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);
2762 string[size] = '\0';
2763 __ecereNameSpace__ecere__sys__TrimRSpaces(string, string);
2764 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
2768 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
2770 struct __ecereNameSpace__ecere__com__GlobalFunction;
2772 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);
2774 void __ecereRegisterModule_output(struct __ecereNameSpace__ecere__com__Instance * module)
2776 struct __ecereNameSpace__ecere__com__Class * class;
2778 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetMemoryGuard", "void SetMemoryGuard(bool b)", SetMemoryGuard, module, 1);
2779 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetMemoryGuard", "bool GetMemoryGuard(void)", GetMemoryGuard, module, 1);
2780 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputTypeName", "void OutputTypeName(TypeName type, ecere::sys::File f, bool typeName)", OutputTypeName, module, 1);
2781 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputExpression", "void OutputExpression(Expression exp, ecere::sys::File f)", OutputExpression, module, 1);
2782 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputTree", "void OutputTree(ecere::sys::OldList ast, ecere::sys::File f)", OutputTree, module, 1);
2783 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("StringFromSpecDecl", "char * StringFromSpecDecl(ecere::sys::OldList specs, Declarator decl)", StringFromSpecDecl, module, 1);
2786 void __ecereUnregisterModule_output(struct __ecereNameSpace__ecere__com__Instance * module)