Skip to content

A Python-based lexical analyzer for C++ code that tokenizes source code into keywords, identifiers, literals, operators, and more. Includes both a command-line interface (CLI) and a GUI built with Tkinter.

License

Notifications You must be signed in to change notification settings

umer33511/cpp-lexer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C++ Lexical Analyzer

A Python tool that tokenizes C++ code into keywords, identifiers, operators, and more. Includes a GUI.

Quick Start

  git clone https://github.com/yourusername/cpp-lexer.git
  cd cpp-lexer
  python src/lexergui.py  # GUI version
  python src/lexer.py input.cpp  # CLI version

Features

  • Detects 15+ token types (keywords, literals, comments, etc.)

  • Tracks line numbers

  • GUI (Tkinter) and CLI support

Test Files

  • Check Test Files/ for examples (test1.cpp, test2.cpp, test3.cpp).

License: MIT

About

A Python-based lexical analyzer for C++ code that tokenizes source code into keywords, identifiers, literals, operators, and more. Includes both a command-line interface (CLI) and a GUI built with Tkinter.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published