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

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

public class AntlrFilterValueParser
extends antlr.LLkParser
implements AntlrFilterValueParserTokenTypes

A filter assertion value encoding parser. This parser is used by the top filter parser to handle equality, extensible, presence and substring assertion values. It also participates in multiplexing the underlying token stream by driving filter assertion value lexer.

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

Field Summary
static java.lang.String[] _tokenNames
           
static antlr.collections.impl.BitSet _tokenSet_0
           
 
Fields inherited from class antlr.Parser
astFactory, inputState, returnAST, tokenNames, tokenTypeToASTClassMap, traceDepth
 
Fields inherited from interface org.apache.directory.shared.ldap.filter.AntlrFilterValueParserTokenTypes
AMPERSAND, ASTERISK, COLON, DIGIT, EOF, ESC, ESCAPED, EXCLAMATION, HEXDIG, LPAREN, NORMAL, NULL_TREE_LOOKAHEAD, RPAREN, TILDE, UTF0, UTF1, UTF1SUBSET, UTF2, UTF3, UTF4, UTF8, UTFMB, VALUEENCODING, VERTBAR
 
Constructor Summary
  AntlrFilterValueParser(antlr.ParserSharedInputState state)
           
  AntlrFilterValueParser(antlr.TokenBuffer tokenBuf)
           
protected AntlrFilterValueParser(antlr.TokenBuffer tokenBuf, int k)
           
  AntlrFilterValueParser(antlr.TokenStream lexer)
           
protected AntlrFilterValueParser(antlr.TokenStream lexer, int k)
           
 
Method Summary
 java.lang.String equal()
          Parser production that parses the equality expression value immediately after the '=' in a filter equality assertion.
 PresenceNode presence(java.lang.String attribute)
          Parser production that parses the presence expressions immediately after the '=' in a presence assertion.
 void setFilterParserMonitor(FilterParserMonitor monitor)
          Sets the monitor used to track the activities of this parser.
 void setLexer(AntlrFilterLexer lexer)
          Sets the filter's main lexer so we can switch back to it.
 void setSelector(antlr.TokenStreamSelector selector)
          Sets the token stream select so we can use it to switch to the filter parsers primary lexer.
 LeafNode substring(java.lang.String attribute)
          Parser production that parses the substring expression value immediately after the '=' in a substring filter assertion.
 java.lang.Object value(java.lang.String attribute)
          Parser production that calls either equal, presence or substring productions.
 
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
Constructor Detail

AntlrFilterValueParser

protected AntlrFilterValueParser(antlr.TokenBuffer tokenBuf,
                                 int k)

AntlrFilterValueParser

public AntlrFilterValueParser(antlr.TokenBuffer tokenBuf)

AntlrFilterValueParser

protected AntlrFilterValueParser(antlr.TokenStream lexer,
                                 int k)

AntlrFilterValueParser

public AntlrFilterValueParser(antlr.TokenStream lexer)

AntlrFilterValueParser

public AntlrFilterValueParser(antlr.ParserSharedInputState state)
Method Detail

setSelector

public void setSelector(antlr.TokenStreamSelector selector)
Sets the token stream select so we can use it to switch to the filter parsers primary lexer.

Parameters:
selector - the token stream selector for the filter parser

setLexer

public void setLexer(AntlrFilterLexer lexer)
Sets the filter's main lexer so we can switch back to it.

Parameters:
lexer - the primary lexer used by the filter parser

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

value

public final java.lang.Object value(java.lang.String attribute)
                             throws antlr.RecognitionException,
                                    antlr.TokenStreamException
Parser production that calls either equal, presence or substring productions.

Throws:
antlr.RecognitionException
antlr.TokenStreamException

equal

public final java.lang.String equal()
                             throws antlr.RecognitionException,
                                    antlr.TokenStreamException
Parser production that parses the equality expression value immediately after the '=' in a filter equality assertion.

Throws:
antlr.RecognitionException
antlr.TokenStreamException

presence

public final PresenceNode presence(java.lang.String attribute)
                            throws antlr.RecognitionException,
                                   antlr.TokenStreamException
Parser production that parses the presence expressions immediately after the '=' in a presence assertion.

Throws:
antlr.RecognitionException
antlr.TokenStreamException

substring

public final LeafNode substring(java.lang.String attribute)
                         throws antlr.RecognitionException,
                                antlr.TokenStreamException
Parser production that parses the substring expression value immediately after the '=' in a substring filter assertion.

Throws:
antlr.RecognitionException
antlr.TokenStreamException


Copyright © 2003-2006 . All Rights Reserved.