Compilers, you can check the book that is in linked from the page of Randall, search there is a book (where the source of hla is).

There are a lot of source code for compilers: mingw, Open Watcom (iirc), in sourceforge, others searching in internet.

In sf is a book about a compiler, that I dont remember the name... a here is.. http://sourceforge.net/projects/inger/ and pheraphs in the future: http://sourceforge.net/projects/bspcc/

About parsing there are book, but I dont remember where.
Posted on 2004-09-04 09:12:29 by rea
Thanks.

- Julian
Posted on 2004-09-04 11:32:07 by JulianS
New version, this version simply takes care of constants, not a whole lot, but when you think of the previous code I did, I am actually going somewhere... somewhere near the finish line "Useful compiler..." :wink:. It is currently not error proof, it still refuses to calculate, but I am debugging, so don't worry, will fix this... sooner or later... any help is still appreciated. Remember the goal of this project is not to make a compiler that can be bought and used by anyone for general purpose... the real goal is to be able to code as fast as possible, and at the same time keeping the code optimized, support for different stuff like cross-platform or directx and opengl will follow, but these are extensions, which shall also be implemented nativly so not only will it have a native windows editor(like VB :-D) it will probably also have an interface for OpenGL and DirectX, to speed up both the compiler and the IDE.

I imagine, having for example, to make a calculator. You start the IDE(5 sec to load :)) then you drag and drop the buttons with the mouse, double click one of them, then you see a list of procedures etc.. then you write a simple code as:


;General Variables
DWORD FirNum
DWORD SecNum

Proc EqualButton
{
MyLabel.Caption = ConStr(FirNum+SecNum)
}



Totally simple code, right? So now you are all wondering "What happend to the model type, window proc, main proc etc... :?", well these are set from start, and they are hidden, but you can easly access them, all you have to is go to "Options" and select the "Show hidden procs", and you see them all, of course these procs are not directly in assembly. If you want assembly here, all you will probably have to do is something like this:



DWORD MyNumber

Asm
{
MOV EAX, 0
ADD EAX, 100
SUB EAX, 25
MOV [MyNumber], EAX
}



Now these are just examples, any comments, questions or suggestions are still 100% appreciated :wink:.
- Julian
Posted on 2004-09-04 14:05:34 by JulianS
Ouch, you've got your work cut out for you. Good luck. :shock:

Black iCE
Posted on 2004-09-05 10:31:50 by Black iCE
Right now I am writing it in VB, but I suppose I'll convert it to C++ later for speed, I'll probably just convert the actual compiler to C++, and make the IDE in VB 8)

- Julian
Posted on 2004-09-06 08:14:13 by JulianS