RE: [HACKERS] Postgres' lexer

From: "Ansley, Michael" <Michael(dot)Ansley(at)intec(dot)co(dot)za>
To: "'Leon'" <leon(at)udmnet(dot)ru>, "Ansley, Michael" <Michael(dot)Ansley(at)intec(dot)co(dot)za>
Cc: hackers <pgsql-hackers(at)postgreSQL(dot)org>
Subject: RE: [HACKERS] Postgres' lexer
Date: 1999-08-21 08:17:39
Message-ID: 1BF7C7482189D211B03F00805F8527F70ED11D@S-NATH-EXCH2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I've just grabbed it now, I'll get back to you Monday.

>> -----Original Message-----
>> From: Leon [mailto:leon(at)udmnet(dot)ru]
>> Sent: Friday, August 20, 1999 8:28 PM
>> To: Ansley, Michael
>> Cc: hackers
>> Subject: Re: [HACKERS] Postgres' lexer
>>
>>
>> Ansley, Michael wrote:
>> >
>> > Leon, if you manage to find a replacement for this, please
>> let me know.
>> > I'll probably only pick it up after the weekend.
>> >
>> > I think that we need to find another way to tokenise the
>> minus. First of
>> > all, though, how is the parser supposed to tell whether this:
>> > a -2
>> > means this:
>> > (a - 2)
>> > or this:
>> > a (-2)
>>
>> I think that the current behavior is ok - it is what we would expect
>> from expressions like 'a -2'.
>>
>> I have produced a patch to cleanup the code. It works due to the
>> fact that unary minus gets processed in doNegate() in parser anyway,
>> and it is by no way lexer's job to do grammatical parsing - i.e.
>> deciding if operator is to be treated as binary or unary.
>>
>> I ran regression tests, everything seems to be ok. It is my first
>> diff/patch experience in *NIX, so take it with mercy :) But it
>> seems to be correct. It is to be applied against 6.5.0 (I have
>> not upgraded to 6.5.1 yet, but hope lexer hasn't changed since
>> then.) The patch mainly contains nuked code. The only thing added
>> is my short comment :)
>>
>> Have I done some right thing? :)
>>
>> --
>> Leon.
>> ---------
>> "This may seem a bit weird, but that's okay, because it is weird." -
>> Perl manpage.
>>

Browse pgsql-hackers by date

  From Date Subject
Next Message Theo Kramer 1999-08-22 03:27:38 Re: [HACKERS] pg_log >> growing to infinity in 6.5.1
Previous Message Wayne Piekarski 1999-08-21 06:33:08 Re: [HACKERS] Inefficiencies in COPY command