what is suffix _P in gram.y

Started by Pavel Stehulealmost 18 years ago4 messages
#1Pavel Stehule
pavel.stehule@gmail.com

Hello,

is it means " some PostgreSQL specific"?

regards

Pavel Stehule

#2Martijn van Oosterhout
kleptog@svana.org
In reply to: Pavel Stehule (#1)
Re: what is suffix _P in gram.y

On Sun, Jan 27, 2008 at 09:10:31PM +0100, Pavel Stehule wrote:

Hello,

is it means " some PostgreSQL specific"?

Not really. The main thing is that many symbols in gram.y eventually
get turned into a #define and if the symbol is a normal looking word
that may be used in another context it's common to suffix it with a _P
(the P stands for something but I forget what. Predicate?). That way
you don't run into unexpected surprises when it compiles with other
headers...

Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/

Show quoted text

Those who make peaceful revolution impossible will make violent revolution inevitable.
-- John F Kennedy

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Pavel Stehule (#1)
Re: what is suffix _P in gram.y

"Pavel Stehule" <pavel.stehule@gmail.com> writes:

is it means " some PostgreSQL specific"?

I think the original idea was P-for-Parser. It's just there for tokens
whose macros would otherwise be likely to collide with other symbols.

regards, tom lane

#4Pavel Stehule
pavel.stehule@gmail.com
In reply to: Tom Lane (#3)
Re: what is suffix _P in gram.y

On 27/01/2008, Tom Lane <tgl@sss.pgh.pa.us> wrote:

"Pavel Stehule" <pavel.stehule@gmail.com> writes:

is it means " some PostgreSQL specific"?

I think the original idea was P-for-Parser. It's just there for tokens
whose macros would otherwise be likely to collide with other symbols.

regards, tom lane

ok. unterstand

thank you

Pavel Stehule