>> 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