yacc'ing functions and parameters

Stu <johnson_stu@yahoo.com>
17 Nov 2000 23:54:49 -0500

          From comp.compilers

Related articles
yacc'ing functions and parameters johnson_stu@yahoo.com (Stu) (2000-11-17)
| List of all articles for this month |

From: Stu <johnson_stu@yahoo.com>
Newsgroups: comp.compilers
Date: 17 Nov 2000 23:54:49 -0500
Organization: Deja.com - Before you buy.
Keywords: interpreter, question, comment
Posted-Date: 17 Nov 2000 23:54:49 EST

I'm building an interpreter (sorry, couldn't find a comp.interpreters)
and have some questions about the implementation of function
calls. How would you go about lex'ing and yacc'ing functions with
parameters? Say you had a function table that contained the names,
number and types of parameters, and a pointer to the actual
function. But how would I go about getting the parameters into the
function, doing type checking, and that sort of thing? Is there a
chunk of example code somewhere?
[My invariable advice is to translate into some sort of easy-to-interpret
code, either RPN or trees, and the interpret that, rather than trying to
interpret the source code directly. -John]

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.