Weaving a debugging aspect into domain-specific language grammars

Hui Wu, Jeff Gray, Suman Roychoudhury, Marjan Mernik
2005 Proceedings of the 2005 ACM symposium on Applied computing - SAC '05  
A common trend in programming language specification is to generate various tools (e.g., compiler, editor, profiler, and debugger) from a grammar. In such a generative approach, it is desirable to have the definition of a programming language be modularized according to specific concerns specified in the grammar. However, it is often the case that the corresponding properties of the generated tools are scattered and tangled across the language specification. In this paper, separation of
more » ... within a programming language specification is demonstrated by considering debugging support within a domain-specific language (DSL). The paper first describes the use of AspectJ to weave the debugging semantics into the code created by a parser generator. The paper outlines several situations when the use of AspectJ is infeasible at separating language specification properties. To accommodate such situations, a second approach is presented that weaves the debugging support directly into a grammar specification using a program transformation engine. A case study for a simple DSL is presented to highlight the benefits of weaving across language specifications defined by grammars.
doi:10.1145/1066677.1066986 dblp:conf/sac/WuGRM05 fatcat:n6ngxuofwbfk5k2w7apk75hguy