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 fromStatefrom
forInputSymbolinput
withStackSymbolstackItem
from the top of thePDAsstack. The resultingTransitioncontains the newState, as well as a list ofStackSymbolsthat get pushed onto the stack by the transition rule. If there is no applicable rule, aMalformedOpenPgpMessageExceptionis thrown, since in this case theInputSymbolmust 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)
-