org.apache.directory.shared.ldap.filter
Class AntlrFilterParser

java.lang.Object
  extended byantlr.Parser
      extended byantlr.LLkParser
          extended byorg.apache.directory.shared.ldap.filter.AntlrFilterParser
All Implemented Interfaces:
AntlrFilterParserTokenTypes

public class AntlrFilterParser
extends antlr.LLkParser
implements AntlrFilterParserTokenTypes

An LDAP filter parser.

Author:
Alex Karasulu
See Also:
String Representation of Search Filters

Field Summary
static java.lang.String[] _tokenNames
           
static antlr.collections.impl.BitSet _tokenSet_0
           
static antlr.collections.impl.BitSet _tokenSet_1
           
static antlr.collections.impl.BitSet _tokenSet_2
           
static antlr.collections.impl.BitSet _tokenSet_3
           
 
Fields inherited from class antlr.Parser
astFactory, inputState, returnAST, tokenNames, tokenTypeToASTClassMap, traceDepth
 
Fields inherited from interface org.apache.directory.shared.ldap.filter.AntlrFilterParserTokenTypes
ALPHA, AMPERSAND, AMPERSTAND, APPROX, ASTERISK, ATTRIBUTEDESCRIPTION, COLON, COLONEQUALS, DESCR, DIGIT, DN, EOF, EQUALS, ESC, ESCAPED, EXCLAMATION, GREATEROREQUAL, HEXDIG, LANGLE, LDIGIT, LESSOREQUAL, LPAREN, NORMAL, NULL_TREE_LOOKAHEAD, NUMBER, NUMERICOID, OID, OPTION, OPTIONS, RANGLE, RPAREN, TILDE, UTF0, UTF1, UTF1SUBSET, UTF2, UTF3, UTF4, UTF8, UTFMB, VALUEENCODING, VERTBAR, WS
 
Constructor Summary
  AntlrFilterParser(antlr.ParserSharedInputState state)
           
  AntlrFilterParser(antlr.TokenBuffer tokenBuf)
           
protected AntlrFilterParser(antlr.TokenBuffer tokenBuf, int k)
           
  AntlrFilterParser(antlr.TokenStream lexer)
           
protected AntlrFilterParser(antlr.TokenStream lexer, int k)
           
 
Method Summary
 BranchNode and()
          A recursive production for matching AND'd filter expressions.
 ExtensibleNode extensible()
          Extensible filter assertion matching production.
 ExprNode filter()
          The top level production for matching a filter expression.
 ExprNode filtercomp()
          A production for matching composite filter expressions.
 LeafNode item()
          A production for matching all non-terminal assertions.
 BranchNode not()
          A recursive production for matching negated filter expressions.
 BranchNode or()
          A recursive production for matching OR'd filter expressions.
 void setFilterParserMonitor(FilterParserMonitor monitor)
          Sets the monitor used to track the activities of this parser.
 void setSelector(antlr.TokenStreamSelector selector)
          Sets the token stream selector used for multiplexing the underlying stream.
 void setValueLexer(AntlrFilterValueLexer valueLexer)
          Sets the filter value encoding lexer.
 void setValueParser(AntlrFilterValueParser valueParser)
          Sets the value parser pulling tokens from the value lexer.
 LeafNode simple()
          General filter assertion matching production for approximate, greater or equal, less or equal, equals, substring, and presence simple items,
 
Methods inherited from class antlr.LLkParser
consume, LA, LT, traceIn, traceOut
 
Methods inherited from class antlr.Parser
addMessageListener, addParserListener, addParserMatchListener, addParserTokenListener, addSemanticPredicateListener, addSyntacticPredicateListener, addTraceListener, consumeUntil, consumeUntil, defaultDebuggingSetup, getAST, getASTFactory, getFilename, getInputState, getTokenName, getTokenNames, getTokenTypeToASTClassMap, isDebugMode, mark, match, match, matchNot, panic, recover, removeMessageListener, removeParserListener, removeParserMatchListener, removeParserTokenListener, removeSemanticPredicateListener, removeSyntacticPredicateListener, removeTraceListener, reportError, reportError, reportWarning, rewind, setASTFactory, setASTNodeClass, setASTNodeType, setDebugMode, setFilename, setIgnoreInvalidDebugCalls, setInputState, setTokenBuffer, traceIndent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_tokenNames

