Go backward to The Programming Language Core
Go up to Top
Go forward to Abstract Syntax

A Core Imperative Language

A while loop language

C in Command
E in Expression
L in Location
N in Numeral

C ::= L:=E | C_1;C_2 | if E then C_1 else C_2 fi
    | while E do C od | skip
E ::= N | @L | E_1+E_2 | not E | E_1=E_2
L ::= loc_i, if i>0
N ::= n, if n in Integer

Example

loc_1 := 0; while @loc_1=0 do loc_2:=@loc_1+1 od


Wolfgang.Schreiner@risc.uni-linz.ac.at
Id: core.tex,v 1.3 1996/02/05 10:34:52 schreine Exp schreine

Prev Up Next