Reis, Leonardo Vieira dos SantosIorio, Vladimir Oliveira DiBigonha, Roberto da Silva2015-12-072015-12-072015REIS, L. V. dos S.; IORIO, V. O. D.; BIGONHA, R. da S. An on-the-fly grammar modification mechanism for composing and defining extensible languages. Computer Languages, Systems & Structures, v. 42, p. 46-59, 2015. Disponível em: <http://www.sciencedirect.com/science/article/pii/S1477842415000032>. Acesso em: 13 out 2015.1477-8424http://www.repositorio.ufop.br/handle/123456789/5926Adaptable 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.en-USParsing expression grammarsExtensible languagesGrammarsLanguage compositionAn on-the-fly grammar modification mechanism for composing and defining extensible languages.Artigo publicado em periodicoO periódico Computer Languages, Systems & Structures concede permissão para depósito deste artigo no Repositório Institucional da UFOP. Número da licença: 3730731018146.https://doi.org/10.1016/j.cl.2015.01.002