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.
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
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=