PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
jsonpath_internal.h File Reference
#include "utils/jsonpath.h"
#include "jsonpath_gram.h"
Include dependency graph for jsonpath_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  JsonPathString
 

Macros

#define YY_TYPEDEF_YY_SCANNER_T
 
#define YY_DECL
 

Typedefs

typedef struct JsonPathString JsonPathString
 
typedef void * yyscan_t
 

Functions

int jsonpath_yyparse (JsonPathParseResult **result, struct Node *escontext, yyscan_t yyscanner)
 
void jsonpath_yyerror (JsonPathParseResult **result, struct Node *escontext, yyscan_t yyscanner, const char *message)
 

Variables

 YY_DECL
 

Macro Definition Documentation

◆ YY_DECL

#define YY_DECL
Value:
extern int jsonpath_yylex(YYSTYPE *yylval_param, \
JsonPathParseResult **result, \
struct Node *escontext, \
yyscan_t yyscanner)
void * yyscan_t
Definition: cubedata.h:67
int YYSTYPE
Definition: psqlscanslash.l:39
Definition: nodes.h:129

Definition at line 33 of file jsonpath_internal.h.

◆ YY_TYPEDEF_YY_SCANNER_T

#define YY_TYPEDEF_YY_SCANNER_T

Definition at line 26 of file jsonpath_internal.h.

Typedef Documentation

◆ JsonPathString

◆ yyscan_t

typedef void* yyscan_t

Definition at line 27 of file jsonpath_internal.h.

Function Documentation

◆ jsonpath_yyerror()

void jsonpath_yyerror ( JsonPathParseResult **  result,
struct Node escontext,
yyscan_t  yyscanner,
const char *  message 
)

Definition at line 362 of file jsonpath_scan.l.

365{
366 struct yyguts_t *yyg = (struct yyguts_t *) yyscanner; /* needed for yytext
367 * macro */
368
369 /* don't overwrite escontext if it's already been set */
370 if (SOFT_ERROR_OCCURRED(escontext))
371 return;
372
373 if (*yytext == YY_END_OF_BUFFER_CHAR)
374 {
375 errsave(escontext,
376 (errcode(ERRCODE_SYNTAX_ERROR),
377 /* translator: %s is typically "syntax error" */
378 errmsg("%s at end of jsonpath input", _(message))));
379 }
380 else
381 {
382 errsave(escontext,
383 (errcode(ERRCODE_SYNTAX_ERROR),
384 /* translator: first %s is typically "syntax error" */
385 errmsg("%s at or near \"%s\" of jsonpath input",
386 _(message), yytext)));
387 }
388}
int errcode(int sqlerrcode)
Definition: elog.c:853
int errmsg(const char *fmt,...)
Definition: elog.c:1070
#define _(x)
Definition: elog.c:90
#define errsave(context,...)
Definition: elog.h:261
#define SOFT_ERROR_OCCURRED(escontext)
Definition: miscnodes.h:53

References _, errcode(), errmsg(), errsave, and SOFT_ERROR_OCCURRED.

Referenced by hexval(), and parsejsonpath().

◆ jsonpath_yyparse()

int jsonpath_yyparse ( JsonPathParseResult **  result,
struct Node escontext,
yyscan_t  yyscanner 
)

Referenced by parsejsonpath().

Variable Documentation

◆ YY_DECL

YY_DECL

Definition at line 37 of file jsonpath_internal.h.