ACM Home Page
Please provide us with feedback. Feedback
Implementation of a portable Fortran 77 compiler using modern tools
Full text PdfPdf (863 KB)
Source Symposium on Compiler Construction archive
Proceedings of the 1979 SIGPLAN symposium on Compiler construction table of contents
Denver, Colorado, United States
Pages: 98 - 106  
Year of Publication: 1979
ISBN:0-89791-002-8
Also published in ...
Author
Stuart I. Feldman  Bell Laboratories, Murray Hill, New Jersey
Sponsor
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 10,   Downloads (12 Months): 34,   Citation Count: 10
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues   peer to peer  

Tools and Actions: Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/800229.806959
What is a DOI?

ABSTRACT

I have recently written a portable compiler [1] for the Fortran 77 language [2]. It attacks an old language with new tools: the parser is generated automatically from an LALR(1) grammar, the program is produced by code generators designed for another language. These tools proved very valuable, but they are based on theory and experience one or two decades fresher than that underlying Fortran, so they really do not fit this application. The following discusses the approach taken, the ways in which the tools had to be bent to do the job, the properties of Fortran that seem to cause the most trouble, and the costs of writing a portable compiler. It also describes certain aspects of the approach to code generation, since others may wish to use the same tools. This paper does not describe low-level details of the implementation. This compiler is intimately connected with the programming language C[3]. The compiler is written in C, it uses tools written in C, the input/output library uses the standard C library, and it uses the second pass of a C compiler as code generator. To a much smaller extent, this compiler is based on the UNIXニ operating system, since all of the development work was done on UNIX systems and the current version of the compiler assumes the UNIX system process structure. It would require a serious but not enormous effort to move this compiler to a different operating system; it would be impossible to move it to a non-C environment.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
Feldman, S. I. and Weinberger, P. J., "A Portable Fortran 77 Compiler", (unpublished, 1978).
 
2
American National Standard Programming Language Fortran, American National Standards Institute X3.9-1978.
 
3
 
4
The Bell System Technical Journal57, 6, Part 2 (July-August 1978), Entire issue.
 
5
Feldman, S. I., "Fortlex — A General Purpose Lexical Analyzer for Fortran," Bell Laboratories Computing Science Technical Report #51 (1976).
 
6
Johnson, S. C., "Yacc: Yet Another Compiler-Compiler," Bell Laboratories Computing Science Technical Report #32 (1975).
 
7
Johnson, S. C., "A Tour Through the Portable C Compiler," (unpublished, 1976).
 
8
Ritchie, D. M., "A Tour Through the unix C Compiler," (unpublished, 1975).



Peer to Peer - Readers of this Article have also read: