3 Replies - 1078 Views - Last Post: 07 August 2009 - 08:14 AM

#1 apoorv.dashing   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 3
  • Joined: 03-August 09

Designing and Coding a new Interpreter

Posted 03 August 2009 - 11:35 AM

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
Is This A Good Question/Topic? 1

Replies To: Designing and Coding a new Interpreter

#2 wildgoose   User is offline

  • D.I.C Regular
  • member icon

Reputation: 67
  • View blog
  • Posts: 468
  • Joined: 29-June 09

Re: Designing and Coding a new Interpreter

Posted 03 August 2009 - 02:36 PM

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!
Was This Post Helpful? 0
  • +
  • -

#3 apoorv.dashing   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 3
  • Joined: 03-August 09

Re: Designing and Coding a new Interpreter

Posted 04 August 2009 - 12:10 AM

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: 04 August 2009 - 12:10 AM

Was This Post Helpful? 0
  • +
  • -

#4 Addiction2Code   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 67
  • Joined: 19-December 06

Re: Designing and Coding a new Interpreter

Posted 07 August 2009 - 08:14 AM

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.co...n/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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1