BNF for SCL Statements Syntax
This section presents the Simulation Control Language statements expressed formally in the BNF syntax.
Syntax of actions, events, conditions, expressions is the same as in the specification itself. One may use SCL variables defined in the SCP in any Rational Statemate expression except for event expressions. For example, while make_true(c), where c is a local boolean variable, is legal, TRUE(C) is not.
scp_program => PROGRAM program_name ;
breakpoint_part => breakpoint_definition
breakpoint_definition => SET BREAKPOINT
[br_name=>] br_trigger DOdeclaration_section => [CONSTANT const_decl_list]
const_decl_list => const_decl; {const_decl;}
const_decl => const_type id_val_list
id_val_list => id := expression {,id := expression}
var_decl_list => var_dec; {var_dec}
var_dec => [GLOBAL] type id_opt_val_list
id_opt_val_list => id [:= expression] {,id [:= expression]}
array_type => (constant..constant) of simple_type
bit_arrau type => bit-array name (1..6)
sequence_of_statements => scl_statement {; scl_statement}
scl_statement => simple_statement
simple_statement => assign_statement
structured_statement => if_statement
io_statement => read_statement
assign_statement => ASSIGN activity_id scp_name
set_statement => set_operation BREAKPOINT br_name
| SET INFINITE LOOP
expression| SET GO BACK expression
| set_operation REPORT RACING
simple_action_statement => action
random_solution_statement=> RANDOM_SOLUTION
restore_statement => RESTORE_STATUS
status_namesave_statement => SAVE_STATUS status_name
choose_statement => CHOOSE expression
exec_statement => EXEC scp_name
stop_statement => STOP_SCP [scp_name]
status_name => string_constant
if_statement => IF condition THEN
when_statement => WHEN event THEN
while_loop => WHILE condition LOOP
for_loop => FOR condition LOOP
read_statement => READ([file_var,] id_list)
write_statement => WRITE([file_var,]
write_expression_list)open_statement => OPEN(file_var, file_name,
INPUT)| OPEN(file_var, file_name, OUTPUT)
close_statement => CLOSE(file_var)
write_expression_list => write_expression
{,write_expression}