Advanced

Contributions to the generation of semantic editors

Söderberg, Emma LU (2010)
Abstract
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... (More)
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. (Less)
Please use this url to cite or link to this publication:
author
supervisor
organization
publishing date
type
Thesis
publication status
published
subject
project
EASE
language
English
LU publication?
yes
id
b5f46134-f9c8-4c14-9c5f-9eae42659c79 (old id 1671268)
date added to LUP
2010-09-20 11:09:12
date last changed
2016-09-19 08:45:17
@misc{b5f46134-f9c8-4c14-9c5f-9eae42659c79,
  abstract     = {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<br/><br>
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.},
  author       = {Söderberg, Emma},
  language     = {eng},
  note         = {Licentiate Thesis},
  title        = {Contributions to the generation of semantic editors},
  year         = {2010},
}