Re: Question about GOTO syntax checking

thiadmer@compuphase.com (Thiadmer Riemersma)
19 Jul 1999 01:19:52 -0400

          From comp.compilers

Related articles
Question about GOTO syntax checking magnus.jansson@mbox319.swipnet.se (Magnus Jansson) (1999-07-14)
Re: Question about GOTO syntax checking rkrayhawk@aol.com (1999-07-14)
Re: Question about GOTO syntax checking thiadmer@compuphase.com (1999-07-19)
Re: Question about GOTO syntax checking cfc@world.std.com (Chris F Clark) (1999-07-19)
Re: Question about GOTO syntax checking jonathan_barker@my-deja.com (1999-07-20)
| List of all articles for this month |

From: thiadmer@compuphase.com (Thiadmer Riemersma)
Newsgroups: comp.compilers
Date: 19 Jul 1999 01:19:52 -0400
Organization: ITB CompuPhase
References: 99-07-053
Keywords: analysis

On 14 Jul 1999 02:08:38 -0400, "Magnus Jansson"
<magnus.jansson@mbox319.swipnet.se> wrote:


>But: How do I check that a goto statement doesn't end up inside
>an if statement or a loop? For example:


What I once did was to verify that the nesting level of braces was the
same for the goto instruction as for its label. I also inserted
"hidden" braces for the body of an "if" or a loop if its body was a
single statement.


This limitation would not allow you to jump into or out off a compound
block. Perhaps you want to be able to jump out off a compound block,
but not into one. That could be done with a slight variation of this
technique.


Thiadmer
-----------------------------------------------------
CompuPhase
animation tools for programmers, contract programming


Website: www.compuphase.com
email: info@compuphase.com


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.