Daily programming challenge #5 The lost challenge
Difficulty: Hard!
In challenge #1, we created a programm, which parsed a string and gave out the string, that was to write.
NOW: Let's imagine, we want to create Variables in our Interpreter.
EXAMPLE:
INPUT (=File):
new_int_var (Hello = 123)
write (Hello + " HI")
OUTPUT (Terminal or output-field):
123 HI
HOW TO DO THAT? Well, first we need to parse the command and the arguement to it.
BUT: thats not the problem. We need to add an array, which saves the 1-NAME and the 2-VALUE. Once you add string-variables, you need to add the 3-TYPE.
EXTENSIONS:
EX1: add string-variable-types
EX2: add a function for input
EX3: BE HAPPY, THAT YOu JUST WROTE A BASIC INTERPRETER (this isn't something, everybody can do.)
BTW: If you are german and want to see my interpreter (#competition), check out
sites.google.com/sites/gerinterpreter.
As this is a really difficult question, feel free to ask me at any times. BUT don't post the answer to others ;-)
Leave Daily programming challenge #5 The lost challenge to:
Read more #daily posts
Best Posts From linuxer4fun
We have not curated any of linuxer4fun's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From linuxer4fun
- Daily programming challenge #15 PAPER, PLEASE!
- Daily programming challenges: Why I do them
- Daily programming challenge #15 Basic challenge extended
- Daily programming challenge #14 Let's get easy for the moment
- Daily programming challenge #13 3D
- My thougts on 1 == 2; Math theory
- Daily programming challenge #12 Assembler
- Daily programming challenge #5 The lost challenge
- Daily programming challenge #11 Neural Networks
- Daily programming challenge #10 Data
- Daily programming challenge #9 HACKER
- Daily programming challenge #8 NETWORKS and stuff
- daily programming challenge #7 Your first own Library
- daily programming challenge #6 CHEAT-Engine
- Daily programming challenge #4 ASCII-ART
- Daily programming challenge #3
- daily programming challenge #2
- Daily programming challenge
- devRant - Programmers lifesaver