From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Hannu Krosing <hannu(at)tm(dot)ee>, Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] Re: SQL compliance - why -- comments only at psql level? |
Date: | 2000-02-22 04:19:28 |
Message-ID: | 22188.951193168@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> On 2000-02-20, Tom Lane mentioned:
>> select *-- 123
>> ERROR: Can't find left op '*--' for type 23
> I believe that these things (certainly the first one) could be fixed by
> making the {operator} rule in scan.l rescanning yytext for "--" or "/*"
> (using string functions) and if found putting part of the token back in
> the input stream using yyless().
I think you are right, that would work. Is yyless flex-specific or a
generic lex feature?
The intermediate-lookahead-buffer solution might still be better, if it
lets us solve more problems than just this one. I'm inclined to not
do anything until Thomas decides what he wants to do about the NOT NULL
business.
>> but <<EOF>> is a flex-ism not supported by regular lex.
> Exclusive start conditions are not supported by regular lex either.
Oooh, somehow I managed to completely miss that statement in the flex
manual, but you are right. Hmm. I think that shoots a gaping hole in
my desire to have scan.l work with plain lex. Offhand I don't see a
good way to avoid using exclusive start conditions for multi-section
literals.
> If you want to catch unbalanced quotes at the end of input, I could
> imagine that some grand unified evilness via yywrap setting some global
> flag or two might get the job done.
Right at the moment I'm thinking we might as well use <<EOF>>, which
is after all the recommended way of doing it.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 2000-02-22 04:45:39 | Re: [HACKERS] Beta for 4:30AST ... ? |
Previous Message | Bruce Momjian | 2000-02-22 04:08:26 | Re: [HACKERS] Re: [PATCHES] Patch for more readable parse error messages |