org.apache.directory.shared.ldap.schema.syntax
Class AntlrSchemaParser

java.lang.Object
  extended by antlr.Parser
      extended by antlr.LLkParser
          extended by org.apache.directory.shared.ldap.schema.syntax.AntlrSchemaParser
All Implemented Interfaces:
AntlrSchemaTokenTypes
Direct Known Subclasses:
ReusableAntlrSchemaParser

public class AntlrSchemaParser
extends antlr.LLkParser
implements AntlrSchemaTokenTypes

An antlr generated schema main parser.

Version:
$Rev$
Author:
Apache Directory Project

Field Summary
static java.lang.String[] _tokenNames
           
 
Fields inherited from class antlr.Parser
astFactory, inputState, returnAST, tokenNames, tokenTypeToASTClassMap, traceDepth
 
Fields inherited from interface org.apache.directory.shared.ldap.schema.syntax.AntlrSchemaTokenTypes
ABSTRACT, APPLIES, ATTRIBUTETYPE, AUX, AUX_OR_AUXILIARY, AUXILIARY, BYTECODE, BYTECODE_VALUE, COLLECTIVE, DESC, DIRECTORY_OPERATION, DISTRIBUTED_OPERATION, DOLLAR, DSA_OPERATION, EOF, EQUALITY, EXTENSION, FORM, FQCN, FQCN_IDENTIFIER, FQCN_LETTER, FQCN_LETTERORDIGIT, FQCN_VALUE, LBRACKET, LEN, LPAR, MAY, MUST, NAME, NO_USER_MODIFICATION, NOT, NULL_TREE_LOOKAHEAD, OBJECTCLASS, OBJECTIDENTIFIER, OBSOLETE, OC, ORDERING, QUOTE, QUOTED_STRING, RBRACKET, RPAR, SINGLE_VALUE, STARTNUMERICOID, STRUCTURAL, SUBSTR, SUP, SYNTAX, UNQUOTED_STRING, USAGE, USER_APPLICATIONS, VALUE, VALUES, WHSP
 
Constructor Summary
  AntlrSchemaParser(antlr.ParserSharedInputState state)
           
  AntlrSchemaParser(antlr.TokenBuffer tokenBuf)
           
protected AntlrSchemaParser(antlr.TokenBuffer tokenBuf, int k)
           
  AntlrSchemaParser(antlr.TokenStream lexer)
           
protected AntlrSchemaParser(antlr.TokenStream lexer, int k)
           
 
Method Summary
 AttributeTypeDescription attributeTypeDescription()
          Production for matching attribute type descriptions.
 ComparatorDescription comparatorDescription()
          Production for comparator descriptions.
 DITContentRuleDescription ditContentRuleDescription()
          Production for DIT content rule descriptions.
 DITStructureRuleDescription ditStructureRuleDescription()
          Production for DIT structure rules descriptions.
 org.apache.directory.shared.ldap.schema.syntax.AntlrSchemaParser.Extension extension(java.lang.String s)
           
 boolean isQuirksMode()
           
 LdapSyntaxDescription ldapSyntaxDescription()
          Production for matching ldap syntax descriptions.
 MatchingRuleDescription matchingRuleDescription()
          Production for matching rule descriptions.
 MatchingRuleUseDescription matchingRuleUseDescription()
          Production for matching rule use descriptions.
 NameFormDescription nameFormDescription()
          Production for name form descriptions.
 org.apache.directory.shared.ldap.schema.syntax.AntlrSchemaParser.NoidLen noidlen(java.lang.String s)
           
 NormalizerDescription normalizerDescription()
          Production for normalizer descriptions.
 java.lang.String numericoid(java.lang.String s)
           
 ObjectClassDescription objectClassDescription()
          Production for matching object class descriptions.
 java.lang.String oid(java.lang.String s)
           
 java.util.List<java.lang.String> oids(java.lang.String s)
           
 AttributeTypeDescription openLdapAttributeType()
           
 ObjectClassDescription openLdapObjectClass()
           
 OpenLdapObjectIdentifierMacro openLdapObjectIdentifier()
           
 java.util.List<java.lang.Object> openLdapSchema()
           
 java.lang.String qdescr(java.lang.String s)
           
 java.util.List<java.lang.String> qdescrs(java.lang.String s)
           
 java.lang.String qdstring(java.lang.String s)
           
 java.util.List<java.lang.String> qdstrings(java.lang.String s)
           
 java.lang.Integer ruleid(java.lang.String s)
           
 java.util.List<java.lang.Integer> ruleids(java.lang.String s)
           
 void setParserMonitor(ParserMonitor monitor)
           
 void setQuirksMode(boolean enabled)
           
 SyntaxCheckerDescription syntaxCheckerDescription()
          Production for syntax checker descriptions.
 
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
Constructor Detail

AntlrSchemaParser

protected AntlrSchemaParser(antlr.TokenBuffer tokenBuf,
                            int k)

AntlrSchemaParser

public AntlrSchemaParser(antlr.TokenBuffer tokenBuf)

AntlrSchemaParser

protected AntlrSchemaParser(antlr.TokenStream lexer,
                            int k)

AntlrSchemaParser

public AntlrSchemaParser(antlr.TokenStream lexer)

AntlrSchemaParser

public AntlrSchemaParser(antlr.ParserSharedInputState state)
Method Detail

setParserMonitor

public void setParserMonitor(ParserMonitor monitor)

setQuirksMode

public void setQuirksMode(boolean enabled)

isQuirksMode

public boolean isQuirksMode()

openLdapSchema

public final java.util.List<java.lang.Object> openLdapSchema()
                                                      throws antlr.RecognitionException,
                                                             antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

openLdapObjectIdentifier

public final OpenLdapObjectIdentifierMacro openLdapObjectIdentifier()
                                                             throws antlr.RecognitionException,
                                                                    antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

openLdapAttributeType

public final AttributeTypeDescription openLdapAttributeType()
                                                     throws antlr.RecognitionException,
                                                            antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

openLdapObjectClass

public final ObjectClassDescription openLdapObjectClass()
                                                 throws antlr.RecognitionException,
                                                        antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

objectClassDescription

public final ObjectClassDescription objectClassDescription()
                                                    throws antlr.RecognitionException,
                                                           antlr.TokenStreamException
Production for matching object class descriptions. It is fault-tolerant against element ordering.
 ObjectClassDescription = LPAREN WSP
     numericoid                 ; object identifier
     [ SP "NAME" SP qdescrs ]   ; short names (descriptors)
     [ SP "DESC" SP qdstring ]  ; description
     [ SP "OBSOLETE" ]          ; not active
     [ SP "SUP" SP oids ]       ; superior object classes
     [ SP kind ]                ; kind of class
     [ SP "MUST" SP oids ]      ; attribute types
     [ SP "MAY" SP oids ]       ; attribute types
     extensions WSP RPAREN

 kind = "ABSTRACT" / "STRUCTURAL" / "AUXILIARY"
 
 extensions = *( SP xstring SP qdstrings )
 xstring = "X" HYPHEN 1*( ALPHA / HYPHEN / USCORE ) 
 

Throws:
antlr.RecognitionException
antlr.TokenStreamException

attributeTypeDescription

public final AttributeTypeDescription attributeTypeDescription()
                                                        throws antlr.RecognitionException,
                                                               antlr.TokenStreamException
Production for matching attribute type descriptions. It is fault-tolerant against element ordering.
 AttributeTypeDescription = LPAREN WSP
     numericoid                    ; object identifier
     [ SP "NAME" SP qdescrs ]      ; short names (descriptors)
     [ SP "DESC" SP qdstring ]     ; description
     [ SP "OBSOLETE" ]             ; not active
     [ SP "SUP" SP oid ]           ; supertype
     [ SP "EQUALITY" SP oid ]      ; equality matching rule
     [ SP "ORDERING" SP oid ]      ; ordering matching rule
     [ SP "SUBSTR" SP oid ]        ; substrings matching rule
     [ SP "SYNTAX" SP noidlen ]    ; value syntax
     [ SP "SINGLE-VALUE" ]         ; single-value
     [ SP "COLLECTIVE" ]           ; collective
     [ SP "NO-USER-MODIFICATION" ] ; not user modifiable
     [ SP "USAGE" SP usage ]       ; usage
     extensions WSP RPAREN         ; extensions
 
 usage = "userApplications"     /  ; user
         "directoryOperation"   /  ; directory operational
         "distributedOperation" /  ; DSA-shared operational
         "dSAOperation"            ; DSA-specific operational     
 
 extensions = *( SP xstring SP qdstrings )
 xstring = "X" HYPHEN 1*( ALPHA / HYPHEN / USCORE ) 
 

Throws:
antlr.RecognitionException
antlr.TokenStreamException

ldapSyntaxDescription

public final LdapSyntaxDescription ldapSyntaxDescription()
                                                  throws antlr.RecognitionException,
                                                         antlr.TokenStreamException
Production for matching ldap syntax descriptions. It is fault-tolerant against element ordering.
 SyntaxDescription = LPAREN WSP
    numericoid                 ; object identifier
    [ SP "DESC" SP qdstring ]  ; description
    extensions WSP RPAREN      ; extensions
 

Throws:
antlr.RecognitionException
antlr.TokenStreamException

matchingRuleDescription

public final MatchingRuleDescription matchingRuleDescription()
                                                      throws antlr.RecognitionException,
                                                             antlr.TokenStreamException
Production for matching rule descriptions. It is fault-tolerant against element ordering.
 MatchingRuleDescription = LPAREN WSP
    numericoid                 ; object identifier
    [ SP "NAME" SP qdescrs ]   ; short names (descriptors)
    [ SP "DESC" SP qdstring ]  ; description
    [ SP "OBSOLETE" ]          ; not active
    SP "SYNTAX" SP numericoid  ; assertion syntax
    extensions WSP RPAREN      ; extensions
 

Throws:
antlr.RecognitionException
antlr.TokenStreamException

matchingRuleUseDescription

public final MatchingRuleUseDescription matchingRuleUseDescription()
                                                            throws antlr.RecognitionException,
                                                                   antlr.TokenStreamException
Production for matching rule use descriptions. It is fault-tolerant against element ordering.
 MatchingRuleUseDescription = LPAREN WSP
    numericoid                 ; object identifier
    [ SP "NAME" SP qdescrs ]   ; short names (descriptors)
    [ SP "DESC" SP qdstring ]  ; description
    [ SP "OBSOLETE" ]          ; not active
    SP "APPLIES" SP oids       ; attribute types
    extensions WSP RPAREN      ; extensions
 

Throws:
antlr.RecognitionException
antlr.TokenStreamException

ditContentRuleDescription

public final DITContentRuleDescription ditContentRuleDescription()
                                                          throws antlr.RecognitionException,
                                                                 antlr.TokenStreamException
Production for DIT content rule descriptions. It is fault-tolerant against element ordering.
 DITContentRuleDescription = LPAREN WSP
    numericoid                 ; object identifier
    [ SP "NAME" SP qdescrs ]   ; short names (descriptors)
    [ SP "DESC" SP qdstring ]  ; description
    [ SP "OBSOLETE" ]          ; not active
    [ SP "AUX" SP oids ]       ; auxiliary object classes
    [ SP "MUST" SP oids ]      ; attribute types
    [ SP "MAY" SP oids ]       ; attribute types
    [ SP "NOT" SP oids ]       ; attribute types
    extensions WSP RPAREN      ; extensions
 

Throws:
antlr.RecognitionException
antlr.TokenStreamException

ditStructureRuleDescription

public final DITStructureRuleDescription ditStructureRuleDescription()
                                                              throws antlr.RecognitionException,
                                                                     antlr.TokenStreamException
Production for DIT structure rules descriptions. It is fault-tolerant against element ordering.
 DITStructureRuleDescription = LPAREN WSP
   ruleid                     ; rule identifier
   [ SP "NAME" SP qdescrs ]   ; short names (descriptors)
   [ SP "DESC" SP qdstring ]  ; description
   [ SP "OBSOLETE" ]          ; not active
   SP "FORM" SP oid           ; NameForm
   [ SP "SUP" ruleids ]       ; superior rules
   extensions WSP RPAREN      ; extensions

 ruleids = ruleid / ( LPAREN WSP ruleidlist WSP RPAREN )
 ruleidlist = ruleid *( SP ruleid )
 ruleid = number
 

Throws:
antlr.RecognitionException
antlr.TokenStreamException

nameFormDescription

public final NameFormDescription nameFormDescription()
                                              throws antlr.RecognitionException,
                                                     antlr.TokenStreamException
Production for name form descriptions. It is fault-tolerant against element ordering.
 NameFormDescription = LPAREN WSP
    numericoid                 ; object identifier
    [ SP "NAME" SP qdescrs ]   ; short names (descriptors)
    [ SP "DESC" SP qdstring ]  ; description
    [ SP "OBSOLETE" ]          ; not active
    SP "OC" SP oid             ; structural object class
    SP "MUST" SP oids          ; attribute types
    [ SP "MAY" SP oids ]       ; attribute types
    extensions WSP RPAREN      ; extensions
 

Throws:
antlr.RecognitionException
antlr.TokenStreamException

comparatorDescription

public final ComparatorDescription comparatorDescription()
                                                  throws antlr.RecognitionException,
                                                         antlr.TokenStreamException
Production for comparator descriptions. It is fault-tolerant against element ordering.
 ComparatorDescription = LPAREN WSP
       numericoid                           ; object identifier
       [ SP "DESC" SP qdstring ]            ; description
       SP "FQCN" SP fqcn                    ; fully qualified class name
       [ SP "BYTECODE" SP base64 ]          ; optional base64 encoded bytecode
       extensions WSP RPAREN                ; extensions
 
 base64          = *(4base64-char)
 base64-char     = ALPHA / DIGIT / "+" / "/"
 fqcn = fqcnComponent 1*( DOT fqcnComponent )
 fqcnComponent = ???
 

Throws:
antlr.RecognitionException
antlr.TokenStreamException

normalizerDescription

public final NormalizerDescription normalizerDescription()
                                                  throws antlr.RecognitionException,
                                                         antlr.TokenStreamException
Production for normalizer descriptions. It is fault-tolerant against element ordering.
 NormalizerDescription = LPAREN WSP
       numericoid                           ; object identifier
       [ SP "DESC" SP qdstring ]            ; description
       SP "FQCN" SP fqcn                    ; fully qualified class name
       [ SP "BYTECODE" SP base64 ]          ; optional base64 encoded bytecode
       extensions WSP RPAREN                ; extensions
 
 base64          = *(4base64-char)
 base64-char     = ALPHA / DIGIT / "+" / "/"
 fqcn = fqcnComponent 1*( DOT fqcnComponent )
 fqcnComponent = ???
 

Throws:
antlr.RecognitionException
antlr.TokenStreamException

syntaxCheckerDescription

public final SyntaxCheckerDescription syntaxCheckerDescription()
                                                        throws antlr.RecognitionException,
                                                               antlr.TokenStreamException
Production for syntax checker descriptions. It is fault-tolerant against element ordering.
 SyntaxCheckerDescription = LPAREN WSP
       numericoid                           ; object identifier
       [ SP "DESC" SP qdstring ]            ; description
       SP "FQCN" SP fqcn                    ; fully qualified class name
       [ SP "BYTECODE" SP base64 ]          ; optional base64 encoded bytecode
       extensions WSP RPAREN                ; extensions
 
 base64          = *(4base64-char)
 base64-char     = ALPHA / DIGIT / "+" / "/"
 fqcn = fqcnComponent 1*( DOT fqcnComponent )
 fqcnComponent = ???
 

Throws:
antlr.RecognitionException
antlr.TokenStreamException

noidlen

public final org.apache.directory.shared.ldap.schema.syntax.AntlrSchemaParser.NoidLen noidlen(java.lang.String s)
                                                                                       throws antlr.RecognitionException,
                                                                                              antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

extension

public final org.apache.directory.shared.ldap.schema.syntax.AntlrSchemaParser.Extension extension(java.lang.String s)
                                                                                           throws antlr.RecognitionException,
                                                                                                  antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

numericoid

public final java.lang.String numericoid(java.lang.String s)
                                  throws antlr.RecognitionException,
                                         antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

oid

public final java.lang.String oid(java.lang.String s)
                           throws antlr.RecognitionException,
                                  antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

oids

public final java.util.List<java.lang.String> oids(java.lang.String s)
                                            throws antlr.RecognitionException,
                                                   antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

qdescr

public final java.lang.String qdescr(java.lang.String s)
                              throws antlr.RecognitionException,
                                     antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

qdescrs

public final java.util.List<java.lang.String> qdescrs(java.lang.String s)
                                               throws antlr.RecognitionException,
                                                      antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

qdstring

public final java.lang.String qdstring(java.lang.String s)
                                throws antlr.RecognitionException,
                                       antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

qdstrings

public final java.util.List<java.lang.String> qdstrings(java.lang.String s)
                                                 throws antlr.RecognitionException,
                                                        antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

ruleid

public final java.lang.Integer ruleid(java.lang.String s)
                               throws antlr.RecognitionException,
                                      antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

ruleids

public final java.util.List<java.lang.Integer> ruleids(java.lang.String s)
                                                throws antlr.RecognitionException,
                                                       antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.