Class DiagnosisMarkUp

java.lang.Object
eu.bandm.tools.d2d2.infra.DiagnosisMarkUp
Direct Known Subclasses:
DiagnosisMarkUp.NoMarkup, DiagnosisMarkUp.VT100

public abstract class DiagnosisMarkUp extends Object
Defines the string constants for presenting the parser situation to the user on a given type of terminal.

The string contants printed are needed to visually mark-up (for each stack frame printed) (a) the tag currently selected and (b) the set of all possible follower tags. (a) and (b) may apply to the same tag. The strings define the switching on and switching off of the three possible combinations.

The two non-abstract methods are fall-back implementations and simply concatenate the two dedicated strings.

  • Field Details

    • on_VT100

      public static final DiagnosisMarkUp.VT100 on_VT100
      Constant instance to be used as method parameter for activating the vt 100 behaviour.
  • Constructor Details

    • DiagnosisMarkUp

      public DiagnosisMarkUp()
  • Method Details

    • open_actual

      public abstract String open_actual()
      The visual mark-up for the currently active tag.
    • open_possible

      public abstract String open_possible()
      The visual mark-up for all possible follower tags.
    • open_actual_and_possible

      public String open_actual_and_possible()
      The visual mark-up for an active tag which is also a possible follower.
    • close_actual

      public abstract String close_actual()
      End the visual mark-up for the currently active tag.
    • close_possible

      public abstract String close_possible()
      End the visual mark-up for all possible follower tags.
    • close_actual_and_possible

      public String close_actual_and_possible()
      End the visual mark-up for an active tag which is also a possible follower.