Re: Clean up optional rules in grammar - Mailing list pgsql-hackers

From John Naylor
Subject Re: Clean up optional rules in grammar
Date
Msg-id CAFBsxsGD6AaUDOXyWnE=p8W0Ex0On5CJTMDQZMQP6Ry3oU-+7A@mail.gmail.com
Whole thread Raw
In response to Clean up optional rules in grammar  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
List pgsql-hackers

On Wed, Nov 11, 2020 at 5:13 AM Peter Eisentraut <peter.eisentraut@enterprisedb.com> wrote:
It's obviously confusing to have multiple different styles to do the
same thing.  And these extra rules (including the empty ones) also end
up in the output, so they create more work down the line.

The attached patch cleans this up to make them all look like the first
style.

+1 for standardizing in this area. It's worth noting that Bison 3.0 introduced %empty for this situation, which is self-documenting. Until we get there, this is a good step.

--
John Naylor
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company 

pgsql-hackers by date:

Previous
From: Greg Sabino Mullane
Date:
Subject: Re: Prefer TG_TABLE_NAME over TG_RELNAME in tests
Next
From: John Naylor
Date:
Subject: Re: cutting down the TODO list thread