Sather Home Page

Section 6.7.16:
Break Statement

This is a 'built-in' iter - which is actually part of the Sather language. Its purpose is to change the flow of control to leave the nearest looping environment and continue to execute following code.

Concrete Syntax

break statement = Break_SY, Iter_SY ;

Abstract Syntax

This statement type makes use of the built-in routine with the 'Break' identity. This is defined as in the following invariant -

Predefined_Call ::
      id : token
      args : Feature
      impl : Feature
      rval : [Value_Expression] ;
   inv mk_Predefined_Call(expid,args,imp,val) ==
      expid = Break
      and len args = nil
      and imp.impl = break_built_in()
      and val = nil

Static Semantics

The well-formedness for this iterator is identically true.

Dynamic Semantics

The attach statement associates a new thread for the first argument with a method call which is its second argument.

break_built_in()

post true

errs Break_loop : true -> do_leave_loop

do_leave_loop()

TO BE DONE

Specification Index Language Index Section 6 Index
Comments or enquiries should be made to Keith Hopper.
Page last modified: Wednesday, 25 April 2001.
Produced with Amaya