Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[photran] Syntax Error - Unable to recognize '*' in column 1 as comment

Folks,

 

I’m brand-new to using Photran and I seem to have a problem right off the bat. It seems that the syntax parser does not like the format of comments in my code.

 

A sample snippet is as follows:

               

**********************************************************************

*      Copyright 2013                                                *

**********************************************************************

*

      program bernie

      implicit none

      print *,'Hello World'

      end program Bernie

 

In the “Outline” window I see a Syntax Exception listed. The Text of the exception is:

               

SyntaxException: Syntax error: Unexpected * (/Ez5_code/bl/bernie.f, line 2, column 1).  Expected one of the following: block, close, contains, abstract, class, identifier, return, interface, call, end of statement, go, print, subroutine, stop, allocatable, end, private, doubleprecision, all, implicit, if, end of input, dimension, goto, write, data, submodule, where, recursive, blockdata, select, allstop, codimension, import, use, intent, pause, backspace, endfile, selectcase, open, associate, elemental, character, nullify, rewind, bind, do, pointer, syncall, program, syncimages, syncmemory, wait, unlock, optional, double, module, read, allocate, equivalence, integer, entry, real, cycle, procedure, pure, integer constant, lock, intrinsic, format, namelist, asynchronous, critical, value, logical, forall, save, sync, inquire, assign, external, volatile, complex, protected, common, endprogram, public, enddo, contiguous, impure, enum, parameter, target, doublecomplex, type, deallocate, function, continue, exit

 

When I add an exclamation point as the first character fir the first 4 lines th syntax error disappears:

!**********************************************************************

!*      Copyright 2013                                                *

!**********************************************************************

!*

      program bernie

      implicit none

      print *,'Hello World'

      end program Bernie

 

Why isn’t an asterisk (‘*’) in column 1 not recognized as an error? Is this something I can change in the configuration?

 

Thanks!

 

--Bernie Scholz

 


Back to the top