Skip to main content

Lexer - TP1 de Sintaxis

Project description

TP1 Sintaxis - Lexer

Trabajo práctico de análisis léxico con autómatas finitos deterministas.

Instalación

# Instalar desde PyPI
pip install lexer-fdfattor-2025

Uso

# Forma recomendada - Solo importar la función pública
from lexer import core

# Analizar código
codigo = "program ejemplo var x : int begin x = 5; end"
tokens = core.lexer(codigo)
print(tokens)
# También funciona (pero menos recomendado)
import lexer.core

tokens = lexer.core.lexer("program test var x : int")
print(tokens)

Tokens soportados

  • Palabras reservadas: program, var, int, bool, true, false, begin, end, if, else, not, and, or, goto, let
  • Operadores: <=, >=, <>, ==, <, >, =, +, -, *
  • Delimitadores: (, ), ;, :, ., ...
  • Identificadores y números

Desarrollo

# Clonar y configurar
git clone https://github.com/FDFattor/tp1-sintaxis-2025.git
cd tp1-sintaxis-2025
python -m venv .venv
source .venv/bin/activate  # En Windows: .venv\Scripts\activate

# Instalar en modo desarrollo
pip install -e .

# Ejecutar tests
python -m pytest tests.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lexer_fdfattor_2025-1.0.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lexer_fdfattor_2025-1.0.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file lexer_fdfattor_2025-1.0.1.tar.gz.

File metadata

  • Download URL: lexer_fdfattor_2025-1.0.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for lexer_fdfattor_2025-1.0.1.tar.gz
Algorithm Hash digest
SHA256 7112d7059cad16ea6b9bb1cd94d2d84a0eaa9c813a31223aea997349b0d4c837
MD5 8d9730c514033d12c962f738a5f8f284
BLAKE2b-256 db9b7e1d918d4ebca5902b3bdf291cf045b391484ac43dbf7e66364fc931e497

See more details on using hashes here.

File details

Details for the file lexer_fdfattor_2025-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for lexer_fdfattor_2025-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ffbdd22d72de3a5a999dffe1414360e7d25a85ce101b6c7335dc329635550d63
MD5 10bffd50189eeb85a9b1fca2037a4f93
BLAKE2b-256 8f9c8bd046bdbdf3784932a5997045ad4c7cbce2241f38dfb4553ea5c48ad777

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page