Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 331850

Summary: Parser rejects forall statements with more than one triplet-spec
Product: [Tools] PTP Reporter: Kris <tuffguy.kris>
Component: Photran.Editor & Outline ViewAssignee: Jeffrey Overbey <com-eclipse-dot-org>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: com-eclipse-dot-org, eh.toussaint
Version: unspecified   
Target Milestone: 7.0   
Hardware: PC   
OS: Linux   
Whiteboard:

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>