Re: [HACKERS] Postgres' lexer

Поиск
Список
Период
Сортировка
От Leon
Тема Re: [HACKERS] Postgres' lexer
Дата
Msg-id 37CFEA48.4AA9EB19@udmnet.ru
обсуждение исходный текст
Ответ на Re: [HACKERS] Postgres' lexer  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Postgres' lexer
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] main tree is (slightly) damaged