Class WhitespaceOrCaseInsensitiveLetterState
java.lang.Object
net.sf.antcontrib.cpptasks.parser.AbstractParserState
net.sf.antcontrib.cpptasks.parser.WhitespaceOrCaseInsensitiveLetterState
This parser state checks consumed characters against a specific character
(case insensitive) or whitespace.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final char
Character to match (lower case).private final AbstractParserState
Next state if the character is found.private final char
Character to match (upper case). -
Constructor Summary
ConstructorsConstructorDescriptionWhitespaceOrCaseInsensitiveLetterState
(AbstractParser parser, char matchLetter, AbstractParserState nextStateArg) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionconsume
(char ch) Consumes a character and returns the next state for the parser.Methods inherited from class net.sf.antcontrib.cpptasks.parser.AbstractParserState
getParser
-
Field Details
-
nextState
Next state if the character is found. -
lowerLetter
private final char lowerLetterCharacter to match (lower case). -
upperLetter
private final char upperLetterCharacter to match (upper case).
-
-
Constructor Details
-
WhitespaceOrCaseInsensitiveLetterState
public WhitespaceOrCaseInsensitiveLetterState(AbstractParser parser, char matchLetter, AbstractParserState nextStateArg) Constructor.- Parameters:
parser
- parsermatchLetter
- letter to matchnextStateArg
- next state if a match on the letter
-
-
Method Details
-
consume
Consumes a character and returns the next state for the parser.- Specified by:
consume
in classAbstractParserState
- Parameters:
ch
- next character- Returns:
- the configured nextState if ch is the expected character or the configure noMatchState otherwise.
-