Про "из пушки по воробьям", Coco-Paper.ps
> -- Hanspeter Mo"ssenbo"ck писал(а):
> 7. CONCLUSIONThe field of compiler construction and compiler generation has long become mature. Various methods of scanning, parsing and semantic evaluation have been studied extensively. Time has come now to make good use of that knowledge and to design tools that are as simple and as efficient as we can achieve today. Coco/R is an effort in this direction. It is definitely not a prototype but a production quality tool with simplicity and efficiency as a major design goal.A simple tool should be based on a familiar notation, it should require as little input as possible and its function should be transparent and predictable to its user. For the generated parts to be able to compete with production quality compilers they must be small and fast. This can be achieved by using single-pass compilation with semantic actions executed during parsing, by burning the grammar into code instead of using table-driven techniques and by using efficient error-handling that does not slow down error-free parsing. For many translation tasks, such as the processing of small command languages, this kind of compilation scheme is quite sufficient () and also .Coco/R matches the above requirements to a large degree. The compilers generated by it are comparable to hand-written compilers both in speed and in size. The input language Cocol/R is easy to learn since it is small and based on familiar concepts (EBNF grammars and a general purpose programming language). A compiler description in Cocol/R is about half the size of the compiler parts generated from it. It provides a better overview of the syntactic and semantic activities in a compiler and is therefore more readable.Let me conclude with a personal remark: . The power of compiler generators may well have encouraged the complexity of some of today's languages. Are such powerful tools really necessary? I believe they are not. For me, there seems to be little reason why a programming language should not be designed in a way that makes it amenable to single-pass compilation and top-down parsing