Sather Home Page

Section 6.7.3:
If Statement

An If statement in Sather follows the style of if statments in othe languages so far as concrete syntax and dynamic semantics is concerned. The abstract syntax, however, considers this to be a variant of a case statement in which there is always a minimum of two clauses and in which the guard may be dynamically determined.

Concrete Syntax

if statement = If_SY, expression, guarded clause,
[Elsif_SY, expression, guarded clause},
[default clause], End_SY ;
guarded clause = Then_SY, statement list ;
default clause = Else_SY, statement list ;

Abstract Syntax

Static Semantics

Dynamic Semantics


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