Geração de compiladores baseada em componentes

Detalhes bibliográficos
Ano de defesa: 2014
Autor(a) principal: Gabriel de Godoy Corrêa e Castro
Orientador(a): Não Informado pela instituição
Banca de defesa: Não Informado pela instituição
Tipo de documento: Dissertação
Tipo de acesso: Acesso aberto
Idioma: por
Instituição de defesa: Universidade Federal de Minas Gerais
UFMG
Programa de Pós-Graduação: Não Informado pela instituição
Departamento: Não Informado pela instituição
País: Não Informado pela instituição
Palavras-chave em Português:
Link de acesso: http://hdl.handle.net/1843/ESBF-9P2FVH
Resumo: The construction of a compiler of a real size programming language is a complex and big project. So, proper tools are needed to help in this task. However, compiler generation systems are still not popular yet. This is due to the complexity of these systems, complicated by their lack of readability and low reusability of language definitions used by other systems. This dissertation presents a compiler development environment which is focused on the readability of the compiler code, making the environment simpler to use. This environment translates the source code to an abstract syntax tree and performs, subsequently, semantic actions to generate code while visiting the AST generated. The environment is supported by a code generator infrastructure that encapsulates fundamental and recurring concepts of the constructs of imperative programming languages. The infrastructure consists of components of semantic actions, intermediary code instructions and a symbol table. The components are utilized by the programming language implementer to perform the semantic actions necessary to compile the language. The symbol table is used to control the declarations of the variables used in the infrastructure and allows the selection of different strategies for scope control and memory allocation. The environment was validated with an implementation for the compiler of the language Small, defined herein.