Skip to content

Advanced multi-language lexical analyzer with modern GUI. Features tokenization, syntax/semantic analysis, AST & parse tree visualization, frequency charts, and optional AI code tools for Python, JavaScript, Java, and C++

Notifications You must be signed in to change notification settings

Harshitjasuja/Lexical-Analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Multi-Language Lexical Analyzer & Visualizer

An advanced lexical analyzer and visualizer with a modern GUI. Supports Python, JavaScript, Java, and C++. Features tokenization, syntax and semantic analysis, AST and parse tree visualization, token frequency charts, and optional AI-powered code tools.


Table of Contents


Features

  • Multi-Language Support: Analyze code in Python, JavaScript, Java, and C++.
  • Lexical Analysis: Tokenization with error detection and classification.
  • Syntax & Semantic Analysis: Detects syntax and semantic issues specific to each language.
  • AST & Parse Tree Visualization: Interactive visualization of code structure.
  • Token Frequency Charts: Visual analysis of token distribution.
  • LALR(1) Parsing Table Generation: For advanced parsing and educational use.
  • AI/ML Integration: Optional code suggestions and error prediction using machine learning.
  • Modern GUI: CustomTkinter interface with theme and font customization.
  • Export Options: Save analysis results and visualizations.

Topics

  • Lexical analysis
  • Syntax analysis
  • Semantic analysis
  • Multi-language code parsing (Python, JavaScript, Java, C++)
  • Tokenization
  • AST & parse tree visualization
  • Token frequency analysis & charts
  • LALR(1) parsing table generation
  • AI/ML-based code suggestions and error prediction (optional)
  • GUI development with CustomTkinter
  • Theme and font customization
  • Real-time analysis
  • Exporting analysis results and visualizations

Requirements

  • Python 3.8+
  • pip
  • CustomTkinter
  • matplotlib
  • NetworkX
  • (Optional) torch, transformers

See installation notes for more details.


Installation

  1. Clone the repository:
git clone https://github.com/Harshitjasuja/Lexical-Analyzer.git
cd lexical-analyzer
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the application:
python main.py

Usage

  • Launch the application.
  • Select the programming language.
  • Paste or load your source code.
  • Click "Analyze" to view tokens, analysis, AST, parse trees, and charts.
  • Use export options to save your results.

Screenshots

Screenshot 2025-06-21 at 1 00 11 PM Screenshot 2025-06-21 at 1 00 32 PM Screenshot 2025-06-21 at 1 00 51 PM Screenshot 2025-06-21 at 1 01 02 PM Screenshot 2025-06-21 at 1 01 19 PM Screenshot 2025-06-21 at 1 01 26 PM Screenshot 2025-06-21 at 1 01 36 PM Screenshot 2025-06-21 at 1 01 45 PM Screenshot 2025-06-21 at 1 01 55 PM Screenshot 2025-06-21 at 1 02 04 PM Screenshot 2025-06-21 at 1 02 19 PM

Troubleshooting

  • If you encounter issues with GUI rendering, ensure all dependencies are installed and your Python version is compatible.
  • For AI features, verify that torch and transformers are installed.
  • For more help, open an issue or check the Useful Resources.

Team & Contact


License

  • This project is developed as an academic project by the Architechs Team for SE(CD)-VI-T155. All rights reserved.
  • For collaboration, feature requests, or partnership opportunities, please contact the development team.
  • © Team Architechs

Acknowledgments

  • Built for compiler design and code analysis education.
  • Inspired by modern compiler construction and software engineering practices.

Roadmap

  • Multi-language lexical analysis
  • Syntax and semantic analysis
  • AST and parse tree visualization
  • Token frequency charts
  • Expand language support (e.g., Go, Rust)
  • Enhanced AI/ML code suggestion features
  • Web-based interface
  • Plugin system for custom analyzers

Useful Resources


About

Advanced multi-language lexical analyzer with modern GUI. Features tokenization, syntax/semantic analysis, AST & parse tree visualization, frequency charts, and optional AI code tools for Python, JavaScript, Java, and C++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages