Modifier and Type | Field and Description |
---|---|
protected int |
fColumn
The column constraint
|
protected IToken |
fToken
The token to be returned when this rule is successful
|
protected static int |
UNDEFINED
Internal setting for the un-initialized column constraint
|
Constructor and Description |
---|
NumberRule(IToken token)
Creates a rule which will return the specified
token when a numerical sequence is detected.
|
Modifier and Type | Method and Description |
---|---|
IToken |
evaluate(ICharacterScanner scanner)
Evaluates the rule by examining the characters available from the provided character scanner.
|
void |
setColumnConstraint(int column)
Sets a column constraint for this rule.
|
protected static final int UNDEFINED
protected IToken fToken
protected int fColumn
public NumberRule(IToken token)
token
- the token to be returnedpublic void setColumnConstraint(int column)
column
- the column in which the pattern startspublic IToken evaluate(ICharacterScanner scanner)
IRule
true
when calling
isUndefined
, if the text that the rule investigated does not match the rule's
requirements
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.