Version 7.0
Copyright © 2021 Lowell D. Thomas
APG
… an ABNF Parser Generator
|
Go to the documentation of this file.
44 #include "../utilities/utilities.h"
51 #define DEFAULT_CALLBACK (void*)1
61 const char* cpEncoding;
63 const char* cpStandalone;
84 aint uiGEDeclsNotProcessed;
86 aint uiAttListsDeclared;
89 aint uiAttListsNotProcessed;
142 u32_phrase* spAttValues, uint32_t uiAttCount,
void* vpUserData);
160 u32_phrase* spAttrValues, uint32_t uiAttrCount,
void* vpUserData);
203 void vXmlGetFile(
void* vpCtx,
const char* cpFileName);
u32_phrase * spNotationValues
A list of the Notation values, if any.
u32_phrase * spGEValues
A list of (uiGEDeclsUnique) declared General Entity Declaration values, if any.
u32_phrase * spAttNames
A list of (uiAttListsUnique) names of declared attribute defaults.
void(* pfnEmptyTagCallback)(u32_phrase *spName, u32_phrase *spAttrNames, u32_phrase *spAttrValues, uint32_t uiAttrCount, void *vpUserData)
Defines the function type that is called after an empty tag has been found.
void vXmlSetEmptyTagCallback(void *vpCtx, pfnEmptyTagCallback pfnCallback, void *vpUserData)
Set the user's callback function for the empty tags (<name attr="10"/>).
void(* pfnEndTagCallback)(u32_phrase *spName, u32_phrase *spContent, void *vpUserData)
Defines the function type that is called after an element's end tag has been found.
aint uiPERefs
The number of Parameter Entity references.
void vXmlGetFile(void *vpCtx, const char *cpFileName)
Gets the XML byte stream from a file.
abool bExtSubset
True if an external subset is declared.
aint uiExternalIds
The number of external IDs declared.
u32_phrase * spAttElementNames
A list of (uiAttListsUnique) element names of declared attribute defaults.
const char * cpExists
"yes" if the XML declaration exists, "no" otherwise.
void(* pfnStartTagCallback)(u32_phrase *spName, u32_phrase *spAttNames, u32_phrase *spAttValues, uint32_t uiAttCount, void *vpUserData)
Defines the function type that is called after an element's start tag has been found.
void(* pfnCommentCallback)(u32_phrase *spComment, void *vpUserData)
Defines the function type that is called after a comment is found.
aint uiGEDeclsUnique
A count of the unique and valid General Entities declared.
uint_fast32_t aint
The APG parser's unsigned integer type.
void vXmlSetStartTagCallback(void *vpCtx, pfnStartTagCallback pfnCallback, void *vpUserData)
Set the user's callback function for the start tags (<name attr="10">).
void vXmlGetArray(void *vpCtx, uint8_t *ucpData, aint uiDataLen)
Gets the XML byte stream from a byte array.
void(* pfnXmlDeclCallback)(xmldecl_info *spInfo, void *vpUserData)
Defines the function type that is called after parsing the XML declaration.
u32_phrase * spAttValues
A list of (uiAttListsUnique) normalized values of declared attribute defaults.
void vXmlSetCommentCallback(void *vpCtx, pfnCommentCallback pfnCallback, void *vpUserData)
Set the user's callback function for comments.
void vXmlDisplayInput(void *vpCtx, abool bShowLines)
Display input file.
abool bXmlValidate(void *vpCtx)
Validate an XML context pointer.
u32_phrase * spNotationNames
A list of the Notation names, if any.
Information about the Document Type Declaration.
void vXmlSetEndTagCallback(void *vpCtx, pfnEndTagCallback pfnCallback, void *vpUserData)
Set the user's callback function for the end tags (</name>).
A structure to describe the type and location of a caught exception.
Information about the XML declaration.
abool bExists
True if the DTD exists, false otherwise.
aint uiGEDeclsDeclared
A count of ALL General Entities declared.
void * vpXmlGetMsgs(void *vpCtx)
Give the user a handle to the message log.
void * vpXmlCtor(exception *spEx)
The XML Parser constructor.
void(* pfnDTDCallback)(dtd_info *spInfo, void *vpUserData)
Defines the function type that is called after parsing the Document Type Declaration (DTD).
const char * cpVersion
The value of version="1.ddd". Default is 1.0. Any other value is a fatal error.
void vXmlDisplayMsgs(void *vpCtx)
Display the parser's messages on stdout, if any.
void vXmlSetXmlDeclCallback(void *vpCtx, pfnXmlDeclCallback pfnCallback, void *vpUserData)
Set the user's callback function for the XML declaration.
void vXmlSetPICallback(void *vpCtx, pfnPICallback pfnCallback, void *vpUserData)
Set the user's callback function for the Processing Instruction tags(<?target instructions?...
u32_phrase * spAttTypes
A list of (uiAttListsUnique) types of declared attribute defaults.
void vXmlDtor(void *vpCtx)
The XML Parser component destructor.
aint uiAttListsUnique
The number of unique and valid Attribute declarations.
uint8_t abool
abool is the APG bool type.
void vXmlParse(void *vpCtx)
Parse the XML data from vXmlGetFile or vXmlGetArray.
aint uiElementDecls
The number of element declarations found.
void vXmlSetDTDCallback(void *vpCtx, pfnDTDCallback pfnCallback, void *vpUserData)
Set the user's callback function for the Processing Instruction tags(<?target instructions?...
abool bStandalone
True if standalone = "yes", false if standalone = "no".
Defines a pointer to an array of 32-bit unsigned integers plus its length. Typically needed by Unicod...
aint uiPEDecls
The number of Parameter Entities declared.
void(* pfnPICallback)(u32_phrase *spTarget, u32_phrase *spInfo, void *vpUserData)
Defines the function type that is called after a Processing Instruction has been found.
aint uiNotationDecls
The number of notation declarations found.
u32_phrase * spGENames
A list of (uiGEDeclsUnique) declared General Entity names, if any.
APG Version 7.0 is licensed under the
2-Clause BSD License,
an Open Source Initiative Approved License.