Macros | Functions | Variables
JSON_checker.c File Reference
#include "JSON_checker.h"
Include dependency graph for JSON_checker.c:

Go to the source code of this file.

Macros

#define false   0
 
#define MAX_DEPTH   20
 
#define MODE_ARRAY   4
 
#define MODE_DONE   1
 
#define MODE_KEY   2
 
#define MODE_OBJECT   3
 
#define S__A_   16
 
#define S__B_   17
 
#define S__C_   18
 
#define S__D_   19
 
#define S__E_   20
 
#define S__F_   21
 
#define S__L_   22
 
#define S__N_   23
 
#define S__R_   24
 
#define S__S_   25
 
#define S__T_   26
 
#define S__U_   27
 
#define S_A_F   28
 
#define S_BAC   9
 
#define S_COL   6
 
#define S_COM   7
 
#define S_DIG   15
 
#define S_DOT   13
 
#define S_E   29
 
#define S_ERR   -1
 
#define S_ETC   30
 
#define S_LBE   2
 
#define S_LBT   4
 
#define S_MIN   12
 
#define S_PLU   11
 
#define S_QUO   8
 
#define S_RBE   3
 
#define S_RBT   5
 
#define S_SLA   10
 
#define S_SPA   0
 
#define S_WSP   1
 
#define S_ZER   14
 
#define true   1
 

Functions

int JSON_checker (unsigned short p[], int length)
 
int JSON_checker_at_character ()
 
int JSON_checker_finished ()
 
void JSON_checker_init ()
 
int JSON_checker_push (int b)
 
static int pop (int mode)
 
static int push (int mode)
 

Variables

static int ascii_class [128]
 
static int state_transition_table [30][31]
 
static int the_index = 0
 
static int the_stack [MAX_DEPTH]
 
static int the_state
 
static int the_top
 

Macro Definition Documentation

#define false   0

Definition at line 34 of file JSON_checker.c.

#define MAX_DEPTH   20

Definition at line 217 of file JSON_checker.c.

#define MODE_ARRAY   4

Definition at line 212 of file JSON_checker.c.

#define MODE_DONE   1

Definition at line 209 of file JSON_checker.c.

#define MODE_KEY   2

Definition at line 210 of file JSON_checker.c.

#define MODE_OBJECT   3

Definition at line 211 of file JSON_checker.c.

#define S__A_   16

Definition at line 93 of file JSON_checker.c.

#define S__B_   17

Definition at line 96 of file JSON_checker.c.

#define S__C_   18

Definition at line 99 of file JSON_checker.c.

#define S__D_   19

Definition at line 102 of file JSON_checker.c.

#define S__E_   20

Definition at line 105 of file JSON_checker.c.

#define S__F_   21

Definition at line 108 of file JSON_checker.c.

#define S__L_   22

Definition at line 111 of file JSON_checker.c.

#define S__N_   23

Definition at line 114 of file JSON_checker.c.

#define S__R_   24

Definition at line 117 of file JSON_checker.c.

#define S__S_   25

Definition at line 120 of file JSON_checker.c.

#define S__T_   26

Definition at line 123 of file JSON_checker.c.

#define S__U_   27

Definition at line 126 of file JSON_checker.c.

#define S_A_F   28

Definition at line 129 of file JSON_checker.c.

#define S_BAC   9

Definition at line 72 of file JSON_checker.c.

#define S_COL   6

Definition at line 63 of file JSON_checker.c.

#define S_COM   7

Definition at line 66 of file JSON_checker.c.

#define S_DIG   15

Definition at line 90 of file JSON_checker.c.

#define S_DOT   13

Definition at line 84 of file JSON_checker.c.

#define S_E   29

Definition at line 132 of file JSON_checker.c.

#define S_ERR   -1

Definition at line 42 of file JSON_checker.c.

#define S_ETC   30

Definition at line 135 of file JSON_checker.c.

#define S_LBE   2

Definition at line 51 of file JSON_checker.c.