public static final java.lang.String[] _tokenNames

_tokenSet_0

public static final antlr.collections.impl.BitSet _tokenSet_0

_tokenSet_1

public static final antlr.collections.impl.BitSet _tokenSet_1

_tokenSet_2

public static final antlr.collections.impl.BitSet _tokenSet_2

_tokenSet_3

public static final antlr.collections.impl.BitSet _tokenSet_3
Constructor Detail

AntlrFilterParser

protected AntlrFilterParser(antlr.TokenBuffer tokenBuf,
                            int k)

AntlrFilterParser

public AntlrFilterParser(antlr.TokenBuffer tokenBuf)

AntlrFilterParser

protected AntlrFilterParser(antlr.TokenStream lexer,
                            int k)

AntlrFilterParser

public AntlrFilterParser(antlr.TokenStream lexer)

AntlrFilterParser

public AntlrFilterParser(antlr.ParserSharedInputState state)
Method Detail

setSelector

public void setSelector(antlr.TokenStreamSelector selector)
Sets the token stream selector used for multiplexing the underlying stream.

Parameters:
selector - the token stream selector used for multiplexing

setValueLexer

public void setValueLexer(AntlrFilterValueLexer valueLexer)
Sets the filter value encoding lexer.

Parameters:
valueLexer - the filter value encoding lexer

setValueParser

public void setValueParser(AntlrFilterValueParser valueParser)
Sets the value parser pulling tokens from the value lexer.

Parameters:
valueParser - value parser pulling tokens from the value lexer

setFilterParserMonitor

public void setFilterParserMonitor(FilterParserMonitor monitor)
Sets the monitor used to track the activities of this parser.

Parameters:
monitor - used to track the activities of this parser

filter

public final ExprNode filter()
                      throws antlr.RecognitionException,
                             antlr.TokenStreamException
The top level production for matching a filter expression.

Throws:
antlr.RecognitionException
antlr.TokenStreamException

filtercomp

public final ExprNode filtercomp()
                          throws antlr.RecognitionException,
                                 antlr.TokenStreamException
A production for matching composite filter expressions.

Throws:
antlr.RecognitionException
antlr.TokenStreamException

and

public final BranchNode and()
                     throws antlr.RecognitionException,
                            antlr.TokenStreamException
A recursive production for matching AND'd filter expressions.

Throws:
antlr.RecognitionException
antlr.TokenStreamException

or

public final BranchNode or()
                    throws antlr.RecognitionException,
                           antlr.TokenStreamException
A recursive production for matching OR'd filter expressions.

Throws:
antlr.RecognitionException
antlr.TokenStreamException

not

public final BranchNode not()
                     throws antlr.RecognitionException,
                            antlr.TokenStreamException
A recursive production for matching negated filter expressions.

Throws:
antlr.RecognitionException
antlr.TokenStreamException

item

public final LeafNode item()
                    throws antlr.RecognitionException,
                           antlr.TokenStreamException
A production for matching all non-terminal assertions. This includes extensible, presence, substring, greaterorequal, lessorequal, and equality filter assertions.

Throws:
antlr.RecognitionException
antlr.TokenStreamException

simple

public final LeafNode simple()
                      throws antlr.RecognitionException,
                             antlr.TokenStreamException
General filter assertion matching production for approximate, greater or equal, less or equal, equals, substring, and presence simple items,

Throws:
antlr.RecognitionException
antlr.TokenStreamException

extensible

public final ExtensibleNode extensible()
                                throws antlr.RecognitionException,
                                       antlr.TokenStreamException
Extensible filter assertion matching production.

Throws:
antlr.RecognitionException
antlr.TokenStreamException


Copyright © 2003-2006 . All Rights Reserved.