help-bison
[Top][All Lists]
Advanced

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

Re: too many gotos


From: Laurence Finston
Subject: Re: too many gotos
Date: Wed, 13 Oct 2004 12:54:13 +0200 (MEST)

On Wed, 13 Oct 2004, Nick Chapman wrote:

> Or is it better to try transforming the grammar to reduce the number of gotos?
> The problem is, I don't know what aspects of a grammar will influence this.
>

Since the `gotos' occur in the actions rather than the grammar rules,
they are a matter of semantics rather than syntax.  Therefore,
it's quite likely that eliminating them won't be too tricky.

I've found that it's always possible to eliminate `gotos' by
putting code into functions, wrapping it in conditionals, or
both.

I don't think there's anything wrong with the occasional `goto', but
45,000 does seem like a lot to me.

Laurence







reply via email to

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