pobs.parser
Class PExcept

java.lang.Object
  extended bypobs.PParser
      extended bypobs.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.
 
Method Summary
 PMatch parse(PScanner input, long begin, PContext context)
           
 
Methods inherited from class pobs.PParser
addControl, getErrorInfo, process, setErrorInfo, setMatchAction, setMismatchAction
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 match
parserRight - the right-hand parser, which must not match
Method Detail

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.