RE: [HACKERS] Postgres' lexer

Поиск
Список
Период
Сортировка
От Ansley, Michael
Тема RE: [HACKERS] Postgres' lexer
Дата
Msg-id 1BF7C7482189D211B03F00805F8527F70ED114@S-NATH-EXCH2
обсуждение исходный текст
Список pgsql-hackers
>> Hi!
Hi, Leon

>> I'm currently fooling around with Postgres's parser, and I must admit
>> some things puzzle me completely. Please tell me what these things in
>> lexer stand for:
>> 
>> {operator}/-[\.0-9]    {
>>                     yylval.str = pstrdup((char*)yytext);
>>                     return Op;
>>                 }
>> Is it an operator followed by mandatory '-' and (dot or digit) ?
I think this is used to recognize an operator followed by a minus or any
single character (the period is escaped, the character can be used to denote
the base of the number) or a single digit.
But check this, I'm not totally sure.

>> And what this stands for:
>> 
>> {identifier}/{space}*-{number}
An identifier followed by any number of spaces, and then a minus, or a
number.  Again, double check this with a reference of some sorts.

>> 
>> What's the meaning of all these?
>> 
You really should get a reference that deals with regular expressions.  My
understanding is (anybody feel free to comment here) that flex uses normal
regular expressions to generate scanners.


Cheers...

MikeA


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

Предыдущее
От: Richard Bouska
Дата:
Сообщение: pg_log >> groving to infinity in 6.5.1
Следующее
От: "Ansley, Michael"
Дата:
Сообщение: RE: [HACKERS] Problem with query length