@@ -0,0 +1,88 @@
|
||||
=========================
|
||||
Simple Transition Statement (To Identifier)
|
||||
=========================
|
||||
parser simple() {
|
||||
state start {
|
||||
transition accept;
|
||||
}
|
||||
};
|
||||
|
||||
---
|
||||
(p4program
|
||||
(declaration
|
||||
(parserDeclaration
|
||||
(parserType
|
||||
(parser)
|
||||
(identifier)
|
||||
)
|
||||
(parserStates
|
||||
(parserState
|
||||
(state)
|
||||
(identifier)
|
||||
(parserTransitionStatement
|
||||
(transition)
|
||||
(transitionSelectionExpression
|
||||
(identifier)
|
||||
)
|
||||
)
|
||||
(semicolon)
|
||||
)
|
||||
)
|
||||
)
|
||||
(semicolon)
|
||||
)
|
||||
)
|
||||
|
||||
=========================
|
||||
Simple Transition Statement (To Select Expression)
|
||||
=========================
|
||||
parser simple() {
|
||||
state start {
|
||||
transition select (se) {
|
||||
true: next_state;
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
---
|
||||
(p4program
|
||||
(declaration
|
||||
(parserDeclaration
|
||||
(parserType
|
||||
(parser)
|
||||
(identifier)
|
||||
)
|
||||
(parserStates
|
||||
(parserState
|
||||
(state)
|
||||
(identifier)
|
||||
(parserTransitionStatement
|
||||
(transition)
|
||||
(transitionSelectionExpression
|
||||
(selectExpression
|
||||
(select)
|
||||
(expression
|
||||
(identifier)
|
||||
)
|
||||
(selectBody
|
||||
(selectCase
|
||||
(keysetExpression
|
||||
(expression
|
||||
(true)
|
||||
)
|
||||
)
|
||||
(colon)
|
||||
(identifier)
|
||||
)
|
||||
(semicolon)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(semicolon)
|
||||
)
|
||||
)
|
||||
)
|
||||
(semicolon)
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user