On Fri, 2005-10-21 at 10:08 +0200, Philippe Lhoste wrote: > Iago Rubio wrote: [snip] > > To deal with this I have made some tiny changes to the current lexer to > > recognize text surrounded by backticks as string, if you set the > > property "sql.backticks.string". > > Good idea. > Note this change will work only for MySQL when using these backticks, alas.
Yes, you're right. Those changes will be interesting only for MySQL users, and - even further - I think they would be useful only to those using MySQL - or phpMyAdmin - generated files. Mostly for web developers as among them MySQL is king, and data porting is made almost always with those files, as ISPs don't like to allow disk access. > If I have, for example, text, value or class as field names (I see a > table with all three...), it seems to be accepted (OK in SQL context I > suppose) but it is highlighted as keywords. Idem for password, > highlighted as SQL*Plus keyword. This is the problem I tried to address. It was quite easy in MySQL environment as the backticks marks the field, table and database identifiers. > And we cannot do much to avoid this, unless making a full SQL lexer with > context checking... I don't know if it'll pay the effort, as I'm sure It will need a major rewrite or a full new implementation of this lexer. > > It won't break any existing configuration so I let it here for your > > review in the hope you'd find it interesting. > > > > http://iagorubio.com/scintilla/LexSQL.patch > > http://iagorubio.com/scintilla/LexSQL.cxx.zip > > I didn't looked at your code yet. Just some tiny changes, nothing fancy :) > Did you use old (official) lexer or the one I rewrote? > I don't know if Neil integrated it finally. I took cvs code, not sure if it had your changes but I don't see them in the revision history. > If that's the old code, I can integrate your changes in my version. I'd be great, thanks. -- Iago Rubio _______________________________________________ Scintilla-interest mailing list [email protected] http://mailman.lyra.org/mailman/listinfo/scintilla-interest
