help-bison
[Top][All Lists]
Advanced

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

Re: Re: loops


From: Satya
Subject: Re: Re: loops
Date: Mon, 19 Jun 2006 14:41:35 -0500

hi,
You can't have bison implement the loop for you; bison can only
recognize the REPEAT..UNTIL structure. It is upto you to decide what
to do after such a construct has been recognized in the input. You
would have to write a  semantic action to execute the loop;

with 'statement' and 'condition' having their own rules and semantics,
it is not possible to give any specific example here.

IMO it is out of scope for bison to implement the semantics of the loop for you.

./satya

On 6/19/06, temp14 <address@hidden> wrote:
Can you show me some examples??


> [If you reply, make sure to cc the Help-Bison list.]
>
> There is a section in the Bison manual, "Implementing Gotos/Loops".
> You must build a "closure", that can execute the loop after the
> parsing has been done, either by outputting some code in a language
> that can execute it, or write it directly into the memory.
>
> On 19 Jun 2006, at 01:54, temp14 wrote:
>
> > How i can do loop?
> > I have:
> > loop: REPEAT statement UNTIL condiction ';'
> > Can someone write me action for this?
> > Tenx
> >
> >
> > _______________________________________________
> > address@hidden http://lists.gnu.org/mailman/listinfo/help-bison
>
>


_______________________________________________
address@hidden http://lists.gnu.org/mailman/listinfo/help-bison



--
"When you have eliminated the impossible, whatever remains, however
improbable, must be the truth".
-Sherlock Holmes, The sign of four.




reply via email to

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