Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| language:syntacticreplication [2025/09/04 11:07] – [PRS] rajit | language:syntacticreplication [2025/09/04 11:12] (current) – [The core ACT language] rajit |
|---|
| (sym id : range : body(id) ) | (sym id : range : body(id) ) |
| </code> | </code> |
| The ''sym'' (symbol) might be empty. ''id'' is a variable that can be used in ''body(id)'', and takes the range specified by ''range''. ''range'' can be either an integer-valued expression or ''start .. end'' to indicate a start and end index. The result of the replication is | The ''sym'' (symbol) might be empty. ''id'' is a variable that can be used in the ''body(id)'', and takes the range specified by ''range''. ''range'' can be either an integer-valued expression or ''start .. end'' to indicate a start and end index. The integer value of "id" is substituted into "body(id)" when the replication construct is expanded out. The result of the replication is |
| <code act> | <code act> |
| body(lo) sym body(lo+1) sym ... sym body(hi) | body(lo) sym body(lo+1) sym ... sym body(hi) |
| </code> | </code> |
| where ''lo'' is the starting index of the range, and ''hi'' is the ending index. What follows are different forms of the same construct that can be used in ACT. | where ''lo'' is the starting index of the range, and ''hi'' is the ending index. What follows are different forms of the same construct that can be used in ACT. |
| | |
| | |
| |
| ===== The core ACT language ===== | ===== The core ACT language ===== |
| b[0].R = b[1].L; b[1].R = b[2].L; ... b[8].R = b[9].L; | b[0].R = b[1].L; b[1].R = b[2].L; ... b[8].R = b[9].L; |
| </code> | </code> |
| | In this particular case, the separator is empty. |
| |
| Another example is: | Another example is: |
| ] | ] |
| </code> | </code> |
| | In this scenario, the separator is the ''[]'' operator that is used to separate guarded actions. |
| |
| |