help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loops using flex/bison..


From: Anthony DeRobertis
Subject: Re: Loops using flex/bison..
Date: Wed, 6 Feb 2002 06:33:11 -0500

On Wednesday, February 6, 2002, at 05:48 AM, Matthew Tedder (by way of Hans Aberg) wrote:


The main thing I'm looking for is how the designers of lex and yacc intended one to design a compiler/interpreter that has looping constructs such as
while, for, and goto/labels?

Intermediate representations.


Other than using an intermediate code, how can one make the execution of
statements jump to a specified point?

One doesn't.

I figured an interpreter
would be a good first step.

And interpreter can be much easier, because you don't have to worry about the quirks of real hardware. See my AST example of doing it; that will work.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]