octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave-maintainers Digest, Vol 86, Issue 18


From: Torsten
Subject: Re: Octave-maintainers Digest, Vol 86, Issue 18
Date: Mon, 13 May 2013 06:01:58 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5

On 12.05.2013 23:15, John W. Eaton wrote:
> On 05/12/2013 05:10 PM, John W. Eaton wrote:
>> On 05/12/2013 04:57 PM, John Donoghue wrote:
>>>
>>> On Sun, May 12, 2013 at 4:31 PM, John W. Eaton <address@hidden> wrote:
>>>>> We currently have a big hard-coded list of "keywords" (actually
>>>>> mostly function names) in libgui/src/resource-manager.cc that are
>>>>> used by the GUI editor for syntax highlighting. Instead of the static
>>>>> list, I'd like to get the list of keywords from Octave. That part is
>>>>> easy, but when I started looking at how this list is used, I noticed
>>>>> that the QsciLexer keywords function can have more than one class of
>>>>> keywords. What do the class IDs correspond to? What should be in set
>>>>> 1, 2, 3, etc.?
>>>> I think it's up to the person writing the lexer to define what the
>>>> available sets correspond to. The comments in this link [1] indicates
>>>> this is primarily intended to support languages embedded into other
>>>> languages (first example that comes to my mind is HTML/PHP). Michael.
>>>> [1]
>>>> https://code.google.com/p/ste-editor/source/browse/trunk/application/3rdparty/qscintilla/Qt4/Qsci/qscilexer.h?r=3
>>>>
>>>>
>>>>
>>>
>>> Currently, the matlab/octave Scintilla lexer code only uses the 1 set of
>>> keywords.
>>
>> So what should we include in the list? The actual keywords in the
>> language (if, while, for, etc.) or the list of functions or both?
>> Handling them both the same doesn't seem too useful to me...
> 
> So now I see that the Scintilla sources already have a
> qscilexeroctave.cpp file and it includes keywords only in a static list.
>  So why are we defining our own lexer_octave_gui class?  Is that
> obsolete now?

The qscilexeroctave.cpp is quite new and compilation failed with older
versions of Qscintilla. This is why we still have the lexer_octave_gui
class.
If we decide to put only the language keywords into the list I suggest
to create a second more complete list for the code completion.

Torsten




reply via email to

[Prev in Thread] Current Thread [Next in Thread]