Skip to content

Commit

Permalink
Readme change;
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin committed Sep 5, 2018
1 parent c9b1fd1 commit 9effaca
Showing 1 changed file with 49 additions and 2 deletions.
51 changes: 49 additions & 2 deletions README.md
@@ -1,10 +1,57 @@
Enkel (JVM based language)
=======

This repo is just practice code base of [Creating JVM language](http://jakubdziworski.github.io/enkel/2016/03/10/enkel_first.html), the original repo is [here](https://github.com/JakubDziworski/Enkel-JVM-language),
Enkel is a simple programming language running on the jvm

which based on maven, this repo has changed to gradle.

## Build & Run
- Generate parser code from ANTLR
`./gradlew :antlr:generateGrammarSource `

- Compile `*.enk` to `*.class`
Using IDEA

- Run
`java *.class`

## Example

- Input(`Fields.enl`)
```
Fields {
int field
start {
field = 5
print field
}
}
```

- Output(`Fields.class`)

Decompiled form:
```
public class Fields {
public int field;
public void start() {
this.field = 5;
System.out.println(this.field);
}
public Fields() {
}
public static void main(String[] var0) {
(new Fields()).start();
}
}
```

Other examples please see `./EnkelExamples/*.enk`

## TODO
- [ ] Other grammar feature
- [ ] IDEA highlight plugin
- [ ] Support debugger
- [ ] Port to LLVM IR

0 comments on commit 9effaca

Please sign in to comment.