|Techniques for writing an interpreter email@example.com (Simon Chapman) (1998-03-06)|
|Re: Techniques for writing an interpreter Nick.Roberts@dial.pipex.com (Nick Roberts) (1998-03-08)|
|Re: Techniques for writing an interpreter firstname.lastname@example.org (1998-03-12)|
|Re: Techniques for writing an interpreter email@example.com (W. Craig Trader) (1998-03-15)|
|Re: Techniques for writing an interpreter firstname.lastname@example.org.OZ.AU (1998-03-15)|
|Re: Techniques for writing an interpreter email@example.com (Peter Su) (1998-03-18)|
|Re: Techniques for writing an interpreter firstname.lastname@example.org (1998-03-18)|
|[25 later articles]|
|From:||Simon Chapman <email@example.com>|
|Date:||6 Mar 1998 01:57:57 -0500|
I wonder if someone here could give me a little guidance?
I've been using Lex & Yacc (also Flex and Bison) for some time to
write simple scripting utilities. More recently I've become interested
in extending the functionality of these utilities to include more
sophisticated contructs such as flow control, labels, nested IF-ELSE
and so on.
It seems to me that in order to write such an interpreter, I need much
more than just the ability to parse a grammar and perform simple
actions. There needs to be a step after that which builds some sort
of tree, and then walks through it, effectively "running" the
program. Thats where my knowledge on the subject runs out!
All I really want to do is create an interpreter for my simple
scripting language. Does anyone have any suggestions as to where I
should start? Any pointers would be greatly appreciated.
[Yup. Either make a tree or RPN byte codes. As has often been mentioned,
writing yet another scripting interpreter is invariably a waste of time,
since there are several good freeware ones available for the taking.
Return to the
Search the comp.compilers archives again.