A "System declarations" informa ao analisador e
interpretador sobre quais objetos devem ser utilizados no sistema para
propósitos internos.
Um exemplo de uma "system declarations" é
$
system "integer" is integer;
Isto define que todos literais "integer" são do tipo de dado integer.
Além disso integer é usado como tipo para todos os inteiros gerados por "primitive
actions".
Existem diferentes objetos que são definidos por uma "system
declaration"
·
Os tipos literais e
'expressões simples', por exemplo: string para string's e integer para integer's.
·
Outros objetos são
usados como 'valores de resultado' para "primitive
actions", por exemplo:
TRUE,
FALSE e empty
·
As EXCEPTIONS que
devem ser lançadas por "primitive actions", por exemplo:
NUMERIC_ERROR
e MEMORY_ERROR
·
Outros objetos são
utilizados para várias "actions" implícitas, por exemplo:
:=
::= destroy write and flush
As "system declarations" a seguir existem
$
system "type" is type;
$
system "expr" is expr;
$
system "integer" is integer;
$
system "bigInteger" is bigInteger;
$
system "char" is char;
$
system "string" is string;
$
system "proc" is proc;
$
system "float" is float;
$
system "true" is TRUE;
$
system "false" is FALSE;
$
system "empty" is empty;
$
system "memory_error" is MEMORY_ERROR;
$
system "numeric_error" is NUMERIC_ERROR;
$
system "range_error" is RANGE_ERROR;
$
system "file_error" is FILE_ERROR;
$
system "illegal_action" is ILLEGAL_ACTION;
$
system "assign" is := ;
$
system "create" is ::= ;
$
system "destroy" is destroy;
$
system "ord" is ord;
$
system "in" is in;
$
system "prot_outfile" is PROT_OUTFILE;
$
system "flush" is flush;
$
system "write" is write;
$ system
"writeln" is writeln;
$
system "main" is main;
Nenhum comentário:
Postar um comentário