|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "mb/pg_wchar.h"#include "parser/scanner.h"#include "plpgsql.h"#include "pl_gram.h"#include "pl_reserved_kwlist_d.h"#include "pl_unreserved_kwlist_d.h"#include "pl_reserved_kwlist.h"#include "pl_unreserved_kwlist.h"
Go to the source code of this file.
Data Structures | |
| struct | TokenAuxData |
| struct | plpgsql_yy_extra_type |
| struct | yyguts_t |
Macros | |
| #define | PG_KEYWORD(kwname, value) value, |
| #define | AT_STMT_START(prev_token) |
| #define | MAX_PUSHBACKS 4 |
| #define | yyextra (((struct yyguts_t *) yyscanner)->yyextra_r) |
Variables | |
| IdentifierLookup | plpgsql_IdentifierLookup = IDENTIFIER_LOOKUP_NORMAL |
| static const uint16 | ReservedPLKeywordTokens [] |
| static const uint16 | UnreservedPLKeywordTokens [] |
| #define AT_STMT_START | ( | prev_token | ) |
Definition at line 82 of file pl_scanner.c.
| #define MAX_PUSHBACKS 4 |
Definition at line 98 of file pl_scanner.c.
Definition at line 147 of file pl_scanner.c.
|
static |
Definition at line 339 of file pl_scanner.c.
References core_yylex(), fb(), pstrdup(), token, and yyextra.
Referenced by plpgsql_peek(), plpgsql_peek2(), and plpgsql_yylex().
Definition at line 597 of file pl_scanner.c.
Referenced by plpgsql_location_to_lineno(), and plpgsql_scanner_init().
| void plpgsql_append_source_text | ( | StringInfo | buf, |
| int | startlocation, | ||
| int | endlocation, | ||
| yyscan_t | yyscanner | ||
| ) |
Definition at line 435 of file pl_scanner.c.
References appendBinaryStringInfo(), Assert, buf, fb(), and yyextra.
Definition at line 607 of file pl_scanner.c.
References yyextra.
Referenced by plpgsql_compile_error_callback().
Definition at line 573 of file pl_scanner.c.
References plpgsql_yy_extra_type::cur_line_start, fb(), location_lineno_init(), plpgsql_yy_extra_type::scanorig, and yyextra.
Definition at line 452 of file pl_scanner.c.
References fb(), internal_yylex(), and push_back_token().
| void plpgsql_peek2 | ( | int * | tok1_p, |
| int * | tok2_p, | ||
| int * | tok1_loc, | ||
| int * | tok2_loc, | ||
| yyscan_t | yyscanner | ||
| ) |
Definition at line 471 of file pl_scanner.c.
References fb(), internal_yylex(), and push_back_token().
| void plpgsql_push_back_token | ( | int | token, |
| YYSTYPE * | yylvalp, | ||
| YYLTYPE * | yyllocp, | ||
| yyscan_t | yyscanner | ||
| ) |
Definition at line 401 of file pl_scanner.c.
References fb(), TokenAuxData::lval, push_back_token(), and yyextra.
Definition at line 504 of file pl_scanner.c.
References fb(), internalerrposition(), internalerrquery(), pg_mbstrlen_with_len(), plpgsql_yy_extra_type::scanorig, and yyextra.
Referenced by plpgsql_yyerror().
Definition at line 653 of file pl_scanner.c.
References scanner_finish().
Referenced by plpgsql_compile_callback(), and plpgsql_compile_inline().
Definition at line 621 of file pl_scanner.c.
References fb(), IDENTIFIER_LOOKUP_NORMAL, location_lineno_init(), palloc0_object, plpgsql_IdentifierLookup, ReservedPLKeywordTokens, scanner_init(), and str.
Referenced by plpgsql_compile_callback(), and plpgsql_compile_inline().
Definition at line 418 of file pl_scanner.c.
References i, lengthof, and UnreservedPLKeywordTokens.
Definition at line 327 of file pl_scanner.c.
References yyextra.
| void plpgsql_yyerror | ( | YYLTYPE * | yyllocp, |
| PLpgSQL_stmt_block ** | plpgsql_parse_result_p, | ||
| yyscan_t | yyscanner, | ||
| const char * | message | ||
| ) |
Definition at line 534 of file pl_scanner.c.
References _, ereport, errcode(), errmsg(), ERROR, fb(), plpgsql_scanner_errposition(), and yyextra.
Definition at line 160 of file pl_scanner.c.
References AT_STMT_START, fb(), GetScanKeyword(), internal_yylex(), plpgsql_parse_dblword(), plpgsql_parse_tripword(), plpgsql_parse_word(), push_back_token(), ScanKeywordLookup(), UnreservedPLKeywordTokens, and yyextra.
|
static |
Definition at line 385 of file pl_scanner.c.
References elog, ERROR, fb(), MAX_PUSHBACKS, token, and yyextra.
Referenced by plpgsql_peek(), plpgsql_peek2(), plpgsql_push_back_token(), and plpgsql_yylex().
| IdentifierLookup plpgsql_IdentifierLookup = IDENTIFIER_LOOKUP_NORMAL |
Definition at line 26 of file pl_scanner.c.
Referenced by plpgsql_parse_dblword(), plpgsql_parse_tripword(), plpgsql_parse_word(), and plpgsql_scanner_init().
Definition at line 66 of file pl_scanner.c.
Referenced by plpgsql_scanner_init().
Definition at line 70 of file pl_scanner.c.
Referenced by plpgsql_token_is_unreserved_keyword(), and plpgsql_yylex().