home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 858 of 2,753   
   =?iso-8859-1?q?Torben_=C6gidius_Mog to e-blade@nonplayercharacter.dk   
   Re: typechecking break-statement   
   04 Dec 06 08:29:18   
   
   From: torbenm@app-1.diku.dk   
      
   "cp"  writes:   
      
   > I was wondering if anyone could give me any pointers (not C pointers)   
   > on how to typecheck for the occurence of a break-statement outside a   
   > loop. I'm using the imperative side of SML/Moscow ML language.   
      
   You could ask your lecturer (i.e., me).  As Matthias pointed out,   
   having an inherited attribute that tells you if you are inside a loop   
   will do the trick.  Or you can postpone the check until code   
   generation, where you need an attribute to tell you where to go.   
   Using a special value (such as NONE) tells you that you aren't in a   
   loop, so you must make the error message instead of generating code.   
      
   	Torben   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca