Re: pure parsers and reentrant scanners

2025-01-23 Thread Peter Eisentraut
On 17.01.25 16:40, Peter Eisentraut wrote: Here are some more patches.  This should cover the last sub-topic of this topic: not passing the yyparse() result via global variables.  This uses techniques that are already in use in some parsers in the tree, for example cube and jsonpath.  The syncr

Re: pure parsers and reentrant scanners

2025-01-17 Thread Peter Eisentraut
Here are some more patches. This should cover the last sub-topic of this topic: not passing the yyparse() result via global variables. This uses techniques that are already in use in some parsers in the tree, for example cube and jsonpath. The syncrep parser was a bit trickier, because there

Re: pure parsers and reentrant scanners

2025-01-17 Thread Peter Eisentraut
On 09.01.25 15:53, Tom Lane wrote: Peter Eisentraut writes: The second patch contemplates raising the minimum required flex version, but what to? Meh, let's just rip out the version check. It's no longer very relevant. Nobody is going to be using anything older than 2.5.35. While 2.5.35 pro

Re: pure parsers and reentrant scanners

2025-01-09 Thread Tom Lane
Peter Eisentraut writes: > The second patch contemplates raising the minimum required flex version, > but what to? Meh, let's just rip out the version check. It's no longer very relevant. Nobody is going to be using anything older than 2.5.35. While 2.5.35 produces compile warnings, it does st

Re: pure parsers and reentrant scanners

2025-01-08 Thread Peter Eisentraut
On 20.12.24 16:23, Tom Lane wrote: Ok, we can fix that, but maybe this is also a good moment to think about whether that is useful. I could not reproduce the issue with flex 2.5.39. I could find no download of flex 2.5.35. The github site only offers back to 2.5.39, the sourceforce site back t

Re: pure parsers and reentrant scanners

2025-01-08 Thread Peter Eisentraut
On 27.12.24 10:19, Heikki Linnakangas wrote: On 26/12/2024 20:27, Peter Eisentraut wrote: 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

Re: pure parsers and reentrant scanners

2024-12-27 Thread Heikki Linnakangas
On 26/12/2024 20:27, Peter Eisentraut wrote: 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 versi

Re: pure parsers and reentrant scanners

2024-12-22 Thread Andreas Karlsson
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 loo

Re: pure parsers and reentrant scanners

2024-12-21 Thread Peter Eisentraut
On 20.12.24 16:35, Tom Lane wrote: Julien Rouhaud writes: On Fri, Dec 20, 2024 at 11:23 PM Tom Lane wrote: Could we get that animal updated to some newer OS version? There is already adder animal that is running debian sid on i386. The only remaining interest in lapwing is to have older v

Re: pure parsers and reentrant scanners

2024-12-20 Thread Tom Lane
Julien Rouhaud writes: > On Fri, Dec 20, 2024 at 11:23 PM Tom Lane wrote: >> Could we get that animal updated to >> some newer OS version? > There is already adder animal that is running debian sid on i386. The > only remaining interest in lapwing is to have older versions of > everything, so i

Re: pure parsers and reentrant scanners

2024-12-20 Thread Julien Rouhaud
On Fri, Dec 20, 2024 at 11:23 PM Tom Lane wrote: > > Could we get that animal updated to > some newer OS version? There is already adder animal that is running debian sid on i386. The only remaining interest in lapwing is to have older versions of everything, so if that's useless I can just tras

Re: pure parsers and reentrant scanners

2024-12-20 Thread Tom Lane
Peter Eisentraut writes: > On 20.12.24 02:07, Tom Lane wrote: >> I noticed that lapwing is bleating about >> cubescan.c:1689:5: warning: no previous prototype for 'cube_yyget_column' >> [-Wmissing-prototypes] >> cubescan.c:1765:6: warning: no previous prototype for 'cube_yyset_column' >> [-Wmiss

Re: pure parsers and reentrant scanners

2024-12-20 Thread Peter Eisentraut
On 20.12.24 02:07, Tom Lane wrote: I noticed that lapwing is bleating about ccache gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=st

Re: pure parsers and reentrant scanners

2024-12-19 Thread Tom Lane
I noticed that lapwing is bleating about ccache gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -O2 -fPIC -fvisibility=hidd

Re: pure parsers and reentrant scanners

2024-12-19 Thread Peter Eisentraut
On 18.12.24 18:43, Tom Lane wrote: Peter Eisentraut writes: I started committing the cube and seg pieces. There were a couple of complaints from the buildfarm, like segscan.c:348:15: error: redefinition of typedef 'yyscan_t' is a C11 feature [-Werror,-Wtypedef-redefinition] typedef void* yysca

Re: pure parsers and reentrant scanners

2024-12-19 Thread Peter Eisentraut
On 17.12.24 01:46, Andreas Karlsson wrote: On 12/16/24 8:39 AM, Peter Eisentraut wrote: I'll leave it at this for now and wait for some reviews. I really like this work since it makes the code cleaner to read on top of paving the way for threading. Reviewed the patches and found a couple of

Re: pure parsers and reentrant scanners

2024-12-18 Thread Andreas Karlsson
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 be

Re: pure parsers and reentrant scanners

2024-12-18 Thread Tom Lane
Peter Eisentraut writes: > I started committing the cube and seg pieces. There were a couple of > complaints from the buildfarm, like > segscan.c:348:15: error: redefinition of typedef 'yyscan_t' is a C11 > feature [-Werror,-Wtypedef-redefinition] > typedef void* yyscan_t; > ... > (Also, we sho

Re: pure parsers and reentrant scanners

2024-12-18 Thread Peter Eisentraut
I started committing the cube and seg pieces. There were a couple of complaints from the buildfarm, like ccache clang -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Werror=unguarded-availability-new -Wendif-labels -Wmissing-format-attribute -

Re: pure parsers and reentrant scanners

2024-12-16 Thread Andreas Karlsson
On 12/16/24 8:39 AM, Peter Eisentraut wrote: I'll leave it at this for now and wait for some reviews. I really like this work since it makes the code cleaner to read on top of paving the way for threading. Reviewed the patches and found a couple of issues. - Shouldn't yyext in syncrep_scann

Re: pure parsers and reentrant scanners

2024-12-16 Thread Heikki Linnakangas
On 16/12/2024 09:39, Peter Eisentraut wrote: On 02.12.24 10:46, Peter Eisentraut wrote: This patch series changes several parsers in the backend and contrib modules to use bison pure parsers and flex reentrant scanners. This is ultimately toward thread-safety, but I think it's also just nicer i