Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fortran Syntax Highlighting #78

Open
GoogleCodeExporter opened this issue Jan 14, 2016 · 7 comments
Open

Fortran Syntax Highlighting #78

GoogleCodeExporter opened this issue Jan 14, 2016 · 7 comments

Comments

@GoogleCodeExporter
Copy link

How hard would it be to do syntax highlighting for Fortran F90/F95 source code?

I have a google code project with mostly Fortran source code and syntax
highlighting would be nice.

I have attached a syntax highlighting file for F90 for test editor, textpad 
http://www.textpad.com/ 

as an example


Original issue reported on code.google.com by [email protected] on 26 May 2009 at 12:08

Attachments:

@GoogleCodeExporter
Copy link
Author

I forget to say, if you could let me if it would be possible, I could try and 
do it
myself.
Mark

Original comment by [email protected] on 26 May 2009 at 12:09

@GoogleCodeExporter
Copy link
Author

http://eli-project.sourceforge.net/fortran_html/Parse.html has a very large 
grammar
for Fortran 90.

If you want to take a stab, you can look at the lang-*.js files in the src 
directory.
 I'd start with a language that is lexically similar to Fortran 90 and go from there.

Original comment by [email protected] on 14 Aug 2009 at 5:58

@GoogleCodeExporter
Copy link
Author

I tried to use lang-*.js as a template but have run across the following 
problem :-

Fortran 77 reserves the first 7 characters of every line for special 
instructions such as 
comment indicators or continuations & or goto labels. 

I don't see an easy way of indicating those in the lang-*.js. Any suggestions?


Original comment by [email protected] on 5 Feb 2010 at 4:23

@GoogleCodeExporter
Copy link
Author

Its not pretty, but I am attaching one here that mostly works.

Original comment by [email protected] on 6 Feb 2010 at 4:30

Attachments:

@GoogleCodeExporter
Copy link
Author

How can I use the file you attached, since it does not seem to be included in 
prettify yet? 
(https://code.google.com/p/google-code-prettify/source/browse/trunk/src)

Original comment by jbndmi on 31 Jan 2014 at 9:10

@GoogleCodeExporter
Copy link
Author

I figured it out, sorry for the spam. 

    <script src='path/to/lang-fortran.js'/>

But why is this not included? It works fine for my code.

Original comment by jbndmi on 31 Jan 2014 at 9:15

@GoogleCodeExporter
Copy link
Author

how and whre could I edit to keep highlighting keywords folowing the comma 
punctuation?

ie:   real, dimension
      integer, allocatable 

Thanks for the help.

Original comment by [email protected] on 13 Nov 2014 at 4:30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant