Home
SOFTWARE FOR THE GENERATION AND SIMULATION OF SYNTAX ANALYSIS TABLES (BURGRAM)
Supervised by: Dr. César
Ignacio García Osorio
Programmed by: Carlos Gómez
Palacios
Burgos, Enero de 2008
This web page presents a software to support the teaching of syntactic analysis algorithms, specifically, it implements the following: LL (1), SLR (1), LALR (1) and LR (1). In addition to the user documentation for said software, a short theoretical introduction to the algorithms is presented. The associated software and documentation are the result of the work carried out by the student Carlos Gómez Palacios in his final project in the Computer Engineering degree at Polytechnic High School of the University of Burgos.
The original objective of this project was to create a tool to show and simulate the different types of existing syntactic analysis (Ascending and descending) that are seen in the 4th year subject of Language Processors of the Computing Engineering degree. An attempt was made to create a tool that would support both the teacher and the student when working on the subject.
The origin of the project was in the 2005-2006 academic year, I studied the subject. It seemed to me that it would be very useful to have a tool to be able to carry out the exercises that were studied in the subject. There was an application such as Anagra [ANAGRA 2004] but there were very important things that it did not do correctly, so the exercises were incomplete, since some part did not show the expected results. It was for this reason that I proposed this project to César García Osorio: "A tool that allows us to show and simulate the syntactic analysis of grammars". César agreed to be my supervisor, and that's how this project started.
I started by creating a robust set of classes to be able to work correctly with the grammars that would later be generated by the algorithms. Once this set of classes was done, I created a set of classes to be able to perform the algorithms, showing the results in text mode. When creating these algorithms, I was especially careful to completely decouple them from the graphics application. In this way, with this set of classes one can work directly from an applet, a graphical user interface (hereinafter GUI Graphical User Interface), or an external application. Finally, I created the GUI with which the user will interact to obtain the results that are needed. The aim was to create an application as intuitive and simple as possible, with very clear objectives:
Simplicity:
an interface that is as simple as possible so that the user quickly becomes familiar with the application.
Multiple options:
despite trying to make a simple application, which at the same time provides the greatest possible versatility.
Teaching aid:
Since it is a teaching aid tool, an attempt has been made to graphically capture the theoretical knowledge of the theory. For example, the graph with the arrows and the components used in the simulation, aims to graphically represent the components necessary to perform the analysis.
MultiTab:
Currently tabbed applications are being used more and more. The Firefox browser [MOZILLA 2002] is a clear example: on a single screen you can see all the pages that the user needs. Given the success of tabs in FireFox, Microsoft has included tabs in its latest version of the Internet Explorer browser (7.0). This is why they wanted to bring the advantage of eyelashes to this project.
Report generation:
I found it very important to be able to generate a report with all the data that the system generates in a report. In this way, the user can carry out the exercises once in front of the computer and draw a report with all the data that the tool generates, and be able to take them to class to ask the teacher questions, or the teacher can use it to post exercises on the page subject website... Depending on the use to which they are going to be used, these reports should be in one format or another, that is why the reports are generated in three formats (PDF, HTML, RTF).
Reutilización:
Los componentes utilizados en el proyecto se han pensando para poder
utilizarlos en otras aplicaciones.
Este
proyecto pretende abarcar los algoritmos de análisis
sintáctico estudiados en clase, resolviéndolos de forma
sencilla y comprensible por el usuario, para ello la GUI mostrará
paso a paso su resolución. La meta no es resolver el problema
únicamente, sino que el usuario vea además cual es la
forma de hacerlo, para de esta forma asistirle en el proceso de
estudiar y entender los algoritmos.
Para
realizar este proyecto he desarrollado la aplicación
utilizando el paradigma Orientado a Objetos (OO), a través
del lenguaje de programación Java en su versión
1.5.
Para la
construcción de los gráficos que se muestran en la GUI
se ha empleado la herramienta DOT [GRAPHVIZ 2004] mediante el
paquete Grappa [GRAPPA 2001] que permite utilizarlo en Java.
Para la
generación de los informes se ha empleado el paquete IText
[ITEXT 2008] de Java. Este paquete está orientado a crear de
manera sencilla informes en pdf, pero además se permite crear
informes en otros tipos de formatos.
La
aplicación ha quedado completamente probada utilizando pruebas
unitarias (con JUnit [JUNIT 2008] y pruebas de cobertura (con
Cobertura [COBERTURA 2008]. Finalmente
se ha medido su calidad a través de JDepend
[JDEPEND 2008]
|