Re: build remaining Flex files standalone - Mailing list pgsql-hackers

From Andres Freund
Subject Re: build remaining Flex files standalone
Date
Msg-id 20220904181759.px6uosll6zbxcum5@awork3.anarazel.de
Whole thread Raw
In response to Re: build remaining Flex files standalone  (John Naylor <john.naylor@enterprisedb.com>)
Responses Re: build remaining Flex files standalone
Re: build remaining Flex files standalone
List pgsql-hackers
Hi,

On 2022-09-04 12:16:10 +0700, John Naylor wrote:
> Pushed 01 and 02 separately, then squashed and pushed the rest.

Thanks a lot! It does look a good bit cleaner to me now.

I think, as a followup improvement, we should move gramparse.h to
src/backend/parser, and stop installing gram.h, gramparse.h. gramparse.h
already had this note:

 * NOTE: this file is only meant to be included in the core parsing files,
 * i.e., parser.c, gram.y, and scan.l.
 * Definitions that are needed outside the core parser should be in parser.h.

What do you think?


I looked for projects including gramparse.h ([1], and found libpg-query, pgpool,
slony1 and oracfe:
- libpg-query, pgpool are partial copies of our code so will catch up when
  they sync up,
- slony1's [2] is a configure check, one that long seems outdated, because it's
  grepping for standard_conforming strings, which was moved out in 6566e37e027
  in 2009.
- As far as I can tell oracfe's include in sqlscan.l is vistigial, it compiles
  without it. And the include in parse_keywords.c is just required because it
  needs to include parser/scanner.h.

Greetings,

Andres Freund

[1] https://codesearch.debian.net/search?q=gramparse.h&literal=1&perpkg=1
[2]
https://git.postgresql.org/gitweb/?p=slony1-engine.git;a=blob;f=config/acx_libpq.m4;h=7653357c0a731e36ec637df5ab378832d9279c19;hb=HEAD#l530



pgsql-hackers by date:

Previous
From: "Jonathan S. Katz"
Date:
Subject: Re: First draft of the PG 15 release notes
Next
From: Nathan Bossart
Date:
Subject: Re: First draft of the PG 15 release notes