Re: [Fwd: [PORTS] Port Bug Report: parse error not detected on unterminated quote]
От | Bruce Momjian |
---|---|
Тема | Re: [Fwd: [PORTS] Port Bug Report: parse error not detected on unterminated quote] |
Дата | |
Msg-id | 199907010443.AAA23367@candle.pha.pa.us обсуждение исходный текст |
Ответ на | [Fwd: [PORTS] Port Bug Report: parse error not detected on unterminated quote] (Thomas Lockhart <lockhart@alumni.caltech.edu>) |
Список | pgsql-ports |
> (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
В списке pgsql-ports по дате отправления: