NORMA_DD (1158356), страница 15
Текст из файла (страница 15)
1) output of Norma source, Fortran DVM target program, time compilation messages into output file <listing-file>,
2) output of Fortran DVM target program into output file <target-file>,
3) output of Norma source, Fortran DVM target program, compile time messages onto a screen.
4) generation of texts of errors and warnings messages and linking them to corresponding lines of <listing-file> or screen.
Entry points of unit Listing generator are functions listing, erroutall, errpart, errprogr, info.
Function listing outputs text of Norma program and compilation messages. General structure of function listing control is given in the following scheme.
l
isting outrgm list-out outlstn errlst texterr
outrgm erroutall errpart
texterr
Function listing analyses output mode lst (lst=1 - there is Norma-program text and translator's messages in listing, lst=2 - text of Fortran DVM-program and translator's messages, lst=3 - text of Norma-program, Fortran DVM-program and translator's messages), outputs message about compilation options (calling function outrgm)and for lst=1,3 calls function of output of Norma-program's text , for lst=2 - function of output error messages erroutall.
Function list-out reads source file beginning with line with number beginline to line eline (at the end of work function sets beginline=eline+1 - new value of counter of source file lines processed in creation of translation listing). Next line is passed to function outlstn.
Then function outlstn is called , it outputs current read line on to the screen and into file filelst.
Then function errlst is called, it checks if there are errors corresponding to current line in List of errors and if there are some it calls function of generating error messages and warnings texterr. Processed information about errors is eliminated from List of errors.
Function texterr creates the text of message about establishing the pair <error code><error context> and outputs it onto the screen and into file filelst.
Function erroutall outputs messages about errors which belong to the whole part from List of errors onto the screen and into file filelst. It doesn't depend on the mode of output lst. Function texterr is called for generation of messages about errors and warnings.
Function errpart outputs final messages about results of part compilation ( time of part translation, values of errors counter osh in Norma part unit and counter of warnings osh1 in Norma part unit).
Function errprogr outputs final messages about results of Norma-program compilation ( time of part translation, values of errors counter glob in Norma program and counter of warnings globw in Norma- program).
Function info outputs text of current line of Fortran-DVM program into file fileft, onto the screen and into file filelst.
5.10Exit from part unit compilation
Exit part unit compilation’s functions are: generation compile time messages (time of part unit compilation, number of errors and warnings), cleaning data structure.
Entry point of unit Exit part unit compilation is function exit_part_compile.
General structure of function exit_part_compile control is given in the following scheme.
e
xit_part_compile diagn clears count
Function diagn computes total number of errors and warnings in program after compilation of the next part: glob=glob+osh; globw=globw+osh1.
Function clears clears all non-global data structures used in part compilation.
Function count is an entry point of unit Local initialisation. If it is called then next Norma-program part unit is to be compiled.
6Exit from compilation
Exit from compilation’s functions are: to close files, to output some compiling time messages (time of compilation, number of errors and warnings).
Entry point of Exit part unit compilation is function stop.
Function stop calls function errprogr from Listing generator giving messages about results of translation.















