Better Support For Keysets

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-03-27 01:36:38 -04:00
parent fafc80553e
commit 99804e3053
7 changed files with 476 additions and 51 deletions
@@ -87,3 +87,54 @@ parser simple() {
)
)
)
=========================
Simple Transition Statement (To Select Expression With Default)
=========================
parser simple() {
state start {
transition select (se) {
_: next_state;
};
}
};
---
(p4program
(declaration
(parserDeclaration
(parserType
(parser)
(identifier)
)
(parserStates
(parserState
(state)
(identifier)
(parserTransitionStatement
(transition)
(transitionSelectionExpression
(selectExpression
(select)
(expression
(simple_expression
(identifier)
)
)
(selectBody
(selectCase
(keysetExpression
(default_keyset)
)
(colon)
(identifier)
)
)
)
)
)
)
)
)
)
)