APG
… an ABNF Parser Generator
|
Callback functions for basic rules common to all component parsers. More...
#include "callbacks.h"
Go to the source code of this file.
Macros | |
#define | CLOSE_BRACKET 62 |
#define | HYPHEN 45 |
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) |
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... | |
void | vDoubleh (callback_data *spData) |
void | vComment (callback_data *spData) |
void | vPIOpen (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) |
uint32_t | uiHexValue32 (xml *spXml, aint uiOffset, uint32_t *uipChars, uint32_t uiCount) |
uint32_t | uiDecValue32 (xml *spXml, aint uiOffset, uint32_t *uipChars, uint32_t uiCount) |
att_decl * | spLeftMostElement (xml *spXml, att_decl *spAttList) |
entity_decl * | spEntityNameLookup (xml *spXml, aint uiOffset, uint32_t *uipName, uint32_t uiNameLen) |
Find the left-most occurrence of the given entity name. More... | |
abool | bCompNames (const uint32_t *uipLName, uint32_t uiLLen, const uint32_t *uipRName, uint32_t uiRLen) |
cdata_id | sNormalizeAttributeValue (xml *spXml, aint uiOffset, uint32_t *uipAttValue, uint32_t uiLength, abool bIsCDATA) |
int | iAttComp (const void *vpL, const void *vpR) |
int | iEntityComp (const void *vpL, const void *vpR) |
void | vExpandEntity (xml *spXml, aint uiOffset, entity_decl *spThisEntity) |
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) |
void | vXmlgrammarRuleCallbacks (void *vpParserCtx) |
Callback functions for basic rules common to all component parsers.
Definition in file basics.c.
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 | ||
) |
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 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 vDoubleh | ( | callback_data * | spData | ) |
void vExpandEntity | ( | xml * | spXml, |
aint | uiOffset, | ||
entity_decl * | spThisEntity | ||
) |
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 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 vPIOpen | ( | callback_data * | spData | ) |
void vPIReserved | ( | callback_data * | spData | ) |
void vPITarget | ( | callback_data * | spData | ) |
void vPopFrame | ( | callback_data * | spData | ) |
void vPushFrame | ( | callback_data * | spData | ) |
void vUtf82 | ( | callback_data * | spData | ) |
void vUtf83 | ( | callback_data * | spData | ) |
void vUtf84 | ( | callback_data * | spData | ) |