EDDI 0.2 : Integers and variables

I just pushed the last commits of Eddi 0.2.

This new version allows the use of integers. You can declare int variables and pass int values or variables to the Print operation.

I've also refactored the compiled to use a kind of parse tree and several phases. But now, I'm not really satisfied with the design. The classes are too strongly coupled and the parse tree is too specific I think, too many assumptions are made during the semantical analysis. But now, I don't know how to improve that. I also think that the design and the operations will not support some more advanced adds later, I don't know... Don't hesitate if you have any idea or comment on the design :)

I've also made some changes to the Lexer in order to improve the performances, but nothing spectacular.

You can now compile this kind of code with Eddi :

int a = 1;
string b = "asdf";
b = "new b";

The next changes will be to add operations on int and perhaps also the concat on two stirngs. I will see. I will also try to improve the design of the compiler if I found some ideas.

The sources are available on Github :

  • The compiler, eddic : https://github.com/wichtounet/eddic/
  • The virtual machine, eddivm : https://github.com/wichtounet/eddivm/
  • A commons library used by the two projects : https://github.com/wichtounet/eddi-commons/

If you want to see the exact version reffered to in this subject, you can select the tag v0.2

Related articles

  • EDDI 0.1.1 : Variables
  • EDDI 0.2.1 : Integer operations and optimizations
  • EDDI : A new programming language project
  • EDDI 0.3 - Branches and conditions if, else if, else
  • EDDI Compiler 0.6.0 : Arrays
  • EDDI 0.4.1 : Loops and better assembly generation
  • Comments

    Comments powered by Disqus