1 research outputs found

    Applying attribute grammars to teach linguistic rules

    Get PDF
    Dissertação de mestrado integrado em Engenharia InformáticaThis document presents the topic “Applying Attribute Grammars to teach Linguistic Rules”, at Universidade do Minho in Braga, Portugal. This thesis is focused on using the formalisms of attribute grammars in order to create a tool to help linguistic students learn the different rules of a natural language. The system developed, named Lyntax, consists in a processor for a domain specific language which intends to enable the user to specify different kinds of sentence structures, and afterwards, test various phrases against said structures. The processor validates and evaluates the input given, generating a grammar which is specific to a previously chosen sentence. Lastly, using ANTLR, a parser is generated for that specific grammar referred above. The processor built by ANTLR also creates a syntax tree that is presented to the user for analysis purposes. An interface that supports the specification of the language (written in Lyntax DSL) was built, also allowing the use of the processor and the generation of the specific grammar, exempting the user from knowing the details of the process. Within this document, the focus will be primarly dedicated to the analysis of the system and how each block was built. Different examples of the processor in action will be shown and explained.Este documento refere-se a uma dissertação sobre o tópico “Aplicar Gramáticas de Atribu tos no ensino de Regras de Linguística”, e será concluída na Universidade do Minho em Braga, Portugal. Esta dissertação pretende focar-se no uso dos formalismos das gramáticas de atributos de maneira a criar uma ferramenta que ajude os alunos de linguística a aprender as diversas regras da língua natural. O sistema desenvolvido, denominado de Lyntax, consiste em um processor para uma linguagem de domínio específico cujo objetivo é o de permitir ao seu utilizador a possibili dade de especificar diversas estruturas de frases, e posteriormente, testar frases contra essas mesmas estruturas. O processador valida e avalia o input recebido, gerando uma gramática específica à frase previamente escolhida. Por fim, usando uma ferramenta como o ANTLR, um parser é gerado para a gramática específica acima referida. O processador construído pelo ANTLR também gera a árvore de syntax que é apresentada ao utilizador com o intuito de ser analisada. Foi também criada uma interface que suporta a especificação da linguagem, permitindo também o uso do processador e a geração da gramática específica, abstraindo assim o utilizador de quaisquer tipo de cálculos. Neste documento, o focus primário será dedicado à análise do sistema e como cada bloco foi construído. Diferentes exemplos de uso do processador serão apresentados e explicados
    corecore