> (back on list)
>
> Bruce, the problem is revealed with the "single-line input" mode of
> psql. I'm a bit suprised that the backend parser doesn't catch this,
> but I see why now: scan.l goes into a "string accumulate" mode when it
> sees a single quote, and doesn't actually send a token back to gram.y
> until it sees the closing quote. If EOT comes first, then there is no
> flag to tell gram.y (or whatever is the right thing) that there is
> still an active token being worked on.
>
> Not certain yet how to fix this; the "string accumulator" is currently
> local to scan.l and I'm not sure if scan.l can provide code to check
> this after it runs out of characters to process. I do have a lex/yacc
> book, but if anyone has some hints...
I seem to remember there is a function you can define to be called on
EOF in scan.l.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026