Question to Mark Sibly or anyone else who knows...

BlitzMax Forums/BlitzMax Programming/Question to Mark Sibly or anyone else who knows...

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Try reading up on scripting languages, thats where I learnt about compiling, Its essentially the same process just a different output.

You split the source up into tokens (lexical analysis) then analyse them (parsing, type checking and a few other things) and finally emit a assembly code (or byte code in a scripting language) representation of them.

MicroC's compiler has full BMax source code if that would help you, you can find it here http://www.blitzbasic.com/Community/posts.php?topic=57520

You may also find these books usfull, I know I did.
http://www.amazon.com/exec/obidos/tg/detail/-/1931841578?v=glance
http://www.amazon.com/exec/obidos/tg/detail/-/0201100886?v=glance