a b s t r a c tAdaptable Parsing Expression Grammar (APEG) is a formal method for defining the syntax of programming languages. It provides an on-the-fly mechanism to perform modifications of the syntax of the language during parsing time. The primary goal of this dynamic mechanism is the formal specification and the automatic parser generation for extensible languages. In this paper, we show how APEG can be used for the definition of the extensible languages SugarJ and Fortress, clarifying many aspects of the syntax of these languages. We also show that the mechanism for on-the-fly modification of syntax rules can be useful for defining grammars in a modular way, implementing almost all types of language composition in the context of specification of extensible languages.
This article presents the preliminary results achieved while working with a language to define extensions to the concrete syntax of AspectJ. The language uses the concept of syntax classes, units that extend classes with syntax definitions, building modular specifications for extensions. A syntax class can define a new construct with cross-cutting features either by translating it into pure AspectJ code or by modifying the behaviour of elements in different parts of the program, acting like an aspect weaver. The definition of new pointcut designators is also possible, with clear separation between run-time and weave-time processing. The language can be used as a tool to create domain-specific extensions to AspectJ, and domain-specific aspect languages embedded into AspectJ.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.