Class PDA


  • public class PDA
    extends java.lang.Object
    Pushdown Automaton for validating context-free languages. In PGPainless, this class is used to validate OpenPGP message packet sequences against the allowed syntax.
    See Also:
    OpenPGP Message Syntax
    • Constructor Detail

      • PDA

        public PDA()
        Default constructor which initializes the PDA to work with the OpenPgpMessageSyntax.
      • PDA

        public PDA​(@Nonnull
                   Syntax syntax,
                   @Nonnull
                   State initialState,
                   @Nonnull
                   StackSymbol... initialStack)
        Construct a PDA with a custom Syntax, initial State and initial StackSymbols.
        Parameters:
        syntax - syntax
        initialState - initial state
        initialStack - zero or more initial stack items (get pushed onto the stack in order of appearance)