/* *Weuseastackofflexbufferstohandlesubstitutionofpsqlvariables. *Eachstackedbuffercontainstheas-yet-unreadtextfromonepsqlvariable. *Whenwepopthestackalltheway,weresumereadingfromtheouterbuffer *identifiedbyscanbufhandle.
*/ typedefstruct StackElem
{
YY_BUFFER_STATE buf; /* flex input control structure */ char *bufstring; /* data actually being scanned by flex */ char *origstring; /* copy of original data, if needed */ char *varname; /* name of variable providing data, or NULL */ struct StackElem *next;
} StackElem;
/* *AllworkingstateofthelexermustbestoredinPsqlScanStateData *betweencalls.Thisallowsustohavemultipleopenlexeroperations, *whichisneededfornestedincludefiles.Thelexeritselfisnot *recursive,butitmustbere-entrant.
*/ typedefstruct PsqlScanStateData
{
yyscan_t scanner; /* Flex's state for this PsqlScanState */
PQExpBuffer output_buf; /* current output buffer */
StackElem *buffer_stack; /* stack of variable expansion buffers */
/* *Thesevariablesalwaysrefertotheouterbuffer,nevertoanystacked *variable-expansionbuffer.
*/
YY_BUFFER_STATE scanbufhandle; char *scanbuf; /* start of outer-level input buffer */ constchar *scanline; /* current input line at outer level */
/* safe_encoding, curline, refline are used by emit() to replace FFs */ int encoding; /* encoding being used now */ bool safe_encoding; /* is current encoding "safe"? */ bool std_strings; /* are string literals standard? */ constchar *curline; /* actual flex input string for cur buf */ constchar *refline; /* original data for cur buffer */
/* status for psql_scan_get_location() */ int cur_line_no; /* current line#, or 0 if no yylex done */ constchar *cur_line_ptr; /* points into cur_line_no'th line in scanbuf */
/* *Allthisstatelivesacrosssuccessiveinputlines,untilexplicitly *resetbypsql_scan_reset.start_stateisadoptedbyyylex()onentry, *andupdatedwithitsfinishingstateonexit.
*/ int start_state; /* yylex's starting/finishing state */ int state_before_str_stop; /* start cond. before end quote */ int paren_depth; /* depth of nesting in parentheses */ int xcdepth; /* depth of nesting in slash-star comments */ char *dolqstart; /* current $foo$ quote start string */
/* *StatetotrackboundariesofBEGIN...ENDblocksinfunction *definitions,sothatsemicolonsdonotsendquerytooearly.
*/ int identifier_count; /* identifiers since start of statement */ char identifiers[4]; /* records the first few identifiers */ int begin_depth; /* depth of begin/end pairs */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.