Abstract
A simple indentation rule, indent statements from the control statement they belong to, is sufficient to express a program's block structure without the use of compound statements or closing keywords. This is proven using a PASCAL-like language (using indentation instead of BEGIN-END blocks). Using indentation alone means a programmer need not give two independent specifications of a program's block structure, thus reducing effort and eliminating a potential source of errors.
- Clifton, M. H. "A Technique for Making Structured Programs More Readable," ACM SIGPLAN Notices 13, 4 (April 78), 58--63. Google ScholarDigital Library
- Conrow, K. and Smith, R. G. "NEATER2: A PL/I Source Statement Reformatter, " Comm. ACM 13, 11 (Nov. 70), 669--675. Google ScholarDigital Library
- Crider, J. E. "Structured Formatting of Pascal Programs," ACM SIGPLAN Notices 13, 11 (Nov. 78), 15--22. Google ScholarDigital Library
- Grouse, P. "Flowblocks - A Technique for Structured Programming," ACM SIGPLAN Notices 13, 2 (Feb. 78), 46--56. Google ScholarDigital Library
- Gustafson, G. G. "Some Practical Experiences Formatting Pascal Programs, " ACM SIGPLAN Notices 14, 9 (Sep. 79), 42--49. Google ScholarDigital Library
- Hueras, J. and Ledgard, H. "An Automatic Formatting Program for PASCAL. " ACM SIGPLAN Notices 12, 7 (July 77), 82--84. Google ScholarDigital Library
- Jackson, G. A. "Two Dimensional Grammars and Structured Programming Languages, " ACM SIGPLAN Notices 14, 2 (Feb. 79), 21--28. Google ScholarDigital Library
- Peterson, J. L. "On Formatting of Pascal Programs," ACM SIGPLAN Notices 12, 12 (Dec. 77), 83--86. Google ScholarDigital Library
- Ramsdell, J. "Prettyprinting Structured Programs with Connector Lines," ACM SIGPLAN Notices 14, 9 (Sep. 79), 74--75. Google ScholarDigital Library
Recommendations
The Intel labs Haskell research compiler
Haskell '13The Glasgow Haskell Compiler (GHC) is a well supported optimizing compiler for the Haskell programming language, along with its own extensions to the language and libraries. Haskell's lazy semantics imposes a runtime model which is in general difficult ...
Compositional compiler construction
We describe an implementation of an Oberon0 compiler using the techniques proposed in the CoCoCo project. The compiler is constructed out of a collection of pre-compiled, statically type-checked language-definition fragments written in Haskell. Oberon0 ...
Xoc, an extension-oriented compiler for systems programming
ASPLOS '08Today's system programmers go to great lengths to extend the languages in which they program. For instance, system-specific compilers find errors in Linux and other systems, and add support for specialized control flow to Qt and event-based programs. ...
Comments