redfloyd
Writing an interpreter in Elixir
Greetings fellow alchemists !
I have started to write an open-source interpreter in Elixir (https://github.com/nicolasdilley/dwarf-interpreter) one week ago and I decided to write some tutorials on each stage of the development of my new language. I have finished the first one on the lexer. If you are interested in interpreters or even compilers these tutorials would give you a good practical approach to write your own !
You can find these tutorials on my website : http://nicolasdilley.com/?p=1 I would love to have your opinion !
The language is called “Dwarf” and has already lots of functionalities. The next steps are implementing loops, a type system and a good stdlib. If you want to contribute on it feel free to pm me
Most Liked
OvermindDL1
Yay another person making interpreters on the beam! We are getting quite a collection, from a couple of lisps to a multitude of typed languages to a beam native Lua to others. I love seeing blogs about the actually design though, looking forward to updates! 
OvermindDL1
Yep, recursive decent split lexical parsing steps is very classical, PEGs became more popular about 15 years ago, but they are not taught in schools or anything yet so few know about them, even though they are significantly better designs in my opinion, they can act as a lexer, a parser, both, an AST builder, an AST runner, any mix thereof, all with near the same code, while if implemented properly will run circles around the classical methods in speed while being far easier to read. 
redfloyd
Thanks @Qqwy !
I am actually writing this language just to be a very simple and small language ( hence the name
). The aim is not to make anything new or fancy but to show a practical way of writing an interpreter. I found that when I wanted to learn how to build one, I could not find many practical advice and examples. In addition, I wanted to put in practice the theory that I am learning
My area of interest is concurrency so I might use it to test some ideas in the future. For the syntax rules, you can see a definition in BNF form of the language in the README. There are also examples of source program in the benchmarks folder.







