From: Dr G. <drg...@gm...> - 2005-02-05 09:32:31
|
Hello all, Is there any build that currently supports msvc? I would like to get occ working in msvc, can anyone point me in the right direction? Im an experienced programmer with a rather complex game engine and I was thinking about writing a custom preprocessor in order to simplify the use of my engine with a few extensions to c++. then I came across OpenC++. I think its a pretty amazing concept and I think it will do everything I want plus its giving me a lot more possibilities. So I would really like to get it working on msvc and possibly contribute to the project if you like. so is there source working with msvc somewhere or should i just get the latest and try to cram it into msvc??? thanks |
From: Grzegorz J. <ja...@ac...> - 2005-02-07 06:41:43
|
Dr Gorilla wrote: > Hello all, > > Is there any build that currently supports msvc? I would like to get > occ working in msvc, can anyone point me in the right direction? Im an > experienced programmer with a rather complex game engine and I was > thinking about writing a custom preprocessor in order to simplify the > use of my engine with a few extensions to c++. then I came across > OpenC++. I think its a pretty amazing concept and I think it will do > everything I want plus its giving me a lot more possibilities. So I > would really like to get it working on msvc and possibly contribute to > the project if you like. > > so is there source working with msvc somewhere None that I know of. You may have a look at this list archives, because several people tried this throughout the last year, but the patches never made it into a mainstream. > or should i just get > the latest and try to cram it into msvc??? That's what I recommend. We would also welcome any contributions. Moreover, depending on your needs you may want to focus on a smaller subject of functionality factored out into OpenC++Core library. It has significantly simplified build process, so if its functionality is enough for you (parser, DOM, analyzer + you can define translation by deriving from AST visitors; basically the framework top that calls different compilers is stripped off), I would recommend approaching OpenC++Core instead. BR Grzegorz |
From: Dr G. <drg...@gm...> - 2005-02-08 00:39:12
|
Ok Im building the two occ core libs in visual studio - but i had to drop down to cygwin to build the ptree-generated file. anyway im finding an odd problem: if I code - Opencxx::ProgramString* ps = new Opencxx::ProgramString; *ps << "{}"; Opencxx::Program* program = ps; Lex lexer(program); Parser parser(&lexer, errorLog); // parse tree Ptree* result; parser.rDefinition(result); no matter what i place into the source string its getting into an infinite loop inside the Lex ctor do { kind = ReadToken(pos, len); tokens_.push_back(Token(kind, pos, len)); } while (kind); when ReadToken hits an end of string (0 terminator) its just backing up and returning the last character.... am i doing something wrong ? On Mon, 07 Feb 2005 14:43:24 +0800, Grzegorz Jakacki <ja...@ac...> wrote: > Dr Gorilla wrote: > > Hello all, > > > > Is there any build that currently supports msvc? I would like to get > > occ working in msvc, can anyone point me in the right direction? Im an > > experienced programmer with a rather complex game engine and I was > > thinking about writing a custom preprocessor in order to simplify the > > use of my engine with a few extensions to c++. then I came across > > OpenC++. I think its a pretty amazing concept and I think it will do > > everything I want plus its giving me a lot more possibilities. So I > > would really like to get it working on msvc and possibly contribute to > > the project if you like. > > > > so is there source working with msvc somewhere > > None that I know of. You may have a look at this list archives, because > several people tried this throughout the last year, but the patches > never made it into a mainstream. > > > or should i just get > > the latest and try to cram it into msvc??? > > That's what I recommend. We would also welcome any contributions. > > Moreover, depending on your needs you may want to focus on a smaller > subject of functionality factored out into OpenC++Core library. It has > significantly simplified build process, so if its functionality is > enough for you (parser, DOM, analyzer + you can define translation by > deriving from AST visitors; basically the framework top that calls > different compilers is stripped off), I would recommend approaching > OpenC++Core instead. > > BR > Grzegorz > |
From: Grzegorz J. <ja...@ac...> - 2005-02-20 10:58:07
|
Hi, Sorry for the late reply, I was traveling and unable to access my e-mail. Dr Gorilla wrote: > Ok Im building the two occ core libs in visual studio - but i had to > drop down to cygwin to build the ptree-generated file. The plan is to rewrite this part in Python. Should be very straighforward, pls. do it if you have time and interest. > anyway im finding an odd problem: > > if I code - > > Opencxx::ProgramString* ps = new Opencxx::ProgramString; > *ps << "{}"; > > Opencxx::Program* program = ps; > > Lex lexer(program); > Parser parser(&lexer, errorLog); > > // parse tree > Ptree* result; > parser.rDefinition(result); > > > > no matter what i place into the source string its getting into an > infinite loop inside the Lex ctor > > do > { > kind = ReadToken(pos, len); > tokens_.push_back(Token(kind, pos, len)); > } > while (kind); > > when ReadToken hits an end of string (0 terminator) its just backing > up and returning the last character.... > > > am i doing something wrong ? Nope. It was a bug, which I have hopefully fixed. Some code in Lex.cc erroneously assumed that Program::Get() can always be undone by Program::Unget(). This is not true if Program::Get() returns EOF. See last postings on opencxx-commits mailing list for detailed account of what I have changed. My fixes went into occ-lib, so if you want them in opencxx proper, please backport (and ideally commit to our CVS). Best regards Grzegorz |