net.sf.antcontrib.cpptasks.parser

Class WhitespaceOrCaseInsensitiveLetterState

public final class WhitespaceOrCaseInsensitiveLetterState extends AbstractParserState

This parser state checks consumed characters against a specific character (case insensitive) or whitespace.

Author: Curt Arnold

Constructor Summary
WhitespaceOrCaseInsensitiveLetterState(AbstractParser parser, char matchLetter, AbstractParserState nextStateArg)
Constructor.
Method Summary
AbstractParserStateconsume(char ch)
Consumes a character and returns the next state for the parser.

Constructor Detail

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 Detail

consume

public AbstractParserState consume(char ch)
Consumes a character and returns the next state for the parser.

Parameters: ch next character

Returns: the configured nextState if ch is the expected character or the configure noMatchState otherwise.

Copyright ? 2001-2011 Ant-Contrib project. All Rights Reserved.