D18734: Update octave.xml to Octave 4.2.0

2019-02-24 Thread Christoph Cullmann
This revision was automatically updated to reflect the committed changes.
Closed by commit R216:c27d13d75155: Update octave.xml to Octave 4.2.0 (authored 
by sirgienko, committed by cullmann).

REPOSITORY
  R216 Syntax Highlighting

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D18734?vs=52442=52457

REVISION DETAIL
  https://phabricator.kde.org/D18734

AFFECTED FILES
  autotests/folding/highlight_octave.m.fold
  autotests/folding/test.octave.fold
  autotests/html/highlight_octave.m.html
  autotests/html/test.octave.html
  autotests/input/highlight_octave.m
  autotests/input/highlight_octave.m.syntax
  autotests/input/test.octave
  autotests/reference/highlight_octave.m.ref
  autotests/reference/test.octave.ref
  data/syntax/octave.xml

To: sirgienko, #framework_syntax_highlighting, cullmann
Cc: cullmann, dhaumann, kwrite-devel, kde-frameworks-devel, bmortimer, domson, 
michaelh, genethomas, ngraham, bruns, demsking, vkrause, sars


D18734: Update octave.xml to Octave 4.2.0

2019-02-24 Thread Christoph Cullmann
cullmann accepted this revision.
cullmann added a comment.
This revision is now accepted and ready to land.


  But beside the stuff with the xcvxv.xcvc stuff, I think you can commit this 
already as a first step to have a nicer highlighting, nice to see all hard 
coded colors gone!

REPOSITORY
  R216 Syntax Highlighting

BRANCH
  octave

REVISION DETAIL
  https://phabricator.kde.org/D18734

To: sirgienko, #framework_syntax_highlighting, cullmann
Cc: cullmann, dhaumann, kwrite-devel, kde-frameworks-devel, bmortimer, domson, 
michaelh, genethomas, ngraham, bruns, demsking, vkrause, sars


D18734: Update octave.xml to Octave 4.2.0

2019-02-24 Thread Christoph Cullmann
cullmann added a comment.


  For the . stuff in keywords, have you tried to specify some
  
  
  
  style stuff?

INLINE COMMENTS

> sirgienko wrote in octave.xml:2745
> Could one word (`end`) be in several region?
> Because, in Octave, you could end `if` statement by `endif` or just `end`.
> In this variant, this syntax supported, but correct implementation also allow 
> wrong Octave sytnax, like ending `while` via `endfor` (because we are using 
> one region for them in code above).

At the moment you can't say that it opens multiple regions.

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D18734

To: sirgienko, #framework_syntax_highlighting, cullmann
Cc: cullmann, dhaumann, kwrite-devel, kde-frameworks-devel, bmortimer, domson, 
michaelh, genethomas, ngraham, bruns, demsking, vkrause, sars


D18734: Update octave.xml to Octave 4.2.0

2019-02-24 Thread Nikita Sirgienko
sirgienko updated this revision to Diff 52442.
sirgienko added a comment.


  Remove outdate Octave tests

REPOSITORY
  R216 Syntax Highlighting

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D18734?vs=52441=52442

BRANCH
  octave

REVISION DETAIL
  https://phabricator.kde.org/D18734

AFFECTED FILES
  autotests/folding/highlight_octave.m.fold
  autotests/folding/test.octave.fold
  autotests/html/highlight_octave.m.html
  autotests/html/test.octave.html
  autotests/input/highlight_octave.m
  autotests/input/highlight_octave.m.syntax
  autotests/input/test.octave
  autotests/reference/highlight_octave.m.ref
  autotests/reference/test.octave.ref
  data/syntax/octave.xml

To: sirgienko, #framework_syntax_highlighting, cullmann
Cc: cullmann, dhaumann, kwrite-devel, kde-frameworks-devel, bmortimer, domson, 
michaelh, genethomas, ngraham, bruns, demsking, vkrause, sars


D18734: Update octave.xml to Octave 4.2.0

2019-02-24 Thread Nikita Sirgienko
sirgienko updated this revision to Diff 52441.
sirgienko added a comment.


  Add tests for Octave highlighting

REPOSITORY
  R216 Syntax Highlighting

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D18734?vs=50963=52441

BRANCH
  octave

REVISION DETAIL
  https://phabricator.kde.org/D18734

AFFECTED FILES
  autotests/folding/test.octave.fold
  autotests/html/highlight_octave.m.html
  autotests/html/test.octave.html
  autotests/input/highlight_octave.m
  autotests/input/highlight_octave.m.syntax
  autotests/input/test.octave
  autotests/reference/test.octave.ref
  data/syntax/octave.xml

To: sirgienko, #framework_syntax_highlighting, cullmann
Cc: cullmann, dhaumann, kwrite-devel, kde-frameworks-devel, bmortimer, domson, 
michaelh, genethomas, ngraham, bruns, demsking, vkrause, sars


D18734: Update octave.xml to Octave 4.2.0

2019-02-15 Thread Nikita Sirgienko
sirgienko added a comment.


  Could I specify, what dot is also word delimiter? Because, for example, 
"p.poly" has a wrong highlighting: "poly" highlighted as function, but it is 
not a function, it is a part of object "p".

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D18734

To: sirgienko, #framework_syntax_highlighting, cullmann
Cc: cullmann, dhaumann, kwrite-devel, kde-frameworks-devel, gennad, bmortimer, 
michaelh, genethomas, ngraham, bruns, demsking, vkrause, sars


D18734: Update octave.xml to Octave 4.2.0

2019-02-15 Thread Christoph Cullmann
cullmann added a comment.


  In D18734#411416 , @sirgienko 
wrote:
  
  > In D18734#411032 , @cullmann 
wrote:
  >
  > > Good question:
  > >
  > > I added a minimal howto to the README.md:
  > >
  > > 
https://commits.kde.org/syntax-highlighting/9343341f91274f899f74b1ffe3fa260dadbc0978
  > >
  > > Does that help you?
  >
  >
  > Partially. I have written the test file (`test.octave`), but after `make 
test`, I have errors in `testhighlighter_test`, `htmlhighlighter_test` and 
`folding_test`  like this
  >
  >   FAIL!  : TestHighlighterTest::testHighlight(test.octave) 
'ref.open(QIODevice::ReadOnly | QIODevice::Text)' returned FALSE. ()
  >
  >
  > If I change the filename to `test.octave.syntax`, I have only one error in 
`testhighlighter_test`:
  >
  >   TestHighlighterTest::cleanupTestCase() 
'coveredList.open(QFile::WriteOnly)' returned FALSE. ()
  >  Loc: 
[/home/1998/Документы/Репозитории/syntax-highlighting/autotests/testhighlighter.cpp(108)]
  >
  >
  > I can't reproduce this build fail on my KDE Neon virtual machine, should I 
ignore this?
  >
  > Also, what difference between `highlight.tex` and `test.tex`, for example? 
Octave have `highlight_octave.m.syntax`, which, I guess, is test file, should I 
remove it?
  
  
  Hi,
  
  I think test.octave is the right name.
  
  That you get errors is clear, as there is no reference yet.
  
  After running make test, you can run ./autotests/update-reference-data.sh
  
  Then you should see new reference files in the source dirs (git status)
  
  Take a look at them, if the look fine (e.g. the HTML output).
  
  A new "make test" should succeed then

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D18734

To: sirgienko, #framework_syntax_highlighting, cullmann
Cc: cullmann, dhaumann, kwrite-devel, kde-frameworks-devel, gennad, bmortimer, 
michaelh, genethomas, ngraham, bruns, demsking, vkrause, sars


D18734: Update octave.xml to Octave 4.2.0

2019-02-13 Thread Nikita Sirgienko
sirgienko added a comment.


  In D18734#411032 , @cullmann wrote:
  
  > Good question:
  >
  > I added a minimal howto to the README.md:
  >
  > 
https://commits.kde.org/syntax-highlighting/9343341f91274f899f74b1ffe3fa260dadbc0978
  >
  > Does that help you?
  
  
  Partially. I have written the test file (`test.octave`), but after `make 
test`, I have errors in `testhighlighter_test`, `htmlhighlighter_test` and 
`folding_test`  like this
  `FAIL!  : TestHighlighterTest::testHighlight(test.octave) 
'ref.open(QIODevice::ReadOnly | QIODevice::Text)' returned FALSE. ()`.
  
  Also, what difference between `highlight.tex` and `test.tex`, for example? 
Octave have `highlight_octave.m.syntax`, which, I guess, is test file, should I 
remove it?

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D18734

To: sirgienko, #framework_syntax_highlighting, cullmann
Cc: cullmann, dhaumann, kwrite-devel, kde-frameworks-devel, gennad, bmortimer, 
michaelh, genethomas, ngraham, bruns, demsking, vkrause, sars


D18734: Update octave.xml to Octave 4.2.0

2019-02-12 Thread Christoph Cullmann
cullmann added a comment.


  Good question:
  
  I added a minimal howto to the README.md:
  
  
https://commits.kde.org/syntax-highlighting/9343341f91274f899f74b1ffe3fa260dadbc0978
  
  Does that help you?

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D18734

To: sirgienko, #framework_syntax_highlighting, cullmann
Cc: cullmann, dhaumann, kwrite-devel, kde-frameworks-devel, gennad, bmortimer, 
michaelh, genethomas, ngraham, bruns, demsking, vkrause, sars


D18734: Update octave.xml to Octave 4.2.0

2019-02-12 Thread Nikita Sirgienko
sirgienko added a comment.


  In D18734#410977 , @cullmann wrote:
  
  > I think this is fine now, but I would like to have some autotests input 
file to have something we can later check for regressions.
  >  Could you provide some MIT or otherwise freely licensed test file?
  >  It must not cover all things, but at least some basic syntax and perhaps 
include some of your new things.
  >  Thanks!
  
  
  Is there documentation for writing tests? For example, I see `input/Makefile` 
and correct tests results like `folding/Makefile.fold`, `html/Makefile.html`, 
`html/Makefile.html`, but I don't understand, how I make the correct results, 
manually?

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D18734

To: sirgienko, #framework_syntax_highlighting, cullmann
Cc: cullmann, dhaumann, kwrite-devel, kde-frameworks-devel, gennad, bmortimer, 
michaelh, genethomas, ngraham, bruns, demsking, vkrause, sars


D18734: Update octave.xml to Octave 4.2.0

2019-02-12 Thread Christoph Cullmann
cullmann requested changes to this revision.
cullmann added a comment.
This revision now requires changes to proceed.


  I think this is fine now, but I would like to have some autotests input file 
to have something we can later check for regressions.
  Could you provide some MIT or otherwise freely licensed test file?
  It must not cover all things, but at least some basic syntax and perhaps 
include some of your new things.
  Thanks!

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D18734

To: sirgienko, #framework_syntax_highlighting, cullmann
Cc: cullmann, dhaumann, kwrite-devel, kde-frameworks-devel, gennad, bmortimer, 
michaelh, genethomas, ngraham, bruns, demsking, vkrause, sars


D18734: Update octave.xml to Octave 4.2.0

2019-02-05 Thread Nikita Sirgienko
sirgienko added inline comments.

INLINE COMMENTS

> octave.xml:2745
> + String="end_try_catch" endRegion="Try" />
>  
> + endRegion="block" />

Could one word (`end`) be in several region?
Because, in Octave, you could end `if` statement by `endif` or just `end`.
In this variant, this syntax supported, but correct implementation also allow 
wrong Octave sytnax, like ending `while` via `endfor` (because we are using one 
region for them in code above).

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D18734

To: sirgienko, #framework_syntax_highlighting
Cc: dhaumann, kwrite-devel, kde-frameworks-devel, bmortimer, hase, michaelh, 
genethomas, ngraham, bruns, demsking, cullmann, vkrause, sars


D18734: Update octave.xml to Octave 4.2.0

2019-02-05 Thread Nikita Sirgienko
sirgienko marked an inline comment as done.

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D18734

To: sirgienko, #framework_syntax_highlighting
Cc: dhaumann, kwrite-devel, kde-frameworks-devel, bmortimer, hase, michaelh, 
genethomas, ngraham, bruns, demsking, cullmann, vkrause, sars


D18734: Update octave.xml to Octave 4.2.0

2019-02-05 Thread Nikita Sirgienko
sirgienko updated this revision to Diff 50963.
sirgienko added a comment.


  Add requested changes

REPOSITORY
  R216 Syntax Highlighting

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D18734?vs=50877=50963

BRANCH
  octave

REVISION DETAIL
  https://phabricator.kde.org/D18734

AFFECTED FILES
  data/syntax/octave.xml

To: sirgienko, #framework_syntax_highlighting
Cc: dhaumann, kwrite-devel, kde-frameworks-devel, bmortimer, hase, michaelh, 
genethomas, ngraham, bruns, demsking, cullmann, vkrause, sars


D18734: Update octave.xml to Octave 4.2.0

2019-02-05 Thread Nikita Sirgienko
sirgienko added a comment.


  @dhaumann, look on the `eps` (this word contained in command list) on this 
image. The word have wrong highlighting.
  F6589241: изображение.png 
  I am testing my `octave.xml` file on v5.49.0 (current master need ecm 5.55 
and I haven't it). Is it bug and I should create bug report, or it is already 
fixed?

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D18734

To: sirgienko, #framework_syntax_highlighting
Cc: dhaumann, kwrite-devel, kde-frameworks-devel, bmortimer, hase, michaelh, 
genethomas, ngraham, bruns, demsking, cullmann, vkrause, sars


D18734: Update octave.xml to Octave 4.2.0

2019-02-04 Thread Dominik Haumann
dhaumann added a comment.


  ...And there are also new Default Styles for kateversion="5.0", see: 
https://kate-editor.org/2014/03/07/kate-part-kf5-new-default-styles-for-better-color-schemes/
  
  Maybe you could also use these for the itemData, like for Operator 
dsOperator, or for Builtin dsBuiltIn, for Variable dsVariable. Ideally, the 
itemDatas would not have any hard-coded color anymore at all, since then the 
highlighting will work with all color schemas out of the box.

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D18734

To: sirgienko, #framework_syntax_highlighting
Cc: dhaumann, kwrite-devel, kde-frameworks-devel, bmortimer, hase, michaelh, 
genethomas, ngraham, bruns, demsking, cullmann, vkrause, sars


D18734: Update octave.xml to Octave 4.2.0

2019-02-04 Thread Dominik Haumann
dhaumann added a comment.


  Could you also switch to WordDetect for the trivial cases, and set 
kateversion="5.0" ?

INLINE COMMENTS

> octave.xml:2690-2711
>   beginRegion="block" />
>   endRegion="block" />
>   beginRegion="block" />
>   endRegion="block" />
>   beginRegion="block" />
>   endRegion="block" />
>   beginRegion="block" />

While you are working on this, could you change all RegExpr that use the simple 
\b...\b form into a WordDetect form? See: 
https://docs.kde.org/trunk5/en/applications/katepart/highlight.html

  

This would be much faster than general purpose RegExps.

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D18734

To: sirgienko, #framework_syntax_highlighting
Cc: dhaumann, kwrite-devel, kde-frameworks-devel, bmortimer, hase, michaelh, 
genethomas, ngraham, bruns, demsking, cullmann, vkrause, sars


D18734: Update octave.xml to Octave 4.2.0

2019-02-04 Thread Nikita Sirgienko
sirgienko created this revision.
sirgienko added a reviewer: Framework: Syntax Highlighting.
sirgienko added a project: Framework: Syntax Highlighting.
Herald added projects: Kate, Frameworks.
Herald added subscribers: kde-frameworks-devel, kwrite-devel.
sirgienko requested review of this revision.

REVISION SUMMARY
  I have updated keywords, commands, builtions and functions. As you can see, i 
move all builtins with normal name to functions list (like it was done before 
in third version), because builtins have highlight different from functions 
(for example, `acos` is builtin and `acot` is function, so if we *really* fill 
builtins list by octave builtions, file will turn into colour mess).
  
  I aslo have added new blocks for classes. But some of them (`events`, 
`methods`, etc.) valid only into `classdef` block, how I could add resctriction 
for this?

TEST PLAN
  As I see, there aren't tests for octave, right?

REPOSITORY
  R216 Syntax Highlighting

BRANCH
  octave

REVISION DETAIL
  https://phabricator.kde.org/D18734

AFFECTED FILES
  data/syntax/octave.xml

To: sirgienko, #framework_syntax_highlighting
Cc: kwrite-devel, kde-frameworks-devel, bmortimer, hase, michaelh, genethomas, 
ngraham, bruns, demsking, cullmann, vkrause, sars, dhaumann