Version 7.0
Copyright © 2021 Lowell D. Thomas
APG
… an ABNF Parser Generator
|
Go to the documentation of this file.
172 #define JSON_UTF16_MATCH 0
173 #define JSON_UTF16_NOMATCH 1
174 #define JSON_UTF16_BAD_HIGH 2
175 #define JSON_UTF16_BAD_LOW 3
void * vpVecAscii
A scratch vector for constructing ASCII strings on the fly.
void * vpVecIterators
A vector of iterator context pointers remembered for destruction.
The object context. For intenrnal use only.
A JSON interator object context.
aint uiCharsOffset
The offset from the vector base of 32-bit character codes to the first character in the string.
aint uiUtf16_1(char *cpHex, uint32_t *uipChar)
u32_phrase * spStrings
An array of absolute strings.
frame * spCurrentFrame
Points to the current stack frame.
exception * spException
Pointer to the exception structure for reporting errors to the application catch block.
json_value * spValues
an array of absolute values.
uint_fast8_t achar
achar is the type for the parser's alphabet characters.
void * vpVecChars
A vector of string characters. 32-bit Unicode code points. All strings are in this single vector.
aint uiUtf16_2(char *cpHex, uint32_t *uipChar)
uint32_t uiUtf8_3byte(char *cpBytes)
aint uiCurrentDepth
Used to keep track of the current tree depth for display of the tree of values.
void * vpVecKeyList
Vector of pointers to the list of valued found in a key search.
Each value is a node in the parse tree.
aint uiValue
Index to the value represented by this frame.
void * vpVecChildIndexes
A vector of number objects.
json * spJson
Pointer to the parent JSON object context.
void * vpVecChildPointers
void * vpConv
Context pointer for a conversion object.
void * vpVecTreeList
Vector of pointers to sub_tree tree. Value pointers are in the order of a depth-first traversal.
This is the "relative" value developed during parsing.
aint uiNextKey
Used to keep track of the next available key offset to be used by an object member.
uint_fast32_t aint
The APG parser's unsigned integer type.
struct json_value_tag ** sppChildPointers
An array of absolute child value pointers.
void * vpVecFrames
Frame stack of values to keep track of the current value in the parse tree.
void * vpVecInput
The UTF-8-encoded input byte stream. BOM, if any, removed.
aint uiChildCount
if uiId is JSON_ID_OBJECT or JSON_ID_ARRAY, the number of members or values.
abool bFirstNode
Set to true before each call to sJsonWrite() to prevent writing a key for the first node of a sub-tre...
abool bHasFrac
A working value signaling presence of fractional value for a number value.
uint32_t uiUtf8_4byte(char *cpBytes)
aint uiNumber
Offset to a number if JSON_ID_NUMBER.
uint32_t uiUtf8_2byte(char *cpBytes)
uint32_t uiChar
A working value to hold the value of a single character. Higher level rules will move it to vpVecChar...
A structure to describe the type and location of a caught exception.
This is the "relative" string developed during parsing.
aint uiStringCount
The number of strings in the array.
void * vpVecChildList
Vector of pointers to the children of a parent value. NULL if the parent is not an object or array.
aint uiKey
If uiID is JSON_ID_OBJECT, offset to the key's string. Otherwise, zero and not used.
void * vpVecValues
A vector of relative values.
aint uiMaxDepth
The maximum tree depth of values to display.
aint uiChildListOffset
Offset from the base of the vector of child value pointers.
aint uiValueCount
The number of values in the array.
void * vpVecScratch32
A vector of 32-bit integer scratch space.
void * vpVecOutput
Vector of 32-bit code points for generating output of value tree to JSON-text.
aint uiString
Offset to a string_r if JSON_ID_STRING.
void * vpLines
pointer to a lines object context
aint uiString
Offset to the string or key string for this value.
aint uiCount
The number of pointers in the list.
void * vpVecStrings
A vector of relative strings.
json_value ** sppValues
List of pointers to values.
achar * acpInput
Buffer to hold the input converted from uint8_t to achar units.
void * vpVecBuilders
A vector of builder context pointers remembered for destruction.
const void * vpValidate
Must be the "magic number" to be a valid context.
const void * vpValidate
Must be the "magic number" to be a valid context.
uint8_t abool
abool is the APG bool type.
void * vpFmt
Pointer to a hexdump-style formatter object.
aint uiId
The value identifier, JSON_ID_OBJECT, etc.
aint uiWalkCount
An accumulator for counting sub-tree nodes and child nodes.
abool bHasMinus
A working value signaling a minus sign for a number value.
Defines a pointer to an array of 32-bit unsigned integers plus its length. Typically needed by Unicod...
The structure of a JSON value.
aint uiLength
The number of characters in the string.
FILE * spIn
File I/O handle for the input file. Maintained here so that it can be closed in the destructor if nec...
void * vpParser
Pointer to the parser context if exception thrown during parsing.
json_iterator * spJsonIteratorCtor(json *spJson)
Private function for internal object use only. Never called by the application.
aint uiCurrent
The current iterator value index.
void vJsonGrammarRuleCallbacks(void *vpParserCtx)
APG Version 7.0 is licensed under the
2-Clause BSD License,
an Open Source Initiative Approved License.