Skip to content

filipevarjao/fjerl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

===== Fjerl

Fjerl is a translator (compiler, code generator) from Featherweight Java approach to ooErlang and consequently Erlang. This project show the idea of relationship between Object-Orientation and Message Passing, strengthening the first thought of OO created by Dr. Alan Kay, mapping Java objects directly to Erlang process.

Requirements

  • Antlr 4 and ooErlang

Example

###Featherweight Java

class List extends Object {
    List() { super(); }
    List append(List l) {
      return this;
    }
}

###Compiled to ooErlang

-class(list).
-export([append/1]).
-constructor([new/1]).

methods.

new() -> ok.

append(L) ->
    self::new().

###Generate Erlang native code.

-module(list).

-export([append/2, new/1]).

append(ObjectID, L) -> new(ObjectID).

new(ObjectID) ->  ok.

About

Translator of Java subset to Erlang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published