Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Introduce variables on EDDI

DZone's Guide to

Introduce variables on EDDI

· Java Zone
Free Resource

Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code! Brought to you in partnership with ZeroTurnaround.

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

 

From http://www.baptiste-wicht.com/2011/06/introduce-variables-on-eddi/

The Java Zone is brought to you in partnership with ZeroTurnaround. Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code!

Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}