f9ed3e7fbd
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
50 lines
705 B
Plaintext
50 lines
705 B
Plaintext
=========================
|
|
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)
|
|
)
|
|
)
|
|
|