Class WhitespaceOrCaseInsensitiveLetterState

java.lang.Object
net.sf.antcontrib.cpptasks.parser.AbstractParserState
net.sf.antcontrib.cpptasks.parser.WhitespaceOrCaseInsensitiveLetterState

public final class WhitespaceOrCaseInsensitiveLetterState extends AbstractParserState
This parser state checks consumed characters against a specific character (case insensitive) or whitespace.
  • Field Details

    • nextState

      private final AbstractParserState nextState
      Next state if the character is found.
    • lowerLetter

      private final char lowerLetter
      Character to match (lower case).
    • upperLetter

      private final char upperLetter
      Character to match (upper case).
  • Constructor Details

    • WhitespaceOrCaseInsensitiveLetterState

      public WhitespaceOrCaseInsensitiveLetterState(AbstractParser parser, char matchLetter, AbstractParserState nextStateArg)
      Constructor.
      Parameters:
      parser - parser
      matchLetter - letter to match
      nextStateArg - next state if a match on the letter
  • Method Details

    • consume

      public AbstractParserState consume(char ch)
      Consumes a character and returns the next state for the parser.
      Specified by:
      consume in class AbstractParserState
      Parameters:
      ch - next character
      Returns:
      the configured nextState if ch is the expected character or the configure noMatchState otherwise.