Bug 375776 - format statement yields SyntaxException error
Summary: format statement yields SyntaxException error
Status: NEW
Alias: None
Product: PTP
Classification: Tools
Component: Photran.Parser (show other bugs)
Version: 8.0.5   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Photran Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-31 11:11 EDT by Daniel Harenberg CLA
Modified: 2013-04-10 09:17 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Harenberg CLA 2012-03-31 11:11:54 EDT
The following simple program makes a SyntaxException appear in the Outline view. The error is not shown in the Fortran Analysis/Refactoring Problems view, so I can't copy it.

program main
    implicit none
    integer, parameter :: dig=3
    real :: var

    var = 3.14

    write(*,55) var
55 format(f0.<dig>)     ! This line causes the Syntax Exception
! 55 format (f0<dig>)   ! Without the dot Syntax Exception disappears             
                        ! but does not compile (correctly)

    write(*,'(f0.<dig>)') var  ! This does not yield the Syntax Exception

end program main


+++++++ Error message (manually copied only the first part) +++++++++
SyntaxException: Syntax error: Unexpected extraneous character ([path edited]). Expected one of the following: block, close, [... etc]
Comment 1 Daniel Harenberg CLA 2012-03-31 11:18:54 EDT
Additional info:

55 format(f<dig>.3) ! does not yield the error

55 format(f<dig>.<dig>) ! again does yield the error
Comment 2 Daniel Harenberg CLA 2012-10-03 09:49:03 EDT
Bug is still present in the latest updates, i.e. Eclipse Juno, PTP 6.0.2/Photran 8.0.2
Comment 3 Daniel Harenberg CLA 2013-04-10 09:13:09 EDT
Still present in Photran 8.0.5
Comment 4 Daniel Harenberg CLA 2013-04-10 09:17:45 EDT
The reason I find this important is only because when there is a syntax exception one can't apply any refactorings to that file.