Class CaseInsensitiveLetterState
java.lang.Object
net.sf.antcontrib.cpptasks.parser.AbstractParserState
net.sf.antcontrib.cpptasks.parser.CaseInsensitiveLetterState
This parser state checks consumed characters against a specific character
(case insensitive).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final char
Lower case version of character to match.private final AbstractParserState
Next state if a match is found.private final AbstractParserState
Next state if not match is found.private final char
Lower case version of character to match. -
Constructor Summary
ConstructorsConstructorDescriptionCaseInsensitiveLetterState
(AbstractParser parser, char matchLetter, AbstractParserState nextStateArg, AbstractParserState noMatchStateArg) 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 a match is found. -
noMatchState
Next state if not match is found. -
lowerLetter
private final char lowerLetterLower case version of character to match. -
upperLetter
private final char upperLetterLower case version of character to match.
-
-
Constructor Details
-
CaseInsensitiveLetterState
public CaseInsensitiveLetterState(AbstractParser parser, char matchLetter, AbstractParserState nextStateArg, AbstractParserState noMatchStateArg) Constructor.- Parameters:
parser
- parsermatchLetter
- letter to matchnextStateArg
- next state if a match on the letternoMatchStateArg
- state if no match on 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.
-