This will require mission specific adaptation, but we can provide a default implementation with regular expressions that define stems that open and close blocks.
IF and END_IF counts within a sequence should match, and it should be implemented as a stack so that END_IF statements don't occur prior to a paired IF.
ELSE_IF statements should only occur when there is an open SEQ_IF
LOOPS should have matching END_LOOP commands. BREAK and CONTINUE should only occur within a containing loop
This will require mission specific adaptation, but we can provide a default implementation with regular expressions that define stems that open and close blocks.
IF and END_IF counts within a sequence should match, and it should be implemented as a stack so that END_IF statements don't occur prior to a paired IF.
ELSE_IF statements should only occur when there is an open SEQ_IF
LOOPS should have matching END_LOOP commands. BREAK and CONTINUE should only occur within a containing loop