Game
Robot Unlock
13 years ago

The long journey from character to AST... begins elsewhere


Since we’re in full compiler-compiler season I thought it would be appropriate for me to also provide a more educational example. This example illustrates how a very rudimentary* compiler works. In more detail, it shows what happens to your code after it’s been chopped into nice tokens. Then, it shows how, based on these tokens and the language’s grammar an AST is built and then decorated and, finally, how this tree is fed to an interpreter and results start popping up.

By rudimentary I mean that the language consists of simple arithmetic expressions. Below, you can find the compiler-demo. Just type stuff and be amazed!

If you want to find out more about the inner workings of this nifty thing, check this very nicely written article on CodeProject.

<div> Your input code:
7 + pi * (x - 10)
The environment:
{ “x” : 5, “pi” : 3 }
Output:
</div>



0 comments

Loading...

Next up

Smile! Here, take some happy pills! ✨💊 #Blender #3DModelling #3DArt Buy me a Ko-fi: https://ko-fi.com/barbarafb_

🍒Did you like the game? A demo is available for free on Steam.

✌️ Thanks for playing IndieGameiacs!

⚙️ Free Demo: http://bit.ly/UniDuni

📺 Full Video: https://youtu.be/5qEbVXg7GaQ

#steam #uniduni #clops #screenshotsaturday

One of the most critical update for Sunblaze demo. Now you are able to pet a cat! Finally!

A 1h30 painting, coffee break.

My twitter: https://twitter.com/loupil100

It's old and it glows. Experience the nostalgic tile-matching puzzle game in it's new glory!

Game : https://gamejolt.com/games/colortris/499578

ColorTris gameplay - Peach squares

______________________

Music : https://soundcloud.com/the-musical-ghost/ghost-kozmos-tetris-the…

Snacktime

Sans Dance

I created a new character for a small video game I'm planning to make soon. I used Blender, Substance Painter and Marmoset.

Blender eevee render from the upcoming Video Pt. 2

If you really like my work, please give some support by buying me a cofffee!

https://www.buymeacoffee.com/Benmonor

【SEIZURE WARNING】

This is what it feels like to be a green slime in Terraria. :'<

(I accidentally paused the recording before painting the first temporary face. Whoops! xP)

Music: Dainumo - N8TURE