Font Size: a A A

The design and implementation of a parser and front-end for the ISO C++ language and validation of the parser

Posted on:2004-05-27Degree:Ph.DType:Thesis
University:Clemson UniversityCandidate:Gibbs, Tanton HoltFull Text:PDF
GTID:2468390011459085Subject:Computer Science
Abstract/Summary:
In this thesis, we address the problems associated with the early phases of compiler development for object-oriented languages: lexical analysis, parsing and construction of a parser front-end. We first show that many language constructs for object-oriented languages cannot be parsed using only syntactic information. We then describe a technique for parsing ambiguous language constructs that exploits semantic information previously gathered in the parse. To demonstrate the effectiveness of the technique we apply it to a language that is notoriously difficult to parse, the C++ programming language. We show that the technique permits parsing of ambiguous C++ constructs in the grammar provided in the ISO C++ standard without modifying, refactoring or extending the grammar.; We then describe a dynamic, automated technique for validating the parser, including the development of a technique that permits validation of class invariants that are not initially valid. The algorithm for this technique accepts, as input, a formal specification of the invariants for the important classes and class hierarchies in the system. The algorithm produces, as output, a validator that exercises these invariants as part of the testing process.
Keywords/Search Tags:Language, Parser
Related items