[sdl-lists] Compiler Design.... Can You Help?

I need to design a new language… I have parts done like the tokens, and
into byte code and error checking (debugging)… I just don’t know what to
do now…

Church Punks! Truth Rebellion! Audio A!> ----- Original Message -----

From: chrish@pobox.com (Chris Herborth)
Newsgroups: gmane.comp.lib.sdl
Sent: Saturday, September 27, 2003 5:26 AM
Subject: Re: [sdl-lists] Compiler Design… Can You Help?

Andrew Balmos wrote:

I don’t know if you can help me or not… But I need some tutorials on
compiler design… I have a compiler design tutorials for a Virtual
Machine… Witch works OK with the program I am making but… I really

to make a real compiler… For many reasons… For latter development

will be much much much much easier… Also this is something I want to

to do…

Not really what you want, but…

If this is to embed in your game (or any other application, really) as a
scripting language, I’d suggest grabbing Python or some other existing,
embeddable language.

Python’s my favourite (it’s been used in EVE Online, Freedom Fighters,
and a few others), but LUA has quite a following (it was used in the
Infinity Engine games: Baldur’s Gate 1 and 2, Icewind Dale 1 and 2,
Planescape: Torment) because of its C-like syntax, and there are a
number of embedded Scheme implementations (Elk and Guile spring to

By using an existing language, you’re saving yourself a huge amount of
design, implementation, and (most importantly) debugging effort, which
lets you concentrate on your interesting stuff… the game content.

You can get PyGame, too, which will let you use SDL to write the entire
game in Python; depending on what you’re doing, it’ll definitely be
fast enough. I was prototyping an OpenGL-based top-down tile engine
using PyGame; even on severly underpowered hardware (my P2 333 laptop,
which has a Rage Mobility-P chipset… awful for 3D work) it was keeping
up very well.

Chris Herborth
Otaku no sensei