tir, 09 03 2010 kl. 22:45 +0000, skrev Carnë Draug:
> I sent this e-mail before to octave help mailing list but was told
> that it would fit better in the dev mailing list.
I don't know which list is best for this, but let's just keep it here.
> I picked up the language file from gtksourceview and tried to extend
> it. I hope others user enjoy it.
As a user and developer of said file, I guess I should have a look :-)
> *On continuation lines
> ... is also identified as a continuation line character
> continuation lines characters are ignored if they are between single
> quotes only
It is good that '...' is treated as a continuation, but why aren't they
ignored when between double quotes?
> *On comments
> comments can be made after the continuation line characters
> added shebang line (it's no longer just a comment line)
Great. Looking at the file I see the following oddities with respect to
comments:
<metadata>
<property
name="mimetypes">text/x-octave;text/x-matlab</property>
<property name="globs">*.m</property>
<property name="line-comment-start">%</property>
<property name="block-comment-start">^%{$</property>
<property name="block-comment-end">^%}$</property>
</metadata>
This only contains Matlab-style comments. Shouldn't it also include
Octave-style comments, i.e. "#" instead of "%"?
Also, it would be great if Octave-style block comments could be
supported.
> *On functions
> added all functions (I hope).
Do we really want to do this? It seems like a very hard maintenance task
to keep this up to date.
> Just removed "ans" (mapped it to an
> identifier)
Seems okay to me.
> and "pkg" (mapped it to preprocessor).
Why does 'pkg' get a special treatment? Why not just treat it like a
function?
> *On metadata
> added block comment "start" and "end" to the list (can someone test
> this please? I don't know any editor that uses this)
I don't know what this means?
> *On operators
> there's syntax for operators now. I tried to be careful with the
> transpose operator. Should map all of them
> what's the thing with - and +? When do they define the signal instead
> of being operators? Should they be considered numbers in those
> situations?
I don't understand the question. Could you provide an example?
> *On strings
> added a printf regexp that should identify the formatting
Cool! Could this be extended to also cover 'sprintf', 'fprintf', 'error'
and 'warning' ?
> * the use of escape and format inside single and double quotes. It
> seems that in printf the single string still allow escapes, but not
> when assigninig.
Single quote strings are different from double quote strings. For more
info, see Sec. 5.1 in the manual.
> * the list of functions
You can get a list of functions using the '__list_functions__' function.
Similarly, '__operators__' and '__keywords__' provides operators and
keywords.
> * some reserved keywords, like NaN are also functions. Should I refine
> the regexp to see if they are followed by parenthesis and are
> therefore functions instead of a constant
That sounds too complex too me (without really having any benefit)
> * should I list all the pkg options instead of just highlight
> everything after pkg?
I don't understand the question.
Søren
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev