The fortran code is described in a tree called an AST. The first node of a AST is called the root node. In practice, we use the term node or root node to reference the first node. In order to move in a AST, we introduce the following attributes and functions:
IF ($cstat.VARIANT!="do") THEN ERROR(1,"Please, select a DO statement") ENDIF
Remark: In some previous versions of TSF, a comparison such as
($cstat.VARIANT!=do) was possible. The nature of the identifier
do is ambiguous ; is do a variant/string or a TSF variable ? This
syntax is not supported in by new versions of TSF.
The figures 8 illustrates the use of these functions. Note
the presence of the keyword header which enables us any manipulations (cut or
paste for instance) at any level in the fortran code without being worried by
losing the current level.
The figure 9 illustrates the same functions on a fortran
AST view.
Remark: The attributes FIRST, LAST, SKIP, NEXT and PREVIOUS are also available as obsolete statements: