oracle / opengrok

OpenGrok is a fast and usable source code search and cross reference engine, written in Java
http://oracle.github.io/opengrok/
Other
4.38k stars 754 forks source link

Fortran is a case insensitive language (Bugzilla #15970) #456

Open vladak opened 11 years ago

vladak commented 11 years ago

status NEW severity minor in component webapp for --- Reported in version unspecified on platform ANY/Generic Assigned to: Trond Norbye

On 2010-05-14 13:08:15 +0000, njts wrote:

Fortran source code HTML view should recognize also uppercase keywords (like CALL, IF, INTEGER, etc...). Now uppercase keywords are shown as links to definition search.

Also the symbol and definition search for Fortran files should be case insensitive. Now it doesn't find function names which are defined in uppercase and searched in lowercase. This is a problem if the function is used somewhere in lowercase and the link from the source code view doesn't find the definition.

Tested on OpenGrok 0.9 RC1 and Windows 7 64 bit.

On 2010-07-02 11:41:56 +0000, Lubos Kosco wrote:

can you please point me to a lexical analysis(definition) of fortran?

I'll adjust the fortran lexical analyzer we have in opengrok according to that

for case sensitive/insensitive search I added a dependency bug

On 2011-07-20 14:44:21 +0000, Charles T Hart wrote:

Fortran is wholly case insensitive language and "white space free" to boot. If you're the sun, ibm or gcc compiler, you would be down casing all the symbols and adding a "_" at the end of them. For instance: S ubRotin E SM C An annoying comment in the middle of things that messes up lexers sometimes

  • ith

Is the start of a subroutine named "smith_".

For more than you ever wanted to know about "Sale's Algorithm" for lexing fortran files, see some of the following:

http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.50.8362&rep=rep1&type=pdf

Google returns other results too, but section 2.2.1 of that paper and its appendix A tells you pretty much everything you need to know.

-CTH

tarzanek commented 8 years ago

463 will fix this