Philippe Lhoste wrote:
BTW, I took a look at LexSQL.cxx, and I wasn't too happy to see it inefficiently repeating the tests in DEFAULT state. I tried to hack it, without satisfying result, so I rewrote it using the brand new version of the CPP lexer. At least, it uses now the StyleContext object and all the small improvements made on this lexer.
I reused the MatchIgnoreCaseSubstring function.

It seems to work satisfyingly. I didn't send it earlier: it was too late for the upcoming 1.66, so I prefered to test it a bit more and send it now. I don't have tested the SQL*Plus features, so it would be nice if people using SQL*Plus test it more.

I saw my message was held because it was suspected of having a virus... Either all messages with a zip file are suspect, or the scanner is quite dummy... I suspect the former, so I suppose that sending even small files to the list is discouraged (or we should send them unzipped?).

Anyway, I already have a little correction to do:
I was fooled by the names derivated from the LexCPP names and not renamed accordingly to SQL syntax. So I managed SCE_SQL_COMMENTLINEDOC as if it was really a doc comment, while in SQL it is actually just a comment made with #
So I grouped this comment with all the line comments:

                case SCE_SQL_COMMENTLINE:
                case SCE_SQL_COMMENTLINEDOC:
                case SCE_SQL_SQLPLUS_COMMENT:
                case SCE_SQL_SQLPLUS_PROMPT:
                        if (sc.atLineStart) {
                                sc.SetState(SCE_SQL_DEFAULT);
                        }
                        break;

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to