Re: [HACKERS] Lex and things...

From: Leon <leon(at)udmnet(dot)ru>
To: "Ansley, Michael" <Michael(dot)Ansley(at)intec(dot)co(dot)za>
Cc: "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Lex and things...
Date: 1999-08-24 14:09:06
Message-ID: 37C2A782.BA6FC0A2@udmnet.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ansley, Michael wrote:
>
> As far as I understand it, the MAX_PARSE_BUFFER limit only applies if char
> parsestring[] is used, not if char *parsestring is used. This is the whole
> reason for using flex. And scan.l is set up to compile using char
> *parsestring, not char parsestring[].
>

What is defined explicitly:

#ifdef YY_READ_BUF_SIZE
#undef YY_READ_BUF_SIZE
#endif
#define YY_READ_BUF_SIZE MAX_PARSE_BUFFER

(these strings are repeated twice :)

...
char literal[MAX_PARSE_BUFFER];

...
<xq>{xqliteral} {
if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1))
elog(ERROR,"quoted string parse buffer of %d chars
exceeded",MAX_PARSE_BUFFER);
memcpy(literal+llen, yytext, yyleng+1);
llen += yyleng;
}

Seems that limits are everywhere ;)

--
Leon.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Leon 1999-08-24 14:09:56 Re: [HACKERS] Lex and things...
Previous Message Adriaan Joubert 1999-08-24 13:35:02 Re: [HACKERS] Lex and things...