CliXoN
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Functions | Variables
clixon_json_parse.y File Reference
#include "clixon_config.h"
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <stdlib.h>
#include <errno.h>
#include <assert.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <net/if.h>
#include <cligen/cligen.h>
#include "clixon_err.h"
#include "clixon_log.h"
#include "clixon_xml.h"
#include "clixon_json_parse.h"

Macros

#define _JY   ((struct clicon_json_yacc_arg *)_jy)
 
#define _YYERROR(msg)   {clicon_debug(2, "YYERROR %s '%s' %d", (msg), clixon_json_parsetext, _JY->jy_linenum); YYERROR;}
 
#define YY_(msgid)   msgid
 

Functions

void clixon_json_parseerror (void *_jy, char *s)
 
int json_parse_init (struct clicon_json_yacc_arg *jy)
 
int json_parse_exit (struct clicon_json_yacc_arg *jy)
 
static int json_current_new (struct clicon_json_yacc_arg *jy, char *name)
 
static int json_current_pop (struct clicon_json_yacc_arg *jy)
 
static int json_current_clone (struct clicon_json_yacc_arg *jy)
 
static int json_current_body (struct clicon_json_yacc_arg *jy, char *value)
 
 free ($1)
 
 sprintf ($$+len,"%s", $2) = realloc($1, len+strlen($2) + 1)
 

Variables

json __pad0__
 
json json object
 
 YYACCEPT
 
value __pad1__
 
value true
 
 J_FALSE { json_current_body(_JY, "false")
 
 J_NULL { json_current_body(_JY, NULL)
 
object array number { json_current_body(_JY, $1)
 
object __pad2__
 
object pair
 
pair __pad3__
 
 __pad4__
 
array __pad5__ { clicon_debug(2,"pair->string : value")
 
valuelist __pad6__
 
 value
 
string __pad7__
 
string string ustring
 
ustring __pad8__ =$2
 
 J_CHAR {$$=$1
 
number __pad9__
 

Macro Definition Documentation

#define _JY   ((struct clicon_json_yacc_arg *)_jy)
#define _YYERROR (   msg)    {clicon_debug(2, "YYERROR %s '%s' %d", (msg), clixon_json_parsetext, _JY->jy_linenum); YYERROR;}
#define YY_ (   msgid)    msgid

Function Documentation

void clixon_json_parseerror ( void *  _jy,
char *  s 
)
free (   $1)
static int json_current_body ( struct clicon_json_yacc_arg jy,
char *  value 
)
static
static int json_current_clone ( struct clicon_json_yacc_arg jy)
static
static int json_current_new ( struct clicon_json_yacc_arg jy,
char *  name 
)
static
static int json_current_pop ( struct clicon_json_yacc_arg jy)
static
int json_parse_exit ( struct clicon_json_yacc_arg jy)
int json_parse_init ( struct clicon_json_yacc_arg jy)
sprintf (   $$+,
"%s"  ,
  $2 
) = realloc($1, len+strlen($2) + 1)

Variable Documentation

json __pad0__
value __pad1__
object __pad2__
pair __pad3__
__pad4__
array __pad5__ { clicon_debug(2,"pair->string : value")
valuelist __pad6__
string __pad7__
ustring __pad8__ =$2
number __pad9__
int intval
J_CHAR {$$=$1
J_FALSE { json_current_body(_JY, "false")
object array number { json_current_body(_JY, $1)
object object
Initial value:
{}");}
| '{' objlist '}' { clicon_debug(2,"object->{ objlist }");}
;
objlist : pair { clicon_debug(2,"objlist->pair");}
| objlist ',' pair { clicon_debug(2,"objlist->objlist
object pair
string { json_current_body(_JY, $1)
value true
string string ustring
value
YYACCEPT