Version 7.0
Copyright © 2021 Lowell D. Thomas
APG
… an ABNF Parser Generator
|
Go to the documentation of this file.
47 uint8_t* ucpTable = (uint8_t*)spParserInit->
vpAcharTable;
48 for(ui = 0; ui < uiLen; ui += 1){
49 acpAcharTable[ui] = (
achar)ucpTable[ui];
54 uint16_t* usipTable = (uint16_t*)spParserInit->
vpAcharTable;
55 for(ui = 0; ui < uiLen; ui += 1){
56 acpAcharTable[ui] = (
achar)usipTable[ui];
61 uint32_t* uipTable = (uint32_t*)spParserInit->
vpAcharTable;
62 for(ui = 0; ui < uiLen; ui += 1){
63 acpAcharTable[ui] = (
achar)uipTable[ui];
68 uint64_t* ulipTable = (uint64_t*)spParserInit->
vpAcharTable;
69 for(ui = 0; ui < uiLen; ui += 1){
70 acpAcharTable[ui] = (
achar)ulipTable[ui];
85 uint8_t* ucpTable = (uint8_t*)vpData;
86 for(ui = 0; ui < uiLen; ui += 1){
87 if((
signed char)ucpTable[ui] == -1){
88 luipParserInit[ui] = (
luint)-1;
90 luipParserInit[ui] = (
luint)ucpTable[ui];
96 uint16_t* usipTable = (uint16_t*)vpData;
97 for(ui = 0; ui < uiLen; ui += 1){
98 if((
signed short int)usipTable[ui] == -1){
99 luipParserInit[ui] = (
luint)-1;
101 luipParserInit[ui] = (
luint)usipTable[ui];
107 uint32_t* uipTable = (uint32_t*)vpData;
108 for(ui = 0; ui < uiLen; ui += 1){
109 if((
signed int)uipTable[ui] == -1){
110 luipParserInit[ui] = (
luint)-1;
112 luipParserInit[ui] = (
luint)uipTable[ui];
118 uint64_t* ulipTable = (uint64_t*)vpData;
119 for(ui = 0; ui < uiLen; ui += 1){
120 luipParserInit[ui] = ulipTable[ui];
134 uipList[ui] = (
aint) uipTable[ui];
This header "#include"s all publid lib headers and other standard headers needed by most objects.
uint32_t uiSizeofUint
Minimum size, in bytes, required for the basic parser unsigned integer, aint.
Private header for the SABNF parser.
luint uiChildListOffset
Offset from the beginning of the initialization data to the list of ALT and CAT child node opcode ind...
uint32_t uiAcharTableLength
Length of this data's alphabet character table.
uint_fast8_t achar
achar is the type for the parser's alphabet characters.
void vGetChildListTable(init_hdr *spInitHdr, aint *uipList)
Extract the child index list from the initialization data.
aint uiGetAcharTable(parser_init *spParserInit, achar *acpAcharTable)
Extract the alphabet character table from the initialization data.
abool bGetParserInitData(parser_init *spParserInit, luint *luipParserInit)
Re-size the initialization data to the required integer size.
uint32_t uiSizeofAchar
Minimum size, in bytes, required for the alphabet characters, achar.
uint32_t uiParserInitLength
Length of the parser initialization data.
The initialization information generated by APG.
const void * vpAcharTable
Pointer to the alphabet character table or NULL if none. (Possible for small grammars....
uint_fast32_t aint
The APG parser's unsigned integer type.
uintmax_t luint
luint is used to cast integers suitable for the %"PRIuMAX" printf format.
luint uiChildListLength
The number of integers in the child index list.
uint8_t abool
abool is the APG bool type.
Header for the parser initialization data.
const void * vpParserInit
Pointer to the parser's initialization data.
APG Version 7.0 is licensed under the
2-Clause BSD License,
an Open Source Initiative Approved License.