Re: pure parsers and reentrant scanners
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: Andreas Karlsson <andreas@proxel.se>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-12-26T18:27:26Z
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 →
-
Return yyparse() result not via global variable
- 473a575e0597 18.0 landed
-
Remove flex version checks
- 0869ea43e9c2 18.0 landed
-
Drop warning-free support for Flex 2.5.35
- 6fdd5d956343 18.0 landed
-
plpgsql: pure parser and reentrant scanner
- 7b27f5fd36cb 18.0 landed
-
flex code modernization: Replace YY_EXTRA_TYPE define with flex option
- b1ef48980ddd 18.0 landed
-
guc: reentrant scanner
- d663f150b5ed 18.0 landed
-
jsonpath scanner: reentrant scanner
- 2a7425d7eef9 18.0 landed
-
syncrep parser: pure parser and reentrant scanner
- db6856c9913f 18.0 landed
-
replication parser: pure parser and reentrant scanner
- e4a8fb8fefb9 18.0 landed
-
bootstrap: pure parser and reentrant scanner
- 3e4bacb17100 18.0 landed
-
Small whitespace improvement
- 399d0f1e11b5 18.0 landed
-
Prevent redeclaration of typedef yyscan_t
- 382092a0cd2c 18.0 landed
-
seg: pure parser and reentrant scanner
- 1f0de66ea2a5 18.0 landed
-
cube: pure parser and reentrant scanner
- 802fe923e3cd 18.0 landed
Attachments
- v3-0001-flex-code-modernization-Replace-YY_EXTRA_TYPE-def.patch (text/plain) patch v3-0001
- v3-0002-plpgsql-reentrant-scanner.patch (text/plain) patch v3-0002
- v3-0003-plpgsql-pure-parser.patch (text/plain) patch v3-0003
- v3-0004-plpgsql-yyextra.patch (text/plain) patch v3-0004
On 22.12.24 22:43, Andreas Karlsson wrote: > On 12/19/24 9:57 PM, Peter Eisentraut wrote: >> Here is an updated patch set on top of what has been committed so far, >> with all the issues you pointed out addressed. > > Other than the discussion of how old versions of flex we should support > I think this set of patches is ready to be committed. I looked at it > again and everything looks good. I have committed these except the plpgsql one, which was still work in progress. But I have progressed on this now and also converted the parser and put the local state into yyextra. This gets rid of all internal global state now. The patches for this are attached. It's a lot of churn, but otherwise pretty standard stuff. Along the way I noticed that the flex documentation now recommends a different way to set the yyextra type. So I have changed the ones we already have to that newer style. I inspected the generated C code and there wasn't any significant difference, so I'm not sure, but I figure if we're making changes in this area we might as well use the modern style.