#define S_LBT   4

Definition at line 57 of file JSON_checker.c.

#define S_MIN   12

Definition at line 81 of file JSON_checker.c.

#define S_PLU   11

Definition at line 78 of file JSON_checker.c.

#define S_QUO   8

Definition at line 69 of file JSON_checker.c.

#define S_RBE   3

Definition at line 54 of file JSON_checker.c.

#define S_RBT   5

Definition at line 60 of file JSON_checker.c.

#define S_SLA   10

Definition at line 75 of file JSON_checker.c.

#define S_SPA   0

Definition at line 45 of file JSON_checker.c.

#define S_WSP   1

Definition at line 48 of file JSON_checker.c.

#define S_ZER   14

Definition at line 87 of file JSON_checker.c.

#define true   1

Definition at line 33 of file JSON_checker.c.

Function Documentation

int JSON_checker ( unsigned short  p[],
int  length 
)

Definition at line 275 of file JSON_checker.c.

int JSON_checker_at_character ( void  )

Definition at line 411 of file JSON_checker.c.

int JSON_checker_finished ( void  )

Definition at line 263 of file JSON_checker.c.

void JSON_checker_init ( void  )

Definition at line 257 of file JSON_checker.c.

int JSON_checker_push ( int  b)

Definition at line 287 of file JSON_checker.c.

static int pop ( int  mode)
static

Definition at line 245 of file JSON_checker.c.

static int push ( int  mode)
static

Definition at line 229 of file JSON_checker.c.

Variable Documentation

int ascii_class[128]
static
Initial value:
= {
}
#define S_ETC
Definition: JSON_checker.c:135
#define S_QUO
Definition: JSON_checker.c:69
#define S_COL
Definition: JSON_checker.c:63
#define S_DOT
Definition: JSON_checker.c:84
#define S_DIG
Definition: JSON_checker.c:90
#define S__A_
Definition: JSON_checker.c:93
#define S_LBT
Definition: JSON_checker.c:57
#define S__U_
Definition: JSON_checker.c:126
#define S__B_
Definition: JSON_checker.c:96
#define S_MIN
Definition: JSON_checker.c:81
#define S__S_
Definition: JSON_checker.c:120
#define S_E
Definition: JSON_checker.c:132
#define S_A_F
Definition: JSON_checker.c:129
#define S__E_
Definition: JSON_checker.c:105
#define S_ZER
Definition: JSON_checker.c:87
#define S_COM
Definition: JSON_checker.c:66
#define S_ERR
Definition: JSON_checker.c:42
#define S_BAC
Definition: JSON_checker.c:72
#define S_SPA
Definition: JSON_checker.c:45
#define S_WSP
Definition: JSON_checker.c:48
#define S__D_
Definition: JSON_checker.c:102
#define S__R_
Definition: JSON_checker.c:117
#define S__C_
Definition: JSON_checker.c:99
#define S__N_
Definition: JSON_checker.c:114
#define S_LBE
Definition: JSON_checker.c:51
#define S__F_
Definition: JSON_checker.c:108
#define S__T_
Definition: JSON_checker.c:123
#define S_SLA
Definition: JSON_checker.c:75
#define S_RBT
Definition: JSON_checker.c:60
#define S_RBE
Definition: JSON_checker.c:54
#define S__L_
Definition: JSON_checker.c:111
#define S_PLU
Definition: JSON_checker.c:78

Definition at line 142 of file JSON_checker.c.

int state_transition_table[30][31]
static

Definition at line 171 of file JSON_checker.c.

int the_index = 0
static

Definition at line 223 of file JSON_checker.c.

int the_stack[MAX_DEPTH]
static

Definition at line 220 of file JSON_checker.c.

int the_state
static

Definition at line 219 of file JSON_checker.c.

int the_top
static

Definition at line 221 of file JSON_checker.c.



csm
Author(s): Andrea Censi
autogenerated on Tue May 11 2021 02:18:23