You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many projects that Phoenix will have to support will write complex sequences with complex logic. The form in which logic takes will be different per sequencing language (VML, FCPL, Fprime, etc.), so implementing branch detection in a multi-mission way is key.
Describe the feature request
Allow generic definition of branch detection per sequence language grammar. Each grammar should come with its own branch detection logic. Add branch detection logic for VML and FCPL.
In FCPL, the following commands (sequence directives) indicate the start of a branch:
SEQ_DIR_IF
SEQ_DIR_IF_OR
SEQ_DIR_IF_AND
SEQ_DIR_ELSE (ends previous branch and starts new branch)
SEQ_DIR_WAIT_UNTIL
SEQ_DIR_WAIT_UNTIL_VAR
SEQ_DIR_WAIT_UNTIL_AND
SEQ_DIR_WAIT_UNTIL_OR
SEQ_DIR_WAIT_UNTIL_TIMEOUT (ends previous branch and starts new branch)
SEQ_DIR_LOOP
And the following indicate the end of a branch:
SEQ_DIR_END_IF
SEQ_DIR_END_LOOP
SEQ_DIR_END_WAIT_UNTIL
In VML, the following tokens indicate the starts and ends of branches:
Checked for duplicates
No - I haven't checked
Alternatives considered
No - I haven't considered
Related problems
Many projects that Phoenix will have to support will write complex sequences with complex logic. The form in which logic takes will be different per sequencing language (VML, FCPL, Fprime, etc.), so implementing branch detection in a multi-mission way is key.
Describe the feature request
Allow generic definition of branch detection per sequence language grammar. Each grammar should come with its own branch detection logic. Add branch detection logic for VML and FCPL.
In FCPL, the following commands (sequence directives) indicate the start of a branch:
SEQ_DIR_IF
SEQ_DIR_IF_OR
SEQ_DIR_IF_AND
SEQ_DIR_ELSE (ends previous branch and starts new branch)
SEQ_DIR_WAIT_UNTIL
SEQ_DIR_WAIT_UNTIL_VAR
SEQ_DIR_WAIT_UNTIL_AND
SEQ_DIR_WAIT_UNTIL_OR
SEQ_DIR_WAIT_UNTIL_TIMEOUT (ends previous branch and starts new branch)
SEQ_DIR_LOOP
And the following indicate the end of a branch:
SEQ_DIR_END_IF
SEQ_DIR_END_LOOP
SEQ_DIR_END_WAIT_UNTIL
In VML, the following tokens indicate the starts and ends of branches:
flow: branch | return | delay;
branch: branch_always | branch_true | branch_false;
branch_always: BRANCH label_name;
branch_true: BRANCH_TRUE simple_expr label_name; branch_false: BRANCH_FALSE simple_expr label_name;
if: IF if_condition;
else_if: ELSE_IF if_condition; else: ELSE;
end_if: END_IF; if_condition: compound_expr;
while: WHILE while_condition; end_while: END_WHILE; while_condition: compound_expr;
for: FOR for_assignment
for_bound optional_step DO;
end_for: END_FOR;
for_assignment: variable_name ASSIGNMENT compound_expr;
for_bound: for_direction
compound_expr; for_direction: TO| DOWN_TO;
(would appreciate someone double checking this list for me)
For VML, see docs in #1411 for more detail
The text was updated successfully, but these errors were encountered: