Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331850 - Parser rejects forall statements with more than one triplet-spec
Summary: Parser rejects forall statements with more than one triplet-spec
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: Photran.Editor & Outline View (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 7.0   Edit
Assignee: Jeffrey Overbey CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-04 15:23 EST by Kris CLA
Modified: 2011-03-17 12:31 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kris CLA 2010-12-04 15:23:13 EST
Build Identifier: 20100917-0705

forall statements like:

forall (i=1:10, j=1:10) A(i,j) = 2.0

are considered syntax errors.  If I re-write them as constructs like so:

forall (i=1:10, j=1:10) 
  A(i,j) = 2.0
end forall

then they are not considered errors.  I am importing some code that is valid fortran and compiles with several different compilers. 



Reproducible: Always

Steps to Reproduce:
1. install eclipse
2. open source file with forall statement
3. syntax error
4. close eclipse and continue to work in emacs
Comment 1 Erik Toussaint CLA 2010-12-04 21:44:12 EST
This has been reported before (see bug 308196 and also bug 314043 ), and should have been fixed in 6.0 RC2, according to Jeffrey Overbey.

I'm currently running 7.0.0.201011121412 and don't get this error anymore.
Comment 2 Jeffrey Overbey CLA 2011-03-17 12:25:41 EDT
This appears to be a different problem -- the parser is rejecting forall statements with more than one triplet-spec
Comment 3 Jeffrey Overbey CLA 2011-03-17 12:29:49 EDT
This will be fixed in the next 7.0 build.  Thanks again for the bug report!
Comment 4 Jeffrey Overbey CLA 2011-03-17 12:30:52 EDT
Changed fortran2008.bnf in HEAD:

# R750
(list):<ForallTripletSpecList> ::=
  | <Name> -:T_EQUALS Lb:<Subscript> -:T_COLON Ub:<Subscript>
  | <Name> -:T_EQUALS Lb:<Subscript> -:T_COLON Ub:<Subscript> -:T_COLON stepExpr:<Expr>
  | <ForallTripletSpecList> -:T_COMMA <Name> -:T_EQUALS Lb:<Subscript> -:T_COLON Ub:<Subscript>
  | <ForallTripletSpecList> -:T_COMMA <Name> -:T_EQUALS Lb:<Subscript> -:T_COLON Ub:<Subscript> -:T_COLON stepExpr:<Expr>