[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

unnamed-faq-93

 
To: "Stones, Darren" <Darren.Stones@nectech.co.uk>
Subject: Re: You're the man to see?
In-reply-to: Your message of Wed, 23 Jun 1999 11:10:29 PDT.
Date: Wed, 23 Jun 1999 09:01:40 PDT
From: Vern Paxson <vern>

> I hope you can help me.  I am using Flex and Bison to produce an interpreted
> language.  However all goes well until I try to implement an IF statement or
> a WHILE.  I cannot get this to work as the parser parses all the conditions
> eg. the TRUE and FALSE conditons to check for a rule match.  So I cannot
> make a decision!!

You need to use the parser to build a parse tree (= abstract syntax trwee),
and when that's all done you recursively evaluate the tree, binding variables
to values at that time.

		Vern

[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated by Wolfram Kahl on September, 9 2006 using texi2html 1.76.