I am confused as to whether the following is allowed:
(I am using declaration in the forloop rule however declaration also defines how to declare other things. Could this be error checked later in the compiler? Am I clear?)
declaration :
operand ASSIGNMENTOPERATOR variable var_type CONST?
|operations ASSIGNMENTOPERATOR variable var_type CONST?
|funcall ASSIGNMENTOPERATOR variable var_type CONST?
|(funcall|operand|NOINDEXARRAY) ASSIGNMENTOPERATOR variable var_type ARRAY CONST? ;
forloop :
block
(LPARENS ((number_operation ASSIGNMENTOPERATOR variable)|number_functions)
SEMICOLON bool_operation
SEMICOLON declaration
RPARENS
)
'for'
;
UPDATE: I know that it would work when I supply the right type of declaration inside the for loop. The question is what happens if I don't?