Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   interpreter (http://www.programmingforums.org/showthread.php?t=10814)

programmingnoob Jul 23rd, 2006 6:41 AM

interpreter
 
so i am kind of done with my parser, well still fixing bugs and all, but mostly done.
The next step is to design the interpreter ....

so what is it? lol .... i am a little confused, i tried searching for it online, it wasnt much help

what exactly are "control statements"?

v0id Jul 23rd, 2006 7:34 AM

What is a Control Statement?
http://www.intap.net/~drw/cpp/cpp04_01.htm

JimmyJim Jul 23rd, 2006 7:40 AM

No offence programmingnoob but if you dont know what a control statement is then maybe you should do some more reading before you make this interpreter. I may be completely wrong and you may have just had one of those mental and google block(terrible things, no matter how you phrase it it never gives you what you want) moments lol.

Good luck.

v0id Jul 23rd, 2006 8:41 AM

Quote:

Originally Posted by programmingnoob
so i am kind of done with my parser, well still fixing bugs and all, but mostly done.
The next step is to design the interpreter ....

I think he already knew what a while-, for-, if- etc.-statement does, but didn't knew that its name were "control statement".

JimmyJim Jul 23rd, 2006 4:54 PM

Thats what i thought. Its a difficult to keep up with the jargon. You learn a new word or phrase and another goes right out of your brain never to be seen again.

Jimbo Jul 23rd, 2006 5:22 PM

If only brains had virtual memory... :p

King Jul 23rd, 2006 5:35 PM

Quote:

Originally Posted by Jimbo
If only brains had virtual memory... :p

hahah that would be great for me, my memory isn't that great.

King Jul 23rd, 2006 5:36 PM

Back on topic, what is this interpreter for, I must have missed something?

programmingnoob Jul 24th, 2006 2:23 AM

Quote:

Originally Posted by JimmyJim
No offence programmingnoob but if you dont know what a control statement is then maybe you should do some more reading before you make this interpreter. I may be completely wrong and you may have just had one of those mental and google block(terrible things, no matter how you phrase it it never gives you what you want) moments lol.

Good luck.

lol i know what control statements are!! yeah, it's definitely one of those blocks.
i mean i knew what they meant, but as usual, i didnt have enough confidence to rely on my knowledge

programmingnoob Jul 24th, 2006 7:25 AM

i have grammar rules, tree for each rule and the list of tokens .... is that enough information to interpret stuff?

if it is, then what am i supposed to do if i am not sure wt action needs to be taken for a specific node/subtree

like i see the word "var" which probably means variable ... and i see the tree [var [ : y integer]] which probably means declaring y variable as integer ... the problem is i encountered another tree [: z integer] ... note that there is no "var" as the parent..... but aint i supposed to take the same action with this tree as well?

also, both y and z have token types as identifiers before evaluating the subtrees discussed above, but what action needs to be taken when my interpreter encounters those trees


All times are GMT -5. The time now is 12:44 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC