Files
gp4/tree-sitter-p4/test/corpus/control.txt
T
Will Hawkins 902dc945fd grammar: Add apply to control declaration
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-04-20 02:27:36 -04:00

60 lines
798 B
Plaintext

=========================
Simple Control Declaration
=========================
control simple() {
action a() {
}
table t {
key = {
x: exact;
}
}
apply {
}
};
---
(p4program
(declaration
(control_declaration
(control)
(identifier)
(parameters)
(action_declaration
(action)
(identifier)
(parameters)
(statement
(blockStatement)
)
)
(table_declaration
(table)
(identifier)
(table_property_list
(table_keys
(key)
(table_key_entry
(keysetExpression
(expression
(simple_expression
(identifier)
)
)
)
(table_key_match_type
(exact)
)
)
)
)
)
(apply)
(statement
(blockStatement)
)
)
)
)