Appendix A. Pascal Syntax Flow
Appendix A. Pascal Syntax Flow
1
Pascal Syntax Flow Graph
<program>
PROGRAM identifier ( identifier ) ; block .
<block> ,
LABEL Unsigned integer
,
;
; block ;
variable := expression
function identifier ,
; procedure identifier
,
;
WHILE expression DO statement
,
GOTO unsigned integer 3
Pascal Syntax Flow Graph
<identifier>
letter <unsigned integer>
letter
digit
digit
<unsigned number>
+
unsigned integer . unsigned integer E unsigned integer
-
4
Pascal Syntax Flow Graph
<type>
simple type
<simple type>
type identifier
type identifier
PACKED ,
( identifier ) simple type type
ARRAY [ ] OF
,
FILE OF type
constant .. constant
SET OF simple type
identifier : type
;
,
constant : ( field list )
5
Pascal Syntax Flow Graph
<variable>
variable identifier
<factor> factor
unsigned constant
*
variable
,
/
function identifier ( expression )
DIV
( expression )
MOD
NOT factor
AND
[ ]
expression .. expression
,
6
Pascal Syntax Flow Graph
<simple Expression>
+
term
-
+ - OR
<expression> term
simple expression
= < > IN
simple expression
<parameter list>
FUNCTION ,
VAR ,
PROCEDURE identifier