Hi,
I think about some constructs simplification. Currently for 'for and 'while'.
This example:
for (i:=1; i<=10; i:=i+1) {
for (j:=1; j<=10; j:=j+1) {
for (k:=1; k<=10; k:=k+1) {
:
}
}
}
may be written as :
for (i:=1; i<=10; i:=i+1)
for (j:=1; j<=10; j:=j+1)
for (k:=1; k<=10; k:=k+1) {
:
}
In the same way:
var integer i;
while (i<=10) {
for (j:=1; j<=10; j:=j+1) {
for (k:=1; k<=10; k:=k+1) {
:
}
}
}
may be replaced by:
while (i<=10)
for (j:=1; j<=10; j:=j+1)
for (k:=1; k<=10; k:=k+1) {
:
}
The BNF changes may be:
ForStatement ::= ForKeyword "(" Initial SemiColon Final SemiColon Step ")"
( StatementBlock | LoopConstruct | ConditionalConstruct )
WhileStatement ::= WhileKeyword "(" BooleanExpression ")"
( StatementBlock | LoopConstruct | ConditionalConstruct )
BR,
Mariusz Kupiec