Re: [HACKERS] Postgres' lexer

From: Leon <leon(at)udmnet(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Ansley, Michael" <Michael(dot)Ansley(at)intec(dot)co(dot)za>, hackers <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Postgres' lexer
Date: 1999-09-03 15:33:28
Message-ID: 37CFEA48.4AA9EB19@udmnet.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
>
> I think it would be a really bad idea for the lexical analysis to depend
> on whether or not particular operator names are defined, for the same
> reasons that lexical analysis of word tokens doesn't depend on whether
> there are keywords/table names/field names that match those tokens.

101% correct :)

> You get into circularity problems very quickly if you do that.
> Language designers learned not to do that in the sixties...
>

All that should be carved in stone and then erected as a monument :)
It is a good idea to explicitly state where and how to divide
functions amongst components - though it places some (minor)
restrictions, it introduces an conceivable order, which one can
abide by. E.g. no semantics is allowed in lexer. Even unary minus
in numbers is semantics and isn't proper for lexer.

--
Leon.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-09-03 15:35:18 Re: [HACKERS] Postgres' lexer
Previous Message Tom Lane 1999-09-03 15:20:45 Re: AW: [HACKERS] SELECT BUG