Re: pure parsers and reentrant scanners

Andreas Karlsson <andreas@proxel.se>

From: Andreas Karlsson <andreas@proxel.se>
To: Peter Eisentraut <peter@eisentraut.org>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-12-18T18:44:47Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Return yyparse() result not via global variable

  2. Remove flex version checks

  3. Drop warning-free support for Flex 2.5.35

  4. plpgsql: pure parser and reentrant scanner

  5. flex code modernization: Replace YY_EXTRA_TYPE define with flex option

  6. guc: reentrant scanner

  7. jsonpath scanner: reentrant scanner

  8. syncrep parser: pure parser and reentrant scanner

  9. replication parser: pure parser and reentrant scanner

  10. bootstrap: pure parser and reentrant scanner

  11. Small whitespace improvement

  12. Prevent redeclaration of typedef yyscan_t

  13. seg: pure parser and reentrant scanner

  14. cube: pure parser and reentrant scanner

On 12/18/24 10:42 AM, Peter Eisentraut wrote:
> I can fix that with the attached patch.
> 
> The symbol YY_TYPEDEF_YY_SCANNER_T isn't documented, but we already use 
> it elsewhere in the code.
> 
> Note that in replication/syncrep.h and replication/walsender_private.h 
> we have to have an #ifndef wrapper because there are files that end up 
> including both headers.  Maybe we should put that #ifndef wrapper 
> everywhere for consistency?
> 
> Any thoughts?

Seems like a sane fix to me and as for the ifndef I have no strong 
opinion either way but I would personally probably have added it 
everywhere for consistency.

Andreas