[Phpmyadmin-devel] Parser and SET

Robin, about bug 621357, in a query like UPDATE mytable set myfield = 1 the parser thinks that "set" is a column type. If I add SET to the list of reserved words, now the UPDATE statement colorizes ok, but in an ALTER TABLE with a column type of SET, the SET does not go orange. Marc

On Fri, Oct 11, 2002 at 10:28:34AM -0400, Marc Delisle wrote:
in a query like
UPDATE mytable set myfield = 1
the parser thinks that "set" is a column type.
If I add SET to the list of reserved words, now the UPDATE statement colorizes ok, but in an ALTER TABLE with a column type of SET, the SET does not go orange. I'll try see about a full solution for this later on. The basic algorithm is that when you hit 'SET' you need to check the next token.
If it's a '(' then it's a column type, else it's a reserved word. There was a big batch of stuff i've been working on in the parser system anyway. I'll see about getting some of it in soon, even if it's just that bugfix for the moment. -- Robin Hugh Johnson E-Mail : robbat2@orbis-terrarum.net Home Page : http://www.orbis-terrarum.net/?l=people.robbat2 ICQ# : 30269588 or 41961639 GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85

On Fri, Oct 11, 2002 at 02:58:44PM -0700, Robin Johnson wrote:
If I add SET to the list of reserved words, now the UPDATE statement colorizes ok, but in an ALTER TABLE with a column type of SET, the SET does not go orange. I'll try see about a full solution for this later on. The basic algorithm is that when you hit 'SET' you need to check the next token.
If it's a '(' then it's a column type, else it's a reserved word. There was a big batch of stuff i've been working on in the parser system anyway. I'll see about getting some of it in soon, even if it's just that bugfix for the moment. I've put a simple fix in place for the moment.
-- Robin Hugh Johnson E-Mail : robbat2@orbis-terrarum.net Home Page : http://www.orbis-terrarum.net/?l=people.robbat2 ICQ# : 30269588 or 41961639 GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85
participants (2)
-
Marc Delisle
-
Robin Johnson