Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 551 Bytes

File metadata and controls

21 lines (14 loc) · 551 Bytes

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