Ticket #214 (closed enhancement: fixed)

Opened 10 years ago

Last modified 9 years ago

Fortran 90/95 syntax

Reported by: NNemec Owned by: styx
Priority: major Milestone: 4.7
Component: mcedit Version:
Keywords: commited-master Cc:
Blocked By: Blocking:
Branch state: Votes for changeset:

Description

Syntax file for freeform Fortran 90/95

Attachments

f90.syntax (9.3 KB) - added by NNemec 10 years ago.
git patch for f90 syntax

Change History

Changed 10 years ago by NNemec

git patch for f90 syntax

comment:1 Changed 10 years ago by winnie

  • Milestone changed from 4.6.3 to 4.7

nice new feature.. but this surely don't belong into a bugfix release. Therfore adding milestone 4.7

4.6.X will be only bugfix releases new features will go into 4.7

comment:2 Changed 10 years ago by styx

  • Status changed from new to accepted
  • Keywords review added; fortran syntax removed
  • Version 4.6.2~pre1 deleted
  • Owner set to styx

comment:3 follow-up: ↓ 4 Changed 10 years ago by slyfox

I don't know fortran, but it looks like f90 is case insensitive (like pascal or basic).
So provided syntax has hard times highlighting lowercase style.
(tested on first .f90 file in my system: /usr/lib64/python2.5/site-packages/numpy/f2py/docs/usersguide/moddata.f90)

The rest looks ok.

comment:4 in reply to: ↑ 3 ; follow-up: ↓ 5 Changed 10 years ago by NNemec

True, Fortran is generally case-insensitive. Checking pascal.syntax I find that there does not seem to be a straightforward way to specify case-insensitive keywords in mcedit? I'm not really excited about the idea of putting various versions of each keyword in the syntax file. Any ideas about that?

Replying to slyfox:

I don't know fortran, but it looks like f90 is case insensitive (like pascal or basic).
So provided syntax has hard times highlighting lowercase style.
(tested on first .f90 file in my system: /usr/lib64/python2.5/site-packages/numpy/f2py/docs/usersguide/moddata.f90)

The rest looks ok.

comment:5 in reply to: ↑ 4 ; follow-ups: ↓ 6 ↓ 7 Changed 10 years ago by ossi

Replying to NNemec:

I find that there does not seem to be a straightforward way to specify case-insensitive keywords in mcedit? [...] Any ideas about that?

you can more or less easily implement a "keyword/i" keyword for that purpose.
for optimization, you might want to require the case-insensitive keywords in the syntax file to be always uppercase, so only the compared text needs to be uppercased.

comment:6 in reply to: ↑ 5 Changed 10 years ago by ossi

Replying to ossi:

for optimization, you might want to require the case-insensitive keywords in the syntax file to be always uppercase, so only the compared text needs to be uppercased.

actually, that's stupid. the syntax reader can do that optimization internally, as the file is read at startup.

comment:7 in reply to: ↑ 5 Changed 10 years ago by NNemec

Right now, I do not have the time to dig through the C sources of mc to implement this. Maybe someone who already is acquainted with the sources could do that with much less effort?

Replying to ossi:

you can more or less easily implement a "keyword/i" keyword for that purpose.
for optimization, you might want to require the case-insensitive keywords in the syntax file to be always uppercase, so only the compared text needs to be uppercased.

comment:8 Changed 10 years ago by slyfox

  • Keywords vote-slyfox added

Ok. Then we can just add current f90.syntax and enhance it when something like IGNORECASE directive will be added to syntax engine.

My vote

comment:9 Changed 10 years ago by styx

  • Keywords commited-master added; review vote-slyfox removed
  • Status changed from accepted to testing
  • Resolution set to fixed

comment:10 Changed 10 years ago by styx

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.