git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 9b25489) | patch
jsonpath scanner: reentrant scanner
2024年12月24日 22:42:41 +0000 (23:42 +0100)
2024年12月24日 22:42:41 +0000 (23:42 +0100)
commit 2a7425d7eef9b4b848763fb920fefa23c3c43f31
jsonpath scanner: reentrant scanner

Use the flex %option reentrant to make the generated scanner
reentrant and thread-safe. Note: The parser was already pure.

Simplify flex scan buffer management: Instead of constructing the
buffer from pieces and then using yy_scan_buffer(), we can just use
yy_scan_string(), which does the same thing internally. (Actually, we
use yy_scan_bytes() here because we already have the length.)

Use flex yyextra to handle context information, instead of global
variables. This complements the other changes to make the scanner
reentrant.

Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Reviewed-by: Andreas Karlsson <andreas@proxel.se>
Discussion: https://www.postgresql.org/message-id/flat/eb6faeac-2a8a-4b69-9189-c33c520e5b7b@eisentraut.org
src/backend/nls.mk diff | blob | blame | history
src/backend/utils/adt/jsonpath_gram.y diff | blob | blame | history
src/backend/utils/adt/jsonpath_internal.h diff | blob | blame | history
src/backend/utils/adt/jsonpath_scan.l diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /