Class Action

java.lang.Object
de.bottlecaps.markup.blitz.parser.Action

public class Action extends Object
  • Field Details

    • type

      private final Action.Type type
      The action type.
    • argument

      private final int argument
      The action code, interpreted depending on the action:
      • - for SHIFT: the target state
      • - for REDUCE and SHIFT_REDUCE: the reduction id
      • - for FORK: the fork id
      • - for ERROR and ACCEPT: 0 (not needed)
  • Constructor Details

    • Action

      public Action(Action.Type type, int argument)
  • Method Details

    • getType

      public Action.Type getType()
    • getArgument

      public int getArgument()
    • code

      public int code()
    • code

      public static int code(Action.Type type, int argument)
    • of

      public static Action of(int code)
    • toString

      public String toString()
      Overrides:
      toString in class Object