Menu

#6 libpaul does not associate fortran annotation with ast node

open
None
7
2013-01-26
2012-03-30
No

program main
integer :: x
! %Fortran
x = 1
end program main

For the above code the annotation is not associated with the assignment statement.
Please see the file ccsdTrans.cpp (a copy of example traversal from libpaul)

The annotation is not found even after all nodes are visited.

Discussion

  • Ajay Panyala

    Ajay Panyala - 2012-03-30
     
  • Matt Sottile

    Matt Sottile - 2012-04-05
    • assigned_to: nobody --> matts22
     
  • Matt Sottile

    Matt Sottile - 2012-04-05
    • status: open --> closed-fixed
     
  • Matt Sottile

    Matt Sottile - 2012-04-05

    Fixed. The parser did not properly handle whitespace between the comment symbol and the annotation tag, so the annotations were not recognized as annotations and were skipped. The code now handles this situation correctly. Try this with the example traversal in the tests directory to verify:

    ! %EXAMPLE annotation=foo
    program foo
    print *, 'hi'
    end program foo

    Output is:

    [matt@ftt tests]$ ./example_traversal foo.f90
    Found annotated node:SgGlobal
    annotation: foo

     
  • Ajay Panyala

    Ajay Panyala - 2013-01-26
    • status: closed-fixed --> open
     
  • Ajay Panyala

    Ajay Panyala - 2013-01-26

    This bug had been fixed before.

    Annotations of the form ! %TAG string are not recognized (simple fortran example attached).

    The following message is printed:

    UNSUPPORTED ANNOTATION FORMAT (NON-FATAL, IGNORING) :: Tag=Fortran, Parser=

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.