pobs.parser
Class PLimit
java.lang.Object
pobs.PParser
pobs.parser.PLimit
- All Implemented Interfaces:
- PObject
- public class PLimit
- extends PParser
Semantic parser which verifies if a parsed numeric (double) value is within
specified, inclusive boundaries.
- Author:
- Martijn W. van der Lee
Constructor Summary |
PLimit(PObject parser,
double min,
double max)
Sole constructor.
|
Method Summary |
PMatch |
parse(PScanner input,
long begin,
PContext context)
Matches if the numerical (parsed as double) data parsed by the specified
parser is within the specified minimal and maximum boundaries, inclusive. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PLimit
public PLimit(PObject parser,
double min,
double max)
- Sole constructor.
If the lower boundary is greater than the higher boundary, this parser
will never match; boundaries are not interchangeable.
- Parameters:
parser
- the parser which will handle parsing the numbermin
- the lower boundarymax
- the higher boundary
parse
public PMatch parse(PScanner input,
long begin,
PContext context)
- Matches if the numerical (parsed as double) data parsed by the specified
parser is within the specified minimal and maximum boundaries, inclusive.
- Parameters:
input
- Input to be parsed.begin
- Index of first character of input
to be parsed.context
- Parsing context.
- Returns:
- Parsing result.