Robert
I don't see much of an improvement between the new lexer and the old C
based lexer. The only thing I noticed is that C comments /* */ and //
now are no longer highlighted so things like http:// can be written
without turning the rest of the line green. But the new lexer still
doesn't understand the common Tcl end of line commenting using ;#.
Previously I got around that by using ;#// because the C style comment
still works. With the new lexer I can't get the end of line comment to
turn green.
It would also be nice if the new lexer can recognise another form of
Tcl commenting: the if {0} hack. Anything between if {0} { and the
closing } should be colorised as comment. The old C based lexer doesn't
support this.
> I don't see much of an improvement between the new lexer and the old C
> based lexer.
> doesn't understand the common Tcl end of line commenting using ;#.
It also doesn't handle comments at the beginning of a script arg,
if { $xxx } {# xxx flag to handle
blah bla
}
Like the question about a Tcl compiler/verifier today, the problem
is with Tcl being dynamic. Neither the editor nor the compiler can
be sure of the syntax except by executing the program. One could hold
out hopes for a compiler, but expecting this disambiguation in an editor
is foolish. A non contrived difficult example is
button .foo -bg {#ffeeee} -command {# to-do} -text {Push}
(I mean non-contrived in the mixed use of "#", which has happened
like that; all other details are contrived.)
--
Donald Arseneau as...@triumf.ca
Actually in this case I wouldn't mind if #ffeeee gets colorised green.
What annoys me is when writing comments like:
puts "Testing.." ;# Used for debugging..
the word "for" gets colorised as a keyword.. and that looks ugly. Hence
my workaround:
puts "Testing.." ;#// Used for debugging..
I also wouldn't mind if the contents of if {0} { .. } always gets
colored as comment even if it contains code since it is functionally
similar to /* .. */ in C. Parsing these would not be difficult since we
only need to process Tcl's grouping rules. No need to parse the rules
of substitution which is where a lot of the complexity is at.
I will post some of the things you mention...and the author of the
lexer can fix them.
Robert
Robert
Robert
We have a scintilla Tcl lexer in Komodo (which uses scintilla as the
editor component) that we would be willing to open source. I believe it
is quite a bit further along, as we've been using it and refining it for
a while. Please remind me by email to go through the hoops to provide
this (and to whom I should do so).
--
Jeff Hobbs, The Tcl Guy
http://www.ActiveState.com/, Dynamic Tools for Dynamic Languages
fixed in the next version
Andre
Ah, thank you very much. That was a quick response. I take it the
corrections will be in SciTe 1.69?
Robert
Andre