-
Notifications
You must be signed in to change notification settings - Fork 5
SEFL Syntax
Radu Stoenescu edited this page Mar 7, 2017
·
5 revisions
-
tag
:'tag_id'
;'L3'
,'L2'
-
tag_expression
: an arithmetic expression encolsed in square brackets using + or - and numbers or tags, parenthesis are not allowed;['L2' + 100]
,['L2' + 'L3' - 15 + 100]
-
lvalue
- Metadata field:
"id"
;"flag"
- Tag expression:
tag_expression
;['L2']
,['L2' + 15]
- Metadata field:
-
rvalue
:- Tag expression
- Metadata field
-
- or - and the above ones, no paranthesis;
[
L2+ 100] + "sum" - 10 + ['L3']
- or - and the above ones, no paranthesis;
One instruction per line, empty lines are allowed.
Only single line comments are allowed currently, a comment line starts with a #
.
- Allocate
lvalue[, size]
, for example:"IPSrc"
, "L2
+ 15, 100" if a tag expression is used, the size is mandatory. - Assign:
lvalue = rvalue
- Constrain:
lvalue <- arithmetic_constraint
lvalue <- ! arithmetic_constraint
lvalue <- arithmetic_constraint | arithmetic_constraint
lvalue <- arithmetic_constraint & arithmetic_constraint
- any permutation of these using proper placing of the parenthesis
- Exists:
? lvalue
- If:
if (constrain_instruction) instruction_block else instruction_block
- Create tag:
tag(id, tag_expression)
;tag(L2, 0)
,tag(Encap,
L2- 200)
- Instruction blocks:
- sequential instruction block(basic):
{instructions}
- sequential instruction block(basic):
- fork: `f{instructions}`
- parallel: `p{instructions}`
- Destroy tag:
untag(id)
- Deallocate:
! lvalue
- Fail:
!
- Forward:
-> port_id
- Noop:
-