Review Request 129569: Fortran syntax highlighting: distinguish free format and fixed format

Gregor Mi codestruct at posteo.org
Sun Feb 4 14:26:05 UTC 2018


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129569/#review103859
-----------------------------------------------------------



How is this patch coming along? Please consider moving it to Phabricator since Reviewboard is closed down soon.

- Gregor Mi


On Nov. 28, 2016, 6:49 vorm., Janus Weil wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129569/
> -----------------------------------------------------------
> 
> (Updated Nov. 28, 2016, 6:49 vorm.)
> 
> 
> Review request for Kate.
> 
> 
> Bugs: 372950
>     https://bugs.kde.org/show_bug.cgi?id=372950
> 
> 
> Repository: syntax-highlighting
> 
> 
> Description
> -------
> 
> See https://bugs.kde.org/show_bug.cgi?id=372950 for bug description and https://github.com/janusw/syntax-highlighting/commits/master for three separate commits implementing this.
> 
> Description copied from bugzilla:
> 
> Kate currently seems to have only one syntax-highlighting mode for Fortran. However, in the Fortran language there are two different source formats:
> * fixed format (from the old Fortran77 standard, extension .f)
> * free format (introduced with Fortran90, extension .f90)
> 
> The keywords etc are the same, but one thing that differs is commenting: In fixed format every line with a 'c' in the first column is a comment, while in free format comments start with an '!' (in any column).
> 
> Both of these mechanisms seem to be supported in Kate 16.04.3 on Ubuntu 16.10 (with Fortran highlighting file v2). The problem is that lines starting with 'c' are also displayed like a comment in f90 files (where only '!' indicates a comment).
> 
> Simple example ('test.f90'):
> 
> 
> ! this is a test program that does absolutely nothing
> program test
> contains
>   subroutine s
>   end subroutine
> end program
> 
> 
> The first line is greyed out, which is correct, but also the third line ('contains') is greyed out, which is wrong. It is displayed normally if a space is inserted before 'contains.'
> 
> 
> Diffs
> -----
> 
>   data/syntax/fortran-free.xml PRE-CREATION 
>   data/syntax/fortran.xml 77c398f 
> 
> 
> Diff: https://git.reviewboard.kde.org/r/129569/diff/1/
> 
> 
> Testing
> -------
> 
> Opened a few different files (.f, .f90, .f03, .f08) in Kate and verified that the comments show up as expected and all artefacts disappear. A good source for test files is the testsuite of the gfortran compiler ( see e.g. https://github.com/gcc-mirror/gcc/tree/master/gcc/testsuite/gfortran.dg ).
> 
> 
> Thanks,
> 
> Janus Weil
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20180204/bc531666/attachment.html>


More information about the KWrite-Devel mailing list