APG
… an ABNF Parser Generator
|
Declaration for all of the XML Component parser callback functions. More...
#include <limits.h>
#include "../utilities/utilities.h"
#include "xmlgrammar.h"
#include "xml.h"
#include "xmlp.h"
Go to the source code of this file.
Macros | |
#define | STATE_BEGIN 1 |
#define | STATE_TEXT 2 |
#define | STATE_WSP 3 |
#define | ATT_AMP 38 |
#define | ATT_HASH 35 |
#define | ATT_X 120 |
#define | ATT_SEMI 59 |
#define | CABUF_LEN 256 |
#define | XML_THROW(msg) vThrowError(spXml, (msg), spData->uiParserOffset, __LINE__, __FILE__, __func__) |
Functions | |
void | vThrowError (xml *spXml, const char *cpMsg, aint uiOffset, unsigned int uiLine, const char *cpFile, const char *cpFunc) |
void | vLogMsg (xml *spXml, aint uiOffset, char *cpTitle) |
void | vPushFrame (callback_data *spData) |
void | vPopFrame (callback_data *spData) |
uint32_t | ui2byte (const achar *acpBytes) |
uint32_t | ui3byte (const achar *acpBytes) |
uint32_t | ui4byte (const achar *acpBytes) |
abool | bValidateChar (uint32_t uiChar) |
void | vMakeCDataDisplay (xml *spXml, cdata_id *spDataId, u32_phrase *spCData, aint uiOffset) |
void | vMakeCDataIdFromInput (xml *spXml, const achar *acpInput, aint uiLen, aint uiOffset, cdata_id *spCDataId) |
cdata_id | sCapturePhrase (xml *spXml, achar *acpPhrase, aint uiPhraseLength, aint uiOffset) |
int | iAttComp (const void *vpL, const void *vpR) |
att_decl * | spLeftMostElement (xml *spXml, att_decl *spAttList) |
int | iEntityComp (const void *vpL, const void *vpR) |
void | vHexValue (callback_data *spData) |
void | vDecValue (callback_data *spData) |
uint32_t | uiDecValue32 (xml *spXml, aint uiOffset, uint32_t *uipChars, uint32_t uiCount) |
uint32_t | uiHexValue32 (xml *spXml, aint uiOffset, uint32_t *uipChars, uint32_t uiCount) |
abool | bHasEntity (uint32_t *uipChars, uint32_t uiLen, uint32_t *uipEntityOffset, uint32_t *uipEntityLen) |
cdata_id | sNormalizeAttributeValue (xml *spXml, aint uiOffset, uint32_t *uipAttValue, uint32_t uiLength, abool bIsCDATA) |
void | vExpandEntity (xml *spXml, aint uiOffset, entity_decl *spValuei) |
int | iSortCompNames (const uint32_t *uipLName, uint32_t uiLLen, const uint32_t *uipRName, uint32_t uiRLen) |
abool | bCompNames (const uint32_t *uipLName, uint32_t uiLLen, const uint32_t *uipRName, uint32_t uiRLen) |
entity_decl * | spEntityNameLookup (xml *spXml, aint uiOffset, uint32_t *uipName, uint32_t uiNameLen) |
Find the left-most occurrence of the given entity name. More... | |
void | vConvertParsedData (xml *spXml, const achar *acpData, aint uiDataLen, uint32_t *uipOffset, uint32_t *uipLength) |
Converts parsed UTF-8 data to UTF-32 code points. More... | |
int | iCompNames (const uint32_t *uipLName, uint32_t uiLLen, const uint32_t *uipRName, uint32_t uiRLen) |
void | vDocument (callback_data *spData) |
void | vXmlDeclOpen (callback_data *spData) |
void | vXmlDeclClose (callback_data *spData) |
void | vEncDef (callback_data *spData) |
void | vVersionNum (callback_data *spData) |
void | vVersionInfo (callback_data *spData) |
void | vEncName (callback_data *spData) |
void | vSDeclOther (callback_data *spData) |
void | vSDeclYes (callback_data *spData) |
void | vSDeclNo (callback_data *spData) |
void | vDtdOpen (callback_data *spData) |
void | vDtdName (callback_data *spData) |
void | vDtdClose (callback_data *spData) |
void | vExtSubset (callback_data *spData) |
void | vExternalID (callback_data *spData) |
void | vNExternalID (callback_data *spData) |
void | vPEDeclOpen (callback_data *spData) |
void | vPEDeclClose (callback_data *spData) |
void | vPEReference (callback_data *spData) |
void | vPERefError (callback_data *spData) |
void | vGEDeclName (callback_data *spData) |
void | vGEPERef (callback_data *spData) |
void | vGEDefEx (callback_data *spData) |
void | vGEDeclClose (callback_data *spData) |
void | vCloseQuote (callback_data *spData) |
void | vEntityChar (callback_data *spData) |
void | vGERef (callback_data *spData) |
void | vAttlistOpen (callback_data *spData) |
void | vAttName (callback_data *spData) |
void | vAttType (callback_data *spData) |
void | vAttlistValue (callback_data *spData) |
void | vAttDef (callback_data *spData) |
void | vAttlistClose (callback_data *spData) |
void | vNotationOpen (callback_data *spData) |
void | vNotationDef (callback_data *spData) |
void | vNotationClose (callback_data *spData) |
void | vDvalue (callback_data *spData) |
void | vDChar (callback_data *spData) |
void | vEntityRef (callback_data *spData) |
void | vElementOpen (callback_data *spData) |
void | vElementClose (callback_data *spData) |
void | vETagClose (callback_data *spData) |
void | vEOpen (callback_data *spData) |
void | vEStart (callback_data *spData) |
void | vEReserved (callback_data *spData) |
void | vEmptyClose (callback_data *spData) |
void | vSTagClose (callback_data *spData) |
void | vAttValue (callback_data *spData) |
void | vElAttName (callback_data *spData) |
void | vCharData (callback_data *spData) |
void | vCDSectEnd (callback_data *spData) |
void | vCDEnd (callback_data *spData) |
void | vCDRb (callback_data *spData) |
void | vCD2Rb (callback_data *spData) |
void | vRefClose (callback_data *spData) |
void | vComment (callback_data *spData) |
void | vDoubleh (callback_data *spData) |
void | vPIClose (callback_data *spData) |
void | vPITarget (callback_data *spData) |
void | vPIInfo (callback_data *spData) |
void | vPIInfoq (callback_data *spData) |
void | vPIInfoa (callback_data *spData) |
void | vPIForbidden (callback_data *spData) |
void | vPIReserved (callback_data *spData) |
void | vAscii (callback_data *spData) |
void | vUtf82 (callback_data *spData) |
void | vUtf83 (callback_data *spData) |
void | vUtf84 (callback_data *spData) |
void | vName (callback_data *spData) |
void | vNameStartChar (callback_data *spData) |
void | vNameOtherChar (callback_data *spData) |
Declaration for all of the XML Component parser callback functions.
Definition in file callbacks.h.
#define ATT_AMP 38 |
Definition at line 47 of file callbacks.h.
#define ATT_HASH 35 |
Definition at line 48 of file callbacks.h.
#define ATT_SEMI 59 |
Definition at line 50 of file callbacks.h.
#define ATT_X 120 |
Definition at line 49 of file callbacks.h.
#define CABUF_LEN 256 |
Definition at line 51 of file callbacks.h.
#define STATE_BEGIN 1 |
Definition at line 44 of file callbacks.h.
#define STATE_TEXT 2 |
Definition at line 45 of file callbacks.h.
#define STATE_WSP 3 |
Definition at line 46 of file callbacks.h.
#define XML_THROW | ( | msg | ) | vThrowError(spXml, (msg), spData->uiParserOffset, __LINE__, __FILE__, __func__) |
Definition at line 53 of file callbacks.h.
abool bCompNames | ( | const uint32_t * | uipLName, |
uint32_t | uiLLen, | ||
const uint32_t * | uipRName, | ||
uint32_t | uiRLen | ||
) |
abool bHasEntity | ( | uint32_t * | uipChars, |
uint32_t | uiLen, | ||
uint32_t * | uipEntityOffset, | ||
uint32_t * | uipEntityLen | ||
) |
int iCompNames | ( | const uint32_t * | uipLName, |
uint32_t | uiLLen, | ||
const uint32_t * | uipRName, | ||
uint32_t | uiRLen | ||
) |
int iSortCompNames | ( | const uint32_t * | uipLName, |
uint32_t | uiLLen, | ||
const uint32_t * | uipRName, | ||
uint32_t | uiRLen | ||
) |
entity_decl* spEntityNameLookup | ( | xml * | spXml, |
aint | uiOffset, | ||
uint32_t * | uipName, | ||
uint32_t | uiNameLen | ||
) |
Find the left-most occurrence of the given entity name.
If the list of entity names are alphabetical this binary algorithm will find the given name. If there is more than one identical name in the list, this algorithm will find the left-most occurrence of that name. https://en.wikipedia.org/wiki/Binary_search_algorithm#Procedure_for_finding_the_leftmost_element
void vAscii | ( | callback_data * | spData | ) |
void vAttDef | ( | callback_data * | spData | ) |
Definition at line 614 of file declarations.c.
void vAttlistClose | ( | callback_data * | spData | ) |
Definition at line 666 of file declarations.c.
void vAttlistOpen | ( | callback_data * | spData | ) |
Definition at line 535 of file declarations.c.
void vAttlistValue | ( | callback_data * | spData | ) |
Definition at line 600 of file declarations.c.
void vAttName | ( | callback_data * | spData | ) |
Definition at line 557 of file declarations.c.
void vAttType | ( | callback_data * | spData | ) |
Definition at line 575 of file declarations.c.
void vAttValue | ( | callback_data * | spData | ) |
Definition at line 176 of file elements.c.
void vCD2Rb | ( | callback_data * | spData | ) |
Definition at line 388 of file elements.c.
void vCDEnd | ( | callback_data * | spData | ) |
Definition at line 375 of file elements.c.
void vCDRb | ( | callback_data * | spData | ) |
Definition at line 381 of file elements.c.
void vCDSectEnd | ( | callback_data * | spData | ) |
Definition at line 347 of file elements.c.
void vCharData | ( | callback_data * | spData | ) |
Definition at line 341 of file elements.c.
void vCloseQuote | ( | callback_data * | spData | ) |
Definition at line 501 of file declarations.c.
void vComment | ( | callback_data * | spData | ) |
void vConvertParsedData | ( | xml * | spXml, |
const achar * | acpData, | ||
aint | uiDataLen, | ||
uint32_t * | uipOffset, | ||
uint32_t * | uipLength | ||
) |
Converts parsed UTF-8 data to UTF-32 code points.
At times content is needed and it is necessary to convert the raw UTF-8 input data to internal 32-bit code points.
spXml | An XML context pointer |
acpData | Pointer to the UTF-8 data to convert. Note that achar may not necessarily be 8-bit characters. |
uiDataLen | The number of input characters to convert. |
uipOffset | pointer to receive the offset into vpVec32 of the first converted code point |
uipLength | Pointer to receive the number of 32-bit code points. |
void vDChar | ( | callback_data * | spData | ) |
Definition at line 200 of file elements.c.
void vDecValue | ( | callback_data * | spData | ) |
Definition at line 229 of file elements.c.
void vDocument | ( | callback_data * | spData | ) |
Definition at line 51 of file declarations.c.
void vDoubleh | ( | callback_data * | spData | ) |
void vDtdClose | ( | callback_data * | spData | ) |
Definition at line 241 of file declarations.c.
void vDtdName | ( | callback_data * | spData | ) |
Definition at line 233 of file declarations.c.
void vDtdOpen | ( | callback_data * | spData | ) |
Definition at line 221 of file declarations.c.
void vDvalue | ( | callback_data * | spData | ) |
Definition at line 194 of file elements.c.
void vElAttName | ( | callback_data * | spData | ) |
Definition at line 157 of file elements.c.
void vElementClose | ( | callback_data * | spData | ) |
Definition at line 724 of file declarations.c.
void vElementOpen | ( | callback_data * | spData | ) |
Definition at line 717 of file declarations.c.
void vEmptyClose | ( | callback_data * | spData | ) |
Definition at line 92 of file elements.c.
void vEncDef | ( | callback_data * | spData | ) |
Definition at line 174 of file declarations.c.
void vEncName | ( | callback_data * | spData | ) |
Definition at line 180 of file declarations.c.
void vEntityChar | ( | callback_data * | spData | ) |
Definition at line 507 of file declarations.c.
void vEntityRef | ( | callback_data * | spData | ) |
Definition at line 209 of file elements.c.
void vEOpen | ( | callback_data * | spData | ) |
Definition at line 74 of file elements.c.
void vEReserved | ( | callback_data * | spData | ) |
Definition at line 85 of file elements.c.
void vEStart | ( | callback_data * | spData | ) |
Definition at line 50 of file elements.c.
void vETagClose | ( | callback_data * | spData | ) |
Definition at line 120 of file elements.c.
void vExpandEntity | ( | xml * | spXml, |
aint | uiOffset, | ||
entity_decl * | spValuei | ||
) |
void vExternalID | ( | callback_data * | spData | ) |
Definition at line 375 of file declarations.c.
void vExtSubset | ( | callback_data * | spData | ) |
Definition at line 367 of file declarations.c.
void vGEDeclClose | ( | callback_data * | spData | ) |
Definition at line 454 of file declarations.c.
void vGEDeclName | ( | callback_data * | spData | ) |
Definition at line 417 of file declarations.c.
void vGEDefEx | ( | callback_data * | spData | ) |
Definition at line 447 of file declarations.c.
void vGEPERef | ( | callback_data * | spData | ) |
Definition at line 440 of file declarations.c.
void vGERef | ( | callback_data * | spData | ) |
Definition at line 513 of file declarations.c.
void vHexValue | ( | callback_data * | spData | ) |
Definition at line 259 of file elements.c.
void vMakeCDataDisplay | ( | xml * | spXml, |
cdata_id * | spDataId, | ||
u32_phrase * | spCData, | ||
aint | uiOffset | ||
) |
void vName | ( | callback_data * | spData | ) |
void vNameOtherChar | ( | callback_data * | spData | ) |
void vNameStartChar | ( | callback_data * | spData | ) |
void vNExternalID | ( | callback_data * | spData | ) |
Definition at line 382 of file declarations.c.
void vNotationClose | ( | callback_data * | spData | ) |
Definition at line 710 of file declarations.c.
void vNotationDef | ( | callback_data * | spData | ) |
Definition at line 697 of file declarations.c.
void vNotationOpen | ( | callback_data * | spData | ) |
Definition at line 675 of file declarations.c.
void vPEDeclClose | ( | callback_data * | spData | ) |
Definition at line 396 of file declarations.c.
void vPEDeclOpen | ( | callback_data * | spData | ) |
Definition at line 390 of file declarations.c.
void vPEReference | ( | callback_data * | spData | ) |
Definition at line 402 of file declarations.c.
void vPERefError | ( | callback_data * | spData | ) |
Definition at line 408 of file declarations.c.
void vPIClose | ( | callback_data * | spData | ) |
void vPIForbidden | ( | callback_data * | spData | ) |
void vPIInfo | ( | callback_data * | spData | ) |
void vPIInfoa | ( | callback_data * | spData | ) |
void vPIInfoq | ( | callback_data * | spData | ) |
void vPIReserved | ( | callback_data * | spData | ) |
void vPITarget | ( | callback_data * | spData | ) |
void vPopFrame | ( | callback_data * | spData | ) |
void vPushFrame | ( | callback_data * | spData | ) |
void vRefClose | ( | callback_data * | spData | ) |
Definition at line 737 of file declarations.c.
void vSDeclNo | ( | callback_data * | spData | ) |
Definition at line 207 of file declarations.c.
void vSDeclOther | ( | callback_data * | spData | ) |
Definition at line 194 of file declarations.c.
void vSDeclYes | ( | callback_data * | spData | ) |
Definition at line 200 of file declarations.c.
void vSTagClose | ( | callback_data * | spData | ) |
Definition at line 103 of file elements.c.
void vUtf82 | ( | callback_data * | spData | ) |
void vUtf83 | ( | callback_data * | spData | ) |
void vUtf84 | ( | callback_data * | spData | ) |
void vVersionInfo | ( | callback_data * | spData | ) |
Definition at line 152 of file declarations.c.
void vVersionNum | ( | callback_data * | spData | ) |
Definition at line 158 of file declarations.c.
void vXmlDeclClose | ( | callback_data * | spData | ) |
Definition at line 86 of file declarations.c.
void vXmlDeclOpen | ( | callback_data * | spData | ) |
Definition at line 69 of file declarations.c.