DarkBlizz

Game On => Land of AI => STARCRAFT II: WINGS OF LIBERTY => AI Development => Topic started by: Steenreem on March 23, 2010, 01:17:36 PM

Title: Galaxy precompiler
Post by: Steenreem on March 23, 2010, 01:17:36 PM
Hello everyone,

I'm Remy I recentely started working on a precompiler for starcraft 2 called Milkyway precompiler (MWC). The idea of a precompiler is that it extend the galaxy langauge and add support for things like syntax checking, type checking, and lexical scoping.

Currently MWC has mainly 2 features:

- Syntax checking. Gives line and column number and sometimes some extra information.

- Enables the use of new and delete. Using code generation, a limited form of dynamic allocation is simulated.

- Block comments are allowed. /* .. */

The tool can be found here: http://www.sc2mapster.com/assets/milkyway-precompiler/ (http://www.sc2mapster.com/assets/milkyway-precompiler/)

I just started last weekend. MWC is still is in very early developmental phase, so count on bugs. I have tested the syntax checking on some large galaxy files and that works fine. I have already tested the generator code for dynamic allocation in sc2 and it compiles.  It would be of great help if someone could help test a bit.

Future:

For the future I'm planning these features:
Title: Re: Galaxy precompiler
Post by: Kernel64 on March 23, 2010, 05:27:12 PM
This is nice. I've been looking for something that's not as complicated and would just allow me to check lines of codes for syntax errors.

A nice feature would be to have something that checks variable names for specific problems like lower/upper case stuff.
Title: Re: Galaxy precompiler
Post by: Steenreem on March 24, 2010, 08:46:22 AM
Quote from: Kernel64 on March 23, 2010, 05:27:12 PM
This is nice. I've been looking for something that's not as complicated and would just allow me to check lines of codes for syntax errors.

A nice feature would be to have something that checks variable names for specific problems like lower/upper case stuff.

I'd call that feature lexical scoping. I'm working on type checking and lexical scoping now. So hopefully when that's finished it will report any variables names with spelling errors as actual errors.