|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <limits.h>#include <wctype.h>#include "commands/defrem.h"#include "mb/pg_wchar.h"#include "miscadmin.h"#include "tsearch/ts_public.h"#include "tsearch/ts_type.h"#include "tsearch/ts_utils.h"#include "utils/builtins.h"#include "utils/pg_locale.h"
Go to the source code of this file.
Data Structures | |
| struct | TParserStateActionItem |
| struct | TParserPosition |
| struct | TParser |
| struct | TParserStateAction |
| struct | CoverPos |
| struct | hlCheck |
Typedefs | |
| typedef int(* | TParserCharTest) (struct TParser *) |
| typedef void(* | TParserSpecial) (struct TParser *) |
| typedef struct TParserPosition | TParserPosition |
| typedef struct TParser | TParser |
| #define A_BINGO 0x0001 |
Definition at line 221 of file wparser_def.c.
| #define A_CLEAR 0x0010 |
Definition at line 225 of file wparser_def.c.
| #define A_CLRALL 0x0040 |
Definition at line 227 of file wparser_def.c.
| #define A_MERGE 0x0020 |
Definition at line 226 of file wparser_def.c.
| #define A_NEXT 0x0000 |
Definition at line 220 of file wparser_def.c.
| #define A_POP 0x0002 |
Definition at line 222 of file wparser_def.c.
| #define A_PUSH 0x0004 |
Definition at line 223 of file wparser_def.c.
| #define A_RERUN 0x0008 |
Definition at line 224 of file wparser_def.c.
| #define ASCIIHWORD 16 |
Definition at line 51 of file wparser_def.c.
| #define ASCIIPARTHWORD 11 |
Definition at line 46 of file wparser_def.c.
| #define ASCIIWORD 1 |
Definition at line 36 of file wparser_def.c.
Definition at line 1905 of file wparser_def.c.
| #define DECIMAL_T 20 |
Definition at line 55 of file wparser_def.c.
| #define EMAIL 4 |
Definition at line 39 of file wparser_def.c.
| #define FILEPATH 19 |
Definition at line 54 of file wparser_def.c.
Definition at line 1889 of file wparser_def.c.
| #define HOST 6 |
Definition at line 41 of file wparser_def.c.
| #define HWORD 17 |
Definition at line 52 of file wparser_def.c.
Definition at line 1901 of file wparser_def.c.
| #define LASTNUM 23 |
Definition at line 60 of file wparser_def.c.
| #define NOENDTOKEN | ( | x | ) | ( NONWORDTOKEN(x) || (x)==SCIENTIFIC || (x)==VERSIONNUMBER || (x)==DECIMAL_T || (x)==SIGNEDINT || (x)==UNSIGNEDINT || TS_IDIGNORE(x) ) |
Definition at line 1892 of file wparser_def.c.
Definition at line 1891 of file wparser_def.c.
| #define NUMHWORD 15 |
Definition at line 50 of file wparser_def.c.
| #define NUMPARTHWORD 9 |
Definition at line 44 of file wparser_def.c.
| #define NUMWORD 3 |
Definition at line 38 of file wparser_def.c.
Definition at line 388 of file wparser_def.c.
| #define PARTHWORD 10 |
Definition at line 45 of file wparser_def.c.
| #define PROTOCOL 14 |
Definition at line 49 of file wparser_def.c.
| #define SCIENTIFIC 7 |
Definition at line 42 of file wparser_def.c.
| #define SIGNEDINT 21 |
Definition at line 56 of file wparser_def.c.
| #define SPACE 12 |
Definition at line 47 of file wparser_def.c.
| #define TAG_T 13 |
Definition at line 48 of file wparser_def.c.
Definition at line 1575 of file wparser_def.c.
Definition at line 1887 of file wparser_def.c.
| #define UNSIGNEDINT 22 |
Definition at line 57 of file wparser_def.c.
| #define URL_T 5 |
Definition at line 40 of file wparser_def.c.
| #define URLPATH 18 |
Definition at line 53 of file wparser_def.c.
| #define VERSIONNUMBER 8 |
Definition at line 43 of file wparser_def.c.
| #define WORD_T 2 |
Definition at line 37 of file wparser_def.c.
| #define XMLENTITY 23 |
Definition at line 58 of file wparser_def.c.
Definition at line 1890 of file wparser_def.c.
Definition at line 119 of file wparser_def.c.
Definition at line 495 of file wparser_def.c.
|
static |
Definition at line 1936 of file wparser_def.c.
References data, fb(), i, palloc_array, TS_NO, TS_YES, and val.
Referenced by hlCover(), and prsd_headline().
|
static |
Definition at line 2175 of file wparser_def.c.
References endpos, fb(), i, INTERESTINGWORD, NONWORDTOKEN, startpos, HeadlineWordEntry::type, and HeadlineParsedText::words.
Referenced by mark_hl_fragments().
|
static |
Definition at line 1987 of file wparser_def.c.
References checkcondition_HL(), HeadlineParsedText::curwords, fb(), GETQUERY, i, HeadlineWordEntry::item, HeadlineWordEntry::len, lfirst, Max, HeadlineWordEntry::pos, ExecPhraseData::pos, TS_EXEC_EMPTY, TS_execute(), hlCheck::words, and HeadlineParsedText::words.
Referenced by mark_hl_fragments(), and mark_hl_words().
|
static |
Definition at line 2139 of file wparser_def.c.
References endpos, fb(), HLIDREPLACE, HLIDSKIP, i, HeadlineWordEntry::in, HeadlineWordEntry::item, HeadlineWordEntry::repeated, HeadlineWordEntry::replace, HeadlineWordEntry::selected, HeadlineWordEntry::skip, startpos, HeadlineWordEntry::type, HeadlineParsedText::words, and XMLHLIDSKIP.
Referenced by mark_hl_fragments(), and mark_hl_words().
|
static |
Definition at line 2226 of file wparser_def.c.
References BADENDPOINT, HeadlineParsedText::curwords, endpos, fb(), get_next_fragment(), hlCover(), i, HeadlineWordEntry::in, mark_fragment(), NONWORDTOKEN, palloc(), pfree(), PG_INT32_MAX, repalloc(), startpos, HeadlineWordEntry::type, and HeadlineParsedText::words.
Referenced by prsd_headline().
|
static |
Definition at line 2409 of file wparser_def.c.
References BADENDPOINT, HeadlineParsedText::curwords, fb(), hlCover(), i, INTERESTINGWORD, mark_fragment(), NONWORDTOKEN, HeadlineWordEntry::type, and HeadlineParsedText::words.
Referenced by prsd_headline().
|
static |
Definition at line 270 of file wparser_def.c.
References fb(), palloc_object, TParserPosition::prev, and TParserPosition::pushedAtAction.
Referenced by p_isURLPath(), TParserCopyInit(), TParserGet(), and TParserInit().
Definition at line 451 of file wparser_def.c.
References TParserPosition::charlen, fb(), TParserPosition::posbyte, TParser::state, and TParser::str.
Referenced by p_isasclet().
Definition at line 432 of file wparser_def.c.
References Assert, TParserPosition::charlen, TParser::lenstr, TParserPosition::posbyte, and TParser::state.
Referenced by _make_compiler_happy().
Definition at line 439 of file wparser_def.c.
References TParser::c, and fb().
Referenced by _make_compiler_happy().
Definition at line 587 of file wparser_def.c.
References TParserPosition::charlen, check_stack_depth(), fb(), HOST, TParserPosition::lenbytetoken, TParserPosition::lenchartoken, TParserPosition::posbyte, TParserPosition::poschar, TParser::state, TParserCopyClose(), TParserCopyInit(), and TParserGet().
Definition at line 581 of file wparser_def.c.
References TParser::ignore.
Definition at line 445 of file wparser_def.c.
References TParser::c, and fb().
Referenced by _make_compiler_happy().
Definition at line 650 of file wparser_def.c.
References fb(), GetDatabaseEncoding(), lengthof, pg_dsplen(), PG_UTF8, TParser::pgwstr, TParserPosition::posbyte, TParserPosition::poschar, TParser::state, and TParser::str.
Definition at line 570 of file wparser_def.c.
References TParser::wanthost.
Definition at line 463 of file wparser_def.c.
References TParserPosition::charlen, fb(), TParserPosition::posbyte, TParser::state, and TParser::str.
Definition at line 615 of file wparser_def.c.
References TParserPosition::charlen, check_stack_depth(), fb(), TParserPosition::lenbytetoken, TParserPosition::lenchartoken, newTParserPosition(), TParserPosition::posbyte, TParserPosition::poschar, TParser::state, TParserCopyClose(), TParserCopyInit(), TParserGet(), TPS_InURLPathFirst, and URLPATH.
| p_iswhat | ( | alnum | , |
| 1 | |||
| ) |
| Datum prsd_end | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1873 of file wparser_def.c.
References PG_GETARG_POINTER, PG_RETURN_VOID, and TParserClose().
| Datum prsd_headline | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2571 of file wparser_def.c.
References checkcondition_HL(), HeadlineParsedText::curwords, defGetString(), ereport, errcode(), errmsg(), ERROR, fb(), HeadlineParsedText::fragdelim, HeadlineParsedText::fragdelimlen, GETQUERY, HeadlineWordEntry::len, lfirst, mark_hl_fragments(), mark_hl_words(), NIL, PG_GETARG_POINTER, PG_GETARG_TSQUERY, PG_RETURN_POINTER, pg_strcasecmp(), pg_strtoint32(), pstrdup(), TSQueryData::size, HeadlineParsedText::startsel, HeadlineParsedText::startsellen, HeadlineParsedText::stopsel, HeadlineParsedText::stopsellen, TS_EXEC_EMPTY, TS_execute_locations(), val, hlCheck::words, and HeadlineParsedText::words.
| Datum prsd_lextype | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1833 of file wparser_def.c.
References LexDescr::alias, LexDescr::descr, i, LASTNUM, lex_descr, LexDescr::lexid, palloc_array, PG_RETURN_POINTER, pstrdup(), and tok_alias.
| Datum prsd_nexttoken | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1857 of file wparser_def.c.
References fb(), TParser::lenbytetoken, PG_GETARG_POINTER, PG_RETURN_INT32, TParser::token, TParserGet(), and TParser::type.
| Datum prsd_start | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1851 of file wparser_def.c.
References PG_GETARG_INT32, PG_GETARG_POINTER, PG_RETURN_POINTER, and TParserInit().
Definition at line 546 of file wparser_def.c.
References TParserPosition::lenbytetoken, TParserPosition::lenchartoken, TParserPosition::posbyte, TParserPosition::poschar, TParser::state, and TParser::wanthost.
Definition at line 554 of file wparser_def.c.
References TParserPosition::lenbytetoken, TParserPosition::lenchartoken, TParserPosition::posbyte, TParserPosition::poschar, and TParser::state.
Definition at line 522 of file wparser_def.c.
References TParser::ignore, TParserPosition::lenchartoken, pg_strncasecmp(), TParser::state, and TParser::token.
Definition at line 561 of file wparser_def.c.
References TParserPosition::lenbytetoken, TParserPosition::lenchartoken, TParserPosition::posbyte, TParserPosition::poschar, and TParser::state.
Definition at line 342 of file wparser_def.c.
References fb(), fprintf, pfree(), TParser::pgwstr, TParserPosition::prev, and TParser::state.
Referenced by prsd_end().
Definition at line 365 of file wparser_def.c.
References fb(), fprintf, pfree(), TParserPosition::prev, and TParser::state.
Referenced by p_ishost(), and p_isURLPath().
Definition at line 319 of file wparser_def.c.
References TParser::charmaxlen, fb(), fprintf, TParser::lenstr, newTParserPosition(), palloc0_object, TParser::pgwstr, TParserPosition::state, TParser::state, TParser::str, and TPS_Base.
Referenced by p_ishost(), and p_isURLPath().
Definition at line 1665 of file wparser_def.c.
References A_BINGO, A_CLEAR, A_CLRALL, A_MERGE, A_POP, A_PUSH, A_RERUN, TParserStateAction::action, Actions, Assert, TParserStateActionItem::c, TParser::c, TParserPosition::charlen, TParser::charmaxlen, CHECK_FOR_INTERRUPTS, fb(), TParserStateActionItem::flags, fprintf, TParserStateActionItem::isclass, TParserPosition::lenbytetoken, TParser::lenbytetoken, TParserPosition::lenchartoken, TParser::lenchartoken, TParser::lenstr, newTParserPosition(), pfree(), pg_mblen(), TParserPosition::posbyte, TParserPosition::poschar, TParserPosition::prev, TParserPosition::pushedAtAction, TParserStateActionItem::special, TParserPosition::state, TParser::state, TParserStateAction::state, TParser::str, tok_alias, TParser::token, TParserStateActionItem::tostate, TPS_Base, TPS_Null, TParserStateActionItem::type, and TParser::type.
Referenced by p_ishost(), p_isURLPath(), and prsd_nexttoken().
Definition at line 287 of file wparser_def.c.
References TParser::charmaxlen, fb(), fprintf, len, TParser::lenstr, newTParserPosition(), palloc0_object, palloc_array, pg_database_encoding_max_length(), pg_mb2wchar_with_len(), TParser::pgwstr, TParserPosition::state, TParser::state, TParser::str, str, and TPS_Base.
Referenced by prsd_start().
|
static |
|
static |
|
static |
|
static |
Definition at line 1264 of file wparser_def.c.
|
static |
Definition at line 1270 of file wparser_def.c.
|
static |
Definition at line 1258 of file wparser_def.c.
|
static |
|
static |
Definition at line 1243 of file wparser_def.c.
|
static |
Definition at line 1252 of file wparser_def.c.
|
static |
|
static |
Definition at line 1040 of file wparser_def.c.
|
static |
Definition at line 1346 of file wparser_def.c.
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 1431 of file wparser_def.c.
|
static |
|
static |
|
static |
|
static |
Definition at line 1328 of file wparser_def.c.
|
static |
Definition at line 1281 of file wparser_def.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 1487 of file wparser_def.c.
|
static |
|
static |
Definition at line 1550 of file wparser_def.c.
|
static |
|
static |
Definition at line 1471 of file wparser_def.c.
|
static |
|
static |
|
static |
Definition at line 1081 of file wparser_def.c.
|
static |
Definition at line 1089 of file wparser_def.c.
|
static |
|
static |
|
static |
Definition at line 1519 of file wparser_def.c.
|
static |
|
static |
Definition at line 1381 of file wparser_def.c.
|
static |
|
static |
|
static |
Definition at line 1314 of file wparser_def.c.
|
static |
|
static |
Definition at line 1437 of file wparser_def.c.
|
static |
Definition at line 1443 of file wparser_def.c.
|
static |
|
static |
Definition at line 998 of file wparser_def.c.
|
static |
|
static |
Definition at line 1061 of file wparser_def.c.
|
static |
|
static |
|
static |
Definition at line 1192 of file wparser_def.c.
|
static |
Definition at line 1172 of file wparser_def.c.
|
static |
|
static |
Definition at line 1220 of file wparser_def.c.
|
static |
Definition at line 1227 of file wparser_def.c.
|
static |
|
static |
Definition at line 1178 of file wparser_def.c.
|
static |
|
static |
Definition at line 1025 of file wparser_def.c.
|
static |
|
static |
Definition at line 1425 of file wparser_def.c.
|
static |
Definition at line 1415 of file wparser_def.c.
|
static |
Definition at line 1421 of file wparser_def.c.
|
static |
|
static |
Definition at line 1068 of file wparser_def.c.
|
static |
Definition at line 1055 of file wparser_def.c.
|
static |
|
static |
Definition at line 1164 of file wparser_def.c.
|
static |
|
static |
|
static |
|
static |
Definition at line 1142 of file wparser_def.c.
|
static |
Definition at line 1129 of file wparser_def.c.
|
static |
Definition at line 1135 of file wparser_def.c.
|
static |
Definition at line 1121 of file wparser_def.c.
Definition at line 89 of file wparser_def.c.
Referenced by prsd_lextype().
Definition at line 62 of file wparser_def.c.
Referenced by prsd_lextype(), and TParserGet().