During the past few years, research into so-called “Syntax Directed Compiler” and “Compiler Compiler” techniques [1, 2, 3, 4, 5, 6] has given hope that constructing computer programs for translating formal languages may not be as formidable a task as it once was. However, the glow of the researchers' glee has obscured to a certain extent some very perplexing problems in constructing practical translators for common programming languages. The automatic parsing algorithms indeed simplify compiler construction but contribute little to the production of “optimized” machine code, for example. An equally perplexing problem for many of these parsing algorithms has been what to do about syntactically incorrect object strings. It is common knowledge that most of the ALGOL or FORTRAN “programs” which a compiler sees are syntactically incorrect. All of the parsing algorithms detect the existence of such errors. Many have considerable difficulty pinpointing the location of the error, printing out diagnostic information, and recovering enough to move on to other correct parts of the object string. It is the author's opinion that those algorithms which do the best job of error recovery are those which are restricted to simpler forms of formal languages.
The Latest from CACM
Shape the Future of Computing
ACM encourages its members to take a direct hand in shaping the future of the association. There are more ways than ever to get involved.
Get InvolvedCommunications of the ACM (CACM) is now a fully Open Access publication.
By opening CACM to the world, we hope to increase engagement among the broader computer science community and encourage non-members to discover the rich resources ACM has to offer.
Learn More
Join the Discussion (0)
Become a Member or Sign In to Post a Comment