School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,089 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,086 people online right now. Registration is fast and FREE... Join Now!




Designing and Coding a new Interpreter

 

Designing and Coding a new Interpreter

apoorv.dashing

3 Aug, 2009 - 10:35 AM
Post #1

New D.I.C Head
*

Joined: 3 Aug, 2009
Posts: 3



Thanked: 1 times
My Contributions
hiii,i m a student in 3rd yr B.tech I.T.,i need to do a mini project this semester,i thought of making a my own interpreter,being amazed by the existing languages(C,C++,JAVA,etc)...and after that a compiler too...but hving a descent knowledge abt the lang. processor and design of interperter,i dont know from where to start the coding of it and not able to decide for wht purpose shuld i built it......pls help me out

User is offlineProfile CardPM
+Quote Post


wildgoose

RE: Designing And Coding A New Interpreter

3 Aug, 2009 - 01:36 PM
Post #2

D.I.C Regular
Group Icon

Joined: 29 Jun, 2009
Posts: 429



Thanked: 55 times
Dream Kudos: 25
Expert In: Assembly,C,C++

My Contributions
A skrunchcoder-interpreter is not a mini project!

You need to decide how much off the shelf (open source) software that you can use on this project. The biggest component will be the expression evaluator unless you plan to only handle single operator expressions, which is really insufficient!

I've heard there is a downloadable version that you can utilize, but I usually build them from scratch. But as I said, it is not a quick turn around!
User is offlineProfile CardPM
+Quote Post

apoorv.dashing

RE: Designing And Coding A New Interpreter

3 Aug, 2009 - 11:10 PM
Post #3

New D.I.C Head
*

Joined: 3 Aug, 2009
Posts: 3



Thanked: 1 times
My Contributions


ya thts correct,but i think i can work ovrsome thing in tht feild (only some of tokens,statements...to be interperted)....which may be insufficent..but i will get experience in making it....so could think of buildind some thing more useful in future !!!!

This post has been edited by apoorv.dashing: 3 Aug, 2009 - 11:10 PM
User is offlineProfile CardPM
+Quote Post

Addiction2Code

RE: Designing And Coding A New Interpreter

7 Aug, 2009 - 07:14 AM
Post #4

D.I.C Head
**

Joined: 19 Dec, 2006
Posts: 62


My Contributions
If I were you I would get LEX/Flex and Yacc and code the Interpreter in that, doing it all by hand seems to be a complete pain in the ass. You may also want to learn GCC GAS so you can edit your C/C++ at the Assembly level. Making a very basic, BASIC interpreter isn't to hard if you are using a Lexical Analyzer (LEX/FLEX) and a Parser (YACC). If you use the standard C Library to make a language it is all basically writing the Syntax, the rest is pretty easy, and if you want an A+ I would include a Graphical Library and maybe a Networking Library. Personally I own http://www.amazon.com/lex-yacc-Doug-Brown/dp/1565920007 however; there are some pretty good tutorials on the Internet that would be a good start, remember, for a school project it doesn't have to be an entire language, maybe just a program that can understand user input, maybe analyze a sentence and respond accordingly, e.x. This is a question, eat is a verb, food is a thing that is good. Will you eat food? Computer responds; Yes.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 11:19AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month