2 registered members (Akow, tomaslolo),
1,536
guests, and 12
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Genesis "Precompiler" (prototype)
[Re: Rackscha]
#392213
01/20/12 10:43
01/20/12 10:43
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
OP
Serious User
|
OP
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
My project is currently unaivalable for Download. Since yesterday, Megaupload is no more. So i'll have to reupload the project this evening to another hoster.
Greetings Rackscha
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
Re: Genesis "Precompiler" (prototype)
[Re: Rackscha]
#392258
01/20/12 19:18
01/20/12 19:18
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
OP
Serious User
|
OP
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
Download available again on my Blog(still in progress). Updated MainPost.
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
Re: Genesis "Precompiler" (prototype)
[Re: Rackscha]
#392325
01/21/12 18:04
01/21/12 18:04
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
OP
Serious User
|
OP
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
Today, i added the possibillity to define global vars, as you do in LiteC.
int Foo;
....
void main()
{
Foo = 5;
}
It took some time, because when i wrote the parsing for methods/functions i didnt implement something to stop earlier in case its just a global var. so i had to restructure those functions. What a mess
Last edited by Rackscha; 01/21/12 18:04.
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
Re: Genesis "Precompiler" (prototype)
[Re: Rackscha]
#392450
01/22/12 19:33
01/22/12 19:33
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
OP
Serious User
|
OP
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
Okay, since today its possible to use: global fcuntion dummies Structs lazy enums The enums are a bit special, thats why i call them "lazy" enums. you declare them like this:
enum ETest = { Alpha, Beta, Sonstwas};
1) you cant define custom values at the moment 2) every enum value is unique inside an enum declaration output is like this:
#define ETest int
#define Alpha 0
#define Beta 1
#define Sonstwas 2
So as you can see, if you cant hold back yourself, you can abuse them very easy . But this should be better to programm and read(if used properly). And i have something else in my mind, however one question first: Is it possible to define a SET in C++ which has multiple states?(so in fact flags). Greetings Rackscha
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
Re: Genesis "Precompiler" (prototype)
[Re: Rackscha]
#392745
01/26/12 20:45
01/26/12 20:45
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
OP
Serious User
|
OP
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
Today i played around with analysing function code. First result: We have warnings for (possible) missing returns Since the way iam doing it, is very lazy and simple, the last function will throw the same error even if the condition has an "else" statement with a valid return(so in fact, return is always guranteed). Greetings Rackscha
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
Re: Genesis "Precompiler" (prototype)
[Re: Rackscha]
#392811
01/27/12 21:29
01/27/12 21:29
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
OP
Serious User
|
OP
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
BIG SUCCESS this evening. This is obsolete:
...
Instance.Method(Instance);
...
Finally this is possible: Compiler now detects method calls and add the required Instancepointer WHOHOO Input:
...
CTestClass* LClass;
void main()
{
STRING* LNumber = str_create("hi");
LClass = _CTestClass();
LClass.LField.Test();
while(key_enter == 0)
{
draw_text(LClass.ClassName, 20, 20, vector(100, 100, 100));
draw_text(LClass.ClassParentName, 20, 80, vector(100, 100, 100));
str_for_int(LNumber, LClass.GetNumber());
draw_text(LNumber, 20, 100, vector(100, 100, 100));
wait(1);
}
delete(LClass);
ptr_remove(LNumber);
}
output:
CTestClass* LClass;
void main()
{
STRING* LNumber = str_create("hi");
LClass = _CTestClass();
LClass.LField.Test(LClass.LField);
while(key_enter == 0)
{
draw_text(LClass.ClassName, 20, 20, vector(100, 100, 100));
draw_text(LClass.ClassParentName, 20, 80, vector(100, 100, 100));
str_for_int(LNumber, LClass.GetNumber(LClass));
draw_text(LNumber, 20, 100, vector(100, 100, 100));
wait(1);
}
delete(LClass);
ptr_remove(LNumber);
}
Greetings Rackscha
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
Re: Genesis "Precompiler" (prototype)
[Re: Rackscha]
#392835
01/28/12 14:45
01/28/12 14:45
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
OP
Serious User
|
OP
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
New release: V0.4 - You can define Global vars - You can define global function dummies - You can define structs (its yet not possible to define values at the end) - You can define (lazy) enums. You cant set custom values. Each value in an enum is unique - New warnings for possible wrong/missing return statements - You dont have to add the instancepointer to the method call manually anymore. Its automatic^^ - super() is obsoleted. You can finally use ParentClass:ParentMethod() to call methods from a parentclass - Showing alternative matchind identifier(not yet used everywhere) - Showing LiteC Errors correctly in log
Download link in mainpost.
Development of this project will slowdown a bit, because i want to start a real project using my precompiler to find busg and problems. If you find bugs/problems please tell me. I cant find all of them myself^^"
Greetings Rackscha
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
Re: Genesis "Precompiler" (prototype)
[Re: Rackscha]
#392842
01/28/12 16:29
01/28/12 16:29
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
OP
Serious User
|
OP
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
in V0.4 i found a bug with auto adding the Instancepointer to a methodcall. It didnt ignore strings(oops). This is fixed and will be included in a later update.
And i added the possibillity to use comments(single and multiline comments). They are just striped out and not included in the output.
Greetings Rackscha
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
Re: Genesis "Precompiler" (prototype)
[Re: Rackscha]
#392907
01/29/12 15:20
01/29/12 15:20
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
OP
Serious User
|
OP
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
yay, using private/protected/public in class-definition makes sense now^^. Compiler uses accesspecifier now(and their restrictions). so:
class CFoo()
private:
int FFoo;
public
int ForAll;
};
truly influences compiler now. FFoo can only be accessed when inside a method of this class. Public is accessible to all. Proteced is accessible to the same class and classes derived from it. If you try to acces a member without the correct permission(i.e. accessing private, while only allowed accesing public) you get an error. Greets Rackscha
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
|