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));
753 unsigned int isSigned;
755 unsigned int constant;
762 unsigned int byReference;
763 unsigned int extraParam;
765 unsigned int directClassAccess;
766 unsigned int computing;
767 unsigned int dllExport;
769 unsigned int keepCast;
770 unsigned int passAsTemplate;
772 } __attribute__ ((gcc_struct));
774 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
776 struct __ecereNameSpace__ecere__com__Class
778 struct __ecereNameSpace__ecere__com__Class * prev;
779 struct __ecereNameSpace__ecere__com__Class * next;
785 int (* Constructor)(struct __ecereNameSpace__ecere__com__Instance *);
786 void (* Destructor)(struct __ecereNameSpace__ecere__com__Instance *);
789 struct __ecereNameSpace__ecere__com__Class * base;
790 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
791 struct __ecereNameSpace__ecere__sys__BinaryTree members;
792 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
793 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
794 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
795 struct __ecereNameSpace__ecere__sys__OldList derivatives;
799 struct __ecereNameSpace__ecere__com__Instance * module;
800 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
801 char * dataTypeString;
802 struct Type * dataType;
804 int defaultAlignment;
805 void (* Initialize)();
807 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
808 char * designerClass;
809 unsigned int noExpansion;
810 char * defaultProperty;
811 unsigned int comRedefinition;
813 unsigned int isRemote;
814 unsigned int internalDecl;
816 unsigned int computeSize;
818 int destructionWatchOffset;
820 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
821 int inheritanceAccess;
824 struct __ecereNameSpace__ecere__sys__OldList conversions;
825 struct __ecereNameSpace__ecere__sys__OldList templateParams;
826 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
827 struct __ecereNameSpace__ecere__com__Class * templateClass;
828 struct __ecereNameSpace__ecere__sys__OldList templatized;
830 } __attribute__ ((gcc_struct));
832 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, char * name);
834 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
836 struct __ecereNameSpace__ecere__com__Instance
839 struct __ecereNameSpace__ecere__com__Class * _class;
841 } __attribute__ ((gcc_struct));
843 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
845 struct __ecereNameSpace__ecere__com__DataMember
847 struct __ecereNameSpace__ecere__com__DataMember * prev;
848 struct __ecereNameSpace__ecere__com__DataMember * next;
850 unsigned int isProperty;
853 struct __ecereNameSpace__ecere__com__Class * _class;
854 char * dataTypeString;
855 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
856 struct Type * dataType;
860 struct __ecereNameSpace__ecere__sys__OldList members;
861 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
864 } __attribute__ ((gcc_struct));
866 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
868 struct __ecereNameSpace__ecere__com__SerialBuffer
870 unsigned char * _buffer;
874 } __attribute__ ((gcc_struct));
876 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
878 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
884 char * dataTypeString;
885 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
886 } __attribute__ ((gcc_struct));
887 struct __ecereNameSpace__ecere__com__DataValue expression;
893 struct __ecereNameSpace__ecere__com__DataMember * member;
894 struct __ecereNameSpace__ecere__com__Property * prop;
895 struct __ecereNameSpace__ecere__com__Method * method;
896 } __attribute__ ((gcc_struct));
897 } __attribute__ ((gcc_struct));
898 } __attribute__ ((gcc_struct));
899 } __attribute__ ((gcc_struct));
903 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
906 typedef union YYSTYPE
911 struct Identifier * id;
912 struct Expression * exp;
913 struct Specifier * specifier;
914 struct __ecereNameSpace__ecere__sys__OldList * list;
915 struct Enumerator * enumerator;
916 struct Declarator * declarator;
917 struct Pointer * pointer;
918 struct Initializer * initializer;
919 struct InitDeclarator * initDeclarator;
920 struct TypeName * typeName;
921 struct Declaration * declaration;
922 struct Statement * stmt;
923 struct FunctionDefinition * function;
924 struct External * external;
925 struct Context * context;
926 struct AsmField * asmField;
927 struct Attrib * attrib;
928 struct ExtDecl * extDecl;
929 struct Attribute * attribute;
930 struct Instantiation * instance;
931 struct MembersInit * membersInit;
932 struct MemberInit * memberInit;
933 struct ClassFunction * classFunction;
934 struct ClassDefinition * _class;
935 struct ClassDef * classDef;
936 struct PropertyDef * prop;
938 struct Symbol * symbol;
939 struct PropertyWatch * propertyWatch;
940 struct TemplateParameter * templateParameter;
941 struct TemplateArgument * templateArgument;
942 struct TemplateDatatype * templateDatatype;
943 struct DBTableEntry * dbtableEntry;
944 struct DBIndexItem * dbindexItem;
945 struct DBTableDef * dbtableDef;
946 } __attribute__ ((gcc_struct)) YYSTYPE;
948 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Enumerator;
952 struct Enumerator * prev;
953 struct Enumerator * next;
955 struct Identifier * id;
956 struct Expression * exp;
957 } __attribute__ ((gcc_struct));
959 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_InitDeclarator;
961 struct InitDeclarator
963 struct InitDeclarator * prev;
964 struct InitDeclarator * next;
966 struct Declarator * declarator;
967 struct Initializer * initializer;
968 } __attribute__ ((gcc_struct));
970 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_AsmField;
974 struct AsmField * prev;
975 struct AsmField * next;
978 struct Expression * expression;
979 } __attribute__ ((gcc_struct));
981 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attribute;
985 struct Attribute * prev;
986 struct Attribute * next;
989 struct Expression * exp;
990 } __attribute__ ((gcc_struct));
992 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassFunction;
996 struct ClassFunction * prev;
997 struct ClassFunction * next;
999 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1000 struct Declarator * declarator;
1001 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1002 struct Statement * body;
1003 struct __ecereNameSpace__ecere__com__Class * _class;
1004 struct __ecereNameSpace__ecere__sys__OldList attached;
1007 struct Symbol * propSet;
1008 unsigned int isVirtual;
1009 unsigned int isConstructor;
1010 unsigned int isDestructor;
1011 unsigned int dontMangle;
1014 } __attribute__ ((gcc_struct));
1016 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MembersInit;
1020 struct MembersInit * prev;
1021 struct MembersInit * next;
1022 struct Location loc;
1026 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1027 struct ClassFunction * function;
1028 } __attribute__ ((gcc_struct));
1029 } __attribute__ ((gcc_struct));
1031 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MemberInit;
1035 struct MemberInit * prev;
1036 struct MemberInit * next;
1037 struct Location loc;
1038 struct Location realLoc;
1039 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
1040 struct Initializer * initializer;
1042 unsigned int variable;
1043 unsigned int takeOutExp;
1044 } __attribute__ ((gcc_struct));
1046 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyDef;
1050 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyWatch;
1052 struct PropertyWatch;
1054 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDef;
1058 struct ClassDef * prev;
1059 struct ClassDef * next;
1060 struct Location loc;
1064 struct Declaration * decl;
1065 struct ClassFunction * function;
1066 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
1067 struct PropertyDef * propertyDef;
1068 struct PropertyWatch * propertyWatch;
1070 struct Identifier * defaultProperty;
1073 struct Identifier * id;
1074 struct Initializer * initializer;
1075 } __attribute__ ((gcc_struct));
1076 } __attribute__ ((gcc_struct));
1079 } __attribute__ ((gcc_struct));
1081 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableEntry;
1083 struct DBTableEntry;
1085 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBIndexItem;
1089 extern YYSTYPE yylval;
1091 extern struct Location yylloc;
1095 unsigned int memoryGuard = 0x0;
1097 void SetMemoryGuard(unsigned int b)
1102 unsigned int GetMemoryGuard()
1107 extern int strcmp(const char * , const char * );
1109 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts;
1111 static void OutputIdentifier(struct Identifier * id, struct __ecereNameSpace__ecere__com__Instance * f)
1117 if(id->_class->type == 8)
1119 if(id->_class->templateParameter && id->_class->templateParameter->identifier && id->_class->templateParameter->identifier->string)
1120 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, id->_class->templateParameter->identifier->string);
1124 if(id->_class->name)
1126 if(!strcmp(id->_class->name, "class"))
1127 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
1129 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, id->_class->name);
1132 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "::");
1135 ((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)");
1138 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc;
1140 static void OutputOperator(int op, struct __ecereNameSpace__ecere__com__Instance * f)
1145 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "++");
1148 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "--");
1151 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "sizeof ");
1154 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<<");
1157 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">>");
1160 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<=");
1163 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">=");
1166 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "==");
1169 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "!=");
1172 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "&&");
1175 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "||");
1178 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "*=");
1181 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "/=");
1184 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "%=");
1187 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "+=");
1190 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "-=");
1193 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<<=");
1196 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">>=");
1199 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "&=");
1202 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "^=");
1205 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "|=");
1220 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, char ch))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc])(f, (char)op);
1223 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "delete ");
1228 static void OutputSpecifier(struct Specifier * spec, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName);
1230 static void OutputDeclarator(struct Declarator * decl, struct __ecereNameSpace__ecere__com__Instance * f);
1232 void OutputTypeName(struct TypeName * type, struct __ecereNameSpace__ecere__com__Instance * f)
1234 if(type->qualifiers)
1236 struct Specifier * spec;
1238 for(spec = (*type->qualifiers).first; spec; spec = spec->next)
1240 OutputSpecifier(spec, f, 0x0);
1242 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1245 if(type->declarator)
1247 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1248 OutputDeclarator(type->declarator, f);
1250 if(!type->qualifiers && !type->declarator)
1251 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "...");
1254 static void OutputStatement(struct Statement * stmt, struct __ecereNameSpace__ecere__com__Instance * f);
1256 static void OutputInstance(struct Instantiation * inst, struct __ecereNameSpace__ecere__com__Instance * f);
1258 extern int printf(char * , ...);
1260 static void OutputInitializer(struct Initializer * initializer, struct __ecereNameSpace__ecere__com__Instance * f);
1262 void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f)
1267 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class(");
1268 if(exp->_classExp.specifiers)
1270 struct Specifier * spec;
1272 for(spec = (*exp->_classExp.specifiers).first; spec; spec = spec->next)
1274 OutputSpecifier(spec, f, 0x0);
1276 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1278 if(exp->_classExp.decl)
1280 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1281 OutputDeclarator(exp->_classExp.decl, f);
1283 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1287 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1288 OutputStatement(exp->compound, f);
1289 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1292 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "new ");
1293 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1294 OutputTypeName(exp->_renew.typeName, f);
1295 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1296 OutputExpression(exp->_renew.size, f);
1297 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1300 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "new0 ");
1301 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1302 OutputTypeName(exp->_renew.typeName, f);
1303 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1304 OutputExpression(exp->_renew.size, f);
1305 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1308 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "renew ");
1309 OutputExpression(exp->_renew.exp, f);
1310 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1311 OutputTypeName(exp->_renew.typeName, f);
1312 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1313 OutputExpression(exp->_renew.size, f);
1314 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1317 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "renew0 ");
1318 OutputExpression(exp->_renew.exp, f);
1319 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1320 OutputTypeName(exp->_renew.typeName, f);
1321 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1322 OutputExpression(exp->_renew.size, f);
1323 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1327 OutputIdentifier(exp->identifier, f);
1331 OutputInstance(exp->instance, f);
1335 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, exp->constant);
1341 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, exp->string);
1346 OutputExpression(exp->op.exp1, f);
1348 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1350 OutputOperator(exp->op.op, f);
1353 if(exp->op.exp1 || (exp->op.exp2->type == 4 && !exp->op.exp2->op.exp1 && exp->op.exp2->op.op == exp->op.op))
1354 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1355 OutputExpression(exp->op.exp2, f);
1361 struct Expression * expression;
1364 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1365 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1368 for(expression = (*exp->list).first; expression; expression = expression->next)
1370 OutputExpression(expression, f);
1371 if(expression->next)
1372 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1375 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1380 struct Expression * expression;
1383 OutputExpression(exp->index.exp, f);
1384 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1385 if(exp->index.index)
1386 for(expression = (*exp->index.index).first; expression; expression = expression->next)
1388 OutputExpression(expression, f);
1389 if(expression->next)
1390 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1392 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1397 OutputExpression(exp->call.exp, f);
1398 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1399 if(exp->call.arguments)
1401 struct Expression * expression;
1403 for(expression = (*exp->call.arguments).first; expression; expression = expression->next)
1405 OutputExpression(expression, f);
1406 if(expression->next)
1407 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1410 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1415 OutputExpression(exp->member.exp, f);
1416 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ".");
1417 if(exp->member.member)
1418 OutputIdentifier(exp->member.member, f);
1421 OutputExpression(exp->member.exp, f);
1422 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "->");
1423 OutputIdentifier(exp->member.member, f);
1426 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "sizeof(");
1427 OutputTypeName(exp->typeName, f);
1428 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1431 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__alignof__(");
1432 OutputTypeName(exp->typeName, f);
1433 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1436 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1437 if(exp->initializer.typeName)
1438 OutputTypeName(exp->initializer.typeName, f);
1439 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1440 if(exp->initializer.initializer)
1441 OutputInitializer(exp->initializer.initializer, f);
1444 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1445 OutputTypeName(exp->cast.typeName, f);
1446 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1448 OutputExpression(exp->cast.exp, f);
1451 OutputExpression(exp->cond.cond, f);
1452 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ? ");
1454 struct Expression * expression;
1456 for(expression = (*exp->cond.exp).first; expression; expression = expression->next)
1458 OutputExpression(expression, f);
1459 if(expression->next)
1460 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1463 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1464 OutputExpression(exp->cond.elseExp, f);
1467 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__builtin_va_arg(");
1468 OutputExpression(exp->vaArg.exp, f);
1469 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1470 OutputTypeName(exp->vaArg.typeName, f);
1471 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1474 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1477 struct Expression * expression;
1479 for(expression = (*exp->list).first; expression; expression = expression->next)
1481 OutputExpression(expression, f);
1482 if(expression->next)
1483 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1486 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1491 static void OutputAsmField(struct AsmField * field, struct __ecereNameSpace__ecere__com__Instance * f)
1493 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, field->command);
1494 if(field->expression)
1496 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1497 OutputExpression(field->expression, f);
1498 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1502 extern unsigned int inCompiler;
1504 extern char * __ecereNameSpace__ecere__sys__PathCat(char * string, char * addedPath);
1506 extern char * GetIncludeFileFromID(int id);
1508 extern char * sourceFile;
1510 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
1512 extern char * outputFile;
1514 extern unsigned int outputLineNumbers;
1516 static void OutputDeclaration(struct Declaration * decl, struct __ecereNameSpace__ecere__com__Instance * f);
1518 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
1520 extern struct Declarator * SpecDeclFromString(char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
1522 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
1524 extern struct Identifier * MkIdentifier(char * string);
1526 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* )(void * ));
1528 extern struct Specifier * CopySpecifier(struct Specifier * spec);
1530 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
1532 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
1534 extern struct Specifier * MkSpecifierName(char * name);
1536 extern void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
1538 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
1540 extern void InstDeclPassTypeName(struct TypeName * type, unsigned int param);
1542 extern void FreeTypeName(struct TypeName * typeName);
1544 int __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(struct __ecereNameSpace__ecere__com__Instance * this, char * format, ...);
1546 static void OutputStatement(struct Statement * stmt, struct __ecereNameSpace__ecere__com__Instance * f)
1548 char name[274] = "";
1549 char origName[274] = "";
1553 if(yylloc.start.included)
1555 __ecereNameSpace__ecere__sys__PathCat(name, GetIncludeFileFromID((unsigned int)yylloc.start.included));
1559 __ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
1561 __ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
1562 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
1563 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
1565 if(inCompiler && outputLineNumbers && stmt->loc.start.line)
1567 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.start.line, name);
1573 OutputIdentifier(stmt->labeled.id, f);
1574 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":\n");
1576 OutputStatement(stmt->labeled.stmt, f);
1579 if(stmt->caseStmt.exp)
1581 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "case ");
1582 OutputExpression(stmt->caseStmt.exp, f);
1583 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":\n");
1588 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "default:\n");
1591 if(stmt->caseStmt.stmt)
1592 OutputStatement(stmt->caseStmt.stmt, f);
1596 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "{\n");
1598 if(stmt->compound.declarations)
1600 struct Declaration * decl;
1602 for(decl = (*stmt->compound.declarations).first; decl; decl = decl->next)
1604 OutputDeclaration(decl, f);
1607 if(stmt->compound.statements)
1609 struct Statement * statement;
1611 if(stmt->compound.declarations)
1613 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1616 for(statement = (*stmt->compound.statements).first; statement; statement = statement->next)
1618 OutputStatement(statement, f);
1619 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1623 if(inCompiler && outputLineNumbers && stmt->loc.end.line)
1625 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.end.line, name);
1628 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}");
1633 if(stmt->expressions)
1635 struct Expression * exp;
1637 for(exp = (*stmt->expressions).first; exp; exp = exp->next)
1639 OutputExpression(exp, f);
1641 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1644 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1649 struct Expression * exp;
1651 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "if(");
1652 for(exp = (*stmt->ifStmt.exp).first; exp; exp = exp->next)
1654 OutputExpression(exp, f);
1656 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1658 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1660 if(stmt->ifStmt.stmt)
1661 OutputStatement(stmt->ifStmt.stmt, f);
1662 if(stmt->ifStmt.elseStmt)
1664 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1666 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "else");
1667 if(stmt->ifStmt.elseStmt->type != 4)
1669 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1673 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1674 OutputStatement(stmt->ifStmt.elseStmt, f);
1680 struct Expression * exp;
1682 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "switch(");
1683 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1685 OutputExpression(exp, f);
1687 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1689 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1691 OutputStatement(stmt->switchStmt.stmt, f);
1696 struct Expression * exp;
1698 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "while(");
1699 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1701 OutputExpression(exp, f);
1703 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1705 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1707 OutputStatement(stmt->whileStmt.stmt, f);
1712 struct Expression * exp;
1714 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "do\n");
1716 OutputStatement(stmt->whileStmt.stmt, f);
1717 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "while(");
1718 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1720 OutputExpression(exp, f);
1722 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1724 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ");");
1729 struct Expression * exp;
1731 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "for(");
1732 OutputStatement(stmt->forStmt.init, f);
1733 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1734 OutputStatement(stmt->forStmt.check, f);
1735 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1736 if(stmt->forStmt.increment)
1738 if(inCompiler && outputLineNumbers && stmt->loc.end.line)
1740 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.end.line, name);
1743 for(exp = (*stmt->forStmt.increment).first; exp; exp = exp->next)
1745 OutputExpression(exp, f);
1747 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1750 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1752 OutputStatement(stmt->forStmt.stmt, f);
1757 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "goto ");
1758 OutputIdentifier(stmt->gotoStmt.id, f);
1759 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1763 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "continue;");
1766 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "break;");
1770 struct Expression * exp;
1772 if(inCompiler && memoryGuard)
1774 struct Expression * exp = stmt->expressions ? (*stmt->expressions).last : (((void *)0));
1776 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "{ ");
1777 if(exp && exp->expType)
1779 char string[1024] = "";
1780 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
1781 struct Declarator * decl;
1782 struct TypeName * typeName;
1784 if(exp->expType->kind == 20)
1786 if(exp->expType->templateParameter->dataTypeString)
1787 decl = SpecDeclFromString(exp->expType->templateParameter->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1788 else if(exp->expType->templateParameter->dataType)
1790 (__ecereNameSpace__ecere__com__eSystem_Delete(specs), specs = 0);
1791 specs = CopyList(exp->expType->templateParameter->dataType->specifiers, CopySpecifier);
1792 decl = PlugDeclarator(exp->expType->templateParameter->dataType->decl, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1796 ListAdd(specs, MkSpecifierName("uint64"));
1797 decl = MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal"));
1802 PrintType(exp->expType, string, 0x1, 0x1);
1803 decl = SpecDeclFromString(string, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1805 typeName = MkTypeName(specs, decl);
1806 InstDeclPassTypeName(typeName, 0x0);
1807 OutputTypeName(typeName, f);
1808 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ";");
1809 FreeTypeName(typeName);
1813 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "return ");
1816 struct Expression * exp = stmt->expressions ? (*stmt->expressions).last : (((void *)0));
1818 if(exp && exp->expType)
1819 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "__ecereReturnVal = ");
1821 if(stmt->expressions)
1823 for(exp = (*stmt->expressions).first; exp; exp = exp->next)
1825 OutputExpression(exp, f);
1827 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1830 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1831 if(inCompiler && memoryGuard)
1833 struct Expression * exp = stmt->expressions ? (struct Expression *)(*stmt->expressions).last : (((void *)0));
1835 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PopLoc();");
1836 if(exp && exp->expType)
1837 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "return __ecereReturnVal;");
1839 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "return;");
1840 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "}");
1846 struct AsmField * field;
1848 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__asm__ ");
1849 if(stmt->asmStmt.spec)
1850 OutputSpecifier(stmt->asmStmt.spec, f, 0x0);
1851 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1852 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, stmt->asmStmt.statements);
1853 if(stmt->asmStmt.inputFields || stmt->asmStmt.outputFields || stmt->asmStmt.clobberedFields)
1855 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1856 if(stmt->asmStmt.inputFields)
1858 for(field = (*stmt->asmStmt.inputFields).first; field; field = field->next)
1861 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1862 OutputAsmField(field, f);
1866 if(stmt->asmStmt.outputFields || stmt->asmStmt.clobberedFields)
1868 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1869 if(stmt->asmStmt.outputFields)
1871 for(field = (*stmt->asmStmt.outputFields).first; field; field = field->next)
1874 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1875 OutputAsmField(field, f);
1879 if(stmt->asmStmt.clobberedFields)
1881 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1882 for(field = (*stmt->asmStmt.clobberedFields).first; field; field = field->next)
1885 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1886 OutputAsmField(field, f);
1889 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ");\n");
1893 if(inCompiler && outputLineNumbers && stmt->loc.start.line)
1895 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", outputLine + 2, origName);
1900 static void OutputPointer(struct Pointer * ptr, struct __ecereNameSpace__ecere__com__Instance * f)
1902 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "*");
1905 struct Specifier * spec;
1907 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1908 for(spec = (*ptr->qualifiers).first; spec; spec = spec->next)
1910 OutputSpecifier(spec, f, 0x0);
1912 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1917 OutputPointer(ptr->pointer, f);
1921 static void OutputAttrib(struct Attrib * attr, struct __ecereNameSpace__ecere__com__Instance * f);
1923 static void OutputExtDecl(struct ExtDecl * extDecl, struct __ecereNameSpace__ecere__com__Instance * f);
1925 extern void ProcessExpressionType(struct Expression * exp);
1927 extern void ComputeExpression(struct Expression * exp);
1929 static void OutputDeclarator(struct Declarator * decl, struct __ecereNameSpace__ecere__com__Instance * f)
1934 if(decl->declarator)
1936 OutputDeclarator(decl->declarator, f);
1938 if(decl->structDecl.exp)
1940 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1941 OutputExpression(decl->structDecl.exp, f);
1943 if(decl->structDecl.posExp)
1945 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1946 OutputExpression(decl->structDecl.posExp, f);
1948 if(decl->structDecl.attrib)
1950 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1951 OutputAttrib(decl->structDecl.attrib, f);
1955 OutputIdentifier(decl->identifier, f);
1958 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1959 OutputDeclarator(decl->declarator, f);
1960 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1963 if(decl->extended.extended)
1964 OutputExtDecl(decl->extended.extended, f);
1965 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1966 OutputDeclarator(decl->declarator, f);
1969 OutputDeclarator(decl->declarator, f);
1970 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1971 if(decl->extended.extended)
1972 OutputExtDecl(decl->extended.extended, f);
1975 if(decl->declarator)
1977 OutputDeclarator(decl->declarator, f);
1979 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1982 ProcessExpressionType(decl->array.exp);
1983 ComputeExpression(decl->array.exp);
1984 OutputExpression(decl->array.exp, f);
1986 else if(decl->array.enumClass)
1988 struct Symbol * _class = decl->array.enumClass->symbol;
1990 if(_class && _class->registered)
1992 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%d", __ecereNameSpace__ecere__com__eClass_GetProperty(_class->registered, "enumSize"));
1995 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1999 struct TypeName * param;
2001 if(decl->declarator)
2002 OutputDeclarator(decl->declarator, f);
2003 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
2004 if(decl->function.parameters && (*decl->function.parameters).first)
2006 for(param = (*decl->function.parameters).first; param; param = param->next)
2008 OutputTypeName(param, f);
2010 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2013 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2017 if(decl->pointer.pointer)
2018 OutputPointer(decl->pointer.pointer, f);
2019 if(decl->declarator)
2021 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2022 OutputDeclarator(decl->declarator, f);
2028 static void OutputEnumerator(struct Enumerator * enumerator, struct __ecereNameSpace__ecere__com__Instance * f)
2030 OutputIdentifier(enumerator->id, f);
2033 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2034 OutputExpression(enumerator->exp, f);
2038 static void OutputAttribute(struct Attribute * attr, struct __ecereNameSpace__ecere__com__Instance * f)
2041 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, attr->attr);
2044 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2045 OutputExpression(attr->exp, f);
2049 static void OutputAttrib(struct Attrib * attr, struct __ecereNameSpace__ecere__com__Instance * f)
2054 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute__((");
2057 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute((");
2060 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute_deprecated__((");
2065 struct Attribute * attrib;
2067 for(attrib = (*attr->attribs).first; attrib; attrib = attrib->next)
2070 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2071 OutputAttribute(attrib, f);
2074 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "))");
2077 static void OutputExtDecl(struct ExtDecl * extDecl, struct __ecereNameSpace__ecere__com__Instance * f)
2079 if(extDecl->type == 0 && extDecl->s)
2080 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, extDecl->s);
2081 else if(extDecl->type == 1)
2082 OutputAttrib(extDecl->attr, f);
2085 extern struct Symbol * FindClass(char * name);
2087 static void OutputClassDef(struct ClassDef * def, struct __ecereNameSpace__ecere__com__Instance * f);
2089 static void OutputSpecifier(struct Specifier * spec, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName)
2094 switch(spec->specifier)
2097 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typedef");
2100 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "extern");
2103 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "static");
2106 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "auto");
2109 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "register");
2112 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "const");
2115 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "volatile");
2118 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "void");
2121 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "char");
2124 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "short");
2127 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "int");
2130 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, typeName ? "uint" : "unsigned int");
2133 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, typeName ? "int64" : "long long");
2136 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__builtin_va_list");
2139 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "long");
2142 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "float");
2145 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "double");
2148 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "signed");
2151 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "unsigned");
2154 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
2157 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "any_object");
2160 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class");
2163 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "thisclass");
2169 OutputExtDecl(spec->extDecl, f);
2172 if(spec->name && !strcmp(spec->name, "class"))
2174 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
2178 struct Symbol * symbol = spec->symbol;
2180 if(!symbol && spec->name)
2181 symbol = FindClass(spec->name);
2184 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, symbol->string ? symbol->string : "(null)");
2187 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, spec->name);
2192 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "enum");
2195 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2196 OutputIdentifier(spec->id, f);
2200 struct Enumerator * enumerator;
2202 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2204 for(enumerator = (*spec->list).first; enumerator; enumerator = enumerator->next)
2206 OutputEnumerator(enumerator, f);
2207 if(enumerator->next)
2208 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2210 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n}");
2218 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, (spec->type == 3) ? "struct" : "union");
2219 if(spec->extDeclStruct)
2221 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2222 OutputExtDecl(spec->extDeclStruct, f);
2226 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2227 OutputIdentifier(spec->id, f);
2229 if(spec->definitions)
2231 struct ClassDef * def;
2233 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2235 for(def = (*spec->definitions).first; def; def = def->next)
2237 OutputClassDef(def, f);
2239 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "} __attribute__ ((gcc_struct))");
2244 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__typeof(");
2245 OutputExpression(spec->expression, f);
2246 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2249 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "subclass(");
2250 OutputSpecifier(spec->_class, f, 0x0);
2251 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2254 OutputIdentifier(spec->templateParameter->identifier, f);
2259 static void OutputInitializer(struct Initializer * initializer, struct __ecereNameSpace__ecere__com__Instance * f)
2261 char name[274] = "";
2262 char origName[274] = "";
2266 if(yylloc.start.included)
2268 __ecereNameSpace__ecere__sys__PathCat(name, GetIncludeFileFromID((unsigned int)yylloc.start.included));
2272 __ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
2274 __ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
2275 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
2276 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
2278 switch(initializer->type)
2282 struct Initializer * init;
2284 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2286 if(inCompiler && outputLineNumbers && initializer->loc.start.line)
2288 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", initializer->loc.start.line, name);
2291 for(init = (*initializer->list).first; init; init = init->next)
2293 OutputInitializer(init, f);
2295 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2297 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n}");
2298 if(inCompiler && outputLineNumbers && initializer->loc.start.line)
2300 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", initializer->loc.start.line, name);
2307 if(initializer->exp)
2308 OutputExpression(initializer->exp, f);
2313 static void OutputInitDeclarator(struct InitDeclarator * decl, struct __ecereNameSpace__ecere__com__Instance * f)
2315 OutputDeclarator(decl->declarator, f);
2316 if(decl->initializer)
2318 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2319 OutputInitializer(decl->initializer, f);
2323 static void OutputDeclaration(struct Declaration * decl, struct __ecereNameSpace__ecere__com__Instance * f)
2325 struct Specifier * spec;
2326 char origName[274] = "";
2332 struct InitDeclarator * d;
2336 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
2337 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
2339 if(decl->declarators && (*decl->declarators).first)
2341 for(d = (*decl->declarators).first; d; d = d->next)
2344 char name[274] = "";
2346 if(yylloc.start.included)
2348 __ecereNameSpace__ecere__sys__PathCat(name, GetIncludeFileFromID((unsigned int)yylloc.start.included));
2352 __ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
2354 __ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
2355 if(inCompiler && outputLineNumbers && decl->loc.start.line)
2357 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", decl->loc.start.line, name);
2363 if(decl->specifiers)
2365 unsigned int inTypeDef = 0x0;
2367 for(spec = (*decl->specifiers).first; spec; spec = spec->next)
2369 if(spec->type == 0 && spec->specifier == TYPEDEF)
2371 OutputSpecifier(spec, f, inTypeDef && !spec->next);
2373 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2376 if(decl->declarators && (*decl->declarators).first)
2378 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2379 for(d = (*decl->declarators).first; d; d = d->next)
2381 OutputInitDeclarator(d, f);
2383 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2390 if(decl->specifiers)
2392 for(spec = (*decl->specifiers).first; spec; spec = spec->next)
2394 OutputSpecifier(spec, f, 0x0);
2396 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2399 if(decl->declarators)
2401 struct Declarator * d;
2403 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2404 for(d = (*decl->declarators).first; d; d = d->next)
2406 OutputDeclarator(d, f);
2408 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2411 if(decl->extStorage)
2413 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2414 OutputSpecifier(decl->extStorage, f, 0x0);
2421 OutputInstance(decl->inst, f);
2427 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n");
2429 if(inCompiler && outputLineNumbers && decl->loc.start.line && decl->type == 1)
2431 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", outputLine + 2, origName);
2436 static struct FunctionDefinition * curFunction;
2438 extern struct Identifier * GetDeclId(struct Declarator * decl);
2440 static void OutputFunction(struct FunctionDefinition * func, struct __ecereNameSpace__ecere__com__Instance * f)
2442 struct FunctionDefinition * oldFunc = curFunction;
2445 if(func->specifiers)
2447 struct Specifier * spec;
2449 for(spec = (*func->specifiers).first; spec; spec = spec->next)
2451 OutputSpecifier(spec, f, 0x0);
2453 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2455 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2457 if(func->declarator)
2458 OutputDeclarator(func->declarator, f);
2459 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2461 if(func->declarations)
2463 struct Declaration * decl;
2465 for(decl = (*func->declarations).first; decl; decl = decl->next)
2467 OutputDeclaration(decl, f);
2469 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2474 if(inCompiler && memoryGuard)
2476 char name[1024] = "";
2477 struct Identifier * id = GetDeclId(func->declarator);
2479 if(yylloc.start.included)
2481 __ecereNameSpace__ecere__sys__PathCat(name, GetIncludeFileFromID((unsigned int)yylloc.start.included));
2485 __ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
2487 __ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
2488 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "{\n");
2489 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PushLoc(\"%s:%s\");\n", name, id->string);
2492 OutputStatement(func->body, f);
2493 if(inCompiler && memoryGuard)
2495 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PopLoc();\n");
2496 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "}\n");
2499 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2502 curFunction = oldFunc;
2505 static void OutputMemberInit(struct MemberInit * init, struct __ecereNameSpace__ecere__com__Instance * f)
2507 if(init->identifiers)
2509 if((*init->identifiers).count > 1)
2511 struct Identifier * id;
2513 for(id = (*init->identifiers).first; id; id = id->next)
2515 OutputIdentifier(id, f);
2517 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ".");
2520 else if((*init->identifiers).first)
2521 OutputIdentifier((*init->identifiers).first, f);
2522 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2524 if(init->initializer)
2525 OutputInitializer(init->initializer, f);
2528 static void OutputClassFunction(struct ClassFunction * func, struct __ecereNameSpace__ecere__com__Instance * f);
2530 static void OutputMembersInit(struct MembersInit * init, struct __ecereNameSpace__ecere__com__Instance * f)
2536 struct MemberInit * member;
2538 if(init->dataMembers)
2540 for(member = (*init->dataMembers).first; member; member = member->next)
2542 OutputMemberInit(member, f);
2544 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2550 OutputClassFunction(init->function, f);
2555 static void OutputInstance(struct Instantiation * inst, struct __ecereNameSpace__ecere__com__Instance * f)
2558 OutputSpecifier(inst->_class, f, 0x0);
2561 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2562 OutputExpression(inst->exp, f);
2564 if(inst->members && (*inst->members).count > 1)
2566 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2569 else if(inst->members)
2570 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " { ");
2572 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "{");
2575 struct MembersInit * init;
2577 for(init = (*inst->members).first; init; init = init->next)
2579 OutputMembersInit(init, f);
2580 if(init->type == 0 && init->next)
2582 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n");
2588 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " }");
2590 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}");
2593 static void OutputClassFunction(struct ClassFunction * func, struct __ecereNameSpace__ecere__com__Instance * f)
2595 if(func->specifiers)
2597 struct Specifier * spec;
2599 for(spec = (*func->specifiers).first; spec; spec = spec->next)
2601 OutputSpecifier(spec, f, 0x0);
2603 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2605 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2607 if(func->declarator)
2608 OutputDeclarator(func->declarator, f);
2609 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2611 if(func->declarations)
2613 struct Declaration * decl;
2615 for(decl = (*func->declarations).first; decl; decl = decl->next)
2617 OutputDeclaration(decl, f);
2619 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2624 OutputStatement(func->body, f);
2625 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2629 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
2632 static void OutputClassDef(struct ClassDef * def, struct __ecereNameSpace__ecere__com__Instance * f)
2639 OutputDeclaration(def->decl, f);
2640 if(def->next && def->next->type != 2)
2642 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2649 struct MemberInit * init;
2651 for(init = (*def->defProperties).first; init; init = init->next)
2653 OutputMemberInit(init, f);
2655 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2657 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n\n");
2662 OutputClassFunction(def->function, f);
2663 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2669 static void OutputClass(struct ClassDefinition * _class, struct __ecereNameSpace__ecere__com__Instance * f)
2671 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class ");
2672 OutputSpecifier(_class->_class, f, 0x0);
2673 if(_class->baseSpecs)
2675 struct Specifier * spec;
2677 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
2678 for(spec = (*_class->baseSpecs).first; spec; spec = spec->next)
2680 OutputSpecifier(spec, f, 0x0);
2683 if(_class->definitions)
2685 struct ClassDef * def;
2687 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2689 for(def = (*_class->definitions).first; def; def = def->next)
2691 OutputClassDef(def, f);
2693 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}\n");
2697 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
2700 void OutputTree(struct __ecereNameSpace__ecere__sys__OldList * ast, struct __ecereNameSpace__ecere__com__Instance * f)
2702 struct External * external;
2705 for(external = ast->first; external; external = external->next)
2707 switch(external->type)
2710 OutputFunction(external->function, f);
2711 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2715 OutputDeclaration(external->declaration, f);
2716 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2720 OutputClass(external->_class, f);
2721 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2728 extern char * __ecereNameSpace__ecere__sys__TrimRSpaces(char * string, char * output);
2730 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
2732 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
2734 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize;
2736 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
2738 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
2740 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
2742 char * StringFromSpecDecl(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl)
2745 struct TypeName * typeName = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
2746 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
2749 typeName->qualifiers = specs;
2750 typeName->declarator = decl;
2751 OutputTypeName(typeName, f);
2752 ((typeName ? (__ecereClass_TypeName->Destructor ? __ecereClass_TypeName->Destructor(typeName) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(typeName)) : 0), typeName = 0);
2753 size = ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize])(f);
2754 string = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (size + 1));
2755 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(f, 0, 0);
2756 ((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);
2757 string[size] = '\0';
2758 __ecereNameSpace__ecere__sys__TrimRSpaces(string, string);
2759 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
2763 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
2765 struct __ecereNameSpace__ecere__com__GlobalFunction;
2767 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);
2769 void __ecereRegisterModule_output(struct __ecereNameSpace__ecere__com__Instance * module)
2771 struct __ecereNameSpace__ecere__com__Class * class;
2773 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetMemoryGuard", "void SetMemoryGuard(bool b)", SetMemoryGuard, module, 1);
2774 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetMemoryGuard", "bool GetMemoryGuard(void)", GetMemoryGuard, module, 1);
2775 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputTypeName", "void OutputTypeName(TypeName type, ecere::sys::File f)", OutputTypeName, module, 1);
2776 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputExpression", "void OutputExpression(Expression exp, ecere::sys::File f)", OutputExpression, module, 1);
2777 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputTree", "void OutputTree(ecere::sys::OldList ast, ecere::sys::File f)", OutputTree, module, 1);
2778 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("StringFromSpecDecl", "char * StringFromSpecDecl(ecere::sys::OldList specs, Declarator decl)", StringFromSpecDecl, module, 1);
2781 void __ecereUnregisterModule_output(struct __ecereNameSpace__ecere__com__Instance * module)