Introduce variables on EDDI
Join the DZone community and get the full member experience.Join For Free
The version 0.1.1 of EDDI is now available.
This new version introduce the feature to put variable on the code. You can now write things like that :
a = "Variable a"; b = "Variable b"; Print(a); Print(b);
And you can also reassign value to a variable and assign the value of a variable to another :
a = b; b = "New variable b";
Nothing extraordinary, but it’s a start. The variable name are compiled into integers and a table of variable has been made on the virtual machine.
The last step will be to introduce a new type : the integers. But for this integration, I’m not exactly sure on how to do that. I will certainly create a string pool and put only references to the strings on the stack, but it’s not clearly defined. Don’t hesitate if you have any comment
The project is 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.1.1
Opinions expressed by DZone contributors are their own.