Contributions to the generation of semantic editors

Sammanfattning: The state-of-the-art in development tools today provides users with a large number of both syntactic and semantic services, such as syntax highlighting, name completions and refactorings. Preferably, every language should have sophisticated tool support, but unfortunately, the manual task of tool development is both time-consuming and error-prone, making it too costly for small language communities. This situation can be improved by the use of tool generators and frameworks supporting reuse. Tool generators can provide swift generation of language-specific components from high-level specifications, while frameworks can provide reusable language-generic components. In this thesis we address a number of problems related to the generation of semantic services used in editors. We present a prototype tool generator based on reference attribute grammars (RAGs). RAGs extend attribute grammars with references that turn syntax trees into graphs, and we find them both powerful and expressive, suitable for the generation of semantic services. As an example of how RAGs can be used for advanced semantic services, we show how they can modularly express the semantics of flow analysis, using Java as a large case study. Flow analysis is useful in several semantic services, including dead code detection, and as a contributing service in a refactoring tool. We also present contributions to improving the performance of RAG-based systems. The approach is to use profiling to automatically compute a selective caching configuration of attributes, performing better than full caching. We have chosen to focus on text-based editors, which leaves us with the predicament of translating text to syntax tree through parsing. The text in an interactive editor often contains parsing errors, making it difficult to maintain a corresponding syntax tree. To mitigate this problem, we present a novel approach to structural error recovery of text – bridge parsing, used as a pre-processor which makes it independent of the actual parser in use. In addition, we present how bridge parsing can be integrated with scanner-less generalized LR parsing – a fruitful combination outperforming the Eclipse JDT with regards to structural error recovery.

  Denna avhandling är EVENTUELLT nedladdningsbar som PDF. Kolla denna länk för att se om den går att ladda ner.