How juansegnana/grupo-1-ssl-2022 works
Based on our analysis of the file tree and README, this project is an interpreter for an RSS-inspired language developed for an academic course on syntax and semantics. Its primary purpose is to tokenize and parse RSS language files using Python and the PLY library. The system is structured around core components for lexing and parsing, along with a user-interactive menu and auxiliary helper functions.
Main components
• Interpreter Core: Includes the Lexer (src/lexer.py) and Parser (src/parser.py). These components are the heart of the interpreter and are responsible for processing the input RSS files.
• Auxiliary Modules: Components like logicaMenu.py and helpers.py act as controllers or utility modules that manage the flow (for instance, a menu-driven interface) and provide common functions.
• External Utility – PLY Library: Note that the project contains its own copy (src/ply) of the PLY library. Represent it as an external module or dependency that supports lexing and parsing by providing definitions, token management (ctokens.py, lex.py), and parsing functions (yacc.py).
• Test and Example Artifacts: The pruebas directory holds sample RSS files for testing the interpreter, while the bin directory contains compiled executables for both lexer and parser on Linux and Windows platforms.
Relationships and interactions
• Data Flow: Begin with external input (RSS files) that are fed into the Lexer. The Lexer reads and tokenizes the input, then passes the tokens to the Parser.
• Utility & Control Layer: The logicaMenu module can be depicted as the interface controller that directs whether to invoke the lexer, parser, or additional helper functions (such as obtenerHtml.py) based on user input.
• Testing & Deployment: Show that test inputs (from the pruebas folder) and build outputs (in the bin folder generated via PyInstaller) validate and package the system.
Architectural patterns and design principles
• Layered Architecture: At the bottom, present the PLY library as the foundation. Then illustrate the core lexing and parsing components on top, with the control module (menu logic) and auxiliary functions interfaced with them.
• Portability Considerations: The existence of Windows and Linux executables indicates that platform-agnostic design was considered. Make a note that the system’s input processing and language interpretation do not depend on the underlying OS.
Relevant technologies
• Python 3 is the core language used.
• PyInstaller is used for generating standalone executables.
• PLY (Python Lex-Yacc) is embedded for lexing and parsing capabilities.
• Supporting libraries and scripts (helpers.py, obtenerHtml.py) will be mentioned as part of the utility layer.