Skip to content

mayarmohamed123/C-language-Scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

C Language Scanner in Python

A Python-based lexical analyzer (scanner) for the C programming language. This scanner identifies and classifies tokens in C code, such as keywords, identifiers, operators, numeric constants, special characters, comments, whitespace, and newlines.

Features

  • Keywords: Detects C language keywords like int, float, if, else, etc.
  • Identifiers: Recognizes valid variable names and identifiers.
  • Operators: Identifies basic C operators (e.g., +, -, *, /).
  • Numeric Constants: Detects both integer and floating-point numbers.
  • Special Characters: Recognizes symbols like ;, {, }, (, ), etc.
  • Comments: Supports single-line (//) and multi-line (/* ... */) comments.
  • Whitespace and Newlines: Identifies spaces, tabs, and newline characters.

Setup Instructions

Prerequisites

  • Python 3.x: Ensure Python 3.x is installed on your computer. Download Python

Installation

  1. Clone this repository:
    git clone https://github.com/mayarmohamed123/C-language-Scanner.git cd C-language-scanner

About

C Language Scanner

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages