Re: [Fwd: [PORTS] Port Bug Report: parse error not detected on unterminated quote]

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: Postgres Porting List <ports(at)postgresql(dot)org>
Subject: Re: [Fwd: [PORTS] Port Bug Report: parse error not detected on unterminated quote]
Date: 1999-07-01 04:43:01
Message-ID: 199907010443.AAA23367@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-ports by date

  From Date Subject
Next Message Robert Bruccoleri 1999-07-01 12:27:01 PostgreSQL on Irix
Previous Message PostgreSQL 1999-06-30 18:55:12 PostgreSQL 6.5 on Irix 6.2