Over a million developers have joined DZone.

Eddi 0.2 : Integers and variables

DZone's Guide to

Eddi 0.2 : Integers and variables

· Java Zone ·
Free Resource

Verify, standardize, and correct the Big 4 + more– name, email, phone and global addresses – try our Data Quality APIs now at Melissa Developer Portal!

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 :

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

From http://www.baptiste-wicht.com/2011/06/eddi-0-2-types-and-variables/

Developers! Quickly and easily gain access to the tools and information you need! Explore, test and combine our data quality APIs at Melissa Developer Portal – home to tools that save time and boost revenue. Our APIs verify, standardize, and correct the Big 4 + more – name, email, phone and global addresses – to ensure accurate delivery, prevent blacklisting and identify risks in real-time.


Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}