Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337623 - A declaration is not parsed correctly
Summary: A declaration is not parsed correctly
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: Photran.For Internal Use (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 7.0   Edit
Assignee: Jeffrey Overbey CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-18 19:02 EST by Stas Negara CLA
Modified: 2011-03-17 13:15 EDT (History)
2 users (show)

See Also:


Attachments
Fortran source code that reveals the parser's problem. (180 bytes, application/octet-stream)
2011-02-18 19:04 EST, Stas Negara CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stas Negara CLA 2011-02-18 19:02:22 EST
Build Identifier: 20100610-0636

In the attached cg.f90 file the declaration "integer            nzloc(n)" is not parsed correctly (i.e. there is an error token) unless this line is commented out "implicit           logical (a-z)" or "::" is added for the declaration (i.e. it becomes "integer     ::     nzloc(n)").

Reproducible: Always
Comment 1 Stas Negara CLA 2011-02-18 19:04:29 EST
Created attachment 189333 [details]
Fortran source code that reveals the parser's problem.
Comment 2 Jeffrey Overbey CLA 2011-03-17 13:11:33 EDT
The problem seems to be that the lexer is never exiting the IMPLICIT state, and so the "(n)" suffix on the variable declaration is being recognized as a T_X_IMPL (implicit spec) token.
Comment 3 Jeffrey Overbey CLA 2011-03-17 13:15:55 EDT
This is fixed.  I'll commit the change to HEAD later today/tonight.