Menu

#76 declaration (w continuation) fails to parse

open-fixed
lexer (27)
5
2011-08-06
2011-06-22
Jean Utke
No

For the attached example I get:
decl.f90 line 3:190 no viable alternative at input ''

This is probably related to bug 3306187 but I can't modify that one so here is a new one instead.

This problem occurs with version:

commit 5a4278e497d93fa13f7de87066d7fdd87968bd88
Author: rasmussn <rasmussn@kirkelanlgov.local>
Date: Tue Jun 14 00:11:22 2011 -0600

Discussion

  • Jean Utke

    Jean Utke - 2011-06-22

    test input

     
  • Jean Utke

    Jean Utke - 2011-06-24

    I have another example I came across that I remember gave me head aches in our own parser when there are comments following the continuation character like this:
    subroutine foo()

    500 FORMAT ( &!CORE..72
    & '0 ICH L FLOCH1 C0FLCH C1FLCH C2FLCH',&
    & ' C3FLCH TEXPEL ENVAPR DMCHPR')
    600 FORMAT (1X,2I6,8D13.5) !CORE..75
    700 FORMAT (' PIN3= ',D13.5,' PX3= ',D13.5,' DTSUB= ',D13.5,/, &!CORE..76
    & ' ICH COEFE0 COEFE1 COEFE2 CHFLO3 ', &
    & 'GAMCH THT2CH DUM1V DUM2V DEN1V', &
    & ' DEN2V ',/,(I3,6D13.5,/,3X,10D13.5))
    END SUBROUTINE COREFL

    end subtourine

    Sorry, I would have done it as an attachment but it looks like I am not allowed.

     
  • Jean Utke

    Jean Utke - 2011-06-24

    anod now - of course - this example lost the formatting ... argh

     
  • Craig E Rasmussen

    • status: open --> open-fixed
     
  • Craig E Rasmussen

    The bug was caused by an inconsistency between the count and the index in FortranStream. It was fixed by returning a 'tuple' of (index,count) rather than attempting to calculate the count from the index change.

     

Log in to post a comment.