Skip to content

Latest commit

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Code Analyzer: Python Lexical Analyzer 🐍

This repository features a fundamental implementation of a Lexical Analyzer (or Tokenizer) developed entirely in Python. This project serves as a practical showcase for understanding the initial, critical phase of a compiler.

Core Functionality and Purpose

The primary goal of this tool is to perform lexical analysis—the process of reading source code and breaking it down into a sequence of elemental units called tokens.

The analyzer performs the critical task of identifying and categorizing components such as:

  • Keywords: Reserved words in the language (e.g., if, for).
  • Identifiers: Names given to variables, functions, etc.
  • Operators: Mathematical and logical symbols (e.g., +, ==).
  • Literals: Fixed values like numbers and strings.
  • Separators/Punctuation: Symbols used for grouping and termination (e.g., (, ;).

Technology and Licensing

ItemDetails
LanguagePython (100%)
Key Filescode.py, index.py
LicenseApache License 2.0

The code is open-source and released under the Apache-2.0 license, making it freely available for use, modification, and academic study.

About

Lexical Analyzer (Tokenizer) implemented in Python. Performs the initial phase of compilation by breaking source code into tokens and count them and then show you the target code output. Apache-2.0 Licensed.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages