https://github.com/pungrumpy/lexical-analyzer
🫀 Break down regular expression
https://github.com/pungrumpy/lexical-analyzer
java jflex lexical-analysis lexical-analyzer
Last synced: 24 days ago
JSON representation
🫀 Break down regular expression
- Host: GitHub
- URL: https://github.com/pungrumpy/lexical-analyzer
- Owner: PunGrumpy
- Created: 2024-10-13T14:50:25.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-10-13T14:53:56.000Z (12 months ago)
- Last Synced: 2025-08-29T08:41:14.897Z (about 1 month ago)
- Topics: java, jflex, lexical-analysis, lexical-analyzer
- Language: Lex
- Homepage:
- Size: 2.93 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🔍 Lexical Analyzer Project
Welcome to our Lexical Analyzer project! This tool helps break down source code into meaningful tokens. 🚀
## ✨ Features
Our Lexical Analyzer can identify:
- ➕ Operators (+, -, \*, /, =, >, >=, <, <=, ==, ++, --)
- 🎭 Parentheses and semicolons
- 🔑 Keywords (if, then, else, endif, while, do, endwhile, print, newline, read)
- 🔢 Integers
- 🆔 Identifiers
- 📜 Strings
- 💬 Comments (both single-line and multi-line)## 🛠 Prerequisites
Before you begin, ensure you have met the following requirements:
- ☕ Java Development Kit (JDK)
- 🦊 JFlex## 🚀 Installation
1. Clone the repository:
```
git clone https://github.com/PunGrumpy/lexical-analyzer.git
```
2. Navigate to the project directory:
```
cd lexical-analyzer
```## 🏃♂️ Usage
1. Generate the Lexer Java file:
```
jflex src/Lexer.flex
```2. Compile the Java files:
```
java src/*.java
```3. Run the analyzer:
```
java -cp src Main
```## 📁 Project Structure
```
project_root/
│
├── src/
│ ├── Lexer.flex 🧩 JFlex specification file
│ └── Main.java 🎯 Main application file
│
├── input_1.txt 📄 Sample input file
├── input_2.txt 📄 Sample input file
├── input_3.txt 📄 Sample input file
└── .gitignore 🙈 Git ignore file
```## 🤝 Contributing
Contributions are welcome! Here's how you can help:
1. 🍴 Fork the project
2. 🔧 Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. 💾 Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. 📤 Push to the branch (`git push origin feature/AmazingFeature`)
5. 🔀 Open a pull request---
Happy coding! 💻✨