!TITLE APPENDIX A: IMP80 Syntax !KEY ::= A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 ::= {newline character} ::= {| character} ::= ! | " | # | $ | % | & | ' | ( | ) | * | + | , | - | . | / | : | < | = | > | ? | @ | [ | ] | \ | ^ | _ | ` | ~ | ; | | | ::= []... ::= %comment | ! ::= []... !PAGE ::= | ::= []... ::= [, ]... ::= [] ::= . [] ::= [] [] [@ ] ::= _ ... | ' ... ' ::= | ::= ' ' | M' ... ' ::= " []... " !PAGE ::= | | | | ::= + | - | \ | ~ ::= = | == | <- | -> ::= + | - ::= | -> | == | \== | ## ::= = | # | \= | <> | > | >= | < | <= ::= * | / | // | + | - | ** | **** | \ | \\ | >> | << | ! | !! | & | . ::= ( [, ]... ) ::= _ [] !PAGE ::= [] []... | | ( ) ::= [] [ ]... ::= ( ) | (*) ::= [] ::= = [, ]... ::= [[%array] %name] | %array [%format] ::= [, ]... ::= [[%array] %name] | %array ::= ( [%or ]... ) ::= [, ]... !PAGE ::= | ::= ( ) | ::= %integer | %real | %long %real ::= %integer | %real | %long | %byte [%integer] | %short [%integer] | %half [%integer] | %string ::= | %record ::= [%alias " "] ::= [, ]... ::= [= ] ::= [[%array] %name] [%spec] [, ]... | %array [%format] [%spec] [] !PAGE ::= %fn | %function | %map ::= %routine | ::= [[%array] %name] | [%name] [] | %name ::= ( [, ]... ) ::= : ::= ( [, ]... ) ::= %own | %external | %constant | %const <%sed> ::= %system | %external | %dynamic ::= %of %program | %of %file | %of %list !PAGE ::= [%and ]... | [%or ]... ::= [ ] | ( ) | %not ::= [%and ]... | [%or ]... <%wf> ::= %while | %for = , , <%iu> ::= %if | %unless !PAGE ::= [] []... [ ] [%and ] | -> [] | %return | %result | %monitor [%and ] | %stop | %signal [%event] [, ] | %exit | %continue ::= <%iu> ::= [%then] %start | %then [] ::= %else %start | %else | %else !PAGE ::= <%iu> | %until | <%wf> ::= ; | ::= ... !PAGE ::= %begin | | %record %format | [<%sed>] [%spec] [] | | %include " " | %switch [, ]... | %on [%event] [, ]... %start | [] | | %finish [] | [<%wf>] %cycle | %repeat [%until ] | [] : | (*) : | %list | %end [] | | !STOP ! definition: not all the types may be available in some implementations. * {EMAS IMP80: definition: replaced by []} * {IMP77: definition: ** | **** replaced by ^ | ^^ . } !PAGE * Text preceded by '{', terminated by '}' and appearing between syntactic elements of a program is treated as a comment. Such a comment is also terminated by a newline character. * IMP80 statements can be continued on the next line with %c. The %c is not required if the break comes immediately after a comma. {IMP77: comment statements cannot be continued.} !>