Interface Syntax
- All Known Implementing Classes:
OpenPgpMessageSyntax
public interface Syntax
This interface can be used to define a custom syntax for the
PDA
.-
Method Summary
Modifier and TypeMethodDescriptiontransition
(State from, InputSymbol input, StackSymbol stackItem) Describe a transition rule fromState
-
Method Details
-
transition
@Nonnull Transition transition(@Nonnull State from, @Nonnull InputSymbol input, @Nullable StackSymbol stackItem) throws MalformedOpenPgpMessageException Describe a transition rule fromState
from
forInputSymbol
input
withStackSymbol
stackItem
from the top of thePDAs
stack. The resultingTransition
contains the newState
, as well as a list ofStackSymbols
that get pushed onto the stack by the transition rule. If there is no applicable rule, aMalformedOpenPgpMessageException
is thrown, since in this case theInputSymbol
must be considered illegal.- Parameters:
from
- current state of the PDAinput
- input symbolstackItem
- item that got popped from the top of the stack- Returns:
- applicable transition rule containing the new state and pushed stack symbols
- Throws:
MalformedOpenPgpMessageException
- if there is no applicable transition rule (the input symbol is illegal)
-