pobs.parser
Class PExcept
java.lang.Object
pobs.PParser
pobs.parser.PExcept
- All Implemented Interfaces:
- PObject
- public class PExcept
- extends PParser
Matches if the parsed input matches the left-hand parser and not matches the
right-hand parser. This parser will also return a succesfull match if the
right-hand parser could not match as much of the input as the left-hand
parser.
BNF: this := left - right
- Author:
- Martijn W. van der Lee
Constructor Summary |
PExcept(PObject parserLeft,
PObject parserRight)
Sole constructor taking a left-hand and right-hand pobs.PObject. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PExcept
public PExcept(PObject parserLeft,
PObject parserRight)
- Sole constructor taking a left-hand and right-hand pobs.PObject.
- Parameters:
parserLeft
- the left-hand parser, which must matchparserRight
- the right-hand parser, which must not match
parse
public PMatch parse(PScanner input,
long begin,
PContext context)
- Parameters:
input
- Input to be parsed.begin
- Index of first character of input
to be parsed.context
- Parsing context.
- Returns:
- Parsing result.