Re: CASE control block broken by a single line comment - Mailing list pgsql-hackers

From Erik Wienhold
Subject Re: CASE control block broken by a single line comment
Date
Msg-id mth6piewkdd6bp6neyqvrk47rbfezgookgclqxcauuj5v5q6zr@2jymico7ri2q
Whole thread Raw
In response to Re: CASE control block broken by a single line comment  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: CASE control block broken by a single line comment
List pgsql-hackers
On 2024-04-13 00:20 +0200, Tom Lane wrote:
> Erik Wienhold <ewie@ewie.name> writes:
> > I'm surprised that the lexer handles compound tokens.  I'd expect to
> > find that in the parser, especially because of using the context-aware
> > plpgsql_ns_lookup to determine if we have a T_DATUM or T_{WORD,CWORD}.
> 
> I'm not here to defend plpgsql's factorization ;-).  However, it
> doesn't really have a parser of its own, at least not for expressions,
> so I'm not sure how your suggestion could be made to work.

Not a suggestion.  Just a question about the general design, unrelated
to this fix, in case you know the answer off the cuff.  I see that
863a62064c already had the lexer handle those compound tokens, but
unfortunately without an explanation on why.  Never mind if that's too
much to ask about a design descision made over 25 years ago.

-- 
Erik



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: gcc 12.1.0 warning
Next
From: Bharath Rupireddy
Date:
Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation