Welcome to the Python Lexer and Parser repository! This project is dedicated to creating a lexer and parser for a mini-language using Python, without relying on external libraries like 're'.
This repository contains a custom lexer and parser designed to interpret a simplified programming language. The project is implemented in Python 3.10, leveraging the match case feature. It's an excellent resource for learning about lexical analysis and parsing in compiler design.
- Custom Lexer: A lexer that tokenizes input based on predefined rules, without using regular expressions.
- Custom Parser: A parser that analyzes the tokenized input to understand its structure and syntax.
- Mini-Language Syntax: A defined syntax for a mini-language, including basic programming constructs like variables, conditionals, and loops.
- Error Handling: Custom error handling to manage illegal characters and syntax errors.
- Example Programs: Sample programs in the mini-language to demonstrate the lexer and parser in action.
- Clone the repository to your local machine.
- Ensure you have Python 3.10 installed.
- Navigate to the 'Python Mini-Language' directory.
- Run
main.py
to execute the lexer and parser on the provided examples.
Contributions to the Python Lexer and Parser are welcome! Feel free to fork the repository, make changes, and submit pull requests. If you have ideas for new features or improvements, don't hesitate to open an issue.
This project is licensed under the MIT License - see the LICENSE file for details.