943,661 Members | Top Members by Rank

Ad:
Mar 23rd, 2008
0

Programming Language Design Help

Expand 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
Similar Threads
Reputation Points: 18
Solved Threads: 4
Junior Poster
stupidenator is offline Offline
192 posts
since Mar 2005
Mar 23rd, 2008
0

Re: Programming Language Design Help

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?
Reputation Points: 98
Solved Threads: 22
Posting Whiz in Training
sarehu is offline Offline
269 posts
since Oct 2007
Mar 24th, 2008
0

Re: Programming Language Design Help

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
tobbilla78 is offline Offline
2 posts
since Sep 2007
Mar 24th, 2008
0

Re: Programming Language Design Help

I guess it is a compiler project assignment, you can probrably use lex and yacc to do it.
Reputation Points: 769
Solved Threads: 128
Banned
ithelp is offline Offline
1,910 posts
since May 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Computer Science Forum Timeline: binary search trees
Next Thread in Computer Science Forum Timeline: I want to get started learning a programming language





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC