DEV Community

Discussion on: What Are Some Good Starting Points to Learn What I Need to Write My Own Toy Language?

Collapse
 
davidszabo97 profile image
Dávid Szabó

Good. You are on the right path mate. I have my own toy language too: github.com/david-szabo97/DevLang
You might take a look at it how it works.
You can find comments,tests and examples in the Main.java

You get started by doing some Google searches. Keywords: interpeter, compiler, parser, lexer, opcode, virtual machine.

I used to read a blog series to put together my own language.
Maybe this one: aosabook.org/en/500L/a-python-inte...
But I am not sure anymore. It was 2 year ago :)

Good luck!

Collapse
 
vitalcog profile image
Chad Windham

Thanks! The link to the python interpreter is great actually! Also appreciate the keywords list

Collapse
 
davidszabo97 profile image
Dávid Szabó • Edited

I also have some special feature in my toy lanuage: (I have no idea how I did it, my lang contains some secrets.)


for (i = 0; i < 5; for (j = 0; j < 5; j = j+1) {print('j')} i=i+1) {print('i')}

Yes, that's a for in a for.