Package org.pgpainless.decryption_verification.syntax_check

# 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 Type
Method
Description
`Transition`
`transition(State from, InputSymbol input, StackSymbol stackItem)`
Describe a transition rule from `State`

## Method Details

### transition

@Nonnull Transition transition(@Nonnull State from, @Nonnull InputSymbol input, @Nullable StackSymbol stackItem) throws MalformedOpenPgpMessageException
Describe a transition rule from `State`

    from

for `InputSymbol`

    input

with `StackSymbol`

    stackItem

from the top of the `PDAs` stack. The resulting `Transition` contains the new `State`, as well as a list of `StackSymbols` that get pushed onto the stack by the transition rule. If there is no applicable rule, a `MalformedOpenPgpMessageException` is thrown, since in this case the `InputSymbol` must be considered illegal.

Parameters:
  `from` - current state of the PDA
  `input` - input symbol
  `stackItem` - 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)