Version 7.0
Copyright © 2021 Lowell D. Thomas
APG
… an ABNF Parser Generator
Macros
parser-callbacks.c File Reference

For internal object use only. The JSON parser grammar call back functions. More...

#include <limits.h>
#include "./json.h"
#include "./jsonp.h"
#include "./json-grammar.h"
Include dependency graph for parser-callbacks.c:

Go to the source code of this file.

Macros

#define THROW_ERROR(msg, off)   vThrowError(spJson, (msg), (off), __FILE__, __func__, __LINE__)
 A specialized exception thrower for the callback functions. More...
 

Functions

Private Functions

Not static because referenced across multiple files.

uint32_t uiUtf8_2byte (char *cpBytes)
 
uint32_t uiUtf8_3byte (char *cpBytes)
 
uint32_t uiUtf8_4byte (char *cpBytes)
 
aint uiUtf16_1 (char *cpHex, uint32_t *uipChar)
 
aint uiUtf16_2 (char *cpHex, uint32_t *uipChar)
 
Another Private Function

Define the call back funtions to the parser. Not static because referenced across multiple files.

void vJsonGrammarRuleCallbacks (void *vpParserCtx)
 

Detailed Description

For internal object use only. The JSON parser grammar call back functions.

These are the functions that interact with the parse tree nodes to translate the ABNF rules into usable data. Applications should never have need of this functions directly.

Definition in file parser-callbacks.c.

Macro Definition Documentation

◆ THROW_ERROR

#define THROW_ERROR (   msg,
  off 
)    vThrowError(spJson, (msg), (off), __FILE__, __func__, __LINE__)

A specialized exception thrower for the callback functions.

Definition at line 45 of file parser-callbacks.c.

Function Documentation

◆ uiUtf16_1()

aint uiUtf16_1 ( char *  cpHex,
uint32_t *  uipChar 
)

Definition at line 74 of file parser-callbacks.c.

◆ uiUtf16_2()

aint uiUtf16_2 ( char *  cpHex,
uint32_t *  uipChar 
)

Definition at line 82 of file parser-callbacks.c.

◆ uiUtf8_2byte()

uint32_t uiUtf8_2byte ( char *  cpBytes)

Definition at line 53 of file parser-callbacks.c.

◆ uiUtf8_3byte()

uint32_t uiUtf8_3byte ( char *  cpBytes)

Definition at line 59 of file parser-callbacks.c.

◆ uiUtf8_4byte()

uint32_t uiUtf8_4byte ( char *  cpBytes)

Definition at line 66 of file parser-callbacks.c.

◆ vJsonGrammarRuleCallbacks()

void vJsonGrammarRuleCallbacks ( void *  vpParserCtx)

Definition at line 718 of file parser-callbacks.c.

APG Version 7.0 is licensed under the 2-Clause BSD License,
an Open Source Initiative Approved License.