public class AntlrDnParser extends antlr.LLkParser implements AntlrDnTokenTypes
Modifier and Type | Field and Description |
---|---|
static 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 |
static antlr.collections.impl.BitSet |
_tokenSet_4 |
static antlr.collections.impl.BitSet |
_tokenSet_5 |
ALPHA, CHAR_REST, COMMA, DIGIT, DOT, DQUOTE, EOF, EQUALS, ESC, ESCESC, ESCSHARP, HEX, HEXPAIR, HEXPAIR_OR_ESCESC_ESCSHARP_OR_ESC, HEXVALUE, HEXVALUE_OR_SHARP, HYPHEN, LANGLE, LDIGIT, NULL_TREE_LOOKAHEAD, NUMBER, NUMERICOID, NUMERICOID_OR_ALPHA_OR_DIGIT, PLUS, RANGLE, SEMI, SHARP, SPACE, UNDERSCORE, UTFMB
Constructor and Description |
---|
AntlrDnParser(antlr.ParserSharedInputState state) |
AntlrDnParser(antlr.TokenBuffer tokenBuf) |
AntlrDnParser(antlr.TokenStream lexer) |
Modifier and Type | Method and Description |
---|---|
String |
attributeType()
RFC 4514 Section 3
|
String |
attributeTypeAndValue(SchemaManager schemaManager,
Rdn rdn)
RFC 4514, Section 3
|
void |
attributeValue(org.apache.directory.api.ldap.model.name.AntlrDnParser.UpAndNormValue value)
RFC 4514, Section 3
|
String |
descr()
RFC 4512 Section 1.4
|
void |
distinguishedName(SchemaManager schemaManager,
Dn dn)
Parses a Dn string.
|
void |
hexstring(org.apache.directory.api.ldap.model.name.AntlrDnParser.UpAndNormValue value)
RFC 4514 Section 3
|
void |
lutf1(org.apache.directory.api.ldap.model.name.AntlrDnParser.UpAndNormValue value)
RFC 4514, Section 3:
|
String |
numericoid()
RFC 4512 Section 1.4
|
void |
pair(org.apache.directory.api.ldap.model.name.AntlrDnParser.UpAndNormValue value)
RFC 4514, Section 3
|
void |
quotestring(org.apache.directory.api.ldap.model.name.AntlrDnParser.UpAndNormValue value)
RFC 2253, Section 3
|
void |
relativeDistinguishedName(SchemaManager schemaManager,
Rdn rdn)
Parses a Rdn string.
|
String |
relativeDistinguishedNames(SchemaManager schemaManager,
List<Rdn> rdns)
Parses a Dn string.
|
char |
special()
RFC 4514 Section 3
|
void |
string(org.apache.directory.api.ldap.model.name.AntlrDnParser.UpAndNormValue value)
RFC 4514 Section 3
|
void |
sutf1(org.apache.directory.api.ldap.model.name.AntlrDnParser.UpAndNormValue value)
RFC 4514, Section 3:
|
void |
utfmb(org.apache.directory.api.ldap.model.name.AntlrDnParser.UpAndNormValue value)
Process a UTFMB char
|
addMessageListener, addParserListener, addParserMatchListener, addParserTokenListener, addSemanticPredicateListener, addSyntacticPredicateListener, addTraceListener, consumeUntil, consumeUntil, 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
public static final String[] _tokenNames
public static final antlr.collections.impl.BitSet _tokenSet_0
public static final antlr.collections.impl.BitSet _tokenSet_1
public static final antlr.collections.impl.BitSet _tokenSet_2
public static final antlr.collections.impl.BitSet _tokenSet_3
public static final antlr.collections.impl.BitSet _tokenSet_4
public static final antlr.collections.impl.BitSet _tokenSet_5
public AntlrDnParser(antlr.TokenBuffer tokenBuf)
public AntlrDnParser(antlr.TokenStream lexer)
public AntlrDnParser(antlr.ParserSharedInputState state)
public final void distinguishedName(SchemaManager schemaManager, Dn dn) throws antlr.RecognitionException, antlr.TokenStreamException
distinguishedName = [ relativeDistinguishedName *( COMMA relativeDistinguishedName ) ]RFC 2253, Section 3
distinguishedName = [name] name = name-component *("," name-component)RFC 1779, Section 2.3
<name> ::= <name-component> ( <spaced-separator> ) | <name-component> <spaced-separator> <name> <spaced-separator> ::= <optional-space> <separator> <optional-space> <separator> ::= "," | ";" <optional-space> ::= ( <CR> ) *( " " )
schemaManager
- The SchemaManagerdn
- The Dn to updateantlr.RecognitionException
- If the token is invalidantlr.TokenStreamException
- When we weren't able to fetch a tokenpublic final void relativeDistinguishedName(SchemaManager schemaManager, Rdn rdn) throws antlr.RecognitionException, antlr.TokenStreamException
relativeDistinguishedName = attributeTypeAndValue *( PLUS attributeTypeAndValue )RFC 2253, Section 3
name-component = attributeTypeAndValue *("+" attributeTypeAndValue)RFC 1779, Section 2.3
<name-component> ::= <attribute> | <attribute> <optional-space> "+" <optional-space> <name-component>
schemaManager
- The SchemaManagerrdn
- The Rdn to updateantlr.RecognitionException
- If the token is invalidantlr.TokenStreamException
- When we weren't able to fetch a tokenpublic final String relativeDistinguishedNames(SchemaManager schemaManager, List<Rdn> rdns) throws antlr.RecognitionException, antlr.TokenStreamException
distinguishedName = [ relativeDistinguishedName *( COMMA relativeDistinguishedName ) ]RFC 2253, Section 3
distinguishedName = [name] name = name-component *("," name-component)RFC 1779, Section 2.3
<name> ::= <name-component> ( <spaced-separator> ) | <name-component> <spaced-separator> <name> <spaced-separator> ::= <optional-space> <separator> <optional-space> <separator> ::= "," | ";" <optional-space> ::= ( <CR> ) *( " " )
schemaManager
- The SchemaManagerrdns
- The list of Rdns to updateantlr.RecognitionException
- If the token is invalidantlr.TokenStreamException
- When we weren't able to fetch a tokenpublic final String attributeTypeAndValue(SchemaManager schemaManager, Rdn rdn) throws antlr.RecognitionException, antlr.TokenStreamException
attributeTypeAndValue = attributeType EQUALS attributeValueRFC 2253, Section 3
attributeTypeAndValue = attributeType "=" attributeValue
schemaManager
- The SchemaManagerrdn
- The Rdn to updateantlr.RecognitionException
- If the token is invalidantlr.TokenStreamException
- When we weren't able to fetch a tokenpublic final String attributeType() throws antlr.RecognitionException, antlr.TokenStreamException
attributeType = descr / numericoid
antlr.RecognitionException
- If the token is invalidantlr.TokenStreamException
- When we weren't able to fetch a tokenpublic final void attributeValue(org.apache.directory.api.ldap.model.name.AntlrDnParser.UpAndNormValue value) throws antlr.RecognitionException, antlr.TokenStreamException
attributeValue = string / hexstringRFC 2253, Section 3
attributeValue = string string = *( stringchar / pair ) / "#" hexstring / QUOTATION *( quotechar / pair ) QUOTATION ; only from v2 We still accept both forms, which means we can have a value surrounded by '"'
value
- The value to updateantlr.RecognitionException
- If the token is invalidantlr.TokenStreamException
- When we weren't able to fetch a tokenpublic final String descr() throws antlr.RecognitionException, antlr.TokenStreamException
descr = keystring keystring = leadkeychar *keychar leadkeychar = ALPHA keychar = ALPHA / DIGIT / HYPHENWe additionally add UNDERSCORE because some servers allow them.
antlr.RecognitionException
- If the token is invalidantlr.TokenStreamException
- When we weren't able to fetch a tokenpublic final String numericoid() throws antlr.RecognitionException, antlr.TokenStreamException
numericoid = number 1*( DOT number ) number = DIGIT / ( LDIGIT 1*DIGIT ) DIGIT = %x30 / LDIGIT ; "0"-"9" LDIGIT = %x31-39 ; "1"-"9"
antlr.RecognitionException
- If the token is invalidantlr.TokenStreamException
- When we weren't able to fetch a tokenpublic final void quotestring(org.apache.directory.api.ldap.model.name.AntlrDnParser.UpAndNormValue value) throws antlr.RecognitionException, antlr.TokenStreamException
/ QUOTATION *( quotechar / pair ) QUOTATION ; only from v2 quotechar = <any character except "\" or QUOTATION >
value
- The value to updateantlr.RecognitionException
- If the token is invalidantlr.TokenStreamException
- When we weren't able to fetch a tokenpublic final void string(org.apache.directory.api.ldap.model.name.AntlrDnParser.UpAndNormValue value) throws antlr.RecognitionException, antlr.TokenStreamException
; The following characters are to be escaped when they appear ; in the value to be encoded: ESC, one of <escaped>, <leading> ; SHARP or SPACE, trailing SPACE, and NULL. string = [ ( leadchar / pair ) [ *( stringchar / pair ) ( trailchar / pair ) ] ] leadchar = LUTF1 | UTFMB stringchar = SUTF1 / UTFMB trailchar = TUTF1 / UTFMB
value
- The value to updateantlr.RecognitionException
- If the token is invalidantlr.TokenStreamException
- When we weren't able to fetch a tokenpublic final void hexstring(org.apache.directory.api.ldap.model.name.AntlrDnParser.UpAndNormValue value) throws antlr.RecognitionException, antlr.TokenStreamException
hexstring = SHARP 1*hexpair If in <hexstring> form, a BER representation can be obtained from converting each <hexpair> of the <hexstring> to the octet indicated by the <hexpair>.
value
- The value to updateantlr.RecognitionException
- If the token is invalidantlr.TokenStreamException
- When we weren't able to fetch a tokenpublic final void pair(org.apache.directory.api.ldap.model.name.AntlrDnParser.UpAndNormValue value) throws antlr.RecognitionException, antlr.TokenStreamException
pair = ESC ( ESC / special / hexpair ) special = escaped / SPACE / SHARP / EQUALS escaped = DQUOTE / PLUS / COMMA / SEMI / LANGLE / RANGLE hexpair = HEX HEX If in <string> form, a LDAP string representation asserted value can be obtained by replacing (left to right, non-recursively) each <pair> appearing in the <string> as follows: replace <ESC><ESC> with <ESC>; replace <ESC><special> with <special>; replace <ESC><hexpair> with the octet indicated by the <hexpair>.RFC 2253, Section 3
pair = "\" ( special / "\" / QUOTATION / hexpair ) special = "," / "=" / "+" / "<" / ">" / "#" / ";"RFC 1779, Section 2.3
<pair> ::= "\" ( <special> | "\" | '"') <special> ::= "," | "=" | <CR> | "+" | "<" | ">" | "#" | ";"
value
- The value to updateantlr.RecognitionException
- If the token is invalidantlr.TokenStreamException
- When we weren't able to fetch a tokenpublic final void lutf1(org.apache.directory.api.ldap.model.name.AntlrDnParser.UpAndNormValue value) throws antlr.RecognitionException, antlr.TokenStreamException
LUTF1 = %x01-1F / %x21 / %x24-2A / %x2D-3A / %x3D / %x3F-5B / %x5D-7F The rule CHAR_REST doesn't contain the following charcters, so we must check them additionally EQUALS (0x3D) HYPHEN (0x2D) UNDERSCORE (0x5F) DIGIT (0x30-0x39) ALPHA (0x41-0x5A and 0x61-0x7A)
value
- The value to updateantlr.RecognitionException
- If the token is invalidantlr.TokenStreamException
- When we weren't able to fetch a tokenpublic final void utfmb(org.apache.directory.api.ldap.model.name.AntlrDnParser.UpAndNormValue value) throws antlr.RecognitionException, antlr.TokenStreamException
value
- The value to updateantlr.RecognitionException
- If the token is invalidantlr.TokenStreamException
- When we weren't able to fetch a tokenpublic final void sutf1(org.apache.directory.api.ldap.model.name.AntlrDnParser.UpAndNormValue value) throws antlr.RecognitionException, antlr.TokenStreamException
SUTF1 = %x01-21 / %x23-2A / %x2D-3A / %x3D / %x3F-5B / %x5D-7F The rule CHAR_REST doesn't contain the following charcters, so we must check them additionally EQUALS (0x3D) HYPHEN (0x2D) UNDERSCORE (0x5F) DIGIT (0x30-0x39) ALPHA (0x41-0x5A and 0x61-0x7A) SHARP (0x23) SPACE (0x20)
value
- The value to updateantlr.RecognitionException
- If the token is invalidantlr.TokenStreamException
- When we weren't able to fetch a tokenpublic final char special() throws antlr.RecognitionException, antlr.TokenStreamException
special = escaped / SPACE / SHARP / EQUALS escaped = DQUOTE / PLUS / COMMA / SEMI / LANGLE / RANGLE
antlr.RecognitionException
- If the token is invalidantlr.TokenStreamException
- When we weren't able to fetch a tokenCopyright © 2003–2020 The Apache Software Foundation. All rights reserved.