![]() |
| ||
| 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 |
| ||
| 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? |
| ||
| Re: Programming Language Design Help Quote:
--------------------- [snipped fake signature] |
| ||
| Re: Programming Language Design Help I guess it is a compiler project assignment, you can probrably use lex and yacc to do it. |
| All times are GMT -4. The time now is 8:16 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC