Edit

Share via


PARSE.CPP

In the example provider component, a code example of the directory service path parser is in Parse.cpp. The path parser is a key component in ADs provider components. It verifies the syntactic validity of an ADs path passed to this provider. If the syntax is valid, an OBJECTINFO structure is constructed, which contains a componentized version of the ADspath for this object.

Be aware that this is only a syntax verification. Rather than special-case every new iteration of path, all path verification must conform to the grammar rules established by the parser.

The following table lists the functions and methods implemented in Parse.cpp.

Item Description
ADsObject Parses the ADspath passed to it. This function follows the following grammar rules: <ADsObject> -> <ProviderName> <SampleDSObject>
SampleDSObject Parses the following grammar rules: <SampleDSObject> -> "\\" <identifier> "\" <Pathname>
ProviderName Adds in the syntactically correct provider name if not there.
PathName Parses the following grammar rules: <Pathname> -> <Component> "\\" <Pathname> OR
<Pathname> -> <Component>
Component Parses the following grammar rules: <Identifier> OR
<Identifier> "=" <Identifier>
CLexer::CLexer Standard constructor.
CLexer::~CLexer Standard destructor.
CLexer::GetNextToken Tokenizer.
CLexer::NextChar Retrieves next single character.
CLexer::PushBackToken Backs up to the start of the last token.
CLexer::PushbackChar Backs up one character.
CLexer::IsKeyword Verifies keyword list. Defined in Globals.h).
AddComponent Adds this component to the component array.
AddProviderName Adds a syntactically correct provider name to the OBJECTINFO structure.
AddRootRDN Adds the syntactically correct root relative distinguished name (RDN) name to the OBJECTINFO structure.
SetType Sets the type of the object.
Type Parses Type-> "user" | "group" and so on.