Bug 1802293 - Syntax error in VIM syntax highlight file for Fortran
Summary: Syntax error in VIM syntax highlight file for Fortran
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: vim
Version: 30
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-12 20:10 UTC by Karl
Modified: 2020-02-29 03:03 UTC (History)
3 users (show)

Fixed In Version: vim-8.2.236-1.fc30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-26 18:57:12 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karl 2020-02-12 20:10:49 UTC
Description of problem:
Starting a Fortran file in VIM with "fortran_more_precise" set causes a syntax error in recent versions.

Version-Release number of selected component (if applicable):
vim-enhanced-8.2.109-1.fc30

How reproducible:
Easily

Steps to Reproduce:
1. Open VIM
2. issue "let fortran_more_precise=1"
3. issue "set syn=fortran"

Actual results:
Error detected while processing /usr/share/vim/vim82/syntax/fortran.vim:
line  188:
E869: (NFA) Unknown operator '\@1'
E475: Invalid argument: fortranTarget^Idisplay^I"\(\<do\s\+\)\@<11=\d\+\>"
line  277:
E869: (NFA) Unknown operator '\@1'
E475: Invalid argument: fortranConstructName "\(\<end\s*forall\s\+\)\@<15=\a\w*\
>"

Expected results:
(no error messages)

Additional info:
I think the bug is in the following two lines (other lines commented out above and below give context):
"if exists("fortran_more_precise")
"  " Numbers as targets
"  syn match fortranTarget       display "\(\<if\s*(.\+)\s*\)\@<=\(\d\+\s*,\s*\)\{2}\d\+\>"
  syn match fortranTarget       display "\(\<do\s\+\)\@<11=\d\+\>"
  syn match fortranTarget       display "\(\<go\s*to\s*(\=\)\@<11=\(\d\+\s*,\s*\)*\d\+\>"
"endif

The two lines in question should be, if my guess is correct,
  syn match fortranTarget       display "\(\<do\s\+\)\@11<=\d\+\>"
  syn match fortranTarget       display "\(\<go\s*to\s*(\=\)\@11<=\(\d\+\s*,\s*\)*\d\+\>"

Comment 1 Zdenek Dohnal 2020-02-13 10:51:14 UTC
Hi Karl,

thank you for reporting the issue!

The newest upstream commit - which is already in F31+ - fixes the issue - I issued the build for F30 too, it will get into bodhi soon.

Comment 2 Fedora Update System 2020-02-13 11:53:32 UTC
FEDORA-2020-293bf84963 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2020-293bf84963

Comment 3 Fedora Update System 2020-02-14 02:11:46 UTC
vim-8.2.236-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-293bf84963

Comment 4 Karl 2020-02-20 03:59:35 UTC
Seems to be fixed. Thanks!

Comment 5 Zdenek Dohnal 2020-02-20 06:56:49 UTC
You are welcome!

Comment 6 Fedora Update System 2020-02-29 03:03:30 UTC
vim-8.2.236-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.