This process is exactly like the early stages of a compiler. The level of analysis used for each tool depends upon its level of sophistication. A very brief description of the preliminary analysis stages of lexing and parsing follows for the benefit of the interested reader. An understanding of the concepts of lexing and parsing is not necessary to use NAGWare f77 Tools as these stages are effectively hidden from the user. Lexing is the analysis of the source code to identify the elements of the language called tokens.
Tokens are the keywords, names, numbers etc.
The result of lexing is a sequence of tokens called a token stream. All NAGWare f77 Tools invoke the lexing routines as the first, or in some cases only, stage of analysis. In the process the parser carries out a syntactic analysis and ensures that the statements in the program unit are correctly formed and ordered. A parse tree is a low level representation of a program unit in which the program elements are conceptually laid out in a two dimensional tree structure. Pointers logically connect the elements of the program.