Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ooc_tmp/Regexp.c: In function ‘Regexp_construct’:
- ooc_tmp/Regexp.c:206: error: expected expression before ‘RegexpBackend’
- ooc_tmp/Regexp.c:207: warning: unused variable ‘regexpBackend’
- ooc_tmp/Regexp.c:206: warning: unused variable ‘type’
- C compiler failed, aborting compilation process
- /* Regexp header file, generated with ooc */
- #ifndef ___Regexp__
- #define ___Regexp__
- struct _RegexpBackend;
- typedef struct _RegexpBackend RegexpBackend;
- struct _RegexpBackendClass;
- typedef struct _RegexpBackendClass RegexpBackendClass;
- struct _PCRE;
- typedef struct _PCRE PCRE;
- struct _PCREClass;
- typedef struct _PCREClass PCREClass;
- struct _Regexp;
- typedef struct _Regexp Regexp;
- struct _RegexpClass;
- typedef struct _RegexpClass RegexpClass;
- #include <lang/Char.h>
- #include <lang/Iterable.h>
- #include <lang/Iterator.h>
- #include <lang/Object.h>
- #include <lang/ooclib.h>
- #include <lang/String.h>
- struct _RegexpBackend
- {
- struct _Object __super__;
- Int PCRE;
- Int POSIX;
- Int DEFAULT_TYPE;
- };
- struct _RegexpBackendClass
- {
- struct _ObjectClass __super__;
- void (*setPattern)(RegexpBackend *this);
- Bool (*match)(RegexpBackend *this);
- };
- Class *RegexpBackend_class();
- RegexpBackend *RegexpBackend_new();
- void RegexpBackend_construct(RegexpBackend *this);
- void RegexpBackend_setPattern(RegexpBackend *this);
- Bool RegexpBackend_match(RegexpBackend *this);
- struct _PCRE
- {
- struct _RegexpBackend __super__;
- };
- struct _PCREClass
- {
- struct _RegexpBackendClass __super__;
- void (*say)(PCRE *this);
- };
- Class *PCRE_class();
- PCRE *PCRE_new();
- void PCRE_construct(PCRE *this);
- void PCRE_say(PCRE *this);
- struct _Regexp
- {
- struct _Object __super__;
- RegexpBackend *regexpBackend;
- Int type;
- };
- struct _RegexpClass
- {
- struct _ObjectClass __super__;
- void (*setPattern)(Regexp *this);
- Bool (*match)(Regexp *this);
- };
- Class *Regexp_class();
- Regexp *Regexp_new();
- void Regexp_construct(Regexp *this);
- void Regexp_setPattern(Regexp *this);
- Bool Regexp_match(Regexp *this);
- Int main();
- void _Regexp_load();
- #endif // ___Regexp__
- /* Regexp source file, generated with ooc */
- #include "Regexp.h"
- static void RegexpBackend_initialize(RegexpBackend *this)
- {
- Object_class()->initialize((Object *) this);
- this->PCRE = 0;
- this->POSIX = 1;
- this->DEFAULT_TYPE = 0;
- }
- void RegexpBackend_load()
- {
- static bool __done__ = false;
- if (!__done__)
- {
- __done__ = true;
- }
- }
- static void RegexpBackend_destroy(RegexpBackend *this)
- {
- {
- const Class *super = ((Object *) this)->class->super;
- if(super) super->destroy((Object *) this);
- }
- }
- RegexpBackend *RegexpBackend_new()
- {
- RegexpBackend *this = (RegexpBackend *) Class_newInstance((Class *)RegexpBackend_class());
- RegexpBackend_construct(this);
- return this;
- }
- void RegexpBackend_construct(RegexpBackend *this)
- {
- }
- Class *RegexpBackend_class()
- {
- static bool __done__ = false;
- static RegexpBackendClass class =
- {
- {
- {
- .size = sizeof(RegexpBackend),
- .name = "RegexpBackend",
- .initialize = (void (*)(Object *))RegexpBackend_initialize,
- .destroy = (void (*)(Object *))RegexpBackend_destroy,
- },
- },
- .setPattern = RegexpBackend_setPattern,
- .match = RegexpBackend_match,
- };
- Class *classPtr = (Class *) &class;
- if(!__done__)
- {
- __done__ = true;
- classPtr->super = Object_class();
- }
- return classPtr;
- }
- void RegexpBackend_setPattern(RegexpBackend *this)
- {
- ((RegexpBackendClass *)((Object *)this)->class)->setPattern(this);
- }
- Bool RegexpBackend_match(RegexpBackend *this)
- {
- return ((RegexpBackendClass *)((Object *)this)->class)->match(this);
- }
- static void PCRE_initialize(PCRE *this)
- {
- RegexpBackend_class()->initialize((Object *) this);
- }
- void PCRE_load()
- {
- static bool __done__ = false;
- if (!__done__)
- {
- __done__ = true;
- }
- }
- static void PCRE_destroy(PCRE *this)
- {
- {
- const Class *super = ((Object *) this)->class->super;
- if(super) super->destroy((Object *) this);
- }
- }
- PCRE *PCRE_new()
- {
- PCRE *this = (PCRE *) Class_newInstance((Class *)PCRE_class());
- PCRE_construct(this);
- return this;
- }
- void PCRE_construct(PCRE *this)
- {
- }
- static void PCRE_say_impl(PCRE *this)
- {
- printf("hi\n");
- }
- Class *PCRE_class()
- {
- static bool __done__ = false;
- static PCREClass class =
- {
- {
- {
- {
- .size = sizeof(PCRE),
- .name = "PCRE",
- .initialize = (void (*)(Object *))PCRE_initialize,
- .destroy = (void (*)(Object *))PCRE_destroy,
- },
- },
- .setPattern = RegexpBackend_setPattern,
- .match = RegexpBackend_match,
- },
- .say = PCRE_say_impl,
- };
- Class *classPtr = (Class *) &class;
- if(!__done__)
- {
- __done__ = true;
- classPtr->super = RegexpBackend_class();
- }
- return classPtr;
- }
- void PCRE_say(PCRE *this)
- {
- ((PCREClass *)((Object *)this)->class)->say(this);
- }
- static void Regexp_initialize(Regexp *this)
- {
- Object_class()->initialize((Object *) this);
- }
- void Regexp_load()
- {
- static bool __done__ = false;
- if (!__done__)
- {
- __done__ = true;
- }
- }
- static void Regexp_destroy(Regexp *this)
- {
- {
- const Class *super = ((Object *) this)->class->super;
- if(super) super->destroy((Object *) this);
- }
- }
- Regexp *Regexp_new()
- {
- Regexp *this = (Regexp *) Class_newInstance((Class *)Regexp_class());
- Regexp_construct(this);
- return this;
- }
- void Regexp_construct(Regexp *this)
- {
- Int type = RegexpBackend->DEFAULT_TYPE;
- PCRE *regexpBackend = PCRE_new();
- }
- static void Regexp_setPattern_impl(Regexp *this)
- {
- RegexpBackend_setPattern(((Regexp *)this)->regexpBackend);
- }
- static Bool Regexp_match_impl(Regexp *this)
- {
- return RegexpBackend_match(((Regexp *)this)->regexpBackend);
- }
- Class *Regexp_class()
- {
- static bool __done__ = false;
- static RegexpClass class =
- {
- {
- {
- .size = sizeof(Regexp),
- .name = "Regexp",
- .initialize = (void (*)(Object *))Regexp_initialize,
- .destroy = (void (*)(Object *))Regexp_destroy,
- },
- },
- .setPattern = Regexp_setPattern_impl,
- .match = Regexp_match_impl,
- };
- Class *classPtr = (Class *) &class;
- if(!__done__)
- {
- __done__ = true;
- classPtr->super = Object_class();
- }
- return classPtr;
- }
- void Regexp_setPattern(Regexp *this)
- {
- ((RegexpClass *)((Object *)this)->class)->setPattern(this);
- }
- Bool Regexp_match(Regexp *this)
- {
- return ((RegexpClass *)((Object *)this)->class)->match(this);
- }
- Int main()
- {
- GC_INIT();
- _Regexp_load();
- Regexp_new();
- return 0;
- }
- void _Regexp_load()
- {
- static bool __done__ = false;
- if (!__done__)
- {
- __done__ = true;
- RegexpBackend_load();
- PCRE_load();
- Regexp_load();
- _lang_Char_load();
- _lang_Iterable_load();
- _lang_Iterator_load();
- _lang_Object_load();
- _lang_ooclib_load();
- _lang_String_load();
- }
- }
Add Comment
Please, Sign In to add comment