Interface StepPatternParser

  • All Known Implementing Classes:
    RegexPrefixCapturingPatternParser

    public interface StepPatternParser

    Parses a step pattern, as provided in the method annotations, creating a StepMatcher which will in turn match textual steps conforming to the pattern. E.g.:

     I give $money to $name
     
    will match
     I give �10 to Fred
     
    and the captured parameters will be "�10" and "Fred".

    • Method Summary

      Modifier and Type Method Description
      String getPrefix()
      Returns current parameter prefix
      StepMatcher parseStep​(StepType stepType, String stepPattern)
      Parses a step pattern to create a step matcher
    • Method Detail

      • parseStep

        StepMatcher parseStep​(StepType stepType,
                              String stepPattern)
        Parses a step pattern to create a step matcher
        Parameters:
        stepType - the step type
        stepPattern - the step pattern
        Returns:
        A StepMatcher that will capture the parameters associated with a step
      • getPrefix

        String getPrefix()
        Returns current parameter prefix
        Returns:
        parameter prefix, e.g. $