Programming Language Design Help

Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
Reply

Join Date: Mar 2005
Posts: 192
Reputation: stupidenator is an unknown quantity at this point 
Solved Threads: 4
stupidenator's Avatar
stupidenator stupidenator is offline Offline
Junior Poster

Programming Language Design Help

 
0
  #1
Mar 23rd, 2008
Hello,

I am writing a programming language in c++ for a class and I am having a problem understanding how to do some of it. The language is based on Forth, and you are allowed to redefine how any of the words in the language work. I am trying to understand how to store the instructions for each of the words. If anyone can shed some light on some methods of accomplishing this, it would be greatly appreciated!

Thanks,

Nick
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 269
Reputation: sarehu is on a distinguished road 
Solved Threads: 22
sarehu's Avatar
sarehu sarehu is offline Offline
Posting Whiz in Training

Re: Programming Language Design Help

 
0
  #2
Mar 23rd, 2008
It depends.

What features of the stack language are there? What values could possible appear on the stack? Numbers? Integers, Doubles? Strings, arrays, linked lists? Do you want to have runtime checks to see what kind of data structure you're dealing with? Can pointers (to functions) go on the stack? Do you want to be able to construct functions in the middle of code?
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 2
Reputation: tobbilla78 is an unknown quantity at this point 
Solved Threads: 0
tobbilla78 tobbilla78 is offline Offline
Newbie Poster

Re: Programming Language Design Help

 
0
  #3
Mar 24th, 2008
Originally Posted by stupidenator View Post
Hello,

I am writing a programming language in c++ for a class and I am having a problem understanding how to do some of it. The language is based on Forth, and you are allowed to redefine how any of the words in the language work. I am trying to understand how to store the instructions for each of the words. If anyone can shed some light on some methods of accomplishing this, it would be greatly appreciated!

Thanks,

Nick
i will give you the code in the next week
---------------------
[snipped fake signature]
Last edited by Narue; Mar 24th, 2008 at 2:12 pm. Reason: Snipped fake signature
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 1,824
Reputation: ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all 
Solved Threads: 117
ithelp's Avatar
ithelp ithelp is offline Offline
Posting Virtuoso

Re: Programming Language Design Help

 
0
  #4
Mar 24th, 2008
I guess it is a compiler project assignment, you can probrably use lex and yacc to do it.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Computer Science Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC