org.ungoverned.oscar.ldap
Class Parser

java.lang.Object
  extended byorg.ungoverned.oscar.ldap.Parser

public class Parser
extends java.lang.Object


Field Summary
static int APPROX
           
static int APPROX_CRITERIA
           
static java.lang.String ATTRIBUTECHARS0
           
static java.lang.String ATTRIBUTECHARS1
           
static int EOF
           
static int EQUAL
           
static int GREATER_EQUAL
           
static int LESS_EQUAL
           
static char LPAREN
           
static int NOOP
           
static int PRESENT
           
static char RPAREN
           
static int SIMPLE
           
static char STAR
           
static int SUBSTRING
           
 
Constructor Summary
Parser()
           
Parser(LdapLexer l)
           
 
Method Summary
static boolean compare(java.lang.Object lhs, java.lang.String rhs, int operator)
          Compare two operands in an expression with respect to the following operators =, <=, >= and ~= Example: value=100
 java.lang.Object[] getProgram()
           
 void reset()
           
 void reset(LdapLexer l)
           
 void setDebug(java.io.PrintStream out)
           
 boolean start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EOF

public static final int EOF
See Also:
Constant Field Values

LPAREN

public static final char LPAREN
See Also:
Constant Field Values

RPAREN

public static final char RPAREN
See Also:
Constant Field Values

STAR

public static final char STAR
See Also:
Constant Field Values

ATTRIBUTECHARS0

public static final java.lang.String ATTRIBUTECHARS0
See Also:
Constant Field Values

ATTRIBUTECHARS1

public static final java.lang.String ATTRIBUTECHARS1
See Also:
Constant Field Values

SIMPLE

public static final int SIMPLE
See Also:
Constant Field Values

PRESENT

public static final int PRESENT
See Also:
Constant Field Values

SUBSTRING

public static final int SUBSTRING
See Also:
Constant Field Values

NOOP

public static final int NOOP
See Also:
Constant Field Values

EQUAL

public static final int EQUAL
See Also:
Constant Field Values

GREATER_EQUAL

public static final int GREATER_EQUAL
See Also:
Constant Field Values

LESS_EQUAL

public static final int LESS_EQUAL
See Also:
Constant Field Values

APPROX

public static final int APPROX
See Also:
Constant Field Values

APPROX_CRITERIA

public static final int APPROX_CRITERIA
See Also:
Constant Field Values
Constructor Detail

Parser

public Parser()

Parser

public Parser(LdapLexer l)
Method Detail

reset

public void reset()

reset

public void reset(LdapLexer l)

getProgram

public java.lang.Object[] getProgram()

start

public boolean start()
              throws ParseException,
                     java.io.IOException
Throws:
ParseException
java.io.IOException

setDebug

public void setDebug(java.io.PrintStream out)

compare

public static boolean compare(java.lang.Object lhs,
                              java.lang.String rhs,
                              int operator)
                       throws EvaluationException
Compare two operands in an expression with respect to the following operators =, <=, >= and ~= Example: value=100

Parameters:
lhs - an object that implements comparable or an array of objects that implement comparable.
rhs - a string representing the right operand.
operator - an integer that represents the operator.
Returns:
true or false according to the evaluation.
Throws:
EvaluationException - if it is not possible to do the comparison.