Support (One) Local Element

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-01-23 23:29:22 -05:00
parent f81f00103e
commit f9ed3e7fbd
2 changed files with 64 additions and 7 deletions
@@ -0,0 +1,49 @@
=========================
Simple Declaration
=========================
parser simple() {
state start {
bool l;
transition accept;
}
};
---
(p4program
(declaration
(parserDeclaration
(parserType
(parser)
(identifier)
)
(parserStates
(parserState
(state)
(identifier)
(parserLocalElements
(parserLocalElement
(variableDeclaration
(typeRef
(baseType
(bool)
)
)
(identifier)
)
)
(semicolon)
)
(parserTransitionStatement
(transition)
(transitionSelectionExpression
(identifier)
)
)
(semicolon)
)
)
)
(semicolon)
)
)