Skip to content

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.

License

Notifications You must be signed in to change notification settings

Denesepro/code-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

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

Item Details
Language Python (100%)
Key Files code.py, index.py
License Apache 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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages