net.sf.antcontrib.cpptasks.parser

Class CaseInsensitiveLetterState


public final class CaseInsensitiveLetterState
extends AbstractParserState

This parser state checks consumed characters against a specific character (case insensitive).
Author:
Curt Arnold

Constructor Summary

CaseInsensitiveLetterState(AbstractParser parser, char matchLetter, AbstractParserState nextStateArg, AbstractParserState noMatchStateArg)
Constructor.

Method Summary

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

Methods inherited from class net.sf.antcontrib.cpptasks.parser.AbstractParserState

consume, getParser

Constructor Details

CaseInsensitiveLetterState

public CaseInsensitiveLetterState(AbstractParser parser,
                                  char matchLetter,
                                  AbstractParserState nextStateArg,
                                  AbstractParserState noMatchStateArg)
Constructor.
Parameters:
parser - parser
matchLetter - letter to match
nextStateArg - next state if a match on the letter
noMatchStateArg - state if no match on letter

Method Details

consume

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

Copyright B) 2001-2006 Ant-Contrib project. All Rights Reserved